From ddd7c0d60dd1829c7b9a7a3c615374b012340071 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Tue, 5 Sep 2017 15:09:01 +0200 Subject: [PATCH] Fixed issue #1340 - Relative and absolute time bug. --- .../controllers/_ui_element/ticket_selector.coffee | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee b/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee index 72ff6e1b8..91b5ad0b3 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee @@ -156,7 +156,7 @@ class App.UiElement.ticket_selector elementRow = $(e.target).closest('.js-filterElement') groupAndAttribute = elementRow.find('.js-attributeSelector option:selected').attr('value') return if !groupAndAttribute - @buildOperator(item, elementRow, groupAndAttribute, elements, {}, attribute, false) + @buildOperator(item, elementRow, groupAndAttribute, elements, {}, attribute) ) # bind for preview @@ -244,9 +244,9 @@ class App.UiElement.ticket_selector if groupAndAttribute elementRow.find('.js-attributeSelector select').val(groupAndAttribute) - @buildOperator(elementFull, elementRow, groupAndAttribute, elements, meta, attribute, true) + @buildOperator(elementFull, elementRow, groupAndAttribute, elements, meta, attribute) - @buildOperator: (elementFull, elementRow, groupAndAttribute, elements, meta, attribute, buildValue) -> + @buildOperator: (elementFull, elementRow, groupAndAttribute, elements, meta, attribute) -> currentOperator = elementRow.find('.js-operator option:selected').attr('value') name = "#{attribute.name}::#{groupAndAttribute}::operator" @@ -284,9 +284,9 @@ class App.UiElement.ticket_selector elementRow.find('.js-operator select').replaceWith(selection) - @buildPreCondition(elementFull, elementRow, groupAndAttribute, elements, meta, attribute, buildValue) + @buildPreCondition(elementFull, elementRow, groupAndAttribute, elements, meta, attribute) - @buildPreCondition: (elementFull, elementRow, groupAndAttribute, elements, meta, attributeConfig, buildValue = true) -> + @buildPreCondition: (elementFull, elementRow, groupAndAttribute, elements, meta, attributeConfig) -> currentOperator = elementRow.find('.js-operator option:selected').attr('value') currentPreCondition = elementRow.find('.js-preCondition option:selected').attr('value') @@ -318,7 +318,6 @@ class App.UiElement.ticket_selector if !preCondition elementRow.find('.js-preCondition select').html('') elementRow.find('.js-preCondition').addClass('hide') - return if !buildValue toggleValue() @buildValue(elementFull, elementRow, groupAndAttribute, elements, meta, attribute) return @@ -351,7 +350,6 @@ class App.UiElement.ticket_selector toggleValue() ) - return if !buildValue @buildValue(elementFull, elementRow, groupAndAttribute, elements, meta, attribute) toggleValue()