mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Move option category hashes into the widget prototype.
This commit is contained in:
parent
da185a6c15
commit
d6f85644d4
37
ui/jquery.ui.dialog.js
vendored
37
ui/jquery.ui.dialog.js
vendored
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user