diff options
author | Udo Walter | 2016-11-28 18:27:32 +0100 |
---|---|---|
committer | Udo Walter | 2016-11-28 18:27:32 +0100 |
commit | b87930137acf88936fb541f53ab4dab1697e4d03 (patch) | |
tree | 694dfca308d04f32cc38d217fcac9e9f4900b19d /modules-available/statistics_reporting/templates/columnChooser.html | |
parent | login count and offline time database queries (diff) | |
download | slx-admin-b87930137acf88936fb541f53ab4dab1697e4d03.tar.gz slx-admin-b87930137acf88936fb541f53ab4dab1697e4d03.tar.xz slx-admin-b87930137acf88936fb541f53ab4dab1697e4d03.zip |
new ui
Diffstat (limited to 'modules-available/statistics_reporting/templates/columnChooser.html')
-rw-r--r-- | modules-available/statistics_reporting/templates/columnChooser.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html new file mode 100644 index 00000000..62e20a4a --- /dev/null +++ b/modules-available/statistics_reporting/templates/columnChooser.html @@ -0,0 +1,47 @@ +<div class="container-fluid"> + <div class="row top-row form-inline"> + <div class="col-md-12 "> + <select id="select-table" onchange="chooseTable(this.value)" class="form-control" style="width:160px"> + <option value="total" selected="selected">{{lang_total}}</option> + <option value="perlocation">{{lang_perlocation}}</option> + <option value="perclient">{{lang_perclient}}</option> + <option value="peruser">{{lang_peruser}}</option> + <option value="pervm">{{lang_pervm}}</option> + </select> + <div class="btn-group"> + <button id="button-totaltime" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('totaltime')">{{lang_totalTime}}</button> + <button id="button-avgtime" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('avgtime')">{{lang_avgSessionLength}}</button> + <button id="button-logincount" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('logincount')">{{lang_totalLogins}}</button> + <button id="button-timeoffline" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('timeoffline')">{{lang_totalOffTime}}</button> + <button id="button-lastlogout" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('lastlogout')">{{lang_clientLogout}}</button> + <button id="button-laststart" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('laststart')">{{lang_clientStart}}</button> + </div> + </div> + </div> +</div> + + +<script type="application/javascript"> + document.addEventListener("DOMContentLoaded", function () { + chooseTable($('#select-table').val()); + $("table").stupidtable(); + }); + + function chooseTable(v) { + $("[id^=table-]").hide(); + $('#table-'+v).show(); + } + + function toggleButton(v) { + $button = $('#button-'+v); + if($button.hasClass('btn-default')) { + $button.removeClass('btn-default'); + $button.addClass('btn-primary'); + $('.column-'+v).show() + } else { + $button.removeClass('btn-primary'); + $button.addClass('btn-default'); + $('.column-'+v).hide() + } + } +</script>
\ No newline at end of file |