.vscode
Fab2ApprovalMKLink
Fab2ApprovalSystem
.vscode
App_Start
Content
Controllers
DMO
EmailTemplates
FTPBatch
JobSchedules
Jobs
Lib
Misc
Models
PdfGenerator
Properties
Scripts
jqwidgets
kendo
_references.js
bootstrap.js
bootstrap.min.js
common.js
excel-bootstrap-table-filter-bundle.js
excel-bootstrap-table-filter-bundle.js.map
excel-bootstrap-table-filter-bundle.min.js
excel-bootstrap-table-filter-bundle.min.js.map
jquery-1.10.2.intellisense.js
jquery-1.10.2.js
jquery-1.10.2.min.js
jquery-1.10.2.min.map
jquery-ui-1.10.3.js
jquery-ui-1.10.3.min.js
jquery.min.js
jquery.unobtrusive-ajax.js
jquery.unobtrusive-ajax.min.js
jquery.validate-vsdoc.js
jquery.validate.js
jquery.validate.min.js
jquery.validate.unobtrusive.js
jquery.validate.unobtrusive.min.js
js.cookie.js
modernizr-2.6.2.js
moment.js
respond.js
respond.min.js
Utilities
ViewModels
Views
fonts
.editorconfig
Fab2ApprovalSystem.csproj
Global.asax
Global.asax.cs
Project_Readme.html
README.md
Startup.cs
Test.html
Web.Debug.config
Web.Release.config
Web.config
favicon.ico
package.json
pipelines-manual.yml
pipelines.yml
Fab2ApprovalTests
Kendo
MesaFabApproval.API
MesaFabApproval.API.Test
MesaFabApproval.Client
MesaFabApproval.Client.Test
MesaFabApproval.Shared
SQL
references
.editorconfig
.gitignore
Fab2ApprovalSystem.sln
Fab2ApprovalSystem.yml
README.md
64 lines
1.4 KiB
JavaScript
64 lines
1.4 KiB
JavaScript
|
|
|
|
var timoutWarning = 1740000; // Display warning in 29 Mins.
|
|
var timoutNow = 1800000; // Timeout in 30 mins.
|
|
//var timoutWarning = 10000; // Display warning in 10 secs.
|
|
//var timoutNow = 20000; // Timeout in 20 secs
|
|
var logoutUrl = '/Home/MyTasks'; // URL to logout page.
|
|
|
|
var warningTimer;
|
|
var timeoutTimer;
|
|
|
|
// Start timers.
|
|
function StartTimers() {
|
|
|
|
warningTimer = setTimeout("IdleWarning()", timoutWarning);
|
|
timeoutTimer = setTimeout("IdleTimeout()", timoutNow);
|
|
}
|
|
|
|
// Reset timers.
|
|
function ResetTimers() {
|
|
clearTimeout(warningTimer);
|
|
clearTimeout(timeoutTimer);
|
|
StartTimers();
|
|
|
|
}
|
|
|
|
function IdleTimeout() {
|
|
//window.location = logoutUrl;
|
|
//var url = '/MyTasks/Home';
|
|
window.location.href = logoutUrl;
|
|
|
|
}
|
|
|
|
|
|
// Show idle timeout warning dialog.
|
|
function IdleWarning() {
|
|
|
|
|
|
$("#timeout").modal('show');
|
|
}
|
|
|
|
|
|
function DisplayAPIError(description, xhr) {
|
|
if (xhr.status === 401) {
|
|
return;
|
|
}
|
|
var msg = "Error occurred during " + description + "\r\n";
|
|
try {
|
|
var resp = JSON.parse(xhr.responseText);
|
|
|
|
if (resp.result === "Error") {
|
|
msg = msg + resp.detail;
|
|
} else if (resp.result === "Invalid") {
|
|
msg = resp.detail;
|
|
} else {
|
|
msg = msg + xhr.responseText;
|
|
}
|
|
}
|
|
catch (e) {
|
|
msg = msg + xhr.responseText;
|
|
}
|
|
alert(msg);
|
|
}
|