diff --git a/Teknik/Areas/Stats/Views/Stats/Index.cshtml b/Teknik/Areas/Stats/Views/Stats/Index.cshtml index 8800c61..4f69eba 100644 --- a/Teknik/Areas/Stats/Views/Stats/Index.cshtml +++ b/Teknik/Areas/Stats/Views/Stats/Index.cshtml @@ -14,13 +14,13 @@ @if (Config.StatsConfig.Enabled) {
-
+

Site Statistics


@if (Config.PiwikConfig.Enabled) diff --git a/Teknik/Areas/User/Views/User/ViewServiceData.cshtml b/Teknik/Areas/User/Views/User/ViewServiceData.cshtml index e0f8787..48ee311 100644 --- a/Teknik/Areas/User/Views/User/ViewServiceData.cshtml +++ b/Teknik/Areas/User/Views/User/ViewServiceData.cshtml @@ -11,13 +11,13 @@
-
+
@foreach (Teknik.Areas.Upload.Models.Upload upload in Model.Uploads) {
diff --git a/Teknik/Scripts/Stats/Stats.js b/Teknik/Scripts/Stats/Stats.js index 06f58d2..60aae1e 100644 --- a/Teknik/Scripts/Stats/Stats.js +++ b/Teknik/Scripts/Stats/Stats.js @@ -9,6 +9,17 @@ $(document).ready(function () { $('#oneTime-section').collapse('hide'); $('#donations-section').collapse('hide'); $('#takedowns-section').collapse('hide'); + + $('a[data-toggle="tab"]').on('shown.bs.tab', function () { + // save the latest tab; use cookies if you like 'em better: + localStorage.setItem('lastTab_stats', $(this).attr('href')); + }); + + // go to the latest tab, if it exists: + var lastTab = localStorage.getItem('lastTab_stats'); + if (lastTab) { + $('a[href="' + lastTab + '"]').tab('show'); + } ///* ---------------------------------------- // CPU Usage diff --git a/Teknik/Scripts/User/ViewServiceData.js b/Teknik/Scripts/User/ViewServiceData.js index dbd20aa..5196536 100644 --- a/Teknik/Scripts/User/ViewServiceData.js +++ b/Teknik/Scripts/User/ViewServiceData.js @@ -23,6 +23,17 @@ $(document).ready(function () { var element = $('#vaults [id="' + id + '"'); deleteItem(deleteVaultURL, id, element, "Are you sure you want to delete this vault?"); }); + + $('a[data-toggle="tab"]').on('shown.bs.tab', function () { + // save the latest tab; use cookies if you like 'em better: + localStorage.setItem('lastTab_serviceData', $(this).attr('href')); + }); + + // go to the latest tab, if it exists: + var lastTab = localStorage.getItem('lastTab_serviceData'); + if (lastTab) { + $('a[href="' + lastTab + '"]').tab('show'); + } }); function deleteItem(url, id, element, confirmationMsg) { diff --git a/Teknik/Scripts/common.js b/Teknik/Scripts/common.js index 1cbbfe1..58d6ead 100644 --- a/Teknik/Scripts/common.js +++ b/Teknik/Scripts/common.js @@ -67,18 +67,6 @@ $(function () { e.stopPropagation(); }); - // for bootstrap 3 use 'shown.bs.tab', for bootstrap 2 use 'shown' in the next line - $('a[data-toggle="tab"]').on('shown.bs.tab', function () { - // save the latest tab; use cookies if you like 'em better: - localStorage.setItem('lastTab', $(this).attr('href')); - }); - - // go to the latest tab, if it exists: - var lastTab = localStorage.getItem('lastTab'); - if (lastTab) { - $('[href="' + lastTab + '"]').tab('show'); - } - // Auo-select bitcoin address $('#bitcoin_address_footer').click(function() { SelectAll('bitcoin_address_footer');