Skip to content

Commit cfe044b

Browse files
committed
Dialog: Refactor uiDialogTitlebar variable, use this.uiDialogTitlebar instead. Wasn't needed anymore (previous refactorings).
1 parent 5bd8c1a commit cfe044b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ui/jquery.ui.dialog.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ $.widget("ui.dialog", {
9393
var that = this,
9494
options = this.options,
9595
title = options.title || " ",
96-
// TODO should use this.uiDialogTitlebar instead
97-
uiDialogTitlebar,
9896
uiDialogTitle,
9997
uiDialogButtonPane;
10098

@@ -124,11 +122,11 @@ $.widget("ui.dialog", {
124122
.addClass( "ui-dialog-content ui-widget-content" )
125123
.appendTo( this.uiDialog );
126124

127-
// TODO extract this and the next three into a _createTitlebar method
128-
uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
125+
// TODO extract this and the next two into a _createTitlebar method
126+
this.uiDialogTitlebar = $( "<div>" )
129127
.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
130128
.prependTo( this.uiDialog );
131-
this._on( uiDialogTitlebar, {
129+
this._on( this.uiDialogTitlebar, {
132130
mousedown: function() {
133131
// TODO call _focusTabbable or _keepFocus
134132
// Dialog isn't getting focus when dragging (#8063)
@@ -149,13 +147,13 @@ $.widget("ui.dialog", {
149147
event.preventDefault();
150148
that.close( event );
151149
})
152-
.appendTo( uiDialogTitlebar );
150+
.appendTo( this.uiDialogTitlebar );
153151

154152
uiDialogTitle = $( "<span>" )
155153
.uniqueId()
156154
.addClass( "ui-dialog-title" )
157155
.html( title )
158-
.prependTo( uiDialogTitlebar );
156+
.prependTo( this.uiDialogTitlebar );
159157

160158
// TODO extract this one and the next into a _createButtonPane method
161159
uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )

0 commit comments

Comments
 (0)