ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-7399. Slider View: Firefox has Create action inside the table header. (Max Shepel via akovalenko)
Date Fri, 19 Sep 2014 10:19:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk d62147ed3 -> 6eda8c66a


AMBARI-7399. Slider View: Firefox has Create action inside the table header. (Max Shepel via
akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6eda8c66
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6eda8c66
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6eda8c66

Branch: refs/heads/trunk
Commit: 6eda8c66a44189320c2e2270be0f74a33c0a6f68
Parents: d62147e
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Fri Sep 19 13:14:22 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Fri Sep 19 13:19:24 2014 +0300

----------------------------------------------------------------------
 .../src/main/resources/ui/app/styles/application.less  | 13 +++++++++----
 .../main/resources/ui/app/templates/application.hbs    | 13 +++++++++++--
 .../main/resources/ui/app/templates/slider_apps.hbs    |  7 -------
 .../main/resources/ui/app/views/application_view.js    |  5 +++++
 4 files changed, 25 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/styles/application.less
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 44c6487..7497b6e 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -44,11 +44,16 @@ a {
   cursor: pointer;
 }
 
-#slider-apps-table  {
-  .create-app {
-    margin-bottom: 20px;
+.slider-header {
+  overflow: hidden;
+  .box-header {
+    padding-top: 20px;
   }
-#slider-table {
+}
+
+#slider-apps-table  {
+
+  #slider-table {
     margin-top: 10px;
     margin-bottom: 10px;
     font-size: 13px\9;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index da828bf..ccccf62 100755
--- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
@@ -16,9 +16,18 @@
 * limitations under the License.
 }}
 
-<div>
+<div class="slider-header">
   {{#view view.SliderTitleView}}
-    <h1>{{t slider.apps.title}} - <span class="slider-app-title" {{bs-bind-popover
view.popover}}>{{App.instance}}</span></h1>
+    <h1 class="pull-left">{{t slider.apps.title}} - <span class="slider-app-title"
{{bs-bind-popover view.popover}}>{{App.instance}}</span></h1>
+    {{#if view.isIndexPage}}
+      <div class="box-header pull-right">
+        <div class="create-app">
+          <a href="#" class="btn btn-primary" {{action createApp}}>
+            <i class="icon-plus"></i><span>&nbsp;{{t slider.apps.create}}</span>
+          </a>
+        </div>
+      </div>
+    {{/if}}
   {{/view}}
   {{outlet bs-tooltip-box}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index aecfb30..ef72291 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -17,13 +17,6 @@
 }}
 
 <div id="slider-apps-table">
-  <div class="box-header">
-    <div class="pull-right create-app">
-      <a href="#" class="btn btn-primary" {{action createApp}}>
-        <i class="icon-plus"></i><span>&nbsp;{{t slider.apps.create}}</span>
-      </a>
-    </div>
-  </div>
 
   <table class="datatable table table-bordered table-striped" id="slider-table">
     <thead>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
index 1860944..7471f04 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
@@ -33,6 +33,11 @@ App.ApplicationView = Ember.View.extend({
       placement: 'bottom'
     }),
 
+    isIndexPage: function () {
+      var currentPath = this.get('controller.currentPath');
+      return currentPath && (currentPath == 'slider_apps.index' || currentPath.indexOf('slider_apps.createAppWizard')
!= -1);
+    }.property('controller.currentPath'),
+
     /**
      * Set <code>popover</code> template
      * @method sliderConfigsChecker


Mime
View raw message