summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/static/js/ishtar.js4
-rw-r--r--ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html7
-rw-r--r--ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html46
3 files changed, 25 insertions, 32 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js
index 5acc702d6..d54bdd796 100644
--- a/ishtar_common/static/js/ishtar.js
+++ b/ishtar_common/static/js/ishtar.js
@@ -207,7 +207,9 @@ function dynamic_load(url, target){
$(target).html(jqXHR.responseText);
var response = $(jqXHR.responseText);
var responseScript = response.filter("script");
- $.each(responseScript, function(idx, val) { eval(val.text); } );
+ $.each(responseScript, function(idx, val) {
+ eval(val.text);
+ } );
}
});
}
diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html
index 0f33f2069..c5dea616f 100644
--- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html
+++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html
@@ -248,12 +248,5 @@ $('#search_{{unique_id}}').click(function (){
return false;
});
-/*
-{% if item_name == 'files' or item_name == "operations" or item_name == "treatments" or item_name == "treatmentfiles" %}
-load_jquerydate_{{item_name}}_after();
-load_jquerydate_{{item_name}}_before();
-{% endif %}
-*/
-
});
</script>
diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html
index 4d9857bec..f6ead643a 100644
--- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html
+++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html
@@ -1,34 +1,32 @@
{% load i18n %}
-<div class='dashboard'>
- <div>
-<script language="javascript" type="text/javascript">
-$(document).ready(function(){
-var values_users = [];
-{% for user_type in ishtar_users.types %}
-values_users.push(['{{user_type.person__person_types__label}}', {{user_type.number}}]); {% endfor%}
-
-var plot_users = jQuery.jqplot ('user_chart', [values_users],
- {
- seriesDefaults: {
- renderer: jQuery.jqplot.PieRenderer,
- rendererOptions: {
- showDataLabels: true
- }
- },
- legend: { show:true, location: 'e' }
- }
- );
-});
-</script>
- <div id="user_chart" style="height:300px; width:700px;"></div>
+<div class='dashboard centered'>
+ <div id="user_chart" style="height:300px; width:700px;margin-left: auto;margin-right: auto;"></div>
<table class='table table-striped'>
<tr><th>{% trans "User type" %}</th><th>{% trans "Number" %}</th></tr>
- {% for user_type in ishtar_users.types %}
+ {% for user_type in ishtar_users.types %}
<tr>
<td class='string'>{{user_type.person__person_types__label}}{#TODO: Display all#}</td>
<td>{{user_type.number}}</td>
</tr>
- {% endfor%}
+ {% endfor %}
</table>
</div>
+<script language="javascript" type="text/javascript">
+$(document).ready(function(){
+ var values_users = [];
+ {% for user_type in ishtar_users.types %}
+ values_users.push(['{{user_type.person__person_types__label}}', {{user_type.number}}]); {% endfor%}
+ var plot_users = jQuery.jqplot ('user_chart', [values_users],
+ {
+ seriesDefaults: {
+ renderer: jQuery.jqplot.PieRenderer,
+ rendererOptions: {
+ showDataLabels: true
+ }
+ },
+ legend: { show:true, location: 'e' }
+ }
+ );
+});
+</script> \ No newline at end of file