Various Javascript related fixes.

This commit is contained in:
James Cole
2016-11-25 16:54:13 +01:00
parent b34e4cd31b
commit 6c9990e0be
7 changed files with 18 additions and 16 deletions

View File

@@ -6,7 +6,7 @@
* of the MIT license. See the LICENSE file for details.
*/
/* globals $, Chart, currencySymbol,mon_decimal_point ,accounting, mon_thousands_sep, frac_digits */
/* globals $, Chart, currencySymbol,mon_decimal_point ,accounting, mon_thousands_sep, frac_digits, noDataForChart */
var allCharts = {};
@@ -155,8 +155,10 @@ function drawAChart(URI, container, chartType, options, colorData) {
// remove the chart container + parent
var holder = $('#' + container).parent().parent();
if (holder.hasClass('box')) {
// remove box
holder.remove();
// find box-body:
var boxBody = holder.find('.box-body');
boxBody.empty().append($('<p>').append($('<em>').text(noDataForChart)));
//holder.remove();
}
return;
}