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,18 +382,19 @@ jQuery.noConflict();
|
|||||||
this._super();
|
this._super();
|
||||||
|
|
||||||
var self = this, id = 'ss-ui-dialog-' + this.getUUID();
|
var self = this, id = 'ss-ui-dialog-' + this.getUUID();
|
||||||
|
|
||||||
var dialog = $('#' + id);
|
var dialog = $('#' + id);
|
||||||
if(!dialog.length) {
|
if(!dialog.length) {
|
||||||
dialog = $('<div class="ss-ui-dialog" id="' + id + '" />');
|
dialog = $('<div class="ss-ui-dialog" id="' + id + '" />');
|
||||||
$('body').append(dialog);
|
$('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;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add styling to all contained buttons, and create buttonsets if required.
|
* Add styling to all contained buttons, and create buttonsets if required.
|
||||||
*/
|
*/
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
// Custom properties
|
// Custom properties
|
||||||
iframeUrl: '',
|
iframeUrl: '',
|
||||||
reloadOnOpen: true,
|
reloadOnOpen: true,
|
||||||
|
dialogExtraClass: '',
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
width: '80%',
|
width: '80%',
|
||||||
@ -78,6 +79,8 @@
|
|||||||
self._resizeIframe();
|
self._resizeIframe();
|
||||||
self.uiDialog.removeClass('loading');
|
self.uiDialog.removeClass('loading');
|
||||||
}).hide();
|
}).hide();
|
||||||
|
|
||||||
|
if(this.options.dialogExtraClass) this.uiDialog.addClass(this.options.dialogExtraClass);
|
||||||
this.element.append(iframe);
|
this.element.append(iframe);
|
||||||
|
|
||||||
// Let the iframe handle its scrolling
|
// Let the iframe handle its scrolling
|
||||||
|
Loading…
Reference in New Issue
Block a user