ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
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 GMT
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 <onechiporenko@apache.org>
Authored: Wed Dec 14 11:59:35 2016 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
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);
   }
 });
 


Mime
View raw message