aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.dialog.js
diff options
context:
space:
mode:
authorkborchers <kris.borchers@gmail.com>2011-12-01 12:53:35 -0600
committerkborchers <kris.borchers@gmail.com>2011-12-01 12:53:35 -0600
commit490dc4d36b6a0bf1dac5d8a9ba86aef7c9c27ee9 (patch)
treee65043eb657d9232888dcc1435bdd6907f990d15 /ui/jquery.ui.dialog.js
parente206e549352684a4c30ad53e38c5544599328f2d (diff)
parentce7918fc73c161ab237f052bad070e34250526be (diff)
downloadjquery-ui-490dc4d36b6a0bf1dac5d8a9ba86aef7c9c27ee9.tar.gz
jquery-ui-490dc4d36b6a0bf1dac5d8a9ba86aef7c9c27ee9.zip
Merge branch 'master' into menubar_otherStructures
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r--ui/jquery.ui.dialog.js25
1 files changed, 12 insertions, 13 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 46320426a..3d7638667 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -169,7 +169,7 @@ $.widget("ui.dialog", {
_destroy: function() {
var self = this;
-
+
if ( self.overlay ) {
self.overlay.destroy();
}
@@ -196,7 +196,7 @@ $.widget("ui.dialog", {
var self = this,
maxZ, thisZ;
-
+
if ( false === self._trigger( "beforeClose", event ) ) {
return;
}
@@ -372,8 +372,7 @@ $.widget("ui.dialog", {
_makeDraggable: function() {
var self = this,
- options = self.options,
- doc = $( document );
+ options = self.options;
function filteredUi( ui ) {
return {
@@ -396,8 +395,8 @@ $.widget("ui.dialog", {
},
stop: function( event, ui ) {
options.position = [
- ui.position.left - doc.scrollLeft(),
- ui.position.top - doc.scrollTop()
+ ui.position.left - self.document.scrollLeft(),
+ ui.position.top - self.document.scrollTop()
];
$( this )
.removeClass( "ui-dialog-dragging" );
@@ -494,7 +493,7 @@ $.widget("ui.dialog", {
at: myAt.join( " " ),
offset: offset.join( " " )
};
- }
+ }
position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
} else {
@@ -519,7 +518,7 @@ $.widget("ui.dialog", {
$.each( options, function( key, value ) {
self._setOption( key, value );
-
+
if ( key in sizeRelatedOptions ) {
resize = true;
}
@@ -565,7 +564,7 @@ $.widget("ui.dialog", {
if ( isDraggable && !value ) {
uiDialog.draggable( "destroy" );
}
-
+
if ( !isDraggable && value ) {
self._makeDraggable();
}
@@ -597,7 +596,7 @@ $.widget("ui.dialog", {
break;
}
- this._super( "_setOption", key, value );
+ this._super( key, value );
},
_size: function() {
@@ -626,9 +625,9 @@ $.widget("ui.dialog", {
height: "auto",
width: options.width
})
- .height();
+ .outerHeight();
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
-
+
if ( options.height === "auto" ) {
// only needed for IE6 support
if ( $.support.minHeight ) {
@@ -705,7 +704,7 @@ $.extend( $.ui.dialog.overlay, {
$( document ).bind( "keydown.dialog-overlay", function( event ) {
if ( dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
event.keyCode === $.ui.keyCode.ESCAPE ) {
-
+
dialog.close( event );
event.preventDefault();
}