Commit 1da5c4e9 by Masaru Abe

screenLock.jsリファクタリング

parent 6ba272bc
......@@ -2057,7 +2057,7 @@ COMMON.LockScreen = function() {
var timeWaitLockScreen = COMMON.getTimeWaitLockScreen();
if (timeWaitLockScreen > 0) {
//var message = I18N.i18nText("sysInfoScrLock01");
screenLock({
SCREENLOCK.screenLock({
timeout: timeWaitLockScreen,
html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message,
unlockFunc: COMMON.unlockFunction,
......
......@@ -22,7 +22,11 @@
* }
*
*/
function screenLock(options) {
//グローバルの名前空間用のオブジェクトを用意する
var SCREENLOCK = {};
SCREENLOCK.screenLock = function(options) {
var idleTimerId = null;
var bTimeout = false;
......@@ -54,7 +58,16 @@ function screenLock(options) {
}
};
var timeout, elmId, html, color, opacity, background, lockspeed, unlockEvent, unlockFunc, errorMessage;
var timeout;
var elmId;
var html;
var color;
var opacity;
var background;
var lockspeed;
var unlockEvent;
var unlockFunc;
var errorMessage;
// overlay option
if(options) {
......@@ -121,11 +134,10 @@ function screenLock(options) {
// すでにロック状態かどうかをチェックし、ロック状態であれば、即ロックをかける
if(isLocked()) {
idleStateTimeout = 0;
}
}
// clear lock state
removeLockState();
removeLockState();
// set idle timeout
idleTimerId = setTimeout(function() {
......@@ -222,7 +234,6 @@ removeLockState();
$('#screenLockErrMsg').text(AVWEB.format(errorMessage, val.errorCode.errorMessage));
$('#screenLockErrMsg').fadeIn();
$('#passwd-txt').focus();
return;
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment