summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics_reporting
diff options
context:
space:
mode:
authorUdo Walter2017-02-06 18:15:02 +0100
committerUdo Walter2017-02-06 18:15:02 +0100
commitdeb21c96456ef44c2ee14a02ffaa6dede0000245 (patch)
treef113a74b0022d19e7cbac04aa69acb903586636e /modules-available/statistics_reporting
parent[statistics_reporting] fixed incorrect median (diff)
downloadslx-admin-deb21c96456ef44c2ee14a02ffaa6dede0000245.tar.gz
slx-admin-deb21c96456ef44c2ee14a02ffaa6dede0000245.tar.xz
slx-admin-deb21c96456ef44c2ee14a02ffaa6dede0000245.zip
[statistics_reporting] fixed location link in client table
Diffstat (limited to 'modules-available/statistics_reporting')
-rw-r--r--modules-available/statistics_reporting/templates/columnChooser.html31
1 files changed, 24 insertions, 7 deletions
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index b5cf4ec8..420880aa 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -1,5 +1,5 @@
<div class="container-fluid">
- <form method="get">
+ <form method="get" id="controlsForm">
<input type="hidden" name="do" value="statistics_reporting">
<div class="row form-inline">
<div class="col-md-12 top-row">
@@ -92,14 +92,21 @@
th.eq(data.column).append(' <span class="arrow glyphicon glyphicon-chevron-'+arrow+'"></span>');
});
- $(".locationLink").click(function(e) {
- e.preventDefault();
- $('#select-table').val('perlocation');
- chooseTable('perlocation');
- var target = $(".locationName:contains('"+$(this).text()+"'):first");
+ if (getParameter("type") == "location" && getParameter("location")) {
+ var target = $(".locationName:contains('"+decodeURIComponent(getParameter("location")).replace(/\+/g, " ")+"'):first");
$(window).scrollTop(target.offset().top - $(window).height()/2);
target.parent().css( "background-color", "#f8ff99" );
- return false;
+ }
+
+ $(".locationLink").click(function(e) {
+ e.preventDefault();
+ var form = $('#controlsForm');
+ $('<input />').attr('type', 'hidden')
+ .attr('name', "location")
+ .attr('value', $(this).text())
+ .appendTo(form);
+ form.find('#select-table').val("location");
+ form.submit();
});
$('.column-toggle').change(function () {
@@ -142,4 +149,14 @@
data: { action: "setReporting", reporting: $("#checkbox-reporting").is(":checked") ? "on" : "off", token: TOKEN }
});
}
+
+ function getParameter(name) {
+ var query = window.location.search.substring(1);
+ var vars = query.split("&");
+ for (var i=0;i<vars.length;i++) {
+ var pair = vars[i].split("=");
+ if(pair[0] == name){return pair[1];}
+ }
+ return(false);
+ }
</script> \ No newline at end of file