Dialog: Removed $.ui.dialog.topMostDialog - added for performance improvement, but not needed and could cause problems.

This commit is contained in:
Scott González 2009-02-19 02:35:19 +00:00
parent 3c7e1b3ff9
commit dcbd427cdf

View File

@ -177,8 +177,7 @@ $.widget("ui.dialog", {
// position on open // position on open
moveToTop: function(force, event) { moveToTop: function(force, event) {
if ($.ui.dialog.topMostDialog == this if ((this.options.modal && !force)
|| (this.options.modal && !force)
|| (!this.options.stack && !this.options.modal)) { || (!this.options.stack && !this.options.modal)) {
return this._trigger('focus', event); return this._trigger('focus', event);
} }
@ -186,7 +185,6 @@ $.widget("ui.dialog", {
if (this.options.zIndex > $.ui.dialog.maxZ) { if (this.options.zIndex > $.ui.dialog.maxZ) {
$.ui.dialog.maxZ = this.options.zIndex; $.ui.dialog.maxZ = this.options.zIndex;
} }
$.ui.dialog.topMostDialog = this;
(this.overlay && this.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = ++$.ui.dialog.maxZ)); (this.overlay && this.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = ++$.ui.dialog.maxZ));
//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed. //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
@ -503,7 +501,6 @@ $.extend($.ui.dialog, {
uuid: 0, uuid: 0,
maxZ: 0, maxZ: 0,
topMostDialog: null,
getTitleId: function($el) { getTitleId: function($el) {
return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid); return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid);