Skip to content

Commit

Permalink
Fixed time display. Added password field clearing.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrashSensei committed May 28, 2016
1 parent 4c11f7c commit 78d33bd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-idleTimeout-plus",
"description": "User idle detector with session keep-alive, warning dialog, lock screen, url redirection and support for multiple windows and tabs.",
"version": "0.9.2",
"version": "0.9.3",
"main": "dist/jquery-idleTimeout-plus.js",
"authors": [
"Jason Abraham",
Expand Down
4 changes: 3 additions & 1 deletion dist/js/jquery-idleTimeout-plus-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@

stopLockTimer();
closeLockScreen();
$('#jitp-lock-pass').val(''); //Don't want the password to stay in the field
if(config.keepAliveInterval) startKeepSessionAlive();
storeData('lockStartTime',-1);
initIdle();
Expand Down Expand Up @@ -1002,7 +1003,8 @@
}
var hoursLeft = Math.floor(minLeft/60);
minLeft %= 60;
if(minLeft <= 15 || minLeft >52) return 'about '+hoursLeft+' hours';
if(minLeft <= 15) return 'about '+hoursLeft+' hours';
if(minLeft > 52) return 'about '+(hoursLeft+1)+' hours';
return 'about '+hoursLeft+'&frac12; hours';
}

Expand Down
2 changes: 1 addition & 1 deletion dist/js/jquery-idleTimeout-plus-iframe.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/js/jquery-idleTimeout-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@

stopLockTimer();
closeLockScreen();
$('#jitp-lock-pass').val(''); //Don't want the password to stay in the field
if(config.keepAliveInterval) startKeepSessionAlive();
storeData('lockStartTime',-1);
initIdle();
Expand Down Expand Up @@ -876,7 +877,8 @@
}
var hoursLeft = Math.floor(minLeft/60);
minLeft %= 60;
if(minLeft <= 15 || minLeft >52) return 'about '+hoursLeft+' hours';
if(minLeft <= 15) return 'about '+hoursLeft+' hours';
if(minLeft > 52) return 'about '+(hoursLeft+1)+' hours';
return 'about '+hoursLeft+'&frac12; hours';
}

Expand Down
2 changes: 1 addition & 1 deletion dist/js/jquery-idleTimeout-plus.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-idleTimeout-plus",
"version": "0.9.2",
"version": "0.9.3",
"description": "User idle detector with session keep-alive, warning dialog, lock screen, url redirection and support for multiple windows and tabs.",
"main": "dist/jquery-idleTimeout-plus.js",
"homepage": "https://github.com/LinearSoft/jquery-idleTimeout-plus",
Expand Down
8 changes: 5 additions & 3 deletions src/jquery-idleTimeout-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@
/* --strip_testing_begin-- */
var testingConfig = {
idleTimeLimit: 30,
activityEvents: 'click keypress scroll wheel mousewheel', // Remove mousemove
warnTimeLimit: 30,
lockTimeLimit: 60,
keepAliveInterval: 10
keepAliveInterval: 10,
activityEvents: 'click keypress scroll wheel mousewheel' // Remove mousemove
};
/* --strip_testing_end-- */

Expand Down Expand Up @@ -664,6 +664,7 @@
console.log('rollbackLock called');
stopLockTimer();
closeLockScreen();
$('#jitp-lock-pass').val(''); //Don't want the password to stay in the field
if(config.keepAliveInterval) startKeepSessionAlive();
storeData('lockStartTime',-1);
initIdle();
Expand Down Expand Up @@ -1010,7 +1011,8 @@
}
var hoursLeft = Math.floor(minLeft/60);
minLeft %= 60;
if(minLeft <= 15 || minLeft >52) return 'about '+hoursLeft+' hours';
if(minLeft <= 15) return 'about '+hoursLeft+' hours';
if(minLeft > 52) return 'about '+(hoursLeft+1)+' hours';
return 'about '+hoursLeft+'&frac12; hours';
}

Expand Down

0 comments on commit 78d33bd

Please sign in to comment.