Browse Source

AMBARI-9074. Create Alert Notification Popup is too short

Srimanth Gunturi 10 years ago
parent
commit
fe7996466f

+ 1 - 0
ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js

@@ -331,6 +331,7 @@ App.ManageAlertNotificationsController = Em.Controller.extend({
     var createEditPopup = App.ModalPopup.show({
       header: isEdit ? Em.I18n.t('alerts.actions.manage_alert_notifications_popup.editHeader') : Em.I18n.t('alerts.actions.manage_alert_notifications_popup.addHeader'),
       classNames: ['create-edit-alert-notification-popup'],
+      marginBottom: 130,
       bodyClass: Em.View.extend({
         controller: this,
         templateName: require('templates/main/alerts/create_alert_notification'),

+ 2 - 1
ambari-web/app/views/common/modal_popup.js

@@ -30,6 +30,7 @@ App.ModalPopup = Ember.View.extend({
   secondary: Em.I18n.t('common.cancel'),
   third: null,
   autoHeight: true,
+  marginBottom: 300,
   disablePrimary: false,
   disableSecondary: false,
   disableThird: false,
@@ -66,7 +67,7 @@ App.ModalPopup = Ember.View.extend({
     if (this.autoHeight) {
       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
+        block.css('max-height', $(window).height() - block.offset().top  - this.marginBottom + $(window).scrollTop()); // fix popup height
       }
     }
     // If popup is opened from another popup it should be displayed above