mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Refactor uiDialogTitlebar variable, use this.uiDialogTitlebar instead. Wasn't needed anymore (previous refactorings).
This commit is contained in:
parent
7a0353500a
commit
f0acaac230
12
ui/jquery.ui.dialog.js
vendored
12
ui/jquery.ui.dialog.js
vendored
@ -93,8 +93,6 @@ $.widget("ui.dialog", {
|
|||||||
var that = this,
|
var that = this,
|
||||||
options = this.options,
|
options = this.options,
|
||||||
title = options.title || " ",
|
title = options.title || " ",
|
||||||
// TODO should use this.uiDialogTitlebar instead
|
|
||||||
uiDialogTitlebar,
|
|
||||||
uiDialogTitle,
|
uiDialogTitle,
|
||||||
uiDialogButtonPane;
|
uiDialogButtonPane;
|
||||||
|
|
||||||
@ -124,11 +122,11 @@ $.widget("ui.dialog", {
|
|||||||
.addClass( "ui-dialog-content ui-widget-content" )
|
.addClass( "ui-dialog-content ui-widget-content" )
|
||||||
.appendTo( this.uiDialog );
|
.appendTo( this.uiDialog );
|
||||||
|
|
||||||
// TODO extract this and the next three into a _createTitlebar method
|
// TODO extract this and the next two into a _createTitlebar method
|
||||||
uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
|
this.uiDialogTitlebar = $( "<div>" )
|
||||||
.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
|
.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
|
||||||
.prependTo( this.uiDialog );
|
.prependTo( this.uiDialog );
|
||||||
this._on( uiDialogTitlebar, {
|
this._on( this.uiDialogTitlebar, {
|
||||||
mousedown: function() {
|
mousedown: function() {
|
||||||
// TODO call _focusTabbable or _keepFocus
|
// TODO call _focusTabbable or _keepFocus
|
||||||
// Dialog isn't getting focus when dragging (#8063)
|
// Dialog isn't getting focus when dragging (#8063)
|
||||||
@ -149,13 +147,13 @@ $.widget("ui.dialog", {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
that.close( event );
|
that.close( event );
|
||||||
})
|
})
|
||||||
.appendTo( uiDialogTitlebar );
|
.appendTo( this.uiDialogTitlebar );
|
||||||
|
|
||||||
uiDialogTitle = $( "<span>" )
|
uiDialogTitle = $( "<span>" )
|
||||||
.uniqueId()
|
.uniqueId()
|
||||||
.addClass( "ui-dialog-title" )
|
.addClass( "ui-dialog-title" )
|
||||||
.html( title )
|
.html( title )
|
||||||
.prependTo( uiDialogTitlebar );
|
.prependTo( this.uiDialogTitlebar );
|
||||||
|
|
||||||
// TODO extract this one and the next into a _createButtonPane method
|
// TODO extract this one and the next into a _createButtonPane method
|
||||||
uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
|
uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user