mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-04 23:28:41 +02:00
ENHANCEMENT: allow each dialog pop to have their own extra class.
This commit is contained in:
parent
5c3c3cb347
commit
f1e0951483
@ -382,14 +382,15 @@ jQuery.noConflict();
|
||||
this._super();
|
||||
|
||||
var self = this, id = 'ss-ui-dialog-' + this.getUUID();
|
||||
|
||||
var dialog = $('#' + id);
|
||||
if(!dialog.length) {
|
||||
dialog = $('<div class="ss-ui-dialog" id="' + id + '" />');
|
||||
$('body').append(dialog);
|
||||
}
|
||||
|
||||
dialog.ssdialog({iframeUrl: this.attr('href'), autoOpen: true});
|
||||
var extraClass = this.data('popupclass')?this.data('popupclass'):'';
|
||||
|
||||
dialog.ssdialog({iframeUrl: this.attr('href'), autoOpen: true, dialogExtraClass: extraClass});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -55,6 +55,7 @@
|
||||
// Custom properties
|
||||
iframeUrl: '',
|
||||
reloadOnOpen: true,
|
||||
dialogExtraClass: '',
|
||||
|
||||
// Defaults
|
||||
width: '80%',
|
||||
@ -78,6 +79,8 @@
|
||||
self._resizeIframe();
|
||||
self.uiDialog.removeClass('loading');
|
||||
}).hide();
|
||||
|
||||
if(this.options.dialogExtraClass) this.uiDialog.addClass(this.options.dialogExtraClass);
|
||||
this.element.append(iframe);
|
||||
|
||||
// Let the iframe handle its scrolling
|
||||
|
Loading…
Reference in New Issue
Block a user