Repository: ambari Updated Branches: refs/heads/trunk b0e4c9389 -> 6153b0372
AMBARI-19196. BG operations modal windows are too small to show the content (in certain scenarios)[Chrome] (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6153b037 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6153b037 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6153b037 Branch: refs/heads/trunk Commit: 6153b03725d41bbfbd7c801643ec808184817dc7 Parents: b0e4c93 Author: Oleg Nechiporenko <[email protected]> Authored: Wed Dec 14 11:59:35 2016 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Wed Dec 14 15:50:37 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/views/common/modal_popup.js | 6 ++++-- .../controllers/main/admin/kerberos/step1_controller_test.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6153b037/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 a643b23..47b7d61 100644 --- a/ambari-web/app/views/common/modal_popup.js +++ b/ambari-web/app/views/common/modal_popup.js @@ -119,7 +119,7 @@ App.ModalPopup = Ember.View.extend({ enterKeyPressed: function (event) { var primaryButton = this.$().find('.modal-footer > .btn-success').last(); - if ((!$("*:focus").is("textarea")) && primaryButton.length > 0 && primaryButton.attr('disabled') !== 'disabled') { + if (!$("*:focus").is('textarea') && primaryButton.length > 0 && primaryButton.attr('disabled') !== 'disabled') { event.preventDefault(); event.stopPropagation(); primaryButton.click(); @@ -161,7 +161,9 @@ App.ModalPopup = Ember.View.extend({ 'marginTop': 0 }); - block.css('max-height', $(window).height() - top * 2 - (popup.height() - block.height())); + var newMaxHeight = $(window).height() - top * 2 - (popup.height() - block.height()); + newMaxHeight = Math.max(newMaxHeight, 500); + block.css('max-height', newMaxHeight); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/6153b037/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js index f3f05a4..3181fda 100644 --- a/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js +++ b/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js @@ -53,7 +53,7 @@ describe('App.KerberosWizardStep1Controller', function() { expect(controller.get('options')).to.not.be.empty; controller.loadStep(); var options = controller.get('options'); - expect(options.length == 1).to.be.true; + expect(options.length).to.be.equal(1); }); it("enableIpa is false", function() {
