Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3C4E6200BDC for ; Wed, 14 Dec 2016 14:49:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3AD3C160B19; Wed, 14 Dec 2016 13:49:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 84162160B13 for ; Wed, 14 Dec 2016 14:49:09 +0100 (CET) Received: (qmail 53772 invoked by uid 500); 14 Dec 2016 13:49:08 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 53763 invoked by uid 99); 14 Dec 2016 13:49:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2016 13:49:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8944BE3813; Wed, 14 Dec 2016 13:49:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: onechiporenko@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-19196. BG operations modal windows are too small to show the content (in certain scenarios)[Chrome] (onechiporenko) Date: Wed, 14 Dec 2016 13:49:08 +0000 (UTC) archived-at: Wed, 14 Dec 2016 13:49:10 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.5 18ed88726 -> 22b027efb 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/22b027ef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22b027ef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22b027ef Branch: refs/heads/branch-2.5 Commit: 22b027efb782cb4b33cc0a487262ad8de9cc097e Parents: 18ed887 Author: Oleg Nechiporenko Authored: Wed Dec 14 11:59:35 2016 +0200 Committer: Oleg Nechiporenko Committed: Wed Dec 14 15:49:03 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/views/common/modal_popup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/22b027ef/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 252604e..a530ed8 100644 --- a/ambari-web/app/views/common/modal_popup.js +++ b/ambari-web/app/views/common/modal_popup.js @@ -100,7 +100,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(); @@ -142,7 +142,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); } });