From 10bb75c89ed2eeb27255eafcde011bf2d425b1e4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 29 Jan 2018 14:57:27 +0100 Subject: Dashboard: fix dynamic load --- ishtar_common/templates/ishtar/dashboards/dashboard_main.html | 2 +- .../templates/ishtar/dashboards/dashboard_main_detail.html | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index f2eefd6d3..692e435a3 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -17,7 +17,7 @@ $(function() { $('#dashboard .nav-link').click(function () { var url = $(this).attr('data-url'); - $("#dashboard .card-body").load(url); + dynamic_load(url, "#dashboard .card-body"); $('#dashboard li').removeClass('active'); $('#dashboard li').removeClass('show'); $(this).parent().tab('show'); diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index ac779abe0..0f33f2069 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -177,8 +177,11 @@ $(document).ready(function(){ if (typeof values_1_{{unique_id}} === 'undefined' || values_1_{{unique_id}}.length == 0){ -$('#chart_img_{{unique_id}}').hide(); -$('#chart_{{unique_id}}').html("

{% trans 'No data for these criteria.' %}

"); + $('#chart_img_{{unique_id}}').hide(); + $('#chart_{{unique_id}}').html( + "

{% trans 'No data for these criteria.' %}

" + ); + $('#chart_{{unique_id}}').css('height', 'auto'); } else { var showmarker = false; -- cgit v1.2.3