From deb21c96456ef44c2ee14a02ffaa6dede0000245 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Mon, 6 Feb 2017 18:15:02 +0100 Subject: [statistics_reporting] fixed location link in client table --- .../templates/columnChooser.html | 31 +++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'modules-available/statistics_reporting') 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 @@
-
+
@@ -92,14 +92,21 @@ th.eq(data.column).append(' '); }); - $(".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'); + $('').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 \ No newline at end of file -- cgit v1.2.3-55-g7522