Created
December 10, 2011 11:24
-
-
Save jmav/1454952 to your computer and use it in GitHub Desktop.
Revisions
-
jmav created this gist
Dec 10, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ (function ($) { var _init = $.ui.dialog.prototype._init; //Custom Dialog Init $.ui.dialog.prototype._init = function () { var self = this; // set max size of dialog var offSet = 20; var wWidth = $(window).width() - offSet; var wHeight = $(window).height() - offSet; if(self.options.height > wHeight ){ self.options.height = wHeight ; self.options.maxHeight = wHeight ; }; if(self.options.width >= wWidth){ self.options.width = wWidth ; self.options.maxWidth = wWidth ; }; _init.apply(this, arguments); }; })(jQuery);