update main tabs

This commit is contained in:
Luke Pulverenti 2017-03-22 02:03:23 -04:00
parent f083d4b3a8
commit 846ad47cb6
15 changed files with 15 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["globalize","loading","connectionManager"],function(globalize,loading,connectionManager){"use strict";function changeRecordingToSeries(apiClient,timerId,programId){return loading.show(),apiClient.getItem(apiClient.getCurrentUserId(),programId).then(function(item){return item.IsSeries?cancelTimer(apiClient,timerId,!1).then(function(){return apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(timerDefaults){return apiClient.createLiveTvSeriesTimer(timerDefaults).then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#SeriesRecordingScheduled"))})})}):cancelTimer(apiClient,timerId,!0)})}function cancelTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelRecording"),cancelText:globalize.translate("sharedcomponents#HeaderKeepRecording")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);apiClient.cancelLiveTvTimer(timerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#RecordingCancelled"))}),loading.hide(),resolve()},reject)},reject)})})}function cancelSeriesTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelSeries"),cancelText:globalize.translate("sharedcomponents#HeaderKeepSeries")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);apiClient.cancelLiveTvSeriesTimer(timerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)},reject)})})}function cancelTimer(apiClient,timerId,hideLoading){return loading.show(),apiClient.cancelLiveTvTimer(timerId).then(function(){hideLoading&&(loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingCancelled")))})}function createRecording(apiClient,programId,isSeries){return loading.show(),apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(item){var promise=isSeries?apiClient.createLiveTvSeriesTimer(item):apiClient.createLiveTvTimer(item);return promise.then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingScheduled"))})})}function sendToast(msg){require(["toast"],function(toast){toast(msg)})}function toggleRecording(serverId,programId,timerId,timerStatus,seriesTimerId){var apiClient=connectionManager.getApiClient(serverId),hasTimer=timerId&&"Cancelled"!==timerStatus;return seriesTimerId&&hasTimer?cancelTimer(apiClient,timerId,!0):hasTimer&&programId?changeRecordingToSeries(apiClient,timerId,programId):programId?createRecording(apiClient,programId):Promise.reject()}return{cancelTimer:cancelTimer,createRecording:createRecording,changeRecordingToSeries:changeRecordingToSeries,toggleRecording:toggleRecording,cancelTimerWithConfirmation:cancelTimerWithConfirmation,cancelSeriesTimerWithConfirmation:cancelSeriesTimerWithConfirmation}});
define(["globalize","loading","connectionManager","registrationServices"],function(globalize,loading,connectionManager,registrationServices){"use strict";function changeRecordingToSeries(apiClient,timerId,programId,confirmTimerCancellation){return loading.show(),apiClient.getItem(apiClient.getCurrentUserId(),programId).then(function(item){return item.IsSeries?cancelTimer(apiClient,timerId,!1).then(function(){return apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(timerDefaults){return apiClient.createLiveTvSeriesTimer(timerDefaults).then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#SeriesRecordingScheduled"))})})}):confirmTimerCancellation?cancelTimerWithConfirmation(timerId,apiClient.serverId()):cancelTimer(apiClient.serverId(),timerId,!0)})}function cancelTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelRecording"),cancelText:globalize.translate("sharedcomponents#HeaderKeepRecording")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);cancelTimer(apiClient,timerId,!0).then(resolve,reject)},reject)})})}function cancelSeriesTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelSeries"),cancelText:globalize.translate("sharedcomponents#HeaderKeepSeries")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);apiClient.cancelLiveTvSeriesTimer(timerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)},reject)})})}function cancelTimer(apiClient,timerId,hideLoading){return loading.show(),apiClient.cancelLiveTvTimer(timerId).then(function(){hideLoading&&(loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingCancelled")))})}function createRecording(apiClient,programId,isSeries){return loading.show(),apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(item){var promise=isSeries&&item.IsSeries?apiClient.createLiveTvSeriesTimer(item):apiClient.createLiveTvTimer(item);return promise.then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingScheduled"))})})}function sendToast(msg){require(["toast"],function(toast){toast(msg)})}function showMultiCancellationPrompt(serverId,programId,timerId,timerStatus,seriesTimerId){return new Promise(function(resolve,reject){require(["dialog"],function(dialog){var items=[];items.push({name:globalize.translate("sharedcomponents#HeaderKeepRecording"),id:"cancel",type:"submit"}),items.push({name:globalize.translate("sharedcomponents#HeaderCancelRecording"),id:"canceltimer",type:"cancel"}),items.push({name:globalize.translate("sharedcomponents#HeaderCancelSeries"),id:"cancelseriestimer",type:"cancel"}),dialog({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),buttons:items}).then(function(result){var apiClient=connectionManager.getApiClient(serverId);"canceltimer"===result?(loading.show(),cancelTimer(apiClient,timerId,!0).then(resolve,reject)):"cancelseriestimer"===result?(loading.show(),apiClient.cancelLiveTvSeriesTimer(seriesTimerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)):resolve()},reject)})})}function toggleRecording(serverId,programId,timerId,timerStatus,seriesTimerId){return registrationServices.validateFeature("dvr").then(function(){var apiClient=connectionManager.getApiClient(serverId),hasTimer=timerId&&"Cancelled"!==timerStatus;return seriesTimerId&&hasTimer?showMultiCancellationPrompt(serverId,programId,timerId,timerStatus,seriesTimerId):hasTimer&&programId?changeRecordingToSeries(apiClient,timerId,programId,!0):programId?createRecording(apiClient,programId):Promise.reject()})}return{cancelTimer:cancelTimer,createRecording:createRecording,changeRecordingToSeries:changeRecordingToSeries,toggleRecording:toggleRecording,cancelTimerWithConfirmation:cancelTimerWithConfirmation,cancelSeriesTimerWithConfirmation:cancelSeriesTimerWithConfirmation}});

View File

@ -1 +1 @@
.dockedtabs-tabs{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;display:-webkit-box;display:-webkit-flex;display:flex;padding:.5em 0}.dockedtabs-tab-button{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-transform:none!important;font-size:82%!important;padding:0!important;margin:0!important;text-align:center;border-color:transparent!important;border-width:0!important;display:-webkit-box;display:-webkit-flex;display:flex}.dockedtabs-tab-button-noflex{display:block}.dockedtabs-tab-button-icon{margin-bottom:.25em;font-size:190%}@media all and (max-width:640px){.dockedtab-midsize{display:none!important}}
.dockedtabs-tabs{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;display:-webkit-box;display:-webkit-flex;display:flex;padding:.5em 0}.dockedtabs-tab-button{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-transform:none!important;font-size:82%!important;padding:0!important;margin:0!important;text-align:center;border-color:transparent!important;border-width:0!important;font-weight:400!important;display:-webkit-box;display:-webkit-flex;display:flex}.dockedtabs-tab-button-noflex{display:block}.dockedtabs-tab-button-icon{margin-bottom:.25em;font-size:190%}@media all and (max-width:640px){.dockedtab-midsize{display:none!important}}

View File

@ -1 +1 @@
define(["emby-tabs","emby-button"],function(){"use strict";function setTabs(type,selectedIndex,builder){var viewMenuBarTabs;if(!type)return void(tabType&&(document.body.classList.remove("withTallToolbar"),viewMenuBarTabs=queryScope.querySelector(".viewMenuBarTabs"),viewMenuBarTabs.innerHTML="",viewMenuBarTabs.classList.add("hide"),tabType=null));if(viewMenuBarTabs=queryScope.querySelector(".viewMenuBarTabs"),tabType||viewMenuBarTabs.classList.remove("hide"),tabType!=type){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"';return viewMenuBarTabs.innerHTML='<div is="emby-tabs"'+indexAttribute+' class="tabs-viewmenubar"><div class="emby-tabs-slider" style="white-space:nowrap;">'+builder().map(function(t){var tabHtml,tabClass="emby-tab-button";return tabHtml=t.href?'<button onclick="Dashboard.navigate(this.getAttribute(\'data-href\'));" type="button" data-href="'+t.href+'" is="emby-button" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></button>":'<button type="button" is="emby-button" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></button>",index++,tabHtml}).join("")+"</div></div>",document.body.classList.add("withTallToolbar"),tabType=type,!0}return viewMenuBarTabs.querySelector('[is="emby-tabs"]').selectedIndex(selectedIndex),tabType=type,!1}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabType,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement}});
define(["emby-tabs","emby-button"],function(){"use strict";function setTabs(view,selectedIndex,builder){var viewMenuBarTabs;if(!view)return void(tabOwnerView&&(document.body.classList.remove("withTallToolbar"),viewMenuBarTabs=queryScope.querySelector(".viewMenuBarTabs"),viewMenuBarTabs.innerHTML="",viewMenuBarTabs.classList.add("hide"),tabOwnerView=null));if(viewMenuBarTabs=queryScope.querySelector(".viewMenuBarTabs"),tabOwnerView||viewMenuBarTabs.classList.remove("hide"),tabOwnerView!==view){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"';return viewMenuBarTabs.innerHTML='<div is="emby-tabs"'+indexAttribute+' class="tabs-viewmenubar"><div class="emby-tabs-slider" style="white-space:nowrap;">'+builder().map(function(t){var tabHtml,tabClass="emby-tab-button";return tabHtml=t.href?'<button onclick="Dashboard.navigate(this.getAttribute(\'data-href\'));" type="button" data-href="'+t.href+'" is="emby-button" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></button>":'<button type="button" is="emby-button" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></button>",index++,tabHtml}).join("")+"</div></div>",document.body.classList.add("withTallToolbar"),tabOwnerView=view,!0}return viewMenuBarTabs.querySelector('[is="emby-tabs"]').selectedIndex(selectedIndex),tabOwnerView=view,!1}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabOwnerView,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<div id="moviesPage" data-role="page" data-dom-cache="true" class="page libraryPage backdropPage collectionEditorPage pageWithAbsoluteTabs withTabs" data-backdroptype="movie">
<div class="is-active pageTabContent ehsContent fullWidth" id="suggestionsTab" data-index="0">
<div class="pageTabContent ehsContent fullWidth" id="suggestionsTab" data-index="0">
<div id="resumableSection" class="homePageSection hide">
<div>
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderContinueWatching}</h1>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long