aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.dialog.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-15 23:23:25 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-26 10:28:22 +0100
commit4c9caa816906d53b989c65bd24c56147517eee82 (patch)
tree95714f00ce6a0bd52a1558adeb9afdcc0697128c /ui/jquery.ui.dialog.js
parent1d6ce644e0c7ba9b4b53b16aea4a91b2b24cc05c (diff)
downloadjquery-ui-4c9caa816906d53b989c65bd24c56147517eee82.tar.gz
jquery-ui-4c9caa816906d53b989c65bd24c56147517eee82.zip
Dialog: Extract button pane creation into _createButtonPane
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r--ui/jquery.ui.dialog.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index d4f03af60..79aae52ab 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -123,16 +123,8 @@ $.widget("ui.dialog", {
.addClass( "ui-dialog-content ui-widget-content" )
.appendTo( this.uiDialog );
- this._createTitlebar();
-
- // TODO extract this one and the next into a _createButtonPane method
- uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
-
- ( this.uiButtonSet = $( "<div>" ) )
- .addClass( "ui-dialog-buttonset" )
- .appendTo( uiDialogButtonPane );
-
+ this._createTitlebar();
+ this._createButtonPane();
// TODO move into _createWrapper
// We assume that any existing aria-describedby attribute means
@@ -151,9 +143,6 @@ $.widget("ui.dialog", {
this._makeResizable();
}
- // TODO merge with _createButtonPane?
- this._createButtons();
-
this._isOpen = false;
// prevent tabbing out of dialogs
@@ -365,6 +354,17 @@ $.widget("ui.dialog", {
});
},
+ _createButtonPane: function() {
+ var uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
+ .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
+
+ this.uiButtonSet = $( "<div>" )
+ .addClass( "ui-dialog-buttonset" )
+ .appendTo( uiDialogButtonPane );
+
+ this._createButtons();
+ },
+
_createButtons: function() {
var that = this,
buttons = this.options.buttons;