Merge pull request #2454 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2017-02-09 19:01:44 -05:00 committed by GitHub
commit 941a2d0269
4 changed files with 22 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,9 +6,12 @@
<div class="emby-button-foreground">${TabHome}</div>
</button>
<button is="emby-button" class="emby-tab-button" data-index="1">
<div class="emby-button-foreground">${TabFavorites}</div>
<div class="emby-button-foreground">${TabNextUp}</div>
</button>
<button is="emby-button" class="emby-tab-button" data-index="2">
<div class="emby-button-foreground">${TabFavorites}</div>
</button>
<button is="emby-button" class="emby-tab-button" data-index="3">
<div class="emby-button-foreground">${TabUpcoming}</div>
</button>
</div>
@ -23,10 +26,23 @@
<div class="sections"></div>
</div>
<div class="pageTabContent ehsContent fullWidth" id="favoritesTab" data-index="1">
<div class="pageTabContent ehsContent fullWidth" id="nextUpTab" data-index="1">
<div class="homePageSection">
<div>
<h1 class="listHeader nextUpHeader" style="display: inline-block; vertical-align: middle;">${HeaderNextUp}</h1>
<button is="emby-button" type="button" class="raised submit mini categorySyncButton button-accent" data-category="NextUp">
<span>${ButtonSync}</span>
</button>
</div>
<div is="emby-itemscontainer" id="nextUpItems" class="itemsContainer vertical-wrap">
</div>
</div>
<p class="noNextUpItems hide">${NoNextUpItemsMessage}</p>
</div>
<div class="pageTabContent ehsContent fullWidth" id="favoritesTab" data-index="2">
<div class="favoriteSections"></div>
</div>
<div class="pageTabContent ehsContent fullWidth" id="upcomingTab" data-index="2">
<div class="pageTabContent ehsContent fullWidth" id="upcomingTab" data-index="3">
<div id="upcomingItems">
</div>
<div class="noItemsMessage hide">

View File

@ -0,0 +1 @@
define(["components/categorysyncbuttons","cardBuilder","apphost","imageLoader","emby-itemscontainer"],function(categorysyncbuttons,cardBuilder,appHost,imageLoader){"use strict";function getNextUpPromise(){var query={Limit:24,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:Dashboard.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb"};return ApiClient.getNextUpEpisodes(query)}function loadNextUp(page,promise){promise.then(function(result){result.Items.length?page.querySelector(".noNextUpItems").classList.add("hide"):page.querySelector(".noNextUpItems").classList.remove("hide");var html="",supportsImageAnalysis=appHost.supports("imageanalysis");html+=cardBuilder.getCardsHtml({items:result.Items,shape:"backdrop",showTitle:!0,showParentTitle:!0,overlayText:!1,lazy:!0,preferThumb:!0,showDetailsMenu:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!0,context:"home-nextup",cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis});var elem=page.querySelector("#nextUpItems");elem.innerHTML=html,imageLoader.lazyChildren(elem),Dashboard.hideLoadingMsg()})}return function(view,params,tabContent){var nextUpPromise,self=this;categorysyncbuttons.init(view),self.preRender=function(){nextUpPromise=getNextUpPromise()},self.renderTab=function(){Dashboard.showLoadingMsg(),loadNextUp(view,nextUpPromise)}}});

File diff suppressed because one or more lines are too long