Browse Source

Renamed trusted devices setting.

Added reselecting of current tab after a refresh.
tags/2.0.3
Teknikode 4 years ago
parent
commit
140d0a0371
2 changed files with 20 additions and 1 deletions
  1. 1
    1
      Teknik/Areas/User/Views/User/Settings.cshtml
  2. 19
    0
      Teknik/Scripts/Common.js

+ 1
- 1
Teknik/Areas/User/Views/User/Settings.cshtml View File

@@ -161,7 +161,7 @@
</p>
</div>
<div class="col-sm-4 text-left">
<label for="update_security_allow_trusted"><h4>Allow Trusted Device Saving</h4></label>
<label for="update_security_allow_trusted"><h4>Allow Trusted Devices</h4></label>
<div class="checkbox">
<label>
<input id="update_security_allow_trusted" name="update_security_allow_trusted" title="whether a device could be cached to bypass two factor authentication" type="checkbox" value="true" @(Model.SecuritySettings.AllowTrustedDevices ? "checked" : string.Empty) />

+ 19
- 0
Teknik/Scripts/Common.js View File

@@ -74,6 +74,18 @@ $(function () {
$('.dropdown input, .dropdown label').click(function (e) {
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 (e) {
// 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');
}
});

function removeAmp(code) {
@@ -113,6 +125,13 @@ function SelectAll(id) {
document.getElementById(id).select();
}

function getAnchor() {
var currentUrl = document.URL,
urlParts = currentUrl.split('#');

return (urlParts.length > 1) ? urlParts[1] : null;
}

/***************************** TIMER Page Load *******************************/
var loopTime;
var startTime = new Date();

Loading…
Cancel
Save