aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-09-17 09:30:03 -0400
committerScott González <scott.gonzalez@gmail.com>2013-10-24 09:19:41 -0400
commitd6f85644d4bcf9b53e83cb7f0e4ed4716726ffc3 (patch)
treebc7e9786e1525b83396ec6615e23d1d588dbaa14 /ui
parentda185a6c1553c18ec367d8b0210519d04f97a534 (diff)
downloadjquery-ui-d6f85644d4bcf9b53e83cb7f0e4ed4716726ffc3.tar.gz
jquery-ui-d6f85644d4bcf9b53e83cb7f0e4ed4716726ffc3.zip
Dialog: Move option category hashes into the widget prototype.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.dialog.js37
1 files changed, 19 insertions, 18 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index cbae739bf..c5bd42ab5 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -19,22 +19,6 @@
*/
(function( $, undefined ) {
-var sizeRelatedOptions = {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
- resizableRelatedOptions = {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- };
-
$.widget( "ui.dialog", {
version: "@VERSION",
options: {
@@ -83,6 +67,23 @@ $.widget( "ui.dialog", {
resizeStop: null
},
+ sizeRelatedOptions: {
+ buttons: true,
+ height: true,
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true,
+ width: true
+ },
+
+ resizableRelatedOptions: {
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true
+ },
+
_create: function() {
this.originalCss = {
display: this.element[0].style.display,
@@ -579,10 +580,10 @@ $.widget( "ui.dialog", {
$.each( options, function( key, value ) {
that._setOption( key, value );
- if ( key in sizeRelatedOptions ) {
+ if ( key in that.sizeRelatedOptions ) {
resize = true;
}
- if ( key in resizableRelatedOptions ) {
+ if ( key in that.resizableRelatedOptions ) {
resizableOptions[ key ] = value;
}
});