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

remove unused code

This commit is contained in:
Luke Pulverenti 2016-07-26 13:21:27 -04:00
parent 8ca033b47d
commit 1bdfae7682
8 changed files with 27 additions and 102 deletions

View file

@ -132,7 +132,6 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
scrollSource: null, // Element for catching the mouse wheel scrolling. Default is FRAME. scrollSource: null, // Element for catching the mouse wheel scrolling. Default is FRAME.
scrollBy: 0, // Pixels or items to move per one mouse scroll. 0 to disable scrolling. scrollBy: 0, // Pixels or items to move per one mouse scroll. 0 to disable scrolling.
scrollHijack: 300, // Milliseconds since last wheel event after which it is acceptable to hijack global scroll. scrollHijack: 300, // Milliseconds since last wheel event after which it is acceptable to hijack global scroll.
scrollTrap: false, // Don't bubble scrolling when hitting scrolling limits.
// Dragging // Dragging
dragSource: null, // Selector or DOM element for catching dragging events. Default is FRAME. dragSource: null, // Selector or DOM element for catching dragging events. Default is FRAME.
@ -902,8 +901,8 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
} }
var delta = normalizeWheelDelta(event); var delta = normalizeWheelDelta(event);
// Trap scrolling only when necessary and/or requested // Trap scrolling only when necessary and/or requested
if (o.scrollTrap || delta > 0 && pos.dest < pos.end || delta < 0 && pos.dest > pos.start) { if (delta > 0 && pos.dest < pos.end || delta < 0 && pos.dest > pos.start) {
stopDefault(event, 1); //stopDefault(event, 1);
} }
if (transform) { if (transform) {
@ -932,7 +931,9 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
passive: true passive: true
}); });
scrollSource.removeEventListener(wheelEvent, scrollHandler); removeEventListenerWithOptions(scrollSource, wheelEvent, scrollHandler, {
passive: true
});
// Reset initialized status and return the instance // Reset initialized status and return the instance
self.initialized = 0; self.initialized = 0;
@ -1006,14 +1007,18 @@ define(['browser', 'layoutManager', 'scrollStyles'], function (browser, layoutMa
} }
// Scrolling navigation // Scrolling navigation
scrollSource.addEventListener(wheelEvent, scrollHandler); addEventListenerWithOptions(scrollSource, wheelEvent, scrollHandler, {
passive: true
});
} else if (o.horizontal) { } else if (o.horizontal) {
// Don't bind to mouse events with vertical scroll since the mouse wheel can handle this natively // Don't bind to mouse events with vertical scroll since the mouse wheel can handle this natively
// Scrolling navigation // Scrolling navigation
scrollSource.addEventListener(wheelEvent, scrollHandler); addEventListenerWithOptions(scrollSource, wheelEvent, scrollHandler, {
passive: true
});
} }
// Mark instance as initialized // Mark instance as initialized

View file

@ -116,18 +116,6 @@ h1, h1 a {
margin-top: 0; margin-top: 0;
} }
.visualCardBox {
background: none !important;
-moz-box-shadow: none;
-ms-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.visualCardBox .outerCardFooter {
padding: 0;
}
.cardImage { .cardImage {
border-radius: 10px; border-radius: 10px;
} }

View file

@ -1,30 +0,0 @@
.viewMenuBar {
background-color: #000;
}
.libraryViewNav {
background-color: #161616;
box-shadow: none;
text-transform: lowercase;
font-size: 220%;
}
.background-theme-b, .dialog.background-theme-b {
background: #161616;
}
.pageTabButton.is-active .pageTabButtonSelectionBar {
display: none !important;
}
.libraryViewNav .pageTabButton.is-active {
color: #52B54B !important;
}
.libraryPage:not(.noSecondaryNavPage) {
padding-top: 105px !important;
}
.pageWithAbsoluteTabs:not(.noSecondaryNavPage) {
padding-top: 108px !important;
}

View file

@ -5,22 +5,24 @@
"related_applications": [ "related_applications": [
{ {
"platform": "android", "platform": "android",
"location": "https://play.google.com/store/apps/details?id=com.mb.android", "location": "https://play.google.com/store/apps/details?id=com.mb.android"
}, },
{ {
"platform": "ios", "platform": "ios",
"location": "https://itunes.apple.com/us/app/emby/id992180193?ls=1&mt=8", "location": "https://itunes.apple.com/us/app/emby/id992180193?ls=1&mt=8"
}, },
{ {
"platform": "web" "platform": "web"
} }
], ],
"icons": [ { "icons": [
{
"src": "css/images/touchicon144.png", "src": "css/images/touchicon144.png",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png", "type": "image/png",
"density": "3.0" "density": "3.0"
}], }
],
"display": "standalone", "display": "standalone",
"theme_color": "#52B54B" "theme_color": "#52B54B"
} }

View file

