mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Update to related manager.
This commit is contained in:
parent
8d62088576
commit
49c37baac5
@ -9,7 +9,7 @@ function unrelateTransaction(e) {
|
||||
var id = target.data('id');
|
||||
var relatedTo = target.data('relatedto');
|
||||
|
||||
$.post('related/removeRelation/' + id + '/' + relatedTo, {_token:token}).success(function (data) {
|
||||
$.post('related/removeRelation/' + id + '/' + relatedTo, {_token: token}).success(function (data) {
|
||||
target.parent().parent().remove();
|
||||
}).fail(function () {
|
||||
alert('Could not!');
|
||||
@ -41,7 +41,7 @@ function relateTransaction(e) {
|
||||
function searchRelatedTransactions(e, ID) {
|
||||
var searchValue = $('#relatedSearchValue').val();
|
||||
if (searchValue != '') {
|
||||
$.post('related/search/' + ID, {searchValue: searchValue,_token:token}).success(function (data) {
|
||||
$.post('related/search/' + ID, {searchValue: searchValue, _token: token}).success(function (data) {
|
||||
// post the results to some div.
|
||||
$('#relatedSearchResultsTitle').show();
|
||||
$('#relatedSearchResults').empty().html(data);
|
||||
@ -61,7 +61,7 @@ function doRelateNewTransaction(e) {
|
||||
var relateToId = target.data('relateto');
|
||||
if (!target.checked) {
|
||||
var relateID = target.data('id');
|
||||
$.post('related/relate/' + id + '/' + relateToId,{_token:token}).success(function (data) {
|
||||
$.post('related/relate/' + id + '/' + relateToId, {_token: token}).success(function (data) {
|
||||
// success!
|
||||
target.parent().parent().remove();
|
||||
getAlreadyRelatedTransactions(null, relateToId);
|
||||
|
Loading…
Reference in New Issue
Block a user