Skip to content

Instantly share code, notes, and snippets.

@juareznjunior
Last active August 29, 2015 14:08
Show Gist options
  • Save juareznjunior/c1076171658e9be21e2b to your computer and use it in GitHub Desktop.
Save juareznjunior/c1076171658e9be21e2b to your computer and use it in GitHub Desktop.
jQuery UI Dialog Prototype
/**
* prototype jQuery UI Dialog
* @param d jQuery
* @author: Juarez G. N. Junior
*/
;(function(d){
// options
d.extend(d.ui.dialog.prototype.options,{
autoOpen : false
,modal : true
,draggable:false
,resizable:false
});
d.widget('ui.dialog', d.ui.dialog, {
_title: function( title ) {
title.html( !this.options.title ? " " : this.options.title );
}
,superCreateOverlay : d.ui.dialog.prototype._createOverlay
,superDestroyOverlay: d.ui.dialog.prototype._destroyOverlay
,_createOverlay: function() {
this.superCreateOverlay.apply(this,arguments);
$(this._appendTo()).addClass('ui-widget-overlay-overflow-hidden');
}
,_destroyOverlay: function() {
this.superDestroyOverlay.apply(this,arguments);
$(this._appendTo()).removeClass('ui-widget-overlay-overflow-hidden');
}
});
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment