From 3428949ab80ad023693834a789008f230728493a Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Tue, 7 Feb 2017 14:33:04 +0100
Subject: [statistics_reporting] Fix hiding of checkboxes not matching any
column
---
.../statistics_reporting/page.inc.php | 2 +-
.../templates/columnChooser.html | 28 +++++-----------------
.../templates/table-client.html | 28 +++++++++++-----------
.../templates/table-location.html | 20 ++++++++--------
.../templates/table-total.html | 20 ++++++++--------
5 files changed, 41 insertions(+), 57 deletions(-)
(limited to 'modules-available/statistics_reporting')
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php
index 8ae9ec92..06f9cfb6 100644
--- a/modules-available/statistics_reporting/page.inc.php
+++ b/modules-available/statistics_reporting/page.inc.php
@@ -81,7 +81,7 @@ class Page_Statistics_Reporting extends Page
foreach ($this->COLUMNS as $column) {
$data['columns'][] = array(
- 'id' => $column,
+ 'id' => 'col_' . $column,
'name' => Dictionary::translateFile('template-tags', 'lang_' . $column, true),
'checked' => Request::get($column, 'on', 'string') === 'on' ? 'checked' : '',
);
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index 83d1b9e1..efc1f355 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -34,11 +34,11 @@
@@ -117,18 +117,12 @@
th.eq(data.column).append(' ');
});
- 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" );
- }
-
$(".locationLink").click(function(e) {
e.preventDefault();
var form = $('#controlsForm');
$('').attr('type', 'hidden')
.attr('name', "location")
- .attr('value', $(this).text())
+ .attr('value', $(this).data('lid'))
.appendTo(form);
form.find('#select-table').val("location");
form.submit();
@@ -174,14 +168,4 @@
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
diff --git a/modules-available/statistics_reporting/templates/table-client.html b/modules-available/statistics_reporting/templates/table-client.html
index e53a49d6..2bb79447 100644
--- a/modules-available/statistics_reporting/templates/table-client.html
+++ b/modules-available/statistics_reporting/templates/table-client.html
@@ -3,13 +3,13 @@
{{lang_hostname}} |
{{lang_location}} |
- {{lang_totalTime}} |
- {{lang_medianSessionLength}} |
- {{lang_longSessions}} |
- {{lang_shortSessions}} |
- {{lang_totalOffTime}} |
- {{lang_lastLogout}} |
- {{lang_lastStart}} |
+ {{lang_totalTime}} |
+ {{lang_medianSessionLength}} |
+ {{lang_longSessions}} |
+ {{lang_shortSessions}} |
+ {{lang_totalOffTime}} |
+ {{lang_lastLogout}} |
+ {{lang_lastStart}} |
@@ -17,13 +17,13 @@
{{hostname}} |
{{location}} |
- {{time_s}} |
- {{medianTime_s}} |
- {{sessions}} |
- {{shortSessions}} |
- {{offTime_s}} |
- {{lastLogout_s}} |
- {{lastStart_s}} |
+ {{time_s}} |
+ {{medianTime_s}} |
+ {{sessions}} |
+ {{shortSessions}} |
+ {{offTime_s}} |
+ {{lastLogout_s}} |
+ {{lastStart_s}} |
{{/data}}
diff --git a/modules-available/statistics_reporting/templates/table-location.html b/modules-available/statistics_reporting/templates/table-location.html
index 55fa8e6f..02292e5b 100644
--- a/modules-available/statistics_reporting/templates/table-location.html
+++ b/modules-available/statistics_reporting/templates/table-location.html
@@ -2,22 +2,22 @@
{{lang_location}} |
- {{lang_totalTime}} |
- {{lang_medianSessionLength}} |
- {{lang_longSessions}} |
- {{lang_shortSessions}} |
- {{lang_totalOffTime}} |
+ {{lang_totalTime}} |
+ {{lang_medianSessionLength}} |
+ {{lang_longSessions}} |
+ {{lang_shortSessions}} |
+ {{lang_totalOffTime}} |
{{#data}}
{{location}} |
- {{time_s}} |
- {{medianTime_s}} |
- {{sessions}} |
- {{shortSessions}} |
- {{offTime_s}} |
+ {{time_s}} |
+ {{medianTime_s}} |
+ {{sessions}} |
+ {{shortSessions}} |
+ {{offTime_s}} |
{{/data}}
diff --git a/modules-available/statistics_reporting/templates/table-total.html b/modules-available/statistics_reporting/templates/table-total.html
index 2e100ae5..e59dda25 100644
--- a/modules-available/statistics_reporting/templates/table-total.html
+++ b/modules-available/statistics_reporting/templates/table-total.html
@@ -2,21 +2,21 @@
|
- {{lang_totalTime}} |
- {{lang_medianSessionLength}} |
- {{lang_longSessions}} |
- {{lang_shortSessions}} |
- {{lang_totalOffTime}} |
+ {{lang_totalTime}} |
+ {{lang_medianSessionLength}} |
+ {{lang_longSessions}} |
+ {{lang_shortSessions}} |
+ {{lang_totalOffTime}} |
{{lang_total}} |
- {{data.time_s}} |
- {{data.medianTime_s}} |
- {{data.sessions}} |
- {{data.shortSessions}} |
- {{data.totalOfftime_s}} |
+ {{data.time_s}} |
+ {{data.medianTime_s}} |
+ {{data.sessions}} |
+ {{data.shortSessions}} |
+ {{data.totalOfftime_s}} |
--
cgit v1.2.3-55-g7522