ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1435450 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/routes/add_host_routes.js ambari-web/app/routes/add_service_routes.js ambari-web/app/views/common/modal_popup.js
Date Sat, 19 Jan 2013 01:40:30 GMT
Author: yusaku
Date: Sat Jan 19 01:40:30 2013
New Revision: 1435450

URL: http://svn.apache.org/viewvc?rev=1435450&view=rev
Log:
AMBARI-1225. Add Hosts wizard popup is too small. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js
    incubator/ambari/trunk/ambari-web/app/routes/add_service_routes.js
    incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1435450&r1=1435449&r2=1435450&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Sat Jan 19 01:40:30 2013
@@ -17,6 +17,8 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1225. Add Hosts wizard popup is too small. (yusaku)
+
  AMBARI-1224. Drop the "all" option from Hosts > Component Filter and
  Jobs > Users Filter. (yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js?rev=1435450&r1=1435449&r2=1435450&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js Sat Jan 19 01:40:30 2013
@@ -44,6 +44,9 @@ module.exports = Em.Route.extend({
           this.hide();
           App.router.get('updateController').set('isWorking', true);
           router.transitionTo('hosts.index');
+        },
+        didInsertElement: function(){
+          this.fitHeight();
         }
       });
 

Modified: incubator/ambari/trunk/ambari-web/app/routes/add_service_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/add_service_routes.js?rev=1435450&r1=1435449&r2=1435450&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/add_service_routes.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/add_service_routes.js Sat Jan 19 01:40:30
2013
@@ -44,6 +44,9 @@ module.exports = Em.Route.extend({
             this.hide();
             App.router.get('updateController').set('isWorking', true);
             App.router.transitionTo('main.services')
+          },
+          didInsertElement: function(){
+            this.fitHeight();
           }
         });
         router.transitionTo('step' + addServiceController.get('currentStep'));

Modified: incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js?rev=1435450&r1=1435449&r2=1435450&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/modal_popup.js Sat Jan 19 01:40:30
2013
@@ -73,6 +73,20 @@ App.ModalPopup = Ember.View.extend({
       var block = this.$().find('#modal > .modal-body').first();
       block.css('max-height', $(window).height()- block.offset().top - 300); // fix popup
height
     }
+  },
+
+  fitHeight: function(){
+    var popup = this.$().find('#modal');
+    var block = this.$().find('#modal > .modal-body');
+    var wh = $(window).height();
+
+    var top = wh * .05;
+    popup.css({
+      'top' : top + 'px',
+      'marginTop' : 0
+    });
+
+    block.css('max-height', $(window).height()- top * 2 - 100);
   }
 });
 



Mime
View raw message