You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/06/17 20:19:28 UTC
ambari git commit: AMBARI-11980. Clicking on slider config does not
change value but enables save/discard btn (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 ad4b77b13 -> 8b027086a
AMBARI-11980. Clicking on slider config does not change value but enables save/discard btn (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b027086
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b027086
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b027086
Branch: refs/heads/branch-2.1
Commit: 8b027086a4e64b327c8933736e2b462f87df034a
Parents: ad4b77b
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Jun 17 20:06:42 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Jun 17 21:19:23 2015 +0300
----------------------------------------------------------------------
.../common/configs/widgets/slider_config_widget_view.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8b027086/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index 4eb6add..f3ba5df 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -46,6 +46,12 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
mirrorValue: 0,
/**
+ * Previous mirrorValue
+ * @type {number}
+ */
+ prevMirrorValue: 0,
+
+ /**
* Determines if used-input <code>mirrorValue</code> is valid
* Calculated on the <code>mirrorValueObs</code>
* @type {boolean}
@@ -264,6 +270,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
var parseFunction = this.get('parseFunction');
value = value || parseFunction(this.get('config.value'));
this.set('mirrorValue', this.widgetValueByConfigAttributes(value));
+ this.set('prevMirrorValue', this.get('mirrorValue'));
},
/**
@@ -382,7 +389,9 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
* action to run sendRequestRorDependentConfigs when
* we have changed config value within slider
*/
- self.sendRequestRorDependentConfigs(self.get('config'));
+ if (self.get('prevMirrorValue') != self.get('mirrorValue')) {
+ self.sendRequestRorDependentConfigs(self.get('config'));
+ }
});
this.set('slider', slider);
var sliderTicks = this.$('.ui-slider-wrapper:eq(0) .slider-tick');