restore tv series alphabet picker

This commit is contained in:
Luke Pulverenti 2017-02-14 16:11:06 -05:00
parent bb7710e105
commit 27e8d4fb0a
14 changed files with 17 additions and 14 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(["appSettings","events","browser"],function(appsettings,events,browser){"use strict";return function(){function onSaveTimeout(){saveTimeout=null,currentApiClient.updateDisplayPreferences("usersettings",displayPrefs,currentUserId,"emby")}function saveServerPreferences(){saveTimeout&&clearTimeout(saveTimeout),saveTimeout=setTimeout(onSaveTimeout,50)}var currentUserId,currentApiClient,displayPrefs,saveTimeout,self=this;self.setUserInfo=function(userId,apiClient){return saveTimeout&&clearTimeout(saveTimeout),currentUserId=userId,currentApiClient=apiClient,userId?apiClient.getDisplayPreferences("usersettings",userId,"emby").then(function(result){result.CustomPrefs=result.CustomPrefs||{},displayPrefs=result}):(displayPrefs=null,Promise.resolve())},self.getData=function(){return displayPrefs},self.importFrom=function(instance){displayPrefs=instance.getData()},self.set=function(name,value,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");var currentValue=self.get(name);appsettings.set(name,value,userId),enableOnServer!==!1&&displayPrefs&&(displayPrefs.CustomPrefs[name]=null==value?value:value.toString(),saveServerPreferences()),currentValue!==value&&events.trigger(self,"change",[name])},self.get=function(name,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");return enableOnServer!==!1&&displayPrefs?displayPrefs.CustomPrefs[name]:appsettings.get(name,userId)},self.enableCinemaMode=function(val){return null!=val&&self.set("enableCinemaMode",val.toString(),!1),val=self.get("enableCinemaMode",!1),!val||"false"!==val},self.enableThemeSongs=function(val){return null!=val&&self.set("enableThemeSongs",val.toString(),!1),val=self.get("enableThemeSongs",!1),"false"!==val},self.enableThemeVideos=function(val){return null!=val&&self.set("enableThemeVideos",val.toString(),!1),val=self.get("enableThemeVideos",!1),val?"false"!==val:!browser.slow},self.language=function(val){return null!=val&&self.set("language",val.toString(),!1),self.get("language",!1)},self.skipBackLength=function(val){return null!=val&&self.set("skipBackLength",val.toString()),parseInt(self.get("skipBackLength")||"15000")},self.skipForwardLength=function(val){return null!=val&&self.set("skipForwardLength",val.toString()),parseInt(self.get("skipForwardLength")||"15000")},self.serverConfig=function(config){var apiClient=currentApiClient;return config?apiClient.updateUserConfiguration(currentUserId,config):apiClient.getUser(currentUserId).then(function(user){return user.Configuration})}}});
define(["appSettings","events","browser"],function(appsettings,events,browser){"use strict";function UserSettings(){function onSaveTimeout(){saveTimeout=null,currentApiClient.updateDisplayPreferences("usersettings",displayPrefs,currentUserId,"emby")}function saveServerPreferences(){saveTimeout&&clearTimeout(saveTimeout),saveTimeout=setTimeout(onSaveTimeout,50)}var currentUserId,currentApiClient,displayPrefs,saveTimeout,self=this;self.setUserInfo=function(userId,apiClient){return saveTimeout&&clearTimeout(saveTimeout),currentUserId=userId,currentApiClient=apiClient,userId?apiClient.getDisplayPreferences("usersettings",userId,"emby").then(function(result){result.CustomPrefs=result.CustomPrefs||{},displayPrefs=result}):(displayPrefs=null,Promise.resolve())},self.getData=function(){return displayPrefs},self.importFrom=function(instance){displayPrefs=instance.getData()},self.set=function(name,value,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");var currentValue=self.get(name);appsettings.set(name,value,userId),enableOnServer!==!1&&displayPrefs&&(displayPrefs.CustomPrefs[name]=null==value?value:value.toString(),saveServerPreferences()),currentValue!==value&&events.trigger(self,"change",[name])},self.get=function(name,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");return enableOnServer!==!1&&displayPrefs?displayPrefs.CustomPrefs[name]:appsettings.get(name,userId)},self.serverConfig=function(config){var apiClient=currentApiClient;return config?apiClient.updateUserConfiguration(currentUserId,config):apiClient.getUser(currentUserId).then(function(user){return user.Configuration})},self.loadQuerySettings=function(){}}function getSavedQueryKey(context){return"query-"+context}return UserSettings.prototype.enableCinemaMode=function(val){return null!=val&&this.set("enableCinemaMode",val.toString(),!1),val=this.get("enableCinemaMode",!1),!val||"false"!==val},UserSettings.prototype.enableThemeSongs=function(val){return null!=val&&this.set("enableThemeSongs",val.toString(),!1),val=this.get("enableThemeSongs",!1),"false"!==val},UserSettings.prototype.enableThemeVideos=function(val){return null!=val&&this.set("enableThemeVideos",val.toString(),!1),val=this.get("enableThemeVideos",!1),val?"false"!==val:!browser.slow},UserSettings.prototype.language=function(val){return null!=val&&this.set("language",val.toString(),!1),this.get("language",!1)},UserSettings.prototype.skipBackLength=function(val){return null!=val&&this.set("skipBackLength",val.toString()),parseInt(this.get("skipBackLength")||"15000")},UserSettings.prototype.skipForwardLength=function(val){return null!=val&&this.set("skipForwardLength",val.toString()),parseInt(this.get("skipForwardLength")||"15000")},UserSettings.prototype.loadQuerySettings=function(query,context){var key=getSavedQueryKey(context),values=this.get(key);if(values)return values=JSON.parse(values),Object.assign(query,values)},UserSettings.prototype.saveQuerySettings=function(query,context){var key=getSavedQueryKey(context),values={};query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder),this.set(key,JSON.stringify(values))},UserSettings});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.appfooter{background:#1c1c1c;position:fixed;left:0;right:0;z-index:1;bottom:0;-webkit-transition:-webkit-transform 180ms linear;-o-transition:transform 180ms linear;transition:transform 180ms linear;contain:layout style}.appfooter-blurred{background:rgba(28,28,28,.92);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.appfooter.headroom--unpinned{-webkit-transform:translateY(100%);transform:translateY(100%)}
.appfooter{background:#101010;position:fixed;left:0;right:0;z-index:1;bottom:0;-webkit-transition:-webkit-transform 180ms linear;-o-transition:transform 180ms linear;transition:transform 180ms linear;contain:layout style;border-top:1px solid #202020}.appfooter-blurred{background:rgba(28,28,28,.92);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.appfooter.headroom--unpinned{-webkit-transform:translateY(100%);transform:translateY(100%)}

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;font-size:inherit;font-size:13px}.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:12.4px!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,.dockedtabs-tab-button-foreground{font-weight:400!important}.dockedtabs-tab-button-icon{margin-bottom:.25em;font-size:22px}@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;font-size:inherit;font-size:13px}.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:11.6px!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,.dockedtabs-tab-button-foreground{font-weight:400!important}.dockedtabs-tab-button-icon{margin-bottom:.25em;font-size:22px}@media all and (max-width:640px){.dockedtab-midsize{display:none!important}}

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

