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

use shared slideshow

This commit is contained in:
Luke Pulverenti 2016-01-31 01:03:40 -05:00
parent ce8bc1a2f6
commit 619d81ee23
86 changed files with 18787 additions and 2233 deletions

View file

@ -1270,7 +1270,7 @@ $(document).on('pageshow', "#dashboardPage", DashboardPage.onPageShow).on('pageb
(function ($, document, window) {
var welcomeDismissValue = '11';
var welcomeDismissValue = '12';
var welcomeTourKey = 'welcomeTour';
function dismissWelcome(page, userId) {
@ -1312,27 +1312,35 @@ $(document).on('pageshow', "#dashboardPage", DashboardPage.onPageShow).on('pageb
function takeTour(page, userId) {
require(['swipebox'], function () {
require(['slideshow'], function () {
$.swipebox([
{ href: 'css/images/tour/dashboard/dashboard.png', title: Globalize.translate('DashboardTourDashboard') },
{ href: 'css/images/tour/dashboard/help.png', title: Globalize.translate('DashboardTourHelp') },
{ href: 'css/images/tour/dashboard/users.png', title: Globalize.translate('DashboardTourUsers') },
{ href: 'css/images/tour/dashboard/sync.png', title: Globalize.translate('DashboardTourSync') },
{ href: 'css/images/tour/dashboard/cinemamode.png', title: Globalize.translate('DashboardTourCinemaMode') },
{ href: 'css/images/tour/dashboard/chapters.png', title: Globalize.translate('DashboardTourChapters') },
{ href: 'css/images/tour/dashboard/subtitles.png', title: Globalize.translate('DashboardTourSubtitles') },
{ href: 'css/images/tour/dashboard/plugins.png', title: Globalize.translate('DashboardTourPlugins') },
{ href: 'css/images/tour/dashboard/notifications.png', title: Globalize.translate('DashboardTourNotifications') },
{ href: 'css/images/tour/dashboard/scheduledtasks.png', title: Globalize.translate('DashboardTourScheduledTasks') },
{ href: 'css/images/tour/dashboard/mobile.png', title: Globalize.translate('DashboardTourMobile') },
{ href: 'css/images/tour/enjoy.jpg', title: Globalize.translate('MessageEnjoyYourStay') }
], {
afterClose: function () {
dismissWelcome(page, userId);
$('.welcomeMessage', page).hide();
},
hideBarsDelay: 30000
var slides = [
{ imageUrl: 'css/images/tour/dashboard/dashboard.png', title: Globalize.translate('DashboardTourDashboard') },
{ imageUrl: 'css/images/tour/dashboard/help.png', title: Globalize.translate('DashboardTourHelp') },
{ imageUrl: 'css/images/tour/dashboard/users.png', title: Globalize.translate('DashboardTourUsers') },
{ imageUrl: 'css/images/tour/dashboard/sync.png', title: Globalize.translate('DashboardTourSync') },
{ imageUrl: 'css/images/tour/dashboard/cinemamode.png', title: Globalize.translate('DashboardTourCinemaMode') },
{ imageUrl: 'css/images/tour/dashboard/chapters.png', title: Globalize.translate('DashboardTourChapters') },
{ imageUrl: 'css/images/tour/dashboard/subtitles.png', title: Globalize.translate('DashboardTourSubtitles') },
{ imageUrl: 'css/images/tour/dashboard/plugins.png', title: Globalize.translate('DashboardTourPlugins') },
{ imageUrl: 'css/images/tour/dashboard/notifications.png', title: Globalize.translate('DashboardTourNotifications') },
{ imageUrl: 'css/images/tour/dashboard/scheduledtasks.png', title: Globalize.translate('DashboardTourScheduledTasks') },
{ imageUrl: 'css/images/tour/dashboard/mobile.png', title: Globalize.translate('DashboardTourMobile') },
{ imageUrl: 'css/images/tour/enjoy.jpg', title: Globalize.translate('MessageEnjoyYourStay') }
];
require(['slideshow'], function (slideshow) {
var newSlideShow = new slideshow({
slides: slides,
interactive: true,
loop: false
});
newSlideShow.show();
dismissWelcome(page, userId);
$('.welcomeMessage', page).hide();
});
});
}

View file

@ -166,30 +166,38 @@
function takeTour(page, userId) {
require(['swipebox'], function () {
require(['slideshow'], function () {
$.swipebox([
{ href: 'css/images/tour/web/tourcontent.jpg', title: Globalize.translate('WebClientTourContent') },
{ href: 'css/images/tour/web/tourmovies.jpg', title: Globalize.translate('WebClientTourMovies') },
{ href: 'css/images/tour/web/tourmouseover.jpg', title: Globalize.translate('WebClientTourMouseOver') },
{ href: 'css/images/tour/web/tourtaphold.jpg', title: Globalize.translate('WebClientTourTapHold') },
{ href: 'css/images/tour/web/tourmysync.png', title: Globalize.translate('WebClientTourMySync') },
{ href: 'css/images/tour/web/toureditor.png', title: Globalize.translate('WebClientTourMetadataManager') },
{ href: 'css/images/tour/web/tourplaylist.png', title: Globalize.translate('WebClientTourPlaylists') },
{ href: 'css/images/tour/web/tourcollections.jpg', title: Globalize.translate('WebClientTourCollections') },
{ href: 'css/images/tour/web/tourusersettings1.png', title: Globalize.translate('WebClientTourUserPreferences1') },
{ href: 'css/images/tour/web/tourusersettings2.png', title: Globalize.translate('WebClientTourUserPreferences2') },
{ href: 'css/images/tour/web/tourusersettings3.png', title: Globalize.translate('WebClientTourUserPreferences3') },
{ href: 'css/images/tour/web/tourusersettings4.png', title: Globalize.translate('WebClientTourUserPreferences4') },
{ href: 'css/images/tour/web/tourmobile1.jpg', title: Globalize.translate('WebClientTourMobile1') },
{ href: 'css/images/tour/web/tourmobile2.png', title: Globalize.translate('WebClientTourMobile2') },
{ href: 'css/images/tour/enjoy.jpg', title: Globalize.translate('MessageEnjoyYourStay') }
], {
afterClose: function () {
dismissWelcome(page, userId);
$('.welcomeMessage', page).hide();
},
hideBarsDelay: 30000
var slides = [
{ imageUrl: 'css/images/tour/web/tourcontent.jpg', title: Globalize.translate('WebClientTourContent') },
{ imageUrl: 'css/images/tour/web/tourmovies.jpg', title: Globalize.translate('WebClientTourMovies') },
{ imageUrl: 'css/images/tour/web/tourmouseover.jpg', title: Globalize.translate('WebClientTourMouseOver') },
{ imageUrl: 'css/images/tour/web/tourtaphold.jpg', title: Globalize.translate('WebClientTourTapHold') },
{ imageUrl: 'css/images/tour/web/tourmysync.png', title: Globalize.translate('WebClientTourMySync') },
{ imageUrl: 'css/images/tour/web/toureditor.png', title: Globalize.translate('WebClientTourMetadataManager') },
{ imageUrl: 'css/images/tour/web/tourplaylist.png', title: Globalize.translate('WebClientTourPlaylists') },
{ imageUrl: 'css/images/tour/web/tourcollections.jpg', title: Globalize.translate('WebClientTourCollections') },
{ imageUrl: 'css/images/tour/web/tourusersettings1.png', title: Globalize.translate('WebClientTourUserPreferences1') },
{ imageUrl: 'css/images/tour/web/tourusersettings2.png', title: Globalize.translate('WebClientTourUserPreferences2') },
{ imageUrl: 'css/images/tour/web/tourusersettings3.png', title: Globalize.translate('WebClientTourUserPreferences3') },
{ imageUrl: 'css/images/tour/web/tourusersettings4.png', title: Globalize.translate('WebClientTourUserPreferences4') },
{ imageUrl: 'css/images/tour/web/tourmobile1.jpg', title: Globalize.translate('WebClientTourMobile1') },
{ imageUrl: 'css/images/tour/web/tourmobile2.png', title: Globalize.translate('WebClientTourMobile2') },
{ imageUrl: 'css/images/tour/enjoy.jpg', title: Globalize.translate('MessageEnjoyYourStay') }
];
require(['slideshow'], function (slideshow) {
var newSlideShow = new slideshow({
slides: slides,
interactive: true,
loop: false
});
newSlideShow.show();
dismissWelcome(page, userId);
$('.welcomeMessage', page).hide();
});
});
}

View file

@ -125,26 +125,6 @@
function showSlideshow(page, items, startItemId) {
var screenWidth = $(window).width();
var screenHeight = $(window).height();
var slideshowItems = items.map(function (item) {
var imgUrl = ApiClient.getScaledImageUrl(item.Id, {
tag: item.ImageTags.Primary,
type: 'Primary',
maxWidth: screenWidth,
maxHeight: screenHeight
});
return {
title: item.Name,
href: imgUrl
};
});
var index = items.map(function (i) {
return i.Id;
@ -154,12 +134,18 @@
index = 0;
}
require(['swipebox'], function () {
require(['slideshow'], function (slideshow) {
$.swipebox(slideshowItems, {
initialIndexOnArray: index,
hideBarsDelay: 30000
var newSlideShow = new slideshow({
showTitle: false,
cover: false,
items: items,
startIndex: index,
interval: 7000,
interactive: true
});
newSlideShow.show();
});
}

View file

@ -1974,7 +1974,8 @@ var AppInfo = {};
define("jqmpanel", ["thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
define("swipebox", [bowerPath + '/swipebox/src/js/jquery.swipebox.min', "css!" + bowerPath + "/swipebox/src/css/swipebox.min.css"]);
define("iron-icon-set", ["html!" + bowerPath + "/iron-icon/iron-icon.html", "html!" + bowerPath + "/iron-iconset-svg/iron-iconset-svg.html"]);
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
define('fetch', [bowerPath + '/fetch/fetch']);
define('webcomponentsjs', [bowerPath + '/webcomponentsjs/webcomponents-lite.min.js']);
@ -2003,6 +2004,8 @@ var AppInfo = {};
define("offlineusersync", [apiClientBowerPath + "/sync/offlineusersync"]);
define("mediasync", [apiClientBowerPath + "/sync/mediasync"]);
define("swiper", [bowerPath + "/Swiper/dist/js/swiper.min", "css!" + bowerPath + "/Swiper/dist/css/swiper.min"], returnFirstDependency);
define("paperdialoghelper", [embyWebComponentsBowerPath + "/paperdialoghelper/paperdialoghelper"], returnFirstDependency);
// alias
@ -2015,6 +2018,20 @@ var AppInfo = {};
}
};
});
// mock this for now. not used in this app
define("inputManager", [], function () {
return {
on: function () {
},
off: function () {
}
};
});
define("connectionManager", [], function () {
return ConnectionManager;
});
}
function init(hostingAppInfo) {