Merge branch 'fix/numeric_range_filter' into 'master'

Add "inclusive" definition

See merge request benja-2/ember-cli-dunlop!1
This commit is contained in:
2018-12-03 15:18:35 +00:00
3 changed files with 4 additions and 2 deletions
@@ -15,8 +15,8 @@ export default Component.extend({
filter_text: Ember.computed('{lower_bound,upper_bound,display_addition,inclusive}', function () {
var lower_limit, upper_limit, range, isInclusive;
isInclusive = this.get('inclusive');
lower_limit = this.get('lower_bound') || '-';
upper_limit = this.get('upper_bound') || '-';
lower_limit = this.get('lower_bound') || 'a';
upper_limit = this.get('upper_bound') || 'b';
range = isInclusive ? `[${lower_limit}, ${upper_limit}]` : `(${lower_limit}, ${upper_limit})`;
if (this.get('display_addition')) {
range += " " + this.get('display_addition');
@@ -14,6 +14,7 @@ ui-dropdown class='left basic labeled top left pointing icon select-number' acti
.ui.pointing.red.basic.label {{error}}
.item
ui-checkbox class='item' checked=inclusive label=(t 'number.range.inclusive') onChange=(action 'toggle_inclusive')
ui-popup tagName="i" class="info circle icon" html=(t 'number.range.inclusive_explanation')
.divider
.options-container
+1
View File
@@ -67,4 +67,5 @@ window.$translations =
range:
between: 'Between'
inclusive: 'inclusive'
inclusive_explanation: 'Include the <i><b>lower</b></i> and <i><b>upper</b></i> limits as valid elements. [a, b] means all the "x" elements that a <= x <= b; (a, b) means all the "x" elements that a < x < b.'
lower_larger_than_upper_error: 'lower limit (%{lower}) cannot be greater than the upper limit (%{upper}).'