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

update schedules direct page

This commit is contained in:
Luke Pulverenti 2015-07-27 01:03:34 -04:00
parent 1aeb69a26c
commit 2f69a6f07e
10 changed files with 225 additions and 235 deletions

View file

@ -55,11 +55,7 @@
} }
.largeCardMargin .cardBox { .largeCardMargin .cardBox {
margin: 8px; margin: 10px;
}
.mediumCardMargin .cardBox {
margin: 5px;
} }
.defaultBackground .cardImage { .defaultBackground .cardImage {

View file

@ -93,15 +93,6 @@
<a href="gamestudios.html">${TabStudios}</a> <a href="gamestudios.html">${TabStudios}</a>
</div> </div>
</div> </div>
<div id="gameSystemTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="gamesrecommended.html">${TabSuggestions}</a>
<a href="games.html">${TabGames}</a>
<a href="gamesystems.html" class="ui-btn-active">${TabGameSystems}</a>
<a href="gamegenres.html">${TabGenres}</a>
<a href="gamestudios.html">${TabStudios}</a>
</div>
</div>
<div id="itemBackdrop" class="itemBackdrop noBackdrop"> <div id="itemBackdrop" class="itemBackdrop noBackdrop">
<div class="itemBackdropContent"> <div class="itemBackdropContent">
@ -230,19 +221,6 @@
<div id="criticReviewsContent" class="detailSectionContent"></div> <div id="criticReviewsContent" class="detailSectionContent"></div>
</div> </div>
</div> </div>
<div class="detailSection detailsSection">
<div class="detailSectionHeader">
${HeaderDetails}
</div>
<div class="detailSectionContent" style="padding:0 1em;">
<div class="tabDetails">
<p id="players"></p>
<p class="itemExternalLinks"></p>
<p class="itemStudios"></p>
<p class="itemTags"></p>
</div>
</div>
</div>
<div id="scenesCollapsible" style="display: none;" class="detailSection"> <div id="scenesCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader"> <div class="detailSectionHeader">
@ -257,6 +235,19 @@
</div> </div>
<div id="themeSongsContent" class="detailSectionContent"></div> <div id="themeSongsContent" class="detailSectionContent"></div>
</div> </div>
<div class="detailSection detailsSection">
<div class="detailSectionHeader">
${HeaderDetails}
</div>
<div class="detailSectionContent" style="padding:0 1em;">
<div class="tabDetails">
<p id="players"></p>
<p class="itemExternalLinks"></p>
<p class="itemStudios"></p>
<p class="itemTags"></p>
</div>
</div>
</div>
<div id="themeVideosCollapsible" style="display: none;" class="detailSection"> <div id="themeVideosCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader"> <div class="detailSectionHeader">

View file

@ -19,8 +19,13 @@
<h1>Schedules Direct</h1> <h1>Schedules Direct</h1>
<p class="createAccountHelp"></p> <p class="createAccountHelp"></p>
<div style="background-color:rgba(82,181,75,.8);color:#fff;padding:.7em 1em;font-size:16px;border-radius:4px;"> <div style="font-size:16px;">
${GuideProviderLoginStep} <div style="display:inline-block;background-color:rgba(82,181,75,.8);color:#fff;padding:2px 10px;font-size:20px;border-radius:1000px;vertical-align:middle;">
1
</div>
<div style="display:inline-block;vertical-align:middle;margin-left:5px;">
${GuideProviderLogin}
</div>
</div> </div>
<form class="formLogin"> <form class="formLogin">
@ -42,8 +47,13 @@
<br /> <br />
<br /> <br />
<br /> <br />
<div style="background-color:rgba(82,181,75,.8);color:#fff;padding:.7em 1em;font-size:16px;border-radius:4px;"> <div style="font-size:16px;">
${GuideProviderListingsStep} <div style="display:inline-block;background-color:rgba(82,181,75,.8);color:#fff;padding:2px 10px;font-size:20px;border-radius:1000px;vertical-align:middle;">
2
</div>
<div style="display:inline-block;vertical-align:middle;margin-left:5px;">
${GuideProviderSelectListings}
</div>
</div> </div>
<form class="formListings"> <form class="formListings">
<div> <div>

View file

@ -76,7 +76,6 @@
preferThumb: section.preferThumb, preferThumb: section.preferThumb,
shape: section.shape, shape: section.shape,
overlayText: section.overlayText !== false, overlayText: section.overlayText !== false,
context: 'home-favorites',
showTitle: section.showTitle, showTitle: section.showTitle,
showParentTitle: section.showParentTitle, showParentTitle: section.showParentTitle,
lazy: true, lazy: true,

View file

@ -12,7 +12,7 @@
loadNextUp(page, 'home-nextup'); loadNextUp(page, 'home-nextup');
} }
function loadNextUp(page, context) { function loadNextUp(page) {
var limit = AppInfo.hasLowImageBandwidth ? var limit = AppInfo.hasLowImageBandwidth ?
16 : 16 :
@ -48,7 +48,6 @@
showParentTitle: true, showParentTitle: true,
lazy: true, lazy: true,
cardLayout: true, cardLayout: true,
context: 'tv',
showDetailsMenu: true showDetailsMenu: true
}); });
@ -60,7 +59,6 @@
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: false, overlayText: false,
context: context,
lazy: true, lazy: true,
preferThumb: true, preferThumb: true,
showDetailsMenu: true, showDetailsMenu: true,

