Move default option to bottom.

This commit is contained in:
James Cole 2017-01-30 10:33:18 +01:00
parent c7fc10ac89
commit e47d6fb3ac
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -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;
}
}