-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocalVariableTimer.html
More file actions
98 lines (59 loc) · 3.86 KB
/
LocalVariableTimer.html
File metadata and controls
98 lines (59 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<html>
<head>
<title>Javascript clearInterval by using Local variable</title>
<link rel="stylesheet" href="Content/bootstrap/bootstrap.css"/>
</head>
<body ng-app="myApp" >
<a href="GlobalVariableTime.html">Gobal variable</a>
<br/>
<b> Your Logout time : <span id="demo"></span> </b><br/><br/>
<a ui-sref="home"> home</a>
<a ui-sref="product"> product</a>Click to see the product navigation page and stop timer , it not stopping
<div ui-view>
</div>
<div id="modeldialog">
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" style="z-index:20000">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<label class="session-expiration">
<img src="~/Images/Warning_Alert_Icon_26.png">
<span>Your session will expire in another 2 minutes!!</span>
</label>
</div>
<div class="modal-body">
<div class="session-message">
<p class="time-message"><b>Any unsaved changes will be lost.</b></p>
</div>
</div>
<div class="modal-footer">
<span class="time-messages"><b>click Proceed to stay login.</b></span>
<button type="button" class="btn btn-default btn-sm" ng-click="LogOut()">Logout</button>
<button type="button" class="btn btn-primary btn-sm" onclick="proceed()">Proceed</button>
</div>
</div>
</div>
</div>
</div>
<h1>Description sample demo:</h1>
<p>Requirement is </p>
Every 1 minute Idle check is running for user active or not
<p>
after user login,if user is idle for 5 minutes, 3 minutes gets the popup .
the pop have proceed button,if click the proceed , again extend 5 minutes,
After 3 minutes , get the popup.else logout.
In Ui router ,if user navigates between views, extend the time.
In proceed function also extend the time.
In Http request also handle the same.
In below example ,click product and navigate the page. if stopsession button triggered , need to clear the session. But its not working now.
Problem:
If i am using Global variable as idlecheck, after second time click proceed button , the functionality is not working in correct manner, In Between 3- 5minutes,its logout and before 3 minutes getting warning. for this problem , go to local variable.
the pop up is coming and logout, but not exactly popup comes at 3 minutes.
If using as local variable working as expected. But not able to clear the intervals.</p>
<script src="Scripts/jquery-1.9.1.js"></script>
<script src="Scripts/bootstrap/bootstrap.js"></script>
<script src="Scripts/angular.js"></script>
<script src="Scripts/angular-ui-router.js"></script>
<script src="LocalVariableApp.js"></script>
</body>
</html>