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

add server management to web client

This commit is contained in:
Luke Pulverenti 2014-11-04 07:41:12 -05:00
parent 6b8d9149bc
commit f7ba95439b
11 changed files with 363 additions and 46 deletions

View file

@ -111,12 +111,6 @@
Dashboard.hideLoadingMsg();
}
function getDisplayTime(hour) {
return new Date(2000, 1, 1, hour, 0, 0, 0).toLocaleTimeString();
}
function deleteAccessSchedule(page, schedules, index) {
schedules.splice(index, 1);
@ -214,6 +208,19 @@
}
};
function getDisplayTime(hours) {
var minutes = 0;
var pct = hours % 1;
if (pct) {
minutes = parseInt(pct * 60);
}
return new Date(2000, 1, 1, hours, minutes, 0, 0).toLocaleTimeString();
}
function populateHours(page) {
var html = '';
@ -223,6 +230,8 @@
html += '<option value="' + i + '">' + getDisplayTime(i) + '</option>';
}
html += '<option value="24">' + getDisplayTime(0) + '</option>';
$('#selectStart', page).html(html).selectmenu('refresh');
$('#selectEnd', page).html(html).selectmenu('refresh');
}
@ -290,7 +299,7 @@
$('.btnAddSchedule', page).on('click', function () {
showSchedulePopup(page, {}, -1);
showSchedulePopup(page, {}, -1);
});
populateHours(page);