You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
964 B
48 lines
964 B
/// <reference path="jquery-1.4.1-vsdoc.js" />
|
|
|
|
$(function () {
|
|
var speed = 0;
|
|
refreshNotifications();
|
|
|
|
var timer = window.setInterval(function () {
|
|
speed = 1000;
|
|
refreshNotifications();
|
|
}, 2000);
|
|
|
|
function refreshNotifications() {
|
|
$.ajax({
|
|
url: '/Notification',
|
|
success: notificationCallback
|
|
});
|
|
}
|
|
|
|
function notificationCallback(data) {
|
|
|
|
if (data === "") {
|
|
CloseMsg();
|
|
}
|
|
else {
|
|
DisplayMsg(data);
|
|
}
|
|
}
|
|
|
|
//SetupNotifications();
|
|
//DisplayMsg("Scanning Series Folder.");
|
|
|
|
function DisplayMsg(sMsg) {
|
|
//set the message text
|
|
$("#msgText").text(sMsg);
|
|
//show the message
|
|
$('#msgBox').slideDown(speed, null);
|
|
}
|
|
|
|
function CloseMsg() {
|
|
//hide the message
|
|
$('#msgBox').slideUp(speed, null);
|
|
//clear msg text
|
|
$("#msgtText").val("");
|
|
}
|
|
});
|
|
|
|
|