ENHANCEMENT: allow each dialog pop to have their own extra class.

This commit is contained in:
Normann Lou 2012-04-03 12:48:43 +12:00
parent 5c3c3cb347
commit f1e0951483
2 changed files with 8 additions and 4 deletions

View File

@ -382,18 +382,19 @@ 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;
}
});
/**
* Add styling to all contained buttons, and create buttonsets if required.
*/

View File

@ -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