diff options
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r-- | ui/jquery.ui.dialog.js | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index e234464ad..f2e3f945f 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -88,6 +88,11 @@ $.widget("ui.dialog", { options = this.options, title = options.title || " ", + uiDialog, + uiDialogTitlebar, + uiDialogTitlebarClose, + uiDialogTitle, + uiDialogButtonPane; uiDialog = ( this.uiDialog = $( "<div>" ) ) .addClass( uiDialogClasses + options.dialogClass ) @@ -108,13 +113,13 @@ $.widget("ui.dialog", { .mousedown(function( event ) { that.moveToTop( false, event ); }) - .appendTo( "body" ), + .appendTo( "body" ); - uiDialogContent = this.element + this.element .show() .removeAttr( "title" ) .addClass( "ui-dialog-content ui-widget-content" ) - .appendTo( uiDialog ), + .appendTo( uiDialog ); uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) ) .addClass( "ui-dialog-titlebar ui-widget-header " + @@ -123,7 +128,7 @@ $.widget("ui.dialog", { // Dialog isn't getting focus when dragging (#8063) uiDialog.focus(); }) - .prependTo( uiDialog ), + .prependTo( uiDialog ); uiDialogTitlebarClose = $( "<a href='#'></a>" ) .addClass( "ui-dialog-titlebar-close ui-corner-all" ) @@ -132,23 +137,23 @@ $.widget("ui.dialog", { event.preventDefault(); that.close( event ); }) - .appendTo( uiDialogTitlebar ), + .appendTo( uiDialogTitlebar ); - uiDialogTitlebarCloseText = ( this.uiDialogTitlebarCloseText = $( "<span>" ) ) + ( this.uiDialogTitlebarCloseText = $( "<span>" ) ) .addClass( "ui-icon ui-icon-closethick" ) .text( options.closeText ) - .appendTo( uiDialogTitlebarClose ), + .appendTo( uiDialogTitlebarClose ); uiDialogTitle = $( "<span>" ) .uniqueId() .addClass( "ui-dialog-title" ) .html( title ) - .prependTo( uiDialogTitlebar ), + .prependTo( uiDialogTitlebar ); uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) ) - .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ), + .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); - uiButtonSet = ( this.uiButtonSet = $( "<div>" ) ) + ( this.uiButtonSet = $( "<div>" ) ) .addClass( "ui-dialog-buttonset" ) .appendTo( uiDialogButtonPane ); @@ -350,8 +355,7 @@ $.widget("ui.dialog", { }, _createButtons: function( buttons ) { - var uiDialogButtonPane, uiButtonSet, - that = this, + var that = this, hasButtons = false; // if we already have a button pane, remove it |