mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 19:16:51 +00:00
Update to related manager.
This commit is contained in:
@@ -9,7 +9,7 @@ function unrelateTransaction(e) {
|
|||||||
var id = target.data('id');
|
var id = target.data('id');
|
||||||
var relatedTo = target.data('relatedto');
|
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();
|
target.parent().parent().remove();
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
alert('Could not!');
|
alert('Could not!');
|
||||||
@@ -41,7 +41,7 @@ function relateTransaction(e) {
|
|||||||
function searchRelatedTransactions(e, ID) {
|
function searchRelatedTransactions(e, ID) {
|
||||||
var searchValue = $('#relatedSearchValue').val();
|
var searchValue = $('#relatedSearchValue').val();
|
||||||
if (searchValue != '') {
|
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.
|
// post the results to some div.
|
||||||
$('#relatedSearchResultsTitle').show();
|
$('#relatedSearchResultsTitle').show();
|
||||||
$('#relatedSearchResults').empty().html(data);
|
$('#relatedSearchResults').empty().html(data);
|
||||||
@@ -61,7 +61,7 @@ function doRelateNewTransaction(e) {
|
|||||||
var relateToId = target.data('relateto');
|
var relateToId = target.data('relateto');
|
||||||
if (!target.checked) {
|
if (!target.checked) {
|
||||||
var relateID = target.data('id');
|
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!
|
// success!
|
||||||
target.parent().parent().remove();
|
target.parent().parent().remove();
|
||||||
getAlreadyRelatedTransactions(null, relateToId);
|
getAlreadyRelatedTransactions(null, relateToId);
|
||||||
|
Reference in New Issue
Block a user