From a7e0e3fc154ad36fbb903a96a239dd6f1d8a489e Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 2 Nov 2016 20:52:40 +0100 Subject: [PATCH] Small additions and bug fixes. Signed-off-by: James Cole --- public/js/ff/reports/default/all.js | 15 ++++++++++----- routes/web.php | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index 0c534045ca..9b0e686d58 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -11,14 +11,13 @@ $(function () { "use strict"; - // load the account report, which this report shows: loadAjaxPartial('accountReport', accountReportUri); // load income and expense reports: - loadAjaxPartial('incomeReport',incomeReportUri); - loadAjaxPartial('expenseReport',expenseReportUri); - loadAjaxPartial('incomeVsExpenseReport',incExpReportUri); + loadAjaxPartial('incomeReport', incomeReportUri); + loadAjaxPartial('expenseReport', expenseReportUri); + loadAjaxPartial('incomeVsExpenseReport', incExpReportUri); }); @@ -106,13 +105,19 @@ function displayAjaxPartial(data, holder) { // call some often needed recalculations and what-not: // find a sortable table and make it sortable: - $.bootstrapSortable(true); + if (typeof $.bootstrapSortable === "function") { + $.bootstrapSortable(true); + } // find the info click things and respond to them: triggerInfoClick(); // trigger list thing listLengthInitial(); + + // trigger thing for budgets: + $('.budget-chart-activate').unbind('click').on('click', clickBudgetChart); + } function failAjaxPartial(uri, holder) { diff --git a/routes/web.php b/routes/web.php index 793d8e769a..32cda245ba 100755 --- a/routes/web.php +++ b/routes/web.php @@ -196,6 +196,7 @@ Route::group( // budgets: Route::get('/chart/budget/frontpage', ['uses' => 'Chart\BudgetController@frontpage']); + Route::get('/chart/budget/period/{budget}/default/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@period']); // this chart is used in reports: Route::get('/chart/budget/{budget}/{limitrepetition}', ['uses' => 'Chart\BudgetController@budgetLimit']); @@ -216,6 +217,7 @@ Route::group( Route::get('/chart/report/in-out-sum/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOutSummarized']); Route::get('/chart/report/net-worth/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@netWorth']); + /** * IMPORT CONTROLLER */