View file

@ -105,7 +105,6 @@
showTitle: true, showTitle: true,
showPremiereDate: true, showPremiereDate: true,
preferThumb: true, preferThumb: true,
context: 'tv',
lazy: true, lazy: true,
showDetailsMenu: true, showDetailsMenu: true,
centerText: true centerText: true

View file

@ -181,29 +181,7 @@
function getContext(item) { function getContext(item) {
// should return either movies, tv, music or games return getParameterByName('context');
var context = getParameterByName('context');
if (context) {
return context;
}
if (item.Type == "Episode" || item.Type == "Series" || item.Type == "Season") {
return "tv";
}
if (item.Type == "Movie" || item.Type == "Trailer") {
return "movies";
}
if (item.Type == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicVideo") {
return "music";
}
if (item.MediaType == "Game") {
return "games";
}
if (item.Type == "BoxSet") {
return "boxsets";
}
return "";
} }
function renderHeader(page, item, context) { function renderHeader(page, item, context) {
@ -214,31 +192,12 @@
var elem; var elem;
if (context == 'home') { if (!context) {
elem = $('.homeTabs', page).show(); $(page).addClass('noSecondaryNavPage');
$('a', elem).removeClass('ui-btn-active'); LibraryMenu.setBackButtonVisible(true);
$('.lnkHomeHome', page).addClass('ui-btn-active'); LibraryMenu.setMenuButtonVisible(false);
} }
else if (context == 'home-nextup') { if (context == 'photos' || context == 'photos-photos') {
elem = $('.homeTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeNextUp', page).addClass('ui-btn-active');
}
else if (context == 'home-favorites') {
elem = $('.homeTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeFavorites', page).addClass('ui-btn-active');
}
else if (context == 'home-upcoming') {
elem = $('.homeTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeUpcoming', page).addClass('ui-btn-active');
}
else if (context == 'home-latest') {
elem = $('.homeTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
}
else if (context == 'photos' || context == 'photos-photos') {
elem = $('.photoTabs', page).show(); elem = $('.photoTabs', page).show();
$('a', elem).removeClass('ui-btn-active'); $('a', elem).removeClass('ui-btn-active');
@ -265,43 +224,11 @@
$('.lnkMovies', page).addClass('ui-btn-active'); $('.lnkMovies', page).addClass('ui-btn-active');
} }
} }
else if (context == 'channels') { else if (context == 'tv') {
$(page).addClass('noSecondaryNavPage'); elem = $('#tvShowsTabs', page).show();
LibraryMenu.setBackButtonVisible(true);
LibraryMenu.setMenuButtonVisible(false);
} }
else if (item.Type == "MusicAlbum") { else if (context == 'games') {
$('#albumTabs', page).show(); elem = $('#gameTabs', page).show();
}
else if (item.Type == "MusicVideo") {
$('#musicVideoTabs', page).show();
}
else if (item.Type == "Audio") {
$('#songTabs', page).show();
}
else if (item.Type == "ChannelVideoItem" || item.Type == "ChannelAudioItem" || item.Type == "ChannelFolderItem") {
$(page).addClass('noSecondaryNavPage');
LibraryMenu.setBackButtonVisible(true);
LibraryMenu.setMenuButtonVisible(false);
}
else if (item.Type == "BoxSet") {
$('#boxsetTabs', page).show();
}
else if (item.MediaType == "Game") {
$('#gameTabs', page).show();
}
else if (item.Type == "GameSystem") {
$('#gameSystemTabs', page).show();
}
else if (item.Type == "Episode" || item.Type == "Season" || item.Type == "Series") {
$('#tvShowsTabs', page).show();
} }
} }

