1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update selection buttons

This commit is contained in:
Luke Pulverenti 2015-07-14 12:39:34 -04:00
parent 59a3cada00
commit 1c27cdeb2c
35 changed files with 226 additions and 115 deletions

View file

@ -167,16 +167,31 @@
reloadList($.mobile.activePage);
}
var pollInterval;
function onPollIntervalFired() {
if (!ApiClient.isWebSocketOpen()) {
reloadList($.mobile.activePage);
}
}
function startInterval() {
if (ApiClient.isWebSocketOpen()) {
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
}
if (pollInterval) {
clearInterval(pollInterval);
}
pollInterval = setInterval(onPollIntervalFired, 1500);
}
function stopInterval() {
if (ApiClient.isWebSocketOpen()) {
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStop");
}
if (pollInterval) {
clearInterval(pollInterval);
}
}
$(document).on('pageinitdepends', "#scheduledTasksPage", function () {