You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2017/02/10 19:59:39 UTC

ambari git commit: AMBARI-19964 Set recommended tooltip appears in front of icon (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 07f30c550 -> 309b6ebf1


AMBARI-19964 Set recommended tooltip appears in front of icon (akovalenko)


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

Branch: refs/heads/branch-2.5
Commit: 309b6ebf178a495e49eba0d0a9ad699c98829b32
Parents: 07f30c5
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Feb 10 18:29:31 2017 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Feb 10 21:44:43 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/app.js                           |  1 +
 .../common/configs/widgets/controls.hbs         |  6 +++--
 ambari-web/app/utils/bootstrap_reopen.js        | 24 ++++++++++++++++++++
 .../configs/service_configs_by_category_view.js |  2 +-
 .../configs/widgets/config_widget_view.js       |  2 +-
 5 files changed, 31 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 53394a0..86c4045 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -19,6 +19,7 @@
 // Application bootstrapper
 require('utils/ember_reopen');
 require('utils/ember_computed');
+require('utils/bootstrap_reopen');
 var stringUtils = require('utils/string_utils');
 
 module.exports = Em.Application.create({

http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/templates/common/configs/widgets/controls.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index 52cccd4..886c01f 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -48,8 +48,9 @@
         {{#if view.isWidgetViewAllowed}}
           <a href="#"
             data-toggle="tooltip" {{translateAttr data-original-title="common.edit"}}
-            {{bindAttr class=":icon-pencil :widget-action :widget-action-switch-view view.isHover::hide view.config.showAsTextBox::active"}}
+            {{bindAttr class=":widget-action :widget-action-switch-view view.isHover::hide view.config.showAsTextBox::active"}}
             {{action "toggleWidgetView" target="view"}}>
+            <i class="icon-pencil"></i>
           </a>
         {{else}}
           <i class="icon-pencil widget-action widget-action-switch-view text-error"
@@ -59,8 +60,9 @@
       {{#if view.config.recommendedValueExists}}
         {{#unless view.disabled}}
           <a href="#"
-            {{bindAttr class=":icon-repeat :widget-action-set-recommended view.isHover::hide :widget-action"}}
+            {{bindAttr class=":widget-action-set-recommended view.isHover::hide :widget-action"}}
             {{action "setRecommendedValue" target="view"}} data-toggle="tooltip" {{translateAttr data-original-title="services.service.config.setRecommendedValue"}}>
+            <i class="icon-repeat"></i>
           </a>
         {{/unless}}
       {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/utils/bootstrap_reopen.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/bootstrap_reopen.js b/ambari-web/app/utils/bootstrap_reopen.js
new file mode 100644
index 0000000..65acf55
--- /dev/null
+++ b/ambari-web/app/utils/bootstrap_reopen.js
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+
+$.fn.tooltip.Constructor.prototype.getPosition = function (inside) {
+  return $.extend({}, (inside ? this.$element.position() : this.$element.offset()), {
+    width: this.$element[0].offsetWidth,
+    height: this.$element[0].offsetHeight
+  })
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/views/common/configs/service_configs_by_category_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index f4f35c8..a0fb2aa 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -95,7 +95,7 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
       }
       $('#serviceConfig').tooltip({
         selector: '[data-toggle=tooltip]',
-        placement: 'top'
+        placement: 'in top'
       });
       self.filteredCategoryConfigs();
       self.updateReadOnlyFlags();

http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/views/common/configs/widgets/config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
index e93baa2..cb5d5b9 100644
--- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
@@ -360,7 +360,7 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
   }.property('controller.selectedConfigGroup.name', 'controller.selectedConfigGroup.isDefault'),
 
   didInsertElement: function () {
-    App.tooltip(this.$('[data-toggle=tooltip]'), {placement: 'top'});
+    App.tooltip(this.$('[data-toggle=tooltip]'), {placement: 'in top'});
     App.tooltip($(this.get('element')).find('span'));
     var self = this;
     var element = this.$();