Updated Branches:
  refs/heads/trunk 150f949aa -> fc1ea2b60

AMBARI-3508. Multiple popups on the "Install, Start, Test" step. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/fc1ea2b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/fc1ea2b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/fc1ea2b6

Branch: refs/heads/trunk
Commit: fc1ea2b60a9af4a0ed8b0b575df65127269fc5ca
Parents: 150f949
Author: Oleg Nechiporenko <[email protected]>
Authored: Mon Oct 14 17:55:32 2013 +0300
Committer: Oleg Nechiporenko <[email protected]>
Committed: Mon Oct 14 18:00:01 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/modal_popup.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fc1ea2b6/ambari-web/app/views/common/modal_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index d680fb1..94c2ba1 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -84,6 +84,18 @@ App.ModalPopup = Ember.View.extend({
       var block = this.$().find('#modal > .modal-body').first();
       block.css('max-height', $(window).height() - block.offset().top - 300 + 
$(window).scrollTop()); // fix popup height
     }
+    // If popup is opened from another popup it should be displayed above
+    var existedPopups = $(document).find('.modal-backdrop');
+    if (existedPopups) {
+      var maxZindex = 1;
+      existedPopups.each(function(index, popup) {
+        if ($(popup).css('z-index') > maxZindex) {
+          maxZindex = $(popup).css('z-index');
+        }
+      });
+      this.$().find('.modal-backdrop').css('z-index', maxZindex * 2);
+      this.$().find('.modal').css('z-index', maxZindex * 2 + 1);
+    }
   },
 
   fitHeight: function () {

Reply via email to