diff options
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 23 | ||||
-rw-r--r-- | ishtar_common/templates/base.html | 2 | ||||
-rw-r--r-- | version.py | 4 |
3 files changed, 22 insertions, 7 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index caff11986..40592f0db 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -51,6 +51,15 @@ function manage_async_link(event){ if (modal_open) $(modal_open).modal('show'); } +text_truncate = function(str, length) { + var ending = "..."; + if (str.length > length) { + return str.substring(0, length - ending.length) + ending; + } else { + return str; + } +}; + /* default function to prevent undefined */ function get_next_table_id(){} function get_previous_table_id(){} @@ -1502,8 +1511,10 @@ var _render_stats_table = function(stats_values, name){ current_row = new Array(); html += "<tr><td>" + stats_values[idx][0] + "</td>"; current_row.push(stats_values[idx][0]); - html += "<td>" + stats_values[idx][1] + "</td></tr>"; - current_row.push(stats_values[idx][1]); + var cvalue = stats_values[idx][1]; + if (cvalue == null) cvalue = 0; + html += "<td>" + cvalue + "</td></tr>"; + current_row.push(cvalue); rows.push(current_row); } } @@ -1573,11 +1584,11 @@ var render_stats = function(stats_values, name){ }; if (modality_2 && modality_2 != modality_1){ for (idx in stats_values){ - ticks.push(stats_values[idx][0]); + ticks.push(text_truncate(stats_values[idx][0], 40)); var serie_values = stats_values[idx][1]; var current_serie_values = new Array(); for (inner_idx in serie_values){ - var serie_value = serie_values[inner_idx][0]; + var serie_value = text_truncate(serie_values[inner_idx][0], 40); if (series.indexOf(serie_value) == -1){ series.push(serie_value); var fill_values = new Array(); @@ -1601,6 +1612,9 @@ var render_stats = function(stats_values, name){ } stats_xaxis['ticks'] = ticks; } else { + for (idx in stats_values){ + stats_values[idx][0] = text_truncate(stats_values[idx][0], 40); + } jqvalues = [stats_values]; series.push("Total"); if (stats_type != "pie"){ @@ -1654,6 +1668,7 @@ var render_stats = function(stats_values, name){ stats_options["cursor"] = { show: true, zoom: true, + constrainOutsideZoom: false, showTooltip: false } } diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index aec214238..c43f0a081 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -42,7 +42,7 @@ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.barRenderer.min.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.pieRenderer.min.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.dateAxisRenderer.min.js?ver={{VERSION}}"></script> - <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.cursor.min.js?ver={{VERSION}}"></script> + <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/plugins/jqplot.cursor.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jquery-resizable.js?ver={{VERSION}}"></script> {{EXTRA_JS|safe}} <script type='text/javascript'> diff --git a/version.py b/version.py index c4f51d2c0..84d9fbdec 100644 --- a/version.py +++ b/version.py @@ -1,5 +1,5 @@ -# 2.1.dev.41 -VERSION = (2, 1, 'dev', 41) +# 2.1.dev.42 +VERSION = (2, 1, 'dev', 42) def get_version(): |