From e47d6fb3ac073db39b2b844d72968e6c99ae5cae Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 30 Jan 2017 10:33:18 +0100 Subject: [PATCH] Move default option to bottom. --- public/js/ff/rules/create-edit.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/ff/rules/create-edit.js b/public/js/ff/rules/create-edit.js index ded93e61a9..9100050012 100644 --- a/public/js/ff/rules/create-edit.js +++ b/public/js/ff/rules/create-edit.js @@ -189,9 +189,6 @@ function updateActionInput(selectList) { var input = parent.find('input[name^="rule-action-value["]'); input.removeAttr('disabled'); switch (selectList.val()) { - default: - input.typeahead('destroy'); - break; case 'set_category': createAutoComplete(input, 'json/categories'); break; @@ -216,6 +213,9 @@ function updateActionInput(selectList) { case 'set_destination_account': createAutoComplete(input, 'json/all-accounts'); break; + default: + input.typeahead('destroy'); + break; } } @@ -230,9 +230,6 @@ function updateTriggerInput(selectList) { // the text input we're looking for: var input = parent.find('input[name^="rule-trigger-value["]'); switch (selectList.val()) { - default: - input.typeahead('destroy'); - break; case 'from_account_starts': case 'from_account_ends': case 'from_account_is': @@ -262,6 +259,9 @@ function updateTriggerInput(selectList) { case 'description_is': createAutoComplete(input, 'json/transaction-journals/all'); break; + default: + input.typeahead('destroy'); + break; } }