mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Fixed whitespace.
This commit is contained in:
parent
2366a81740
commit
4ad7154bee
19
ui/jquery.ui.dialog.js
vendored
19
ui/jquery.ui.dialog.js
vendored
@ -59,6 +59,7 @@ $.widget("ui.dialog", {
|
|||||||
width: 300,
|
width: 300,
|
||||||
zIndex: 1000
|
zIndex: 1000
|
||||||
},
|
},
|
||||||
|
|
||||||
_create: function() {
|
_create: function() {
|
||||||
this.originalTitle = this.element.attr('title');
|
this.originalTitle = this.element.attr('title');
|
||||||
// #5742 - .attr() might return a DOMElement
|
// #5742 - .attr() might return a DOMElement
|
||||||
@ -177,6 +178,7 @@ $.widget("ui.dialog", {
|
|||||||
uiDialog.bgiframe();
|
uiDialog.bgiframe();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
if ( this.options.autoOpen ) {
|
if ( this.options.autoOpen ) {
|
||||||
this.open();
|
this.open();
|
||||||
@ -203,7 +205,7 @@ $.widget("ui.dialog", {
|
|||||||
|
|
||||||
return self;
|
return self;
|
||||||
},
|
},
|
||||||
|
|
||||||
widget: function() {
|
widget: function() {
|
||||||
return this.uiDialog;
|
return this.uiDialog;
|
||||||
},
|
},
|
||||||
@ -258,12 +260,12 @@ $.widget("ui.dialog", {
|
|||||||
var self = this,
|
var self = this,
|
||||||
options = self.options,
|
options = self.options,
|
||||||
saveScroll;
|
saveScroll;
|
||||||
|
|
||||||
if ((options.modal && !force) ||
|
if ((options.modal && !force) ||
|
||||||
(!options.stack && !options.modal)) {
|
(!options.stack && !options.modal)) {
|
||||||
return self._trigger('focus', event);
|
return self._trigger('focus', event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.zIndex > $.ui.dialog.maxZ) {
|
if (options.zIndex > $.ui.dialog.maxZ) {
|
||||||
$.ui.dialog.maxZ = options.zIndex;
|
$.ui.dialog.maxZ = options.zIndex;
|
||||||
}
|
}
|
||||||
@ -305,11 +307,11 @@ $.widget("ui.dialog", {
|
|||||||
if (event.keyCode !== $.ui.keyCode.TAB) {
|
if (event.keyCode !== $.ui.keyCode.TAB) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tabbables = $(':tabbable', this),
|
var tabbables = $(':tabbable', this),
|
||||||
first = tabbables.filter(':first'),
|
first = tabbables.filter(':first'),
|
||||||
last = tabbables.filter(':last');
|
last = tabbables.filter(':last');
|
||||||
|
|
||||||
if (event.target === last[0] && !event.shiftKey) {
|
if (event.target === last[0] && !event.shiftKey) {
|
||||||
first.focus(1);
|
first.focus(1);
|
||||||
return false;
|
return false;
|
||||||
@ -461,7 +463,6 @@ $.widget("ui.dialog", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
_position: function(position) {
|
_position: function(position) {
|
||||||
var myAt = [],
|
var myAt = [],
|
||||||
offset = [0, 0],
|
offset = [0, 0],
|
||||||
@ -484,14 +485,14 @@ $.widget("ui.dialog", {
|
|||||||
myAt[i] = offsetPosition;
|
myAt[i] = offsetPosition;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
position = {
|
position = {
|
||||||
my: myAt.join(" "),
|
my: myAt.join(" "),
|
||||||
at: myAt.join(" "),
|
at: myAt.join(" "),
|
||||||
offset: offset.join(" ")
|
offset: offset.join(" ")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
position = $.extend({}, $.ui.dialog.prototype.options.position, position);
|
position = $.extend({}, $.ui.dialog.prototype.options.position, position);
|
||||||
} else {
|
} else {
|
||||||
position = $.ui.dialog.prototype.options.position;
|
position = $.ui.dialog.prototype.options.position;
|
||||||
@ -516,7 +517,7 @@ $.widget("ui.dialog", {
|
|||||||
uiDialog = self.uiDialog,
|
uiDialog = self.uiDialog,
|
||||||
isResizable = uiDialog.is(':data(resizable)'),
|
isResizable = uiDialog.is(':data(resizable)'),
|
||||||
resize = false;
|
resize = false;
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
//handling of deprecated beforeclose (vs beforeClose) option
|
//handling of deprecated beforeclose (vs beforeClose) option
|
||||||
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
|
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
|
||||||
|
Loading…
Reference in New Issue
Block a user