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

update bravia profiles

This commit is contained in:
Luke Pulverenti 2015-06-17 21:41:22 -04:00
parent 973b43989d
commit 13e18ba442
48 changed files with 429 additions and 271 deletions

View file

@ -596,7 +596,7 @@ function ticks_to_human(str) {
$.fn.visible = function(visible) {
if (visible) {
return this.removeClass('hide');
return this.removeClass('forceHide');
}
return this.addClass('hide');
return this.addClass('forceHide');
};

View file

@ -9,7 +9,6 @@
{ name: Globalize.translate('HeaderFavoriteGames'), types: "Game", id: "favoriteGames", shape: 'autohome', preferThumb: false, showTitle: true },
{ name: Globalize.translate('HeaderFavoriteAlbums'), types: "MusicAlbum", id: "favoriteAlbums", shape: 'square', preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true }
];
}
function loadSection(elem, userId, section, isSingleSection) {
@ -33,7 +32,7 @@
options.Limit = null;
}
ApiClient.getItems(userId, options).done(function (result) {
return ApiClient.getItems(userId, options).done(function (result) {
var html = '';
@ -53,23 +52,22 @@
});
if (result.TotalRecordCount > result.Items.length) {
html += '<div class="itemsContainer">';
var href = "favorites.html?sectionid=" + section.id;
html += '<a data-role="button" href="' + href + '" data-mini="true" data-inline="true">' + Globalize.translate('ButtonMoreItems') + '</a>';
html += '</div>';
html += '<a class="clearLink" href="' + href + '"><paper-button raised class="more">' + Globalize.translate('ButtonMoreItems') + '</paper-button></a>';
}
html += '</div>';
}
elem = $(elem).html(html).trigger('create').lazyChildren();
elem = $(elem).html(html).lazyChildren();
elem.createCardMenus();
});
}
function loadSections(page, userId) {
Dashboard.showLoadingMsg();
var sections = getSections();
var sectionid = getParameterByName('sectionid');
@ -95,14 +93,20 @@
elem.html(html);
}
var promises = [];
for (i = 0, length = sections.length; i < length; i++) {
var section = sections[i];
elem = $('.section' + section.id, page);
loadSection(elem, userId, section, sections.length == 1);
promises.push(loadSection(elem, userId, section, sections.length == 1));
}
$.when(promises).done(function () {
Dashboard.hideLoadingMsg();
});
}
$(document).on('pageshowready', "#favoritesPage", function () {

View file

@ -1494,7 +1494,8 @@
anchorCssClass += ' itemWithAction';
}
html += '<a class="' + anchorCssClass + '" href="' + href + '"' + defaultActionAttribute + '>';
var transition = options.transition === false || !AppInfo.enableSectionTransitions ? '' : ' data-transition="slide"';
html += '<a' + transition + ' class="' + anchorCssClass + '" href="' + href + '"' + defaultActionAttribute + '>';
html += '<div class="' + imageCssClass + '" style="' + style + '"' + dataSrc + '>';
if (icon) {
html += '<i class="fa ' + icon + '"></i>';

View file

@ -1,11 +1,14 @@
(function (window, document, $, devicePixelRatio) {
var backStack = [];
var addNextToBackStack = true;
function renderHeader() {
var html = '<div class="viewMenuBar ui-bar-b">';
if (AppInfo.enableBackButton) {
html += '<button type="button" data-role="none" class="headerButton headerButtonLeft headerBackButton"><div class="fa fa-arrow-left"></div></button>';
html += '<button type="button" data-role="none" class="headerButton headerButtonLeft headerBackButton"><div class="fa fa-chevron-left"></div></button>';
}
html += '<button type="button" data-role="none" title="Menu" class="headerButton dashboardMenuButton barsMenuButton headerButtonLeft">';
@ -58,10 +61,14 @@
}
function onBackClick() {
if (Dashboard.exitOnBack()) {
Dashboard.exit();
}
else {
addNextToBackStack = false;
backStack.length = Math.max(0, backStack.length - 1);
history.back();
}
}
@ -163,12 +170,17 @@
function updateViewMenuBarHeadroom(page, viewMenuBar) {
if ($(page).hasClass('libraryPage')) {
viewMenuBar.removeClass('headroomDisabled');
// Don't like this timeout at all but if headroom is activated during the page events it will jump and flicker on us
setTimeout(reEnableHeadroom, 700);
} else {
viewMenuBar.addClass('headroomDisabled');
}
}
function reEnableHeadroom() {
$('.headroomDisabled').removeClass('headroomDisabled');
}
function getItemHref(item, context) {
return LibraryBrowser.getHref(item, context);
@ -640,15 +652,7 @@
// Otherwise we run into the jQM redirect back and forth problem
var updateViewMenuBarBeforePageShow = false;
$(document).on('pageinit', ".page", function () {
var page = this;
$(function () {
onPageInitDocumentReady(page);
});
}).on('pagebeforeshowready', ".page", function () {
$(document).on('pagebeforeshowready', ".page", function () {
var page = this;
@ -670,17 +674,22 @@
var page = this;
onPageShowDocumentReady(page);
}).on('pagehide', ".page", function () {
if (addNextToBackStack) {
var text = $('.libraryMenuButtonText').text() || document.title;
backStack.push(text);
}
addNextToBackStack = true;
}).on('pagebeforehide', ".page", function () {
$('.headroomEnabled').addClass('headroomDisabled');
});
function onPageInitDocumentReady(page) {
$('.libraryViewNav', page).wrapInner('<div class="libraryViewNavInner"></div>');
$('.libraryViewNav a', page).each(function () {
this.innerHTML = '<span class="libraryViewNavLinkContent">' + this.innerHTML + '</span>';
});
}
function onPageBeforeShowDocumentReady(page) {
buildViewMenuBar(page);
@ -713,10 +722,39 @@
} else {
$(document.body).removeClass('dashboardDocument').removeClass('libraryDocument');
}
if (AppInfo.enableBackButton)
{
updateBackButton(page);
}
}
function updateBackButton(page) {
var jPage = $(page);
var canGoBack = backStack.length > 0 && jPage.is('.itemDetailPage');
$('.headerBackButton').visible(canGoBack);
jPage.off('swipeleft', onPageSwipeLeft);
if (canGoBack) {
jPage.on('swipeleft', onPageSwipeLeft);
}
}
function onPageSwipeLeft(e) {
var target = $(e.target);
if (!target.is('.hiddenScrollX') && !target.parents('.hiddenScrollX').length) {
history.back();
}
}
function onPageShowDocumentReady(page) {
var elem = $('.libraryViewNavInner .ui-btn-active:visible', page);
var elem = $('.libraryViewNav .ui-btn-active:visible', page);
if (elem.length) {
elem[0].scrollIntoView();
@ -738,6 +776,7 @@
var headroom = new Headroom(elem);
// initialise
headroom.init();
$(elem).addClass('headroomEnabled');
});
}

View file

@ -1222,7 +1222,7 @@
bindEventsForPlayback();
mediaPlayerContainer.trigger("create");
mediaPlayerContainer.trigger('create');
self.currentSubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;

View file

@ -32,7 +32,7 @@
html += '</div>';
$('.downloadLanguages', page).html(html).trigger("create");
$('.downloadLanguages', page).html(html).trigger('create');
var langs = config.DownloadLanguages || [];

View file

@ -22,13 +22,15 @@
var html = '';
html += '<div class="nowPlayingBar" style="display:none;">';
// add return false because on iOS clicking the bar often ends up clicking the content underneath.
html += '<div class="nowPlayingBar" style="display:none;" onclick="return false;">';
html += '<div class="nowPlayingImage"></div>';
html += '<div class="nowPlayingText"></div>';
html += '<a class="mediaButton remoteControlButton imageButton" href="nowplaying.html" data-transition="slideup" title="' + Globalize.translate('ButtonRemoteControl') + '"><i class="fa fa-tablet"></i></a>';
html += '<a class="mediaButton playlistButton imageButton" href="nowplaying.html?tab=Playlist" data-transition="slideup" title="' + Globalize.translate('ButtonPlaylist') + '"><i class="fa fa-list"></i></a>';
// The onclicks are needed due to the return false above
html += '<a class="mediaButton remoteControlButton imageButton" href="nowplaying.html" onclick="Dashboard.navigate(this.href);return false;" data-transition="slideup" title="' + Globalize.translate('ButtonRemoteControl') + '"><i class="fa fa-tablet"></i></a>';
html += '<a class="mediaButton playlistButton imageButton" href="nowplaying.html?tab=Playlist" onclick="Dashboard.navigate(this.href);return false;" data-transition="slideup" title="' + Globalize.translate('ButtonPlaylist') + '"><i class="fa fa-list"></i></a>';
html += '<button class="mediaButton previousTrackButton imageButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-role="none"><i class="fa fa-step-backward"></i></button>';

View file

@ -97,14 +97,17 @@
function requestSearchHintsForOverlay(elem, searchTerm) {
var currentTimeout = searchHintTimeout;
Dashboard.showLoadingMsg();
ApiClient.getSearchHints({ userId: Dashboard.getCurrentUserId(), searchTerm: searchTerm, limit: 30 }).done(function (result) {
if (currentTimeout != searchHintTimeout) {
return;
if (currentTimeout == searchHintTimeout) {
renderSearchResultsInOverlay(elem, result.SearchHints);
}
renderSearchResultsInOverlay(elem, result.SearchHints);
Dashboard.hideLoadingMsg();
}).fail(function () {
Dashboard.hideLoadingMsg();
});
}

View file

@ -248,7 +248,8 @@
showTitle: showTitles,
centerText: true,
lazy: true,
autoThumb: true
autoThumb: true,
transition: false
});
html += '</div>';
}

View file

@ -35,7 +35,7 @@ var Dashboard = {
//$.mobile.popup.prototype.options.theme = "c";
$.mobile.popup.prototype.options.transition = "pop";
//$.mobile.keepNative = "input[type='text'],input[type='password'],input[type='number']";
//$.mobile.keepNative = "textarea";
if ($.browser.mobile) {
$.mobile.defaultPageTransition = "none";
@ -400,7 +400,7 @@ var Dashboard = {
elem.slideDown(400);
}
elem.html(options.html).trigger("create");
elem.html(options.html).trigger('create');
if (options.timeout) {
@ -1658,6 +1658,7 @@ var AppInfo = {};
if (isCordova) {
AppInfo.enableBottomTabs = true;
AppInfo.cardMargin = 'mediumCardMargin';
AppInfo.enableSectionTransitions = true;
} else {
if (isMobile) {
@ -1678,14 +1679,10 @@ var AppInfo = {};
}
}
AppInfo.enableMusicSongsTab = true;
if (!AppInfo.hasLowImageBandwidth) {
AppInfo.enableLatestChannelItems = true;
AppInfo.enableStudioTabs = true;
AppInfo.enablePeopleTabs = true;
AppInfo.enableTvEpisodesTab = true;
AppInfo.enableMusicArtistsTab = true;
AppInfo.enableMovieTrailersTab = true;
}
@ -1706,7 +1703,8 @@ var AppInfo = {};
AppInfo.enableUserImage = true;
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
AppInfo.enableBackButton = isIOS && window.navigator.standalone && !AppInfo.isNativeApp;
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
AppInfo.supportsFullScreen = isCordova && isAndroid;
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
@ -1802,10 +1800,6 @@ var AppInfo = {};
elem.addClass(AppInfo.cardMargin);
}
if (!AppInfo.enableLatestChannelItems) {
elem.addClass('latestChannelItemsDisabled');
}
if (!AppInfo.enableStudioTabs) {
elem.addClass('studioTabDisabled');
}
@ -1818,14 +1812,6 @@ var AppInfo = {};
elem.addClass('tvEpisodesTabDisabled');
}
if (!AppInfo.enableMusicSongsTab) {
elem.addClass('musicSongsTabDisabled');
}
if (!AppInfo.enableMusicArtistsTab) {
elem.addClass('musicArtistsTabDisabled');
}
if (!AppInfo.enableMovieTrailersTab) {
elem.addClass('movieTrailersTabDisabled');
}

View file

@ -230,9 +230,8 @@
html += '<div class="formFields"></div>';
html += '<br/>';
html += '<p>';
html += '<button type="submit" data-icon="refresh" data-theme="b">' + Globalize.translate('ButtonSync') + '</button>';
html += '<button type="submit" data-role="none" class="clearButton"><paper-button raised class="submit block"><iron-icon icon="refresh"></iron-icon><span>' + Globalize.translate('ButtonSync') + '</span></paper-button></button>';
html += '</p>';
html += '</form>';