Add text for empty box #800

This commit is contained in:
James Cole 2017-09-03 11:02:18 +02:00
parent 6b09466819
commit 25ea1c8f5f
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
3 changed files with 7 additions and 0 deletions

View File

@ -109,6 +109,7 @@ function clickCategoryChart(e) {
"use strict";
var link = $(e.target);
var categoryId = link.data('category');
$('#category_help').remove();
var URL = 'chart/category/report-period/' + categoryId + '/' + accountIds + '/' + startDate + '/' + endDate;
var container = 'category_chart';
@ -120,6 +121,7 @@ function clickBudgetChart(e) {
"use strict";
var link = $(e.target);
var budgetId = link.data('budget');
$('#budget_help').remove();
var URL = 'chart/budget/period/' + budgetId + '/' + accountIds + '/' + startDate + '/' + endDate;
var container = 'budget_chart';

View File

@ -782,6 +782,9 @@ return [
'account_role_sharedAsset' => 'Shared asset account',
'account_role_savingAsset' => 'Savings account',
'account_role_ccAsset' => 'Credit card',
'budget_chart_click' => 'Please click on a budget name in the table above to see a chart.',
'category_chart_click' => 'Please click on a category name in the table above to see a chart.',
// charts:
'chart' => 'Chart',

View File

@ -129,6 +129,7 @@
<h3 class="box-title">{{ 'chart'|_ }}</h3>
</div>
<div class="box-body">
<p id="budget_help" class="text-muted text-center">{{ 'budget_chart_click'|_ }}</p>
<canvas id="budget_chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>
</div>
</div>
@ -177,6 +178,7 @@
<h3 class="box-title">{{ 'chart'|_ }}</h3>
</div>
<div class="box-body">
<p id="category_help" class="text-muted text-center">{{ 'category_chart_click'|_ }}</p>
<canvas id="category_chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>
</div>
</div>