mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Fix yoda-if, remove unnecessary TODOs; add missing callbacks to commons test
This commit is contained in:
parent
2062a18db6
commit
4632780435
@ -27,6 +27,16 @@ TestHelpers.commonWidgetTests( "dialog", {
|
||||
width: 300,
|
||||
|
||||
// callbacks
|
||||
create: null
|
||||
beforeClose: null,
|
||||
close: null,
|
||||
create: null,
|
||||
drag: null,
|
||||
dragStart: null,
|
||||
dragStop: null,
|
||||
focus: null,
|
||||
open: null,
|
||||
resize: null,
|
||||
resizeStart: null,
|
||||
resizeStop: null
|
||||
}
|
||||
});
|
||||
|
5
ui/jquery.ui.dialog.js
vendored
5
ui/jquery.ui.dialog.js
vendored
@ -94,7 +94,6 @@ $.widget("ui.dialog", {
|
||||
parent: this.element.parent(),
|
||||
index: this.element.parent().children().index( this.element )
|
||||
};
|
||||
// TODO don't overwrite options
|
||||
this.options.title = this.options.title || this.originalTitle;
|
||||
var that = this,
|
||||
options = this.options,
|
||||
@ -276,8 +275,7 @@ $.widget("ui.dialog", {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO fix yoda-if
|
||||
if ( false === this._trigger( "beforeClose", event ) ) {
|
||||
if ( this._trigger( "beforeClose", event ) === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -294,7 +292,6 @@ $.widget("ui.dialog", {
|
||||
$( this.document[ 0 ].activeElement ).blur();
|
||||
}
|
||||
|
||||
// TODO shouldn't _hide restore `this` to the instance? would also help tooltip
|
||||
this._hide( this.uiDialog, this.options.hide, function() {
|
||||
that._trigger( "close", event );
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user