View file

@ -1,124 +1,198 @@
window.RegistrationServices = { (function () {
renderPluginInfo: function (page, pkg, pluginSecurityInfo) { var supporterPlaybackKey = 'lastSupporterPlaybackMessage2';
if (pkg.isPremium) { function validatePlayback(deferred) {
$('.premiumPackage', page).show();
// Fill in registration info Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
var regStatus = "";
if (pkg.isRegistered) {
regStatus += "<p style='color:green;'>";
regStatus += Globalize.translate('MessageFeatureIncludedWithSupporter');
} else {
var expDateTime = new Date(pkg.expDate).getTime();
var nowTime = new Date().getTime();
if (expDateTime <= nowTime) {
regStatus += "<p style='color:red;'>";
regStatus += Globalize.translate('MessageTrialExpired');
}
else if (expDateTime > new Date(1970, 1, 1).getTime()) {
regStatus += "<p style='color:blue;'>";
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
}
}
regStatus += "</p>";
$('#regStatus', page).html(regStatus);
if (pluginSecurityInfo.IsMBSupporter) { if (pluginSecurityInfo.IsMBSupporter) {
$('#regInfo', page).html(pkg.regInfo || ""); deferred.resolve();
$('.premiumDescription', page).hide();
$('.supporterDescription', page).hide();
if (pkg.price > 0) {
$('.premiumHasPrice', page).show();
$('#featureId', page).val(pkg.featureId);
$('#featureName', page).val(pkg.name);
$('#amount', page).val(pkg.price);
$('#regPrice', page).html("<h3>" + Globalize.translate('ValuePriceUSD').replace('{0}', "$" + pkg.price.toFixed(2)) + "</h3>");
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
$.getJSON(url).done(function (dev) {
if (dev.payPalEmail) {
$('#payPalEmail', page).val(dev.payPalEmail);
} else {
$('#ppButton', page).hide();
}
});
} else {
// Supporter-only feature
$('.premiumHasPrice', page).hide();
}
} else { } else {
if (pkg.price) { var lastMessage = parseInt(appStorage.getItem(supporterPlaybackKey) || '0');
$('.premiumDescription', page).show();
$('.supporterDescription', page).hide(); if (!lastMessage) {
$('#regInfo', page).html("");
// Don't show on the very first playback attempt
appStorage.setItem(supporterPlaybackKey, new Date().getTime());
deferred.resolve();
}
else if ((new Date().getTime() - lastMessage) > 432000000) {
showPlaybackOverlay(deferred);
} else {
deferred.resolve();
}
}
});
}
function showPlaybackOverlay(deferred) {
require(['paperbuttonstyle']);
var html = '';
html += '<div class="supporterInfoOverlay" style="top: 0;left: 0;right: 0;bottom: 0;position: fixed;background-color:#1c1c1c;background-image: url(css/images/splash.jpg);background-position: center center;background-size: 100% 100%;background-repeat: no-repeat;z-index:1097;">';
html += '<div style="background:rgba(0,0,0,.82);top: 0;left: 0;right: 0;bottom: 0;position: fixed;z-index:1098;font-size:14px;">';
html += '<div class="readOnlyContent" style="margin:20px auto 0;color:#fff;padding:1em;">';
html += '<h1>' + Globalize.translate('HeaderTryCinemaMode') + '</h1>';
html += '<p>' + Globalize.translate('MessageDidYouKnowCinemaMode') + '</p>';
html += '<p>' + Globalize.translate('MessageDidYouKnowCinemaMode2') + '</p>';
html += '<br/>';
html += '<a class="clearLink" href="http://emby.media/donate" target="_blank"><paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>' + Globalize.translate('ButtonBecomeSupporter') + '</span></paper-button></a>';
html += '<paper-button raised class="subdued block btnCancelSupporterInfo" style="background:#444;"><iron-icon icon="close"></iron-icon><span>' + Globalize.translate('ButtonClosePlayVideo') + '</span></paper-button>';
html += '</div>';
html += '</div>';
html += '</div>';
$(document.body).append(html);
$('.btnCancelSupporterInfo').on('click', function () {
$('.supporterInfoOverlay').remove();
appStorage.setItem(supporterPlaybackKey, new Date().getTime());
deferred.resolve();
});
}
window.RegistrationServices = {
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
if (pkg.isPremium) {
$('.premiumPackage', page).show();
// Fill in registration info
var regStatus = "";
if (pkg.isRegistered) {
regStatus += "<p style='color:green;'>";
regStatus += Globalize.translate('MessageFeatureIncludedWithSupporter');
} else { } else {
$('.premiumDescription', page).hide();
$('.supporterDescription', page).show(); var expDateTime = new Date(pkg.expDate).getTime();
$('#regInfo', page).html(""); var nowTime = new Date().getTime();
if (expDateTime <= nowTime) {
regStatus += "<p style='color:red;'>";
regStatus += Globalize.translate('MessageTrialExpired');
}
else if (expDateTime > new Date(1970, 1, 1).getTime()) {
regStatus += "<p style='color:blue;'>";
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
}
} }
$('#ppButton', page).hide(); regStatus += "</p>";
$('#regStatus', page).html(regStatus);
if (pluginSecurityInfo.IsMBSupporter) {
$('#regInfo', page).html(pkg.regInfo || "");
$('.premiumDescription', page).hide();
$('.supporterDescription', page).hide();
if (pkg.price > 0) {
$('.premiumHasPrice', page).show();
$('#featureId', page).val(pkg.featureId);
$('#featureName', page).val(pkg.name);
$('#amount', page).val(pkg.price);
$('#regPrice', page).html("<h3>" + Globalize.translate('ValuePriceUSD').replace('{0}', "$" + pkg.price.toFixed(2)) + "</h3>");
var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
$.getJSON(url).done(function (dev) {
if (dev.payPalEmail) {
$('#payPalEmail', page).val(dev.payPalEmail);
} else {
$('#ppButton', page).hide();
}
});
} else {
// Supporter-only feature
$('.premiumHasPrice', page).hide();
}
} else {
if (pkg.price) {
$('.premiumDescription', page).show();
$('.supporterDescription', page).hide();
$('#regInfo', page).html("");
} else {
$('.premiumDescription', page).hide();
$('.supporterDescription', page).show();
$('#regInfo', page).html("");
}
$('#ppButton', page).hide();
}
} else {
$('.premiumPackage', page).hide();
}
},
addRecurringFields: function (page, period) {
var form = page.querySelector('.supporterForm');
// Add recurring fields to form
$("<input type='hidden' name='a3' class='pprecurring' />")
.attr('value', $('#donateAmt', page).val())
.appendTo(form);
$("<input type='hidden' name='p3' value='1' class='pprecurring' />")
.appendTo(form);
$("<input type='hidden' name='t3' value='" + period + "' class='pprecurring' />")
.appendTo(form);
$("<input type='hidden' name='src' value='1' class='pprecurring' />")
.appendTo(form);
$("<input type='hidden' name='sra' value='1' class='pprecurring' />")
.appendTo(form);
//change command for subscriptions
$('#ppCmd', page).val('_xclick-subscriptions');
Events.trigger(form, 'create');
},
initSupporterForm: function (page) {
$('.supporterForm', page).attr('action', 'https://www.paypal.com/cgi-bin/webscr');
$('.recurringSubscriptionCancellationHelp', page).html(Globalize.translate('LabelRecurringDonationCanBeCancelledHelp'));
},
validateFeature: function (name) {
var deferred = DeferredBuilder.Deferred();
if (name == 'playback') {
validatePlayback(deferred);
} else if (name == 'livetv') {
deferred.resolve();
} else {
deferred.resolve();
} }
} else { return deferred.promise();
$('.premiumPackage', page).hide();
} }
}, };
addRecurringFields: function (page, period) { })();
var form = page.querySelector('.supporterForm');
// Add recurring fields to form
$("<input type='hidden' name='a3' class='pprecurring' />")
.attr('value', $('#donateAmt', page).val())
.appendTo(form);
$("<input type='hidden' name='p3' value='1' class='pprecurring' />")
.appendTo(form);
$("<input type='hidden' name='t3' value='" + period + "' class='pprecurring' />")
.appendTo(form);
$("<input type='hidden' name='src' value='1' class='pprecurring' />")
.appendTo(form);
$("<input type='hidden' name='sra' value='1' class='pprecurring' />")
.appendTo(form);
//change command for subscriptions
$('#ppCmd', page).val('_xclick-subscriptions');
Events.trigger(form, 'create');
},
initSupporterForm: function (page) {
$('.supporterForm', page).attr('action', 'https://www.paypal.com/cgi-bin/webscr');
$('.recurringSubscriptionCancellationHelp', page).html(Globalize.translate('LabelRecurringDonationCanBeCancelledHelp'));
},
validateFeature: function () {
var deferred = DeferredBuilder.Deferred();
deferred.resolve();
return deferred.promise();
}
};

