Repository: ambari Updated Branches: refs/heads/trunk e7d070303 -> 81d5c7bdf
AMBARI-8439. Add Host Wizard: Host Checks popup is displayed behind the wizard (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81d5c7bd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81d5c7bd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81d5c7bd Branch: refs/heads/trunk Commit: 81d5c7bdf41c069d06a65fd72065e342f4039b44 Parents: e7d0703 Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Tue Nov 25 12:08:42 2014 +0200 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Tue Nov 25 12:08:42 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/views/common/modal_popup.js | 8 ++++---- ambari-web/test/views/common/modal_popup_test.js | 13 ++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/81d5c7bd/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 78c9387..96b7c62 100644 --- a/ambari-web/app/views/common/modal_popup.js +++ b/ambari-web/app/views/common/modal_popup.js @@ -63,7 +63,7 @@ App.ModalPopup = Ember.View.extend({ didInsertElement: function () { if (this.autoHeight) { - var block = $('#modal > .modal-body').first(); + var block = this.$().find('#modal > .modal-body').first(); if(block.offset()) { block.css('max-height', $(window).height() - block.offset().top - 300 + $(window).scrollTop()); // fix popup height } @@ -77,11 +77,11 @@ App.ModalPopup = Ember.View.extend({ maxZindex = $(popup).css('z-index'); } }); - $('.modal-backdrop').css('z-index', maxZindex * 2); - $('.modal').css('z-index', maxZindex * 2 + 1); + this.$().find('.modal-backdrop').css('z-index', maxZindex * 2); + this.$().find('.modal').css('z-index', maxZindex * 2 + 1); } - var firstInputElement = $('#modal').find(':input').not(':disabled').first(); + var firstInputElement = this.$('#modal').find(':input').not(':disabled').first(); this.focusElement(firstInputElement); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/81d5c7bd/ambari-web/test/views/common/modal_popup_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/common/modal_popup_test.js b/ambari-web/test/views/common/modal_popup_test.js index cd473aa..7458be1 100644 --- a/ambari-web/test/views/common/modal_popup_test.js +++ b/ambari-web/test/views/common/modal_popup_test.js @@ -25,12 +25,15 @@ describe('App.ModalPopup', function() { beforeEach(function () { popup = App.ModalPopup.create( - { - primary: 'test', - secondary: 'test', - header: 'test', - body: '<p>text</p><input type="text"><input type="checkbox"><input type="button">' + { + primary: 'test', + secondary: 'test', + header: 'test', + body: '<p>text</p><input type="text"><input type="checkbox"><input type="button">', + $: function () { + return $(this); } + } ); });