You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2013/11/11 19:11:14 UTC

git commit: AMBARI-3738 Background ops dialog checkbox UI cleanup. (ababiichuk)

Updated Branches:
  refs/heads/trunk 712134b24 -> fd38de564


AMBARI-3738 Background ops dialog checkbox UI cleanup. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: fd38de5643b203f16931cc3afa6a5c9197228fb8
Parents: 712134b
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Nov 11 19:18:55 2013 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Nov 11 19:18:55 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/styles/application.less          |  1 +
 ambari-web/app/templates/common/modal_popup.hbs | 63 ++++++++++++++++++++
 ambari-web/app/views/common/modal_popup.js      | 28 +--------
 3 files changed, 65 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fd38de56/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 61c2a3f..39c9c9f 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1058,6 +1058,7 @@ a:focus {
       text-align: left;
       padding-top: 3px;
       margin-left: 22px;
+      float: left;
       .checkbox {
         margin: 0px;
       }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fd38de56/ambari-web/app/templates/common/modal_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popup.hbs b/ambari-web/app/templates/common/modal_popup.hbs
new file mode 100644
index 0000000..a846231
--- /dev/null
+++ b/ambari-web/app/templates/common/modal_popup.hbs
@@ -0,0 +1,63 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+
+<div class="modal-backdrop"></div>
+<div class="modal" id="modal" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">
+  <div class="modal-header">
+    {{#if showCloseButton}}
+      <a class="close" {{action onClose target="view"}}>x</a>
+    {{/if}}
+    <h3 id="modal-label">
+      {{#if headerClass}}
+        {{view headerClass}}
+      {{else}}
+        {{header}}
+      {{/if}}
+    </h3>
+  </div>
+  <div class="modal-body">
+    {{#if bodyClass}}
+      {{view bodyClass}}
+    {{else}}
+      {{#if encodeBody}}
+        {{body}}
+      {{else}}
+        {{{body}}}
+      {{/if}}
+    {{/if}}
+  </div>
+  {{#if showFooter}}
+    {{#if footerClass}}
+      {{view footerClass}}
+    {{else}}
+      <div class="modal-footer">
+        {{#if view.hasFooterCheckbox}}
+          <label id="footer-checkbox">{{view Ember.Checkbox classNames="checkbox" checkedBinding="view.isNotShowBgChecked"}} &nbsp;
+          {{t admin.userSettings.notShowBgOperations}}</label>
+        {{/if}}
+        {{#if view.secondary}}
+          <a class="btn" {{action onSecondary target="view"}}>{{view.secondary}}</a>
+        {{/if}}
+        {{#if view.primary}}
+          <a {{bindAttr class="view.enablePrimary::disabled :btn :btn-success"}} {{action onPrimary target="view"}}>{{view.primary}}</a>
+        {{/if}}
+      </div>
+    {{/if}}
+  {{/if}}
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fd38de56/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 f231965..de1bc27 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -22,33 +22,7 @@ App.ModalPopup = Ember.View.extend({
 
   viewName: 'modalPopup',
 
-  template: Ember.Handlebars.compile([
-    '<div class="modal-backdrop"></div><div class="modal" id="modal" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">',
-    '<div class="modal-header">',
-    '{{#if showCloseButton}}<a class="close" {{action onClose target="view"}}>x</a>{{/if}}',
-    '<h3 id="modal-label">',
-    '{{#if headerClass}}{{view headerClass}}',
-    '{{else}}{{header}}{{/if}}',
-    '</h3>',
-    '</div>',
-    '<div class="modal-body">',
-    '{{#if bodyClass}}{{view bodyClass}}',
-    '{{else}}{{#if encodeBody}}{{body}}{{else}}{{{body}}}{{/if}}{{/if}}',
-    '</div>',
-    '{{#if showFooter}}',
-    '{{#if footerClass}}{{view footerClass}}',
-    '{{else}}',
-    '<div class="modal-footer">',
-    '{{#if view.hasFooterCheckbox}} <label id="footer-checkbox" class="span8">  {{view Ember.Checkbox classNames="checkbox" checkedBinding="view.isNotShowBgChecked"}} &nbsp;' +
-      '{{t admin.userSettings.notShowBgOperations}}</label> {{/if}}',
-    '{{#if view.secondary}}<a class="btn" {{action onSecondary target="view"}}>{{view.secondary}}</a>{{/if}}',
-    '{{#if view.primary}}<a {{bindAttr class="view.enablePrimary::disabled :btn :btn-success"}} {{action onPrimary target="view"}}>{{view.primary}}</a>{{/if}}',
-    '</div>',
-    '{{/if}}',
-    '{{/if}}',
-
-    '</div>'
-  ].join('\n')),
+  templateName: require('templates/common/modal_popup'),
 
   header: '&nbsp;',
   body: '&nbsp;',