Skip to content

Commit d6f8564

Browse files
committed
Dialog: Move option category hashes into the widget prototype.
1 parent da185a6 commit d6f8564

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

ui/jquery.ui.dialog.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,6 @@
1919
*/
2020
(function( $, undefined ) {
2121

22-
var sizeRelatedOptions = {
23-
buttons: true,
24-
height: true,
25-
maxHeight: true,
26-
maxWidth: true,
27-
minHeight: true,
28-
minWidth: true,
29-
width: true
30-
},
31-
resizableRelatedOptions = {
32-
maxHeight: true,
33-
maxWidth: true,
34-
minHeight: true,
35-
minWidth: true
36-
};
37-
3822
$.widget( "ui.dialog", {
3923
version: "@VERSION",
4024
options: {
@@ -83,6 +67,23 @@ $.widget( "ui.dialog", {
8367
resizeStop: null
8468
},
8569

70+
sizeRelatedOptions: {
71+
buttons: true,
72+
height: true,
73+
maxHeight: true,
74+
maxWidth: true,
75+
minHeight: true,
76+
minWidth: true,
77+
width: true
78+
},
79+
80+
resizableRelatedOptions: {
81+
maxHeight: true,
82+
maxWidth: true,
83+
minHeight: true,
84+
minWidth: true
85+
},
86+
8687
_create: function() {
8788
this.originalCss = {
8889
display: this.element[0].style.display,
@@ -579,10 +580,10 @@ $.widget( "ui.dialog", {
579580
$.each( options, function( key, value ) {
580581
that._setOption( key, value );
581582

582-
if ( key in sizeRelatedOptions ) {
583+
if ( key in that.sizeRelatedOptions ) {
583584
resize = true;
584585
}
585-
if ( key in resizableRelatedOptions ) {
586+
if ( key in that.resizableRelatedOptions ) {
586587
resizableOptions[ key ] = value;
587588
}
588589
});

0 commit comments

Comments
 (0)