diff options
3 files changed, 12 insertions, 3 deletions
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php index 06f9cfb6..90188121 100644 --- a/modules-available/statistics_reporting/page.inc.php +++ b/modules-available/statistics_reporting/page.inc.php @@ -209,7 +209,16 @@ class Page_Statistics_Reporting extends Page case 'total': return GetData::total($flags); case 'location': - return GetData::perLocation($flags); + $data = GetData::perLocation($flags); + $highlight = Request::get('location', false, 'int'); + if ($highlight !== false) { + foreach ($data as &$row) { + if ($row['locationId'] == $highlight) { + $row['highlight'] = true; + } + } + } + return $data; case 'client': return GetData::perClient($flags); case 'user': diff --git a/modules-available/statistics_reporting/templates/table-client.html b/modules-available/statistics_reporting/templates/table-client.html index 2bb79447..2fb2f574 100644 --- a/modules-available/statistics_reporting/templates/table-client.html +++ b/modules-available/statistics_reporting/templates/table-client.html @@ -16,7 +16,7 @@ {{#data}} <tr> <td class="text-left">{{hostname}}</td> - <td class="text-left col_location"><a class="locationLink" href="#">{{location}}</a></td> + <td class="text-left col_location"><a class="locationLink" href="#" data-lid="{{locationId}}">{{location}}</a></td> <td data-sort-value="{{time}}" class="text-left col_totalTime">{{time_s}}</td> <td data-sort-value="{{medianTime}}" class="text-left col_medianSessionLength">{{medianTime_s}}</td> <td class="text-left col_longSessions">{{sessions}}</td> diff --git a/modules-available/statistics_reporting/templates/table-location.html b/modules-available/statistics_reporting/templates/table-location.html index 02292e5b..9479b7af 100644 --- a/modules-available/statistics_reporting/templates/table-location.html +++ b/modules-available/statistics_reporting/templates/table-location.html @@ -11,7 +11,7 @@ </thead> <tbody> {{#data}} - <tr> + <tr{{#highlight}} class="info"{{/highlight}}> <td class="locationName text-left">{{location}}</td> <td data-sort-value="{{time}}" class="text-left col_totalTime">{{time_s}}</td> <td data-sort-value="{{medianTime}}" class="text-left col_medianSessionLength">{{medianTime_s}}</td> |