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

added tv service provider selection

This commit is contained in:
Luke Pulverenti 2014-01-16 17:49:31 -05:00
parent 518003518b
commit a0a589b876
17 changed files with 78 additions and 247 deletions

View file

@ -211,7 +211,7 @@
$('#castCollapsible', page).hide();
} else {
$('#castCollapsible', page).show();
renderCast(page, item, context, 8);
renderCast(page, item, context, 6);
}
if (!item.PartCount || item.PartCount < 2) {

View file

@ -1810,7 +1810,7 @@
var url;
var imageHeight = 510;
var imageHeight = 440;
if (imageTags.Primary) {
@ -2439,197 +2439,6 @@
})(window, document, jQuery, screen, localStorage);
(function ($, document, window) {
var showOverlayTimeout;
var hideOverlayTimeout;
var currentPosterItem;
function onOverlayMouseOver() {
if (hideOverlayTimeout) {
clearTimeout(hideOverlayTimeout);
hideOverlayTimeout = null;
}
}
function onOverlayMouseOut() {
startHideOverlayTimer();
}
function getOverlayHtml(item) {
var html = '';
html += '<div class="itemOverlayContent">';
html += '<p class="itemMiscInfo">';
html += LibraryBrowser.getMiscInfoHtml(item);
html += '</p>';
html += '<p style="margin: 1.25em 0;">';
html += '<span class="itemCommunityRating">';
html += LibraryBrowser.getRatingHtml(item);
html += '</span>';
html += '</p>';
html += '<p style="margin: 1.25em 0;">';
html += '<span class="userDataIcons">';
html += LibraryBrowser.getUserDataIconsHtml(item);
html += '</span>';
html += '</p>';
html += '<p class="itemOverlayHtml">';
html += (item.OverviewHtml || item.Overview || '');
html += '</p>';
html += '<p>';
html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext">Play</button>';
html += '<button type="button" data-mini="true" data-inline="true" data-icon="video" data-iconpos="notext">Play</button>';
html += '<button type="button" data-mini="true" data-inline="true" data-icon="remote" data-iconpos="notext">Play</button>';
html += '<button type="button" data-mini="true" data-inline="true" data-icon="edit" data-iconpos="notext">Play</button>';
html += '</p>';
html += '</div>';
return html;
}
function showOverlay(elem, item) {
$('.itemFlyout').popup('close').remove();
var html = '<div data-role="popup" class="itemFlyout" data-theme="b" data-arrow="true" data-history="false">';
html += '<div class="ui-bar-b" style="text-align:center;">';
html += '<h3 style="margin: .5em 0;padding:0 1em;font-weight:normal;">' + LibraryBrowser.getPosterViewDisplayName(item, true) + '</h3>';
html += '</div>';
html += '<div style="padding: .8em 1em;">';
html += getOverlayHtml(item);
html += '</div>';
html += '</div>';
$('.itemFlyout').popup('close').popup('destroy').remove();
$(document.body).append(html);
var popup = $('.itemFlyout').on('mouseenter', onOverlayMouseOver).on('mouseleave', onOverlayMouseOut).popup({
positionTo: $('.posterItemOverlayTarget', elem)
}).trigger('create').popup("open").on("popupafterclose", function () {
$(this).off("popupafterclose").off("mouseenter").off("mouseleave").remove();
});
popup.parents().prev('.ui-popup-screen').remove();
currentPosterItem = elem;
}
function onPosterItemClicked() {
if (showOverlayTimeout) {
clearTimeout(showOverlayTimeout);
showOverlayTimeout = null;
}
if (hideOverlayTimeout) {
clearTimeout(hideOverlayTimeout);
hideOverlayTimeout = null;
}
hideOverlay();
}
function hideOverlay() {
$('.itemFlyout').popup('close').remove();
if (currentPosterItem) {
$(currentPosterItem).off('click.overlay');
currentPosterItem = null;
}
}
function startHideOverlayTimer() {
if (hideOverlayTimeout) {
clearTimeout(hideOverlayTimeout);
hideOverlayTimeout = null;
}
hideOverlayTimeout = setTimeout(hideOverlay, 400);
}
function onHoverOut() {
if (showOverlayTimeout) {
clearTimeout(showOverlayTimeout);
showOverlayTimeout = null;
}
startHideOverlayTimer();
}
$.fn.createPosterItemHoverMenu = function () {
function onShowTimerExpired(elem) {
var id = elem.getAttribute('data-itemid');
ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
showOverlay(elem, item);
});
}
function onHoverIn() {
if (showOverlayTimeout) {
clearTimeout(showOverlayTimeout);
showOverlayTimeout = null;
}
if (hideOverlayTimeout) {
clearTimeout(hideOverlayTimeout);
hideOverlayTimeout = null;
}
var elem = this;
if (currentPosterItem && currentPosterItem == elem) {
return;
}
showOverlayTimeout = setTimeout(function () {
onShowTimerExpired(elem);
}, 300);
}
// https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/
if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) {
/* browser with either Touch Events of Pointer Events
running on touch-capable device */
return this;
}
return this.on('mouseenter', '.posterItem', onHoverIn)
.on('mouseleave', '.posterItem', onHoverOut)
.on('click', '.posterItem', onPosterItemClicked);
};
})(jQuery, document, window);
(function ($, document, window) {
var showOverlayTimeout;
@ -2673,7 +2482,7 @@
var name = LibraryBrowser.getPosterViewDisplayName(item, true);
html += '<div style="font-weight:bold;margin-bottom:1em;">';
var logoHeight = isPortrait || isSmallItem ? 20 : 22;
var logoHeight = isSmallItem ? 20 : 24;
var maxLogoWidth = isPortrait ? 100 : 200;
var imgUrl;
@ -2711,7 +2520,7 @@
html += '</p>';
}
html += '<p style="margin:.75em 0;">';
html += '<p style="margin:1.25em 0;">';
html += '<span class="itemCommunityRating">';
html += LibraryBrowser.getRatingHtml(item, false);
html += '</span>';
@ -2753,7 +2562,7 @@
}
if (!isPortrait || buttonCount < 3) {
html += '<button type="button" data-mini="true" data-inline="true" data-icon="wireless" data-iconpos="notext" title="Send to Device" class="btnRemoteControl" data-itemid="' + item.Id + '" style="' + buttonMargin + '">Send to Device</button>';
html += '<button type="button" data-mini="true" data-inline="true" data-icon="wireless" data-iconpos="notext" title="Play On" class="btnRemoteControl" data-itemid="' + item.Id + '" style="' + buttonMargin + '">Play On</button>';
}
html += '</div>';
@ -2830,7 +2639,7 @@
onShowTimerExpired(elem);
}, 800);
}, 1000);
}
// https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/

