r2605 - Merged r2431 to 1.7.2 (fixes #4309 - Opening multiple modal dialogs causes access problem...

r2605 - Merged r2431 to 1.7.2 (fixes #4309 - Opening multiple modal dialogs causes access problem...


Author: rdworth
Date: Tue May 26 03:54:56 2009
New Revision: 2605
Modified:
branches/1.7.2/ (props changed)
branches/1.7.2/tests/visual/accordion/ (props changed)
branches/1.7.2/tests/visual/datepicker/ (props changed)
branches/1.7.2/tests/visual/resizable/ (props changed)
branches/1.7.2/tests/visual/selectable/ (props changed)
branches/1.7.2/tests/visual/slider/ (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-ro.js (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-sq.js (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-uk.js (props changed)
branches/1.7.2/ui/ui.accordion.js (props changed)
branches/1.7.2/ui/ui.datepicker.js (props changed)
branches/1.7.2/ui/ui.dialog.js
branches/1.7.2/ui/ui.droppable.js (props changed)
branches/1.7.2/ui/ui.resizable.js (props changed)
branches/1.7.2/ui/ui.selectable.js (props changed)
branches/1.7.2/ui/ui.slider.js (props changed)
Log:
Merged r2431 to 1.7.2 (fixes #4309 - Opening multiple modal dialogs causes
access problems to inputs)
Modified: branches/1.7.2/ui/ui.dialog.js
==============================================================================
--- branches/1.7.2/ui/ui.dialog.js    (original)
+++ branches/1.7.2/ui/ui.dialog.js    Tue May 26 03:54:56 2009
@@ -172,6 +172,17 @@
        $.ui.dialog.overlay.resize();
        self._isOpen = false;
+        
+        // adjust the maxZ to allow other modal dialogs to continue to work (see
#4309)
+        if (self.options.modal) {
+            var maxZ = 0;
+            $('.ui-dialog').each(function() {
+                if (this != self.uiDialog[0]) {
+                    maxZ = Math.max(maxZ, $(this).css('z-index'));
+                }
+            });
+            $.ui.dialog.maxZ = maxZ;
+        }
    },
    isOpen: function() {
@@ -572,6 +583,13 @@
        }
        $el.remove();
+        
+        // adjust the maxZ to allow other modal dialogs to continue to work (see
#4309)
+        var maxZ = 0;
+        $.each(this.instances, function() {
+            maxZ = Math.max(maxZ, this.css('z-index'));
+        });
+        this.maxZ = maxZ;
    },
    height: function() {