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

merge from dev

This commit is contained in:
Luke Pulverenti 2015-12-14 10:43:03 -05:00
parent 1c8f02ce0f
commit 33b01d778c
911 changed files with 34157 additions and 57125 deletions

View file

@ -4,7 +4,7 @@
function getDefaultSection(index) {
if (AppInfo.isNativeApp && $.browser.safari) {
if (AppInfo.isNativeApp && browserInfo.safari) {
switch (index) {
@ -125,7 +125,7 @@
promises.push(loadSection(page, user, displayPreferences, i));
}
return $.when(promises);
return Promise.all(promises);
}
var homePageDismissValue = '14';
@ -133,7 +133,7 @@
function dismissWelcome(page, userId) {
getDisplayPreferences('home', userId).done(function (result) {
getDisplayPreferences('home', userId).then(function (result) {
result.CustomPrefs[homePageTourKey] = homePageDismissValue;
ApiClient.updateDisplayPreferences('home', result, userId, AppSettings.displayPreferencesKey());
@ -165,7 +165,7 @@
function takeTour(page, userId) {
Dashboard.loadSwipebox().done(function () {
require(['swipebox'], function () {
$.swipebox([
{ href: 'css/images/tour/web/tourcontent.jpg', title: Globalize.translate('WebClientTourContent') },
@ -201,11 +201,11 @@
Dashboard.showLoadingMsg();
getDisplayPreferences('home', userId).done(function (result) {
getDisplayPreferences('home', userId).then(function (result) {
Dashboard.getCurrentUser().done(function (user) {
Dashboard.getCurrentUser().then(function (user) {
loadSections(tabContent, user, result).done(function () {
loadSections(tabContent, user, result).then(function () {
if (!AppInfo.isNativeApp) {
showWelcomeIfNeeded(page, result);
@ -266,11 +266,11 @@
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'index.html');
$(pages).on('tabchange', function () {
loadTab(page, parseInt(this.selected));
pages.addEventListener('tabchange', function (e) {
loadTab(page, parseInt(e.target.selected));
});
Events.on(page.querySelector('.btnTakeTour'), 'click', function () {
page.querySelector('.btnTakeTour').addEventListener('click', function () {
takeTour(page, Dashboard.getCurrentUserId());
});
@ -301,15 +301,13 @@
var page = $($.mobile.activePage)[0];
var pages = page.querySelector('neon-animated-pages');
$(pages).trigger('tabchange');
pages.dispatchEvent(new CustomEvent("tabchange", {}));
}
}
function getDisplayPreferences(key, userId) {
return ApiClient.getDisplayPreferences(key, userId, AppSettings.displayPreferencesKey()).done(function (result) {
});
return ApiClient.getDisplayPreferences(key, userId, AppSettings.displayPreferencesKey());
}
window.HomePage = {