From 862e532af3672352a7f7e9eb2d763bcb0803f4e2 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Wed, 5 Mar 2014 21:43:30 +0100 Subject: [PATCH] refs #57 removed min impact control as it might be not clear what it is anyway and user can change the limit filter if he wants to see only entries with very high impact --- .../Visualizations/Insight/RequestConfig.php | 3 +-- .../Insights/javascripts/insightsDataTable.js | 8 ------- .../Insights/templates/insightControls.twig | 22 ++++--------------- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/plugins/Insights/Visualizations/Insight/RequestConfig.php b/plugins/Insights/Visualizations/Insight/RequestConfig.php index 3edfecb7a5d..591f7d8fac8 100644 --- a/plugins/Insights/Visualizations/Insight/RequestConfig.php +++ b/plugins/Insights/Visualizations/Insight/RequestConfig.php @@ -13,7 +13,7 @@ class RequestConfig extends VisualizationRequestConfig { - public $min_impact_percent = 1; + public $min_impact_percent = '0.1'; public $min_growth_percent = 20; public $compared_to_x_periods_ago = 1; public $order_by = 'absolute'; @@ -28,7 +28,6 @@ public function __construct() $properties = array( 'min_growth_percent', - 'min_impact_percent', 'order_by', 'compared_to_x_periods_ago', 'filter_by', diff --git a/plugins/Insights/javascripts/insightsDataTable.js b/plugins/Insights/javascripts/insightsDataTable.js index 3947c76c313..4dd4824c06d 100644 --- a/plugins/Insights/javascripts/insightsDataTable.js +++ b/plugins/Insights/javascripts/insightsDataTable.js @@ -35,7 +35,6 @@ _init: function (domElem) { this.initMinGrowthPercentage(domElem); - this.initMinImpactPercent(domElem); this.initShowIncreaseOrDecrease(domElem); this.initOrderBy(domElem); this.initComparedToXPeriodsAgo(domElem); @@ -98,13 +97,6 @@ }); }, - initMinImpactPercent: function (domElem) { - var self = this; - $('[name=minImpactPercent]', domElem).bind('change', function (event) { - self._changeParameterAndReload({min_impact_percent: getValueFromEvent(event)}); - }); - }, - initComparedToXPeriodsAgo: function (domElem) { var self = this; $('[name=comparedToXPeriodsAgo]', domElem).bind('change', function (event) { diff --git a/plugins/Insights/templates/insightControls.twig b/plugins/Insights/templates/insightControls.twig index 46d186dff3d..e9255290709 100644 --- a/plugins/Insights/templates/insightControls.twig +++ b/plugins/Insights/templates/insightControls.twig @@ -1,21 +1,5 @@
- Minimum impact of - - - and growth of at least + Minimum growth of - {% if period == 'day' or period == 'month' %} + {% if period == 'day' or period == 'month' or period == 'week' %} compared to {% if period == 'day' %} + {% elseif period == 'week' %} + previous week {% endif %} {% endif %}