View file

@ -13,7 +13,31 @@
}
$('#selectGuideDays', page).val(config.LiveTvOptions.GuideDays || '').selectmenu('refresh');
var serviceOptions = liveTvInfo.Services.map(function (s) {
return '<option value="' + s.Name + '">' + s.Name + '</option>';
});
$('#selectActiveService', page).html(serviceOptions).selectmenu('refresh');
var service = liveTvInfo.Services.filter(function (s) {
return s.Name == liveTvInfo.ActiveServiceName;
})[0];
$('#activeServiceName', page).html(liveTvInfo.ActiveServiceName);
var status = service.Status;
if (status != 'Ok') {
if (service.StatusMessage) {
status += ' (' + service.StatusMessage + ')';
}
status = '<span style="color:red;">' + status + '</span>';
}
$('#activeServiceStatus', page).html(status);
Dashboard.hideLoadingMsg();
}
@ -35,10 +59,10 @@
});
window.LiveTvSettingsPage = {
onSubmit: function() {
window.LiveTvSettingsPage = {
onSubmit: function () {
Dashboard.showLoadingMsg();
var form = this;

View file

@ -69,7 +69,7 @@
html += '<a href="#" data-rel="back" data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" data-theme="b">Close</a>';
html += '<div class="ui-bar-b" style="text-align:center;">';
html += '<div style="margin:.5em 0;">Send to Device</div>';
html += '<div style="margin:.5em 0;">Play On</div>';
html += '</div>';
html += '<div style="padding: 1em;">';
@ -90,7 +90,7 @@
html += '<span id="queueButtonContainer" style="display:none;"><button onclick="$(\'#fldPlayCommand\').val(\'PlayLast\');" type="submit" data-icon="plus" data-mini="true" data-inline="true">Queue</button></span>';
html += '<span id="browseButtonContainer" style="display:none;"><button onclick="$(\'#fldPlayCommand\').val(\'Browse\');" type="submit" data-icon="eye" data-mini="true" data-inline="true">Browse</button></span>';
html += '<span id="browseButtonContainer" style="display:none;"><button onclick="$(\'#fldPlayCommand\').val(\'Browse\');" type="submit" data-icon="eye" data-mini="true" data-inline="true">View on Screen</button></span>';
html += '</p>';
@ -454,10 +454,10 @@
var html = '';
html += '<div style="margin-top:0;">';
html += '<label for="selectCommand">Send:</label>';
html += '<label for="selectCommand">Play:</label>';
html += '<select id="selectCommand" data-mini="true">';
var mediaLabel = item.MediaType || 'Media';
var mediaLabel = item.Type;
html += '<option value="Play" selected>' + mediaLabel + '</label>';

View file

@ -1360,7 +1360,7 @@ $(function () {
footerHtml += '<button onclick="MediaPlayer.showChannelsFlyout();" id="channelsButton" class="mediaButton channelsButton" title="TV Channels" type="button" data-icon="tv" data-iconpos="notext" data-inline="true">TV Channels</button>';
footerHtml += '<div class="mediaFlyoutContainer"><div id="channelsFlyout" style="display:none;" class="mediaPlayerFlyout channelsFlyout"></div></div>';
footerHtml += '<button onclick="MediaPlayer.showSendMediaMenu();" id="sendMediaButton" class="mediaButton sendMediaButton" title="Send to Device" type="button" data-icon="wireless" data-iconpos="notext" data-inline="true">Send to Device</button>';
footerHtml += '<button onclick="MediaPlayer.showSendMediaMenu();" id="sendMediaButton" class="mediaButton sendMediaButton" title="Play On" type="button" data-icon="wireless" data-iconpos="notext" data-inline="true">Play On</button>';
footerHtml += '</div>';

View file

@ -19,7 +19,7 @@
} else {
$('.supporterOnly', page).hide();
}
$('#paypalReturnUrl', page).val(ApiClient.getUrl("dashboard/supporterkey.html"));
$('#paypalReturnUrl', page).val(ApiClient.getUrl("supporterkey.html"));
Dashboard.hideLoadingMsg();
});
}

View file

@ -11,8 +11,6 @@
config.ImageSavingConvention = $('#selectImageSavingConvention', page).val();
config.EnableMovieChapterImageExtraction = $('#chkMovies', page).checked();
config.EnableEpisodeChapterImageExtraction = $('#chkEpisodes', page).checked();
config.EnableOtherVideoChapterImageExtraction = $('#chkOtherVideos', page).checked();
ApiClient.updateServerConfiguration(config).done(function (result) {