Dialog: Removed Opera-specific dimension code (not needed with jQuery 1.3).

This commit is contained in:
Scott González 2009-01-14 00:32:12 +00:00
parent 8e5cbf6059
commit 3741f4ee04

View File

@ -368,13 +368,11 @@ $.widget("ui.dialog", {
pTop += 0; pTop += 0;
break; break;
case 'bottom': case 'bottom':
// Opera check fixes #3564, can go away with jQuery 1.3 pTop += wnd.height() - this.uiDialog.outerHeight();
pTop += ($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.outerHeight();
break; break;
default: default:
case 'middle': case 'middle':
// Opera check fixes #3564, can go away with jQuery 1.3 pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2;
pTop += (($.browser.opera ? window.innerHeight : wnd.height()) - this.uiDialog.outerHeight()) / 2;
} }
} }
@ -578,12 +576,6 @@ $.extend($.ui.dialog.overlay, {
} else { } else {
return scrollHeight + 'px'; return scrollHeight + 'px';
} }
// handle Opera
} else if ($.browser.opera) {
return Math.max(
window.innerHeight,
$(document).height()
) + 'px';
// handle "good" browsers // handle "good" browsers
} else { } else {
return $(document).height() + 'px'; return $(document).height() + 'px';
@ -607,12 +599,6 @@ $.extend($.ui.dialog.overlay, {
} else { } else {
return scrollWidth + 'px'; return scrollWidth + 'px';
} }
// handle Opera
} else if ($.browser.opera) {
return Math.max(
window.innerWidth,
$(document).width()
) + 'px';
// handle "good" browsers // handle "good" browsers
} else { } else {
return $(document).width() + 'px'; return $(document).width() + 'px';