View file

@ -129,7 +129,7 @@
}); });
} }
function loadRecentlyAdded(elem, user, context) { function loadRecentlyAdded(elem, user) {
var limit = AppInfo.hasLowImageBandwidth ? var limit = AppInfo.hasLowImageBandwidth ?
16 : 16 :
@ -161,7 +161,6 @@
items: items, items: items,
preferThumb: true, preferThumb: true,
shape: 'backdrop', shape: 'backdrop',
context: context || 'home',
showUnplayedIndicator: false, showUnplayedIndicator: false,
showChildCountIndicator: true, showChildCountIndicator: true,
lazy: true, lazy: true,
@ -308,7 +307,6 @@
overlayText: screenWidth >= 800 && !cardLayout, overlayText: screenWidth >= 800 && !cardLayout,
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
context: 'home',
lazy: true, lazy: true,
cardLayout: cardLayout, cardLayout: cardLayout,
showDetailsMenu: true, showDetailsMenu: true,
@ -395,7 +393,7 @@
html += '<div>'; html += '<div>';
var text = Globalize.translate('HeaderLatestFromChannel').replace('{0}', channel.Name); var text = Globalize.translate('HeaderLatestFromChannel').replace('{0}', channel.Name);
html += '<h1 style="display:inline-block; vertical-align:middle;" class="listHeader">' + text + '</h1>'; html += '<h1 style="display:inline-block; vertical-align:middle;" class="listHeader">' + text + '</h1>';
html += '<a href="channelitems.html?context=channels&id=' + channel.Id + '" class="clearLink" style="margin-left:2em;"><paper-button raised class="more mini"><span>' + Globalize.translate('ButtonMore') + '</span></paper-button></a>'; html += '<a href="channelitems.html?id=' + channel.Id + '" class="clearLink" style="margin-left:2em;"><paper-button raised class="more mini"><span>' + Globalize.translate('ButtonMore') + '</span></paper-button></a>';
html += '</div>'; html += '</div>';
html += '<div class="itemsContainer">'; html += '<div class="itemsContainer">';
@ -405,7 +403,6 @@
defaultShape: 'square', defaultShape: 'square',
showTitle: true, showTitle: true,
centerText: true, centerText: true,
context: 'channels',
lazy: true, lazy: true,
showDetailsMenu: true, showDetailsMenu: true,
overlayPlayButton: true overlayPlayButton: true
@ -440,7 +437,7 @@
html += '<div>'; html += '<div>';
html += '<h1 style="display:inline-block; vertical-align:middle;" class="' + cssClass + '">' + Globalize.translate('HeaderLatestTvRecordings') + '</h1>'; html += '<h1 style="display:inline-block; vertical-align:middle;" class="' + cssClass + '">' + Globalize.translate('HeaderLatestTvRecordings') + '</h1>';
html += '<a href="livetvrecordings.html?context=livetv" class="clearLink" style="margin-left:2em;"><paper-button raised class="more mini"><span>' + Globalize.translate('ButtonMore') + '</span></paper-button></a>'; html += '<a href="livetvrecordings.html" class="clearLink" style="margin-left:2em;"><paper-button raised class="more mini"><span>' + Globalize.translate('ButtonMore') + '</span></paper-button></a>';
html += '</div>'; html += '</div>';
} }

View file

@ -1660,7 +1660,6 @@ var AppInfo = {};
if (isCordova) { if (isCordova) {
AppInfo.enableBottomTabs = true; AppInfo.enableBottomTabs = true;
AppInfo.cardMargin = 'mediumCardMargin';
//AppInfo.enableSectionTransitions = true; //AppInfo.enableSectionTransitions = true;
} else { } else {