mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 15:18:05 +00:00
Fix #1442
This commit is contained in:
12
public/js/ff/transactions/split/edit.js
vendored
12
public/js/ff/transactions/split/edit.js
vendored
@@ -33,12 +33,12 @@ $(document).ready(function () {
|
||||
|
||||
$.getJSON('json/expense-accounts').done(function (data) {
|
||||
destAccounts = data;
|
||||
$('input[name$="destination_account_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
||||
$('input[name$="destination_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
||||
});
|
||||
|
||||
$.getJSON('json/revenue-accounts').done(function (data) {
|
||||
srcAccounts = data;
|
||||
$('input[name$="source_account_name]"]').typeahead({source: srcAccounts, autoSelect: false});
|
||||
$('input[name$="source_name]"]').typeahead({source: srcAccounts, autoSelect: false});
|
||||
});
|
||||
|
||||
$.getJSON('json/categories').done(function (data) {
|
||||
@@ -123,11 +123,11 @@ function cloneDivRow() {
|
||||
source.find('input[name$="][amount]"]').val("").on('change', calculateBothSums);
|
||||
source.find('input[name$="][foreign_amount]"]').val("").on('change', calculateBothSums);
|
||||
if (destAccounts.length > 0) {
|
||||
source.find('input[name$="destination_account_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
||||
source.find('input[name$="destination_name]"]').typeahead({source: destAccounts, autoSelect: false});
|
||||
}
|
||||
|
||||
if (srcAccounts.length > 0) {
|
||||
source.find('input[name$="source_account_name]"]').typeahead({source: srcAccounts, autoSelect: false});
|
||||
source.find('input[name$="source_name]"]').typeahead({source: srcAccounts, autoSelect: false});
|
||||
}
|
||||
if (categories.length > 0) {
|
||||
source.find('input[name$="category_name]"]').typeahead({source: categories, autoSelect: false});
|
||||
@@ -186,12 +186,12 @@ function resetDivSplits() {
|
||||
input.attr('name', 'transactions[' + i + '][transaction_description]');
|
||||
});
|
||||
// ends with ][destination_account_name]
|
||||
$.each($('input[name$="][destination_account_name]"]'), function (i, v) {
|
||||
$.each($('input[name$="][destination_name]"]'), function (i, v) {
|
||||
var input = $(v);
|
||||
input.attr('name', 'transactions[' + i + '][destination_account_name]');
|
||||
});
|
||||
// ends with ][source_account_name]
|
||||
$.each($('input[name$="][source_account_name]"]'), function (i, v) {
|
||||
$.each($('input[name$="][source_name]"]'), function (i, v) {
|
||||
var input = $(v);
|
||||
input.attr('name', 'transactions[' + i + '][source_account_name]');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user