View File

@ -1 +1 @@
.nowPlayingBarText,.nowPlayingText{overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.nowPlayingText{display:inline-block;position:relative;top:-7px;margin:0 0 0 3px;vertical-align:middle;text-align:left;max-width:130px}.mediaButton.active{color:#52B54B}@media (min-width:500px){.nowPlayingText{max-width:180px}}@media (min-width:600px){.nowPlayingText{max-width:200px}}@media (min-width:800px){.nowPlayingText{margin-right:30px}}.nowPlayingBarInfoContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.currentTime{display:inline-block;vertical-align:middle;max-width:110px;margin-right:2em;font-weight:400}.nowPlayingBar{color:#fff;text-align:center;will-change:transform;contain:layout style;font-size:90%;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.nowPlayingBar-hidden{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.hiddenNowPlayingBar .nowPlayingBar{display:none!important}.nowPlayingBarTop{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mediaButton,.nowPlayingBarUserDataButtons .btnUserItemRating{vertical-align:middle;color:#e8e8e8;margin:0;text-align:center}.mediaButton i{height:1em;width:1em;font-size:36px}.mediaButton.castButton i,.mediaButton.infoButton i,.mediaButton.muteButton i,.mediaButton.unmuteButton i{font-size:24px}.nowPlayingImage{display:inline-block;vertical-align:middle;margin-right:1em}.nowPlayingImage img{vertical-align:bottom;height:64px}.nowPlayingBar .nowPlayingImage{width:64px;height:64px;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;background-size:contain}.nowPlayingBarText{vertical-align:middle;text-align:left;max-width:130px;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.repeatActive{color:#52B54B}@media (min-width:500px){.nowPlayingBarText{max-width:180px}}@media (min-width:600px){.nowPlayingBarText{max-width:200px}}@media (min-width:700px){.nowPlayingBarText{max-width:240px}}@media (min-width:800px){.nowPlayingBarText{max-width:300px;margin-right:30px}}@media (min-width:900px){.nowPlayingBarText{max-width:400px}}.nowPlayingBarCenter{vertical-align:middle;text-align:center;margin-top:6px;z-index:2;position:absolute;left:200px;right:200px;top:0}.nowPlayingBarPositionContainer{position:absolute!important;left:64px;top:-8px;right:0;z-index:1}.nowPlayingBarPositionContainer .mdl-slider__background-upper{background:#333}.headroom--unpinned .nowPlayingBarPositionContainer,.noMediaProgress .nowPlayingBarPositionContainer{display:none}.nowPlayingBarRight{position:relative;margin:0 1em 0 auto;z-index:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.nowPlayingBarCurrentTime{vertical-align:middle;font-weight:400;text-align:center;display:inline-block;margin:0 auto;padding-left:50px}.nowPlayingBarVolumeSliderContainer{margin-right:2em}.nowPlayingBarUserDataButtons{display:inline-block;margin-left:2em;margin-right:2em}@media all and (max-width:1400px){.nowPlayingBarUserDataButtons{display:none}}@media all and (max-width:1100px){.nowPlayingBar .muteButton,.nowPlayingBar .unmuteButton,.nowPlayingBarVolumeSliderContainer{display:none!important}}@media all and (max-width:800px){.nowPlayingBarCurrentTime{padding-left:0;top:22px;right:140px;position:absolute}.nowPlayingBarCenter>:not(.nowPlayingBarCurrentTime){display:none!important}.toggleRepeatButton{display:none}}@media all and (min-width:800px){.nowPlayingBarRight .playPauseButton{display:none}}@media all and (max-width:600px){.nowPlayingBarCurrentTime{display:none}}
.nowPlayingBarText,.nowPlayingText{overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.nowPlayingText{display:inline-block;position:relative;top:-7px;margin:0 0 0 3px;vertical-align:middle;text-align:left;max-width:130px}.mediaButton.active{color:#52B54B}@media (min-width:500px){.nowPlayingText{max-width:180px}}@media (min-width:600px){.nowPlayingText{max-width:200px}}@media (min-width:800px){.nowPlayingText{margin-right:30px}}.nowPlayingBarInfoContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.currentTime{display:inline-block;vertical-align:middle;max-width:110px;margin-right:2em;font-weight:400}.nowPlayingBar{color:#fff;text-align:center;will-change:transform;contain:layout style;font-size:90%;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.nowPlayingBar-hidden{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.hiddenNowPlayingBar .nowPlayingBar{display:none!important}.nowPlayingBarTop{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mediaButton,.nowPlayingBarUserDataButtons .btnUserItemRating{vertical-align:middle;color:#e8e8e8;margin:0;text-align:center}.mediaButton i{height:1em;width:1em;font-size:36px}.mediaButton.castButton i,.mediaButton.infoButton i,.mediaButton.muteButton i,.mediaButton.unmuteButton i{font-size:24px}.nowPlayingImage{display:inline-block;vertical-align:middle;margin-right:1em}.nowPlayingImage img{vertical-align:bottom;height:64px}.nowPlayingBar .nowPlayingImage{width:64px;height:64px;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;background-size:contain}.nowPlayingBarText{vertical-align:middle;text-align:left;max-width:130px;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.repeatActive{color:#52B54B}@media (min-width:500px){.nowPlayingBarText{max-width:180px}}@media (min-width:600px){.nowPlayingBarText{max-width:200px}}@media (min-width:700px){.nowPlayingBarText{max-width:240px}}@media (min-width:800px){.nowPlayingBarText{max-width:300px;margin-right:30px}}@media (min-width:900px){.nowPlayingBarText{max-width:400px}}.nowPlayingBarCenter{vertical-align:middle;text-align:center;margin-top:6px;z-index:2;position:absolute;left:200px;right:200px;top:0}.nowPlayingBarPositionContainer{position:absolute!important;left:64px;top:-8px;right:0;z-index:1}.nowPlayingBarPositionContainer .mdl-slider__background-upper{background:#222}.headroom--unpinned .nowPlayingBarPositionContainer,.noMediaProgress .nowPlayingBarPositionContainer{display:none}.nowPlayingBarRight{position:relative;margin:0 1em 0 auto;z-index:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.nowPlayingBarCurrentTime{vertical-align:middle;font-weight:400;text-align:center;display:inline-block;margin:0 auto;padding-left:50px}.nowPlayingBarVolumeSliderContainer{margin-right:2em}.nowPlayingBarUserDataButtons{display:inline-block;margin-left:2em;margin-right:2em}@media all and (max-width:1400px){.nowPlayingBarUserDataButtons{display:none}}@media all and (max-width:1100px){.nowPlayingBar .muteButton,.nowPlayingBar .unmuteButton,.nowPlayingBarVolumeSliderContainer{display:none!important}}@media all and (max-width:800px){.nowPlayingBarCurrentTime{padding-left:0;top:22px;right:140px;position:absolute}.nowPlayingBarCenter>:not(.nowPlayingBarCurrentTime){display:none!important}.toggleRepeatButton{display:none}}@media all and (min-width:800px){.nowPlayingBarRight .playPauseButton{display:none}}@media all and (max-width:600px){.nowPlayingBarCurrentTime{display:none}}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["cardBuilder","imageLoader","emby-itemscontainer"],function(cardBuilder,imageLoader){"use strict";return function(view,params,tabContent){function getPageData(context){var key=getSavedQueryKey(context),pageData=data[key];return pageData||(pageData=data[key]={query:{StartIndex:0,Limit:LibraryBrowser.getDefaultPageSize(),Fields:"PrimaryImageAspectRatio"}},LibraryBrowser.loadSavedQueryValues(key,pageData.query)),pageData}function getQuery(context){return getPageData(context).query}function getSavedQueryKey(context){return context.savedQueryKey||(context.savedQueryKey=LibraryBrowser.getSavedQueryKey("channels")),context.savedQueryKey}function getChannelsHtml(channels){return cardBuilder.getCardsHtml({items:channels,shape:"square",showTitle:!0,lazy:!0,cardLayout:!0,showDetailsMenu:!0,showCurrentProgram:!0})}function renderChannels(context,result){function onNextPageClick(){query.StartIndex+=query.Limit,reloadItems(context)}function onPreviousPageClick(){query.StartIndex-=query.Limit,reloadItems(context)}var query=getQuery(context);context.querySelector(".paging").innerHTML=LibraryBrowser.getQueryPagingHtml({startIndex:query.StartIndex,limit:query.Limit,totalRecordCount:result.TotalRecordCount,showLimit:!1,updatePageSizeSetting:!1,filterButton:!1});var html=getChannelsHtml(result.Items),elem=context.querySelector("#items");elem.innerHTML=html,imageLoader.lazyChildren(elem);var i,length,elems;for(elems=context.querySelectorAll(".btnNextPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onNextPageClick);for(elems=context.querySelectorAll(".btnPreviousPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onPreviousPageClick);LibraryBrowser.saveQueryValues(getSavedQueryKey(context),query)}function showFilterMenu(context){require(["components/filterdialog/filterdialog"],function(filterDialogFactory){var filterDialog=new filterDialogFactory({query:getQuery(context),mode:"livetvchannels"});Events.on(filterDialog,"filterchange",function(){reloadItems(context)}),filterDialog.show()})}function reloadItems(context){Dashboard.showLoadingMsg();var query=getQuery(context);query.UserId=Dashboard.getCurrentUserId(),ApiClient.getLiveTvChannels(query).then(function(result){renderChannels(context,result),Dashboard.hideLoadingMsg()})}var self=this,data={};tabContent.querySelector(".btnFilter").addEventListener("click",function(){showFilterMenu(tabContent)}),self.renderTab=function(){reloadItems(tabContent)}}});
define(["cardBuilder","imageLoader","libraryBrowser","loading","emby-itemscontainer"],function(cardBuilder,imageLoader,libraryBrowser,loading){"use strict";return function(view,params,tabContent){function getPageData(){return pageData||(pageData={query:{StartIndex:0,Limit:100,Fields:"PrimaryImageAspectRatio"}}),pageData}function getQuery(){return getPageData().query}function getChannelsHtml(channels){return cardBuilder.getCardsHtml({items:channels,shape:"square",showTitle:!0,lazy:!0,cardLayout:!0,showDetailsMenu:!0,showCurrentProgram:!0})}function renderChannels(context,result){function onNextPageClick(){query.StartIndex+=query.Limit,reloadItems(context)}function onPreviousPageClick(){query.StartIndex-=query.Limit,reloadItems(context)}var query=getQuery();context.querySelector(".paging").innerHTML=libraryBrowser.getQueryPagingHtml({startIndex:query.StartIndex,limit:query.Limit,totalRecordCount:result.TotalRecordCount,showLimit:!1,updatePageSizeSetting:!1,filterButton:!1});var html=getChannelsHtml(result.Items),elem=context.querySelector("#items");elem.innerHTML=html,imageLoader.lazyChildren(elem);var i,length,elems;for(elems=context.querySelectorAll(".btnNextPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onNextPageClick);for(elems=context.querySelectorAll(".btnPreviousPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onPreviousPageClick)}function showFilterMenu(context){require(["components/filterdialog/filterdialog"],function(filterDialogFactory){var filterDialog=new filterDialogFactory({query:getQuery(),mode:"livetvchannels"});Events.on(filterDialog,"filterchange",function(){reloadItems(context)}),filterDialog.show()})}function reloadItems(context,save){loading.show();var query=getQuery(),apiClient=ApiClient;query.UserId=apiClient.getCurrentUserId(),apiClient.getLiveTvChannels(query).then(function(result){renderChannels(context,result),loading.hide()})}var pageData,self=this;tabContent.querySelector(".btnFilter").addEventListener("click",function(){showFilterMenu(tabContent)}),self.renderTab=function(){reloadItems(tabContent)}}});

File diff suppressed because one or more lines are too long

View File

@ -81,8 +81,11 @@
<button is="paper-icon-button-light" class="btnFilter autoSize" title="${ButtonFilter}"><i class="md-icon">filter_list</i></button>
</div>
<div is="emby-itemscontainer" class="itemsContainer">
<div is="emby-itemscontainer" class="itemsContainer itemsContainerWithAlphaPicker">
</div>
<div class="alphaPicker alphabetPicker alphaPicker-vertical">
</div>
<div style="text-align: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;padding:.7em .5em;">
<div class="paging"></div>
</div>