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

fix sync task button

This commit is contained in:
Luke Pulverenti 2016-08-17 16:32:39 -04:00
parent f6b89286dc
commit 9ebe643e87
9 changed files with 66 additions and 48 deletions

View file

@ -1,4 +1,4 @@
define(['loading', 'apphost', 'globalize', 'syncJobList', 'events', 'localsync', 'emby-button', 'paper-icon-button-light'], function (loading, appHost, globalize, syncJobList, events) {
define(['loading', 'apphost', 'globalize', 'syncJobList', 'events', 'scripts/taskbutton', 'localsync', 'emby-button', 'paper-icon-button-light'], function (loading, appHost, globalize, syncJobList, events, taskButton) {
function getTabs() {
return [
@ -57,6 +57,22 @@
view.addEventListener('viewshow', function () {
LibraryMenu.setTabs('syncadmin', 0, getTabs);
taskButton({
mode: 'on',
progressElem: view.querySelector('.syncProgress'),
taskKey: 'SyncPrepare',
button: view.querySelector('.btnSync')
});
});
view.addEventListener('viewbeforehide', function () {
taskButton({
mode: 'off',
taskKey: 'SyncPrepare',
button: view.querySelector('.btnSync')
});
});
view.addEventListener('viewdestroy', function () {