mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update page background
This commit is contained in:
parent
a88319b05d
commit
478617f766
6 changed files with 9 additions and 171 deletions
|
@ -41,7 +41,7 @@
|
|||
z-index: 2;
|
||||
}
|
||||
|
||||
.ui-page-theme-b:not(.pageWithAbsoluteTabs), .pageWithAbsoluteTabs .pageBackground {
|
||||
html, .ui-page-theme-b:not(.pageWithAbsoluteTabs), .pageWithAbsoluteTabs .pageBackground {
|
||||
background-color: #242424;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
width: auto !important;
|
||||
height: auto !important;
|
||||
touch-action: auto !important;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.mainDrawerPanelPreInit #drawer {
|
||||
|
|
|
@ -383,106 +383,6 @@ function parseISO8601Date(s, options) {
|
|||
return new Date(ms);
|
||||
}
|
||||
|
||||
// jqm.page.params.js - version 0.1
|
||||
// Copyright (c) 2011, Kin Blas
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the <organization> nor the
|
||||
// names of its contributors may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
(function ($, window, undefined) {
|
||||
|
||||
// Given a query string, convert all the name/value pairs
|
||||
// into a property/value object. If a name appears more than
|
||||
// once in a query string, the value is automatically turned
|
||||
// into an array.
|
||||
function queryStringToObject(qstr) {
|
||||
var result = {}, nvPairs = ((qstr || "").replace(/^\?/, "").split(/&/)), i, pair, n, v;
|
||||
|
||||
for (i = 0; i < nvPairs.length; i++) {
|
||||
var pstr = nvPairs[i];
|
||||
if (pstr) {
|
||||
pair = pstr.split(/=/);
|
||||
n = pair[0];
|
||||
v = pair[1];
|
||||
if (result[n] === undefined) {
|
||||
result[n] = v;
|
||||
} else {
|
||||
if (typeof result[n] !== "object") {
|
||||
result[n] = [result[n]];
|
||||
}
|
||||
result[n].push(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// The idea here is to listen for any pagebeforechange notifications from
|
||||
// jQuery Mobile, and then muck with the toPage and options so that query
|
||||
// params can be passed to embedded/internal pages. So for example, if a
|
||||
// changePage() request for a URL like:
|
||||
//
|
||||
// http://mycompany.com/myapp/#page-1?foo=1&bar=2
|
||||
//
|
||||
// is made, the page that will actually get shown is:
|
||||
//
|
||||
// http://mycompany.com/myapp/#page-1
|
||||
//
|
||||
// The browser's location will still be updated to show the original URL.
|
||||
// The query params for the embedded page are also added as a property/value
|
||||
// object on the options object. You can access it from your page notifications
|
||||
// via data.options.pageData.
|
||||
//$(document).bind("pagebeforechange", function (e, data) {
|
||||
|
||||
// // We only want to handle the case where we are being asked
|
||||
// // to go to a page by URL, and only if that URL is referring
|
||||
// // to an internal page by id.
|
||||
|
||||
// if (typeof data.toPage === "string") {
|
||||
// var u = $.mobile.path.parseUrl(data.toPage);
|
||||
// if ($.mobile.path.isEmbeddedPage(u)) {
|
||||
|
||||
// // The request is for an internal page, if the hash
|
||||
// // contains query (search) params, strip them off the
|
||||
// // toPage URL and then set options.dataUrl appropriately
|
||||
// // so the location.hash shows the originally requested URL
|
||||
// // that hash the query params in the hash.
|
||||
|
||||
// var u2 = $.mobile.path.parseUrl(u.hash.replace(/^#/, ""));
|
||||
// if (u2.search) {
|
||||
// if (!data.options.dataUrl) {
|
||||
// data.options.dataUrl = data.toPage;
|
||||
// }
|
||||
// data.options.pageData = queryStringToObject(u2.search);
|
||||
// data.toPage = u.hrefNoHash + "#" + u2.pathname;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
|
||||
//convert Ticks to human hr:min:sec format
|
||||
function ticks_to_human(str) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.viewMenuBar, .libraryViewNav:not(.paperLibraryViewNav), paper-tabs {
|
||||
.viewMenuBar, .libraryViewNav:not(.paperLibraryViewNav), paper-tabs, html {
|
||||
background-color: #1b1b1b;
|
||||
}
|
||||
|
||||
|
|
|
@ -4328,14 +4328,6 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
}, this ));
|
||||
},
|
||||
|
||||
_releaseTransitionLock: function() {
|
||||
//release transition lock so navigation is free again
|
||||
isPageTransitioning = false;
|
||||
if ( pageTransitionQueue.length > 0 ) {
|
||||
$.mobile.changePage.apply( null, pageTransitionQueue.pop() );
|
||||
}
|
||||
},
|
||||
|
||||
_removeActiveLinkClass: function( force ) {
|
||||
//clear out the active button state
|
||||
$.mobile.removeActiveLinkClass( force );
|
||||
|
@ -4353,7 +4345,6 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
this.load( to, settings );
|
||||
|
||||
settings.deferred.done($.proxy(function( url, options, content ) {
|
||||
isPageTransitioning = false;
|
||||
|
||||
// store the original absolute url so that it can be provided
|
||||
// to events in the triggerData of the subsequent changePage call
|
||||
|
@ -4364,7 +4355,6 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
|
||||
settings.deferred.fail($.proxy(function(/* url, options */) {
|
||||
this._removeActiveLinkClass( true );
|
||||
this._releaseTransitionLock();
|
||||
this._triggerWithDeprecated( "changefailed", triggerData );
|
||||
}, this));
|
||||
},
|
||||
|
@ -4392,28 +4382,12 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
triggerData.absUrl = settings.absUrl;
|
||||
}
|
||||
|
||||
// Let listeners know we're about to change the current page.
|
||||
returnEvents = this._triggerWithDeprecated( "beforechange", triggerData );
|
||||
|
||||
// If the default behavior is prevented, stop here!
|
||||
if ( returnEvents.event.isDefaultPrevented() ||
|
||||
returnEvents.deprecatedEvent.isDefaultPrevented() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
change: function( to, options ) {
|
||||
// If we are in the midst of a transition, queue the current request.
|
||||
// We'll call changePage() once we're done with the current transition
|
||||
// to service the request.
|
||||
if ( isPageTransitioning ) {
|
||||
pageTransitionQueue.unshift( arguments );
|
||||
return;
|
||||
}
|
||||
|
||||
var settings = $.extend( {}, $.mobile.changePage.defaults, options ),
|
||||
var settings = $.extend({}, $.mobile.changePage.defaults, options),
|
||||
triggerData = {};
|
||||
|
||||
// Make sure we have a fromPage.
|
||||
|
@ -4435,11 +4409,6 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
// to the promise object it returns so we know when
|
||||
// it is done loading or if an error ocurred.
|
||||
if ( $.type(to) === "string" ) {
|
||||
// Set the isPageTransitioning flag to prevent any requests from
|
||||
// entering this method while we are in the midst of loading a page
|
||||
// or transitioning.
|
||||
isPageTransitioning = true;
|
||||
|
||||
this._loadUrl( to, triggerData, settings );
|
||||
} else {
|
||||
this.transition( to, triggerData, settings );
|
||||
|
@ -4454,23 +4423,8 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
params, cssTransitionDeferred,
|
||||
beforeTransition;
|
||||
|
||||
// If we are in the midst of a transition, queue the current request.
|
||||
// We'll call changePage() once we're done with the current transition
|
||||
// to service the request.
|
||||
if ( isPageTransitioning ) {
|
||||
// make sure to only queue the to and settings values so the arguments
|
||||
// work with a call to the change method
|
||||
pageTransitionQueue.unshift( [toPage, settings] );
|
||||
return;
|
||||
}
|
||||
|
||||
triggerData.prevPage = settings.fromPage;
|
||||
|
||||
// Set the isPageTransitioning flag to prevent any requests from
|
||||
// entering this method while we are in the midst of loading a page
|
||||
// or transitioning.
|
||||
isPageTransitioning = true;
|
||||
|
||||
// If we are going to the first-page of the application, we need to make
|
||||
// sure settings.dataUrl is set to the application document url. This allows
|
||||
// us to avoid generating a document url with an id hash in the case where the
|
||||
|
@ -4511,7 +4465,6 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
if ( fromPage && fromPage[0] === toPage[0] &&
|
||||
!settings.allowSamePageTransition ) {
|
||||
|
||||
isPageTransitioning = false;
|
||||
this._triggerWithDeprecated( "transition", triggerData );
|
||||
this._triggerWithDeprecated( "change", triggerData );
|
||||
|
||||
|
@ -4588,9 +4541,7 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
}
|
||||
|
||||
// Make sure we have a transition defined.
|
||||
settings.transition = settings.transition ||
|
||||
( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined ) ||
|
||||
( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition );
|
||||
settings.transition = "none";
|
||||
|
||||
//add page to history stack if it's not back or forward
|
||||
if ( !historyDir && alreadyThere ) {
|
||||
|
@ -4639,20 +4590,6 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
});
|
||||
|
||||
$.mobile.removeActiveLinkClass();
|
||||
|
||||
//if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
|
||||
if (settings.duplicateCachedPage) {
|
||||
settings.duplicateCachedPage.remove();
|
||||
}
|
||||
|
||||
// despite visibility: hidden addresses issue #2965
|
||||
// https://github.com/jquery/jquery-mobile/issues/2965
|
||||
//if (!alreadyFocused) {
|
||||
// $.mobile.focusPage(toPage);
|
||||
//}
|
||||
|
||||
this._releaseTransitionLock();
|
||||
this._triggerWithDeprecated("transition", triggerData);
|
||||
},
|
||||
|
||||
// determine the current base url
|
||||
|
@ -4670,10 +4607,7 @@ $.fn.fieldcontain = function(/* options */) {
|
|||
|
||||
//these variables make all page containers use the same queue and only navigate one at a time
|
||||
// queue to hold simultanious page transitions
|
||||
var pageTransitionQueue = [],
|
||||
|
||||
// indicates whether or not page is in process of transitioning
|
||||
isPageTransitioning = false;
|
||||
var pageTransitionQueue = [];
|
||||
|
||||
})( jQuery );
|
||||
|
||||
|
|
|
@ -58,6 +58,9 @@ div.ui-mobile-viewport {
|
|||
display: none;
|
||||
border: 0;
|
||||
}
|
||||
.ui-page {
|
||||
position: static !important;
|
||||
}
|
||||
/* On ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */
|
||||
.ui-page {
|
||||
outline: none;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue