mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 03:29:33 +00:00
Introduced bulk edit endpoint for bulk edit of categories and tags
This commit is contained in:
committed by
Victor Mosin
parent
b65e1e022e
commit
805456d032
25
public/js/ff/transactions/list.js
vendored
25
public/js/ff/transactions/list.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: edit_selected_txt, delete_selected_txt */
|
||||
/** global: edit_selected_txt, edit_bulk_selected_txt, delete_selected_txt */
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -45,6 +45,8 @@ $(document).ready(function () {
|
||||
|
||||
// click the edit button:
|
||||
$('.mass_edit').click(goToMassEdit);
|
||||
// click the edit button:
|
||||
$('.mass_edit_bulk').click(goToMassBulkEdit);
|
||||
// click the delete button:
|
||||
$('.mass_delete').click(goToMassDelete);
|
||||
// click reconcile button
|
||||
@@ -100,6 +102,26 @@ function goToMassEdit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function goToMassBulkEdit() {
|
||||
"use strict";
|
||||
var checkedArray = getCheckboxes();
|
||||
|
||||
// go to specially crafted URL:
|
||||
var bases = document.getElementsByTagName('base');
|
||||
var baseHref = null;
|
||||
|
||||
if (bases.length > 0) {
|
||||
baseHref = bases[0].href;
|
||||
}
|
||||
|
||||
window.location.href = baseHref + '/transactions/mass/edit/bulk/' + checkedArray;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {boolean}
|
||||
@@ -144,6 +166,7 @@ function countChecked() {
|
||||
var checked = $('.select_all_single:checked').length;
|
||||
if (checked > 0) {
|
||||
$('.mass_edit span').text(edit_selected_txt + ' (' + checked + ')');
|
||||
$('.mass_edit_bulk span').text(edit_bulk_selected_txt + ' (' + checked + ')');
|
||||
$('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')');
|
||||
|
||||
// get amount for the transactions:
|
||||
|
||||
Reference in New Issue
Block a user