@ -394,7 +394,7 @@
var chapters = item.Chapters || []; var chapters = item.Chapters || [];
if (!chapters.length || !AppInfo.enableDetailPageChapters) { if (!chapters.length) {
page.querySelector('#scenesCollapsible').classList.add('hide'); page.querySelector('#scenesCollapsible').classList.add('hide');
} else { } else {
page.querySelector('#scenesCollapsible').classList.remove('hide'); page.querySelector('#scenesCollapsible').classList.remove('hide');

View file

@ -103,7 +103,8 @@
showTitle: true, showTitle: true,
centerText: true, centerText: true,
lazy: true, lazy: true,
preferThumb: true preferThumb: true,
overlayPlayButton: true
}); });
} }
else if (view == "ThumbCard") { else if (view == "ThumbCard") {

View file

@ -40,7 +40,7 @@
var chapters = item.Chapters || []; var chapters = item.Chapters || [];
if (!chapters.length || !AppInfo.enableDetailPageChapters) { if (!chapters.length) {
$('#scenesCollapsible', page).hide(); $('#scenesCollapsible', page).hide();
} else { } else {
$('#scenesCollapsible', page).show(); $('#scenesCollapsible', page).show();

View file

@ -1196,24 +1196,12 @@ var AppInfo = {};
(function () { (function () {
function isTouchDevice() {
return (('ontouchstart' in window)
|| (navigator.MaxTouchPoints > 0)
|| (navigator.msMaxTouchPoints > 0));
}
function setAppInfo() { function setAppInfo() {
if (isTouchDevice()) {
AppInfo.isTouchPreferred = true;
}
var isCordova = Dashboard.isRunningInCordova(); var isCordova = Dashboard.isRunningInCordova();
AppInfo.enableDetailPageChapters = true;
AppInfo.enableSearchInTopMenu = true; AppInfo.enableSearchInTopMenu = true;
AppInfo.enableHomeFavorites = true; AppInfo.enableHomeFavorites = true;
AppInfo.enableNowPlayingBar = true;
AppInfo.enableHomeTabs = true; AppInfo.enableHomeTabs = true;
AppInfo.enableNowPlayingPageBottomTabs = true; AppInfo.enableNowPlayingPageBottomTabs = true;
AppInfo.enableAutoSave = browserInfo.mobile; AppInfo.enableAutoSave = browserInfo.mobile;
@ -1235,20 +1223,7 @@ var AppInfo = {};
AppInfo.enableHomeFavorites = false; AppInfo.enableHomeFavorites = false;
AppInfo.enableHomeTabs = false; AppInfo.enableHomeTabs = false;
AppInfo.enableNowPlayingPageBottomTabs = false; AppInfo.enableNowPlayingPageBottomTabs = false;
// Disable the now playing bar for the iphone since we already have the now playing tab at the bottom
if (navigator.userAgent.toString().toLowerCase().indexOf('iphone') != -1) {
AppInfo.enableNowPlayingBar = false;
} }
} else {
AppInfo.enableDetailPageChapters = false;
}
}
if (!AppInfo.hasLowImageBandwidth) {
AppInfo.enableStudioTabs = true;
AppInfo.enableTvEpisodesTab = true;
} }
AppInfo.supportsExternalPlayers = true; AppInfo.supportsExternalPlayers = true;
@ -1411,10 +1386,6 @@ var AppInfo = {};
var elem = document.documentElement; var elem = document.documentElement;
if (AppInfo.isTouchPreferred) {
elem.classList.add('touch');
}
if (!AppInfo.enableSupporterMembership) { if (!AppInfo.enableSupporterMembership) {
elem.classList.add('supporterMembershipDisabled'); elem.classList.add('supporterMembershipDisabled');
} }
@ -1457,15 +1428,7 @@ var AppInfo = {};
function getBowerPath() { function getBowerPath() {
var bowerPath = "bower_components"; return "bower_components";
// Put the version into the bower path since we can't easily put a query string param on html imports
// Emby server will handle this
if (Dashboard.isConnectMode() && !Dashboard.isRunningInCordova()) {
//bowerPath += window.dashboardVersion;
}
return bowerPath;
} }
function getLayoutManager(layoutManager) { function getLayoutManager(layoutManager) {
@ -2920,8 +2883,6 @@ var AppInfo = {};
deps.push('css!devices/android/android.css'); deps.push('css!devices/android/android.css');
} else if (AppInfo.isNativeApp && browserInfo.safari) { } else if (AppInfo.isNativeApp && browserInfo.safari) {
deps.push('css!devices/ios/ios.css'); deps.push('css!devices/ios/ios.css');
} else if (AppInfo.isNativeApp && browserInfo.edge) {
deps.push('css!devices/windowsphone/wp.css');
} }
loadTheme(); loadTheme();
@ -2992,9 +2953,7 @@ var AppInfo = {};
postInitDependencies.push('scripts/chromecast'); postInitDependencies.push('scripts/chromecast');
} }
if (AppInfo.enableNowPlayingBar) {
postInitDependencies.push('scripts/nowplayingbar'); postInitDependencies.push('scripts/nowplayingbar');
}
if (AppInfo.isNativeApp && browserInfo.safari) { if (AppInfo.isNativeApp && browserInfo.safari) {