Search and Top Navigation
Ticket #4679: fixForTicket4679_2.diff
File fixForTicket4679_2.diff, 0.7 KB (added by wewals, July 22, 2009 09:44PM UTC)
Second attempt (this one saves the position relative to the window)
Index: ui/ui.dialog.js
===================================================================
--- ui/ui.dialog.js (revision 2935)
+++ ui/ui.dialog.js (working copy)
@@ -308,6 +308,7 @@
_makeDraggable: function() {
var self = this,
options = self.options,
+ doc = $(document),
heightBeforeDrag;
self.uiDialog.draggable({
@@ -322,7 +323,8 @@
drag: function(event) {
self._trigger('drag', event);
},
- stop: function(event) {
+ stop: function(event, ui) {
+ options.position = [ui.position.left - doc.scrollLeft(), ui.position.top - doc.scrollTop()];
$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
self._trigger('dragStop', event);
$.ui.dialog.overlay.resize();
Download in other formats:
Original Format
File fixForTicket4679_2.diff, 0.7 KB (added by wewals, July 22, 2009 09:44PM UTC)
Second attempt (this one saves the position relative to the window)
Index: ui/ui.dialog.js
===================================================================
--- ui/ui.dialog.js (revision 2935)
+++ ui/ui.dialog.js (working copy)
@@ -308,6 +308,7 @@
_makeDraggable: function() {
var self = this,
options = self.options,
+ doc = $(document),
heightBeforeDrag;
self.uiDialog.draggable({
@@ -322,7 +323,8 @@
drag: function(event) {
self._trigger('drag', event);
},
- stop: function(event) {
+ stop: function(event, ui) {
+ options.position = [ui.position.left - doc.scrollLeft(), ui.position.top - doc.scrollTop()];
$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
self._trigger('dragStop', event);
$.ui.dialog.overlay.resize();