Permalink
Browse files

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

  • Loading branch information...
normann committed Apr 3, 2012
1 parent 5c3c3cb commit f1e0951483c5345b7fa12630fde324c79b0ad962
Showing with 8 additions and 4 deletions.
  1. +5 −4 admin/javascript/LeftAndMain.js
  2. +3 −0 admin/javascript/ssui.core.js
@@ -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.
*/
@@ -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

0 comments on commit f1e0951

Please sign in to comment.