mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv segments
This commit is contained in:
parent
c86543dc59
commit
ec67431a0e
13 changed files with 118 additions and 340 deletions
|
@ -27,14 +27,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
||||||
"_release": "1.0.8",
|
"_release": "1.0.8",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.8",
|
"tag": "v1.0.8",
|
||||||
"commit": "663ad706b43989f4961d945b8116cf4db346532f"
|
"commit": "663ad706b43989f4961d945b8116cf4db346532f"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-behaviors"
|
"_originalSource": "polymerelements/iron-behaviors"
|
||||||
}
|
}
|
|
@ -25,14 +25,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||||
"_release": "1.0.3",
|
"_release": "1.0.3",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.3",
|
"tag": "v1.0.3",
|
||||||
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-meta"
|
"_originalSource": "PolymerElements/iron-meta"
|
||||||
}
|
}
|
|
@ -42,7 +42,7 @@
|
||||||
"tag": "v1.0.3",
|
"tag": "v1.0.3",
|
||||||
"commit": "90b54de14264c19693601b9fc16af6b68a9d48e4"
|
"commit": "90b54de14264c19693601b9fc16af6b68a9d48e4"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/paper-behaviors"
|
"_originalSource": "PolymerElements/paper-behaviors"
|
||||||
}
|
}
|
1
dashboard-ui/cordova/android/vlcplayer.js
vendored
1
dashboard-ui/cordova/android/vlcplayer.js
vendored
|
@ -140,6 +140,7 @@
|
||||||
if (tIndex != -1) {
|
if (tIndex != -1) {
|
||||||
startPosMs = val.substring(tIndex + 3);
|
startPosMs = val.substring(tIndex + 3);
|
||||||
startPosMs = parseFloat(startPosMs) * 1000;
|
startPosMs = parseFloat(startPosMs) * 1000;
|
||||||
|
val = val.split('#')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.type == 'audio') {
|
if (options.type == 'audio') {
|
||||||
|
|
|
@ -123,8 +123,25 @@
|
||||||
elem.classList.add('hasrefreshtime');
|
elem.classList.add('hasrefreshtime');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
enableFullPaperTabs: function () {
|
||||||
|
return AppInfo.isNativeApp;
|
||||||
|
},
|
||||||
|
|
||||||
animatePaperTabs: function () {
|
animatePaperTabs: function () {
|
||||||
return !$.browser.safari;
|
|
||||||
|
if (!LibraryBrowser.enableFullPaperTabs()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.browser.safari) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof ($.browser.androidVersion) == 'number' && !isNaN($.browser.androidVersion)) {
|
||||||
|
return $.browser.androidVersion >= 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
||||||
|
@ -174,8 +191,10 @@
|
||||||
if (allowSwipe(e)) {
|
if (allowSwipe(e)) {
|
||||||
var selected = parseInt(pages.selected || '0');
|
var selected = parseInt(pages.selected || '0');
|
||||||
if (selected < (pageCount - 1)) {
|
if (selected < (pageCount - 1)) {
|
||||||
|
if (LibraryBrowser.animatePaperTabs()) {
|
||||||
pages.entryAnimation = 'slide-from-right-animation';
|
pages.entryAnimation = 'slide-from-right-animation';
|
||||||
pages.exitAnimation = 'slide-left-animation';
|
pages.exitAnimation = 'slide-left-animation';
|
||||||
|
}
|
||||||
tabs.selectNext();
|
tabs.selectNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,8 +204,10 @@
|
||||||
if (allowSwipe(e)) {
|
if (allowSwipe(e)) {
|
||||||
var selected = parseInt(pages.selected || '0');
|
var selected = parseInt(pages.selected || '0');
|
||||||
if (selected > 0) {
|
if (selected > 0) {
|
||||||
|
if (LibraryBrowser.animatePaperTabs()) {
|
||||||
pages.entryAnimation = 'slide-from-left-animation';
|
pages.entryAnimation = 'slide-from-left-animation';
|
||||||
pages.exitAnimation = 'slide-right-animation';
|
pages.exitAnimation = 'slide-right-animation';
|
||||||
|
}
|
||||||
tabs.selectPrevious();
|
tabs.selectPrevious();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,10 +215,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
enableFullPaperTabs: function () {
|
|
||||||
return AppInfo.isNativeApp;
|
|
||||||
},
|
|
||||||
|
|
||||||
navigateOnLibraryTabSelect: function () {
|
navigateOnLibraryTabSelect: function () {
|
||||||
return !LibraryBrowser.enableFullPaperTabs();
|
return !LibraryBrowser.enableFullPaperTabs();
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function renderHeader() {
|
function renderHeader() {
|
||||||
|
|
||||||
var html = '<div class="viewMenuBar ui-bar-b">';
|
var html = '';
|
||||||
|
|
||||||
var backIcon = $.browser.safari ? 'chevron-left' : 'arrow-back';
|
var backIcon = $.browser.safari ? 'chevron-left' : 'arrow-back';
|
||||||
|
|
||||||
|
@ -38,9 +38,13 @@
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '</div>';
|
var viewMenuBar = document.createElement('div');
|
||||||
|
viewMenuBar.classList.add('viewMenuBar');
|
||||||
|
viewMenuBar.classList.add('ui-bar-b');
|
||||||
|
viewMenuBar.innerHTML = html;
|
||||||
|
|
||||||
|
document.body.appendChild(viewMenuBar);
|
||||||
|
|
||||||
$(document.body).append(html);
|
|
||||||
ImageLoader.lazyChildren(document.querySelector('.viewMenuBar'));
|
ImageLoader.lazyChildren(document.querySelector('.viewMenuBar'));
|
||||||
|
|
||||||
Events.trigger(document, 'headercreated');
|
Events.trigger(document, 'headercreated');
|
||||||
|
@ -114,17 +118,24 @@
|
||||||
|
|
||||||
function bindMenuEvents() {
|
function bindMenuEvents() {
|
||||||
|
|
||||||
|
var mainDrawerButton = document.querySelector('.mainDrawerButton');
|
||||||
|
|
||||||
|
if (mainDrawerButton) {
|
||||||
if (AppInfo.isTouchPreferred) {
|
if (AppInfo.isTouchPreferred) {
|
||||||
|
|
||||||
$('.mainDrawerButton').on('click', openMainDrawer);
|
Events.on(mainDrawerButton, 'click', openMainDrawer);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.mainDrawerButton').createHoverTouch().on('hovertouch', openMainDrawer);
|
$(mainDrawerButton).createHoverTouch().on('hovertouch', openMainDrawer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.headerBackButton').on('click', onBackClick);
|
var headerBackButton = document.querySelector('.headerBackButton');
|
||||||
|
if (headerBackButton) {
|
||||||
|
Events.on(headerBackButton, 'click', onBackClick);
|
||||||
|
}
|
||||||
|
|
||||||
var viewMenuBar = document.getElementsByClassName("viewMenuBar")[0];
|
var viewMenuBar = document.querySelector(".viewMenuBar");
|
||||||
initHeadRoom(viewMenuBar);
|
initHeadRoom(viewMenuBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,7 +791,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pagebeforeshow', ".page", function () {
|
pageClassOn('pagebeforeshow', 'page', function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
@ -788,18 +799,23 @@
|
||||||
|
|
||||||
onPageBeforeShowDocumentReady(page);
|
onPageBeforeShowDocumentReady(page);
|
||||||
|
|
||||||
}).on('pageshowready', ".page", function () {
|
});
|
||||||
|
|
||||||
|
pageClassOn('pageshowready', 'page', function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
onPageShowDocumentReady(page);
|
onPageShowDocumentReady(page);
|
||||||
|
|
||||||
}).on('pagebeforehide', ".page", function () {
|
});
|
||||||
|
|
||||||
|
pageClassOn('pagebeforehide', 'page', function () {
|
||||||
|
|
||||||
var headroomEnabled = document.querySelectorAll('.headroomEnabled');
|
var headroomEnabled = document.querySelectorAll('.headroomEnabled');
|
||||||
for (var i = 0, length = headroomEnabled.length; i < length; i++) {
|
for (var i = 0, length = headroomEnabled.length; i < length; i++) {
|
||||||
headroomEnabled[i].classList.add('headroomDisabled');
|
headroomEnabled[i].classList.add('headroomDisabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onPageBeforeShowDocumentReady(page) {
|
function onPageBeforeShowDocumentReady(page) {
|
||||||
|
@ -852,10 +868,10 @@
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$('.libraryViewNav', page).each(function () {
|
var navs = page.querySelectorAll('.libraryViewNav');
|
||||||
|
for (var i = 0, length = navs.length; i < length; i++) {
|
||||||
initHeadRoom(this);
|
initHeadRoom(navs[i]);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (page.classList.contains('type-interior')) {
|
else if (page.classList.contains('type-interior')) {
|
||||||
|
@ -906,37 +922,15 @@
|
||||||
backButton.classList.add('hide');
|
backButton.classList.add('hide');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Events.off(page, 'swiperight', onPageSwipeLeft);
|
|
||||||
|
|
||||||
if (canGoBack) {
|
|
||||||
//Events.on(page, 'swiperight', onPageSwipeLeft);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onPageSwipeLeft(e) {
|
|
||||||
|
|
||||||
var target = e.target;
|
|
||||||
|
|
||||||
if (!target.classList.contains('hiddenScrollX') && !$(target).parents('.hiddenScrollX').length) {
|
|
||||||
history.back();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageShowDocumentReady(page) {
|
function onPageShowDocumentReady(page) {
|
||||||
|
|
||||||
if (!NavHelper.isBack()) {
|
if (!NavHelper.isBack()) {
|
||||||
var elems = page.querySelectorAll('.libraryViewNav .ui-btn-active');
|
|
||||||
elems = $(elems).filter(':visible');
|
|
||||||
|
|
||||||
if (elems.length) {
|
|
||||||
elems[0].scrollIntoView();
|
|
||||||
|
|
||||||
// Scroll back up so in case vertical scroll was messed with
|
// Scroll back up so in case vertical scroll was messed with
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function initHeadRoom(elem) {
|
function initHeadRoom(elem) {
|
||||||
|
|
||||||
|
@ -1059,7 +1053,7 @@ $.fn.createHoverTouch = function () {
|
||||||
|
|
||||||
var backUrl;
|
var backUrl;
|
||||||
|
|
||||||
$(document).on('pagebeforeshow', ".page", function () {
|
pageClassOn('pagebeforeshow', "page", function () {
|
||||||
|
|
||||||
if (getWindowUrl() != backUrl) {
|
if (getWindowUrl() != backUrl) {
|
||||||
backUrl = null;
|
backUrl = null;
|
||||||
|
|
|
@ -1551,6 +1551,16 @@ var Dashboard = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof ($.browser.androidVersion) == 'number' && !isNaN($.browser.androidVersion)) {
|
||||||
|
if ($.browser.androidVersion < 5) {
|
||||||
|
quality -= 10;
|
||||||
|
|
||||||
|
if ($.browser.androidVersion < 4.4) {
|
||||||
|
quality -= 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return quality;
|
return quality;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.viewMenuBar, .libraryViewNav:not(.paperLibraryViewNav), paper-tabs {
|
.viewMenuBar, .libraryViewNav:not(.paperLibraryViewNav), paper-tabs {
|
||||||
background-color: #1b1b1b;
|
background-color: #1d1d1d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewMenuBar.semiTransparent {
|
.viewMenuBar.semiTransparent {
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.background-theme-b {
|
.background-theme-b {
|
||||||
background-color: #242424;
|
background-color: #2d2d2d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backdropContainer .pageBackground {
|
.backdropContainer .pageBackground {
|
||||||
|
|
|
@ -32,10 +32,12 @@
|
||||||
|
|
||||||
.libraryViewNav paper-tabs {
|
.libraryViewNav paper-tabs {
|
||||||
height: 58px !important;
|
height: 58px !important;
|
||||||
|
flex-grow: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav paper-tab {
|
.libraryViewNav paper-tab {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
|
flex-grow: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav iron-icon {
|
.libraryViewNav iron-icon {
|
||||||
|
@ -53,6 +55,10 @@
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.libraryViewNav #tabsContainer {
|
||||||
|
flex-grow: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
@media all and (max-width: 600px) {
|
||||||
|
|
||||||
.libraryViewNav a {
|
.libraryViewNav a {
|
||||||
|
|
2
dashboard-ui/thirdparty/browser.js
vendored
2
dashboard-ui/thirdparty/browser.js
vendored
|
@ -961,6 +961,8 @@
|
||||||
browser.tv = true;
|
browser.tv = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
browser.androidVersion = md.version('Android');
|
||||||
|
|
||||||
if (browser.ipad || browser.iphone) {
|
if (browser.ipad || browser.iphone) {
|
||||||
if (userAgent.toLowerCase().indexOf('cpu os 9') != -1) {
|
if (userAgent.toLowerCase().indexOf('cpu os 9') != -1) {
|
||||||
browser.iOSVersion = 9;
|
browser.iOSVersion = 9;
|
||||||
|
|
|
@ -613,8 +613,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
_openPrerequisitesComplete: function () {
|
_openPrerequisitesComplete: function () {
|
||||||
var id = this.element.attr("id"),
|
var id = this.element.attr("id");
|
||||||
firstFocus = this._ui.container.find(":focusable").first();
|
|
||||||
|
|
||||||
this._ui.container.addClass("ui-popup-active");
|
this._ui.container.addClass("ui-popup-active");
|
||||||
this._isOpen = true;
|
this._isOpen = true;
|
||||||
|
@ -624,9 +623,6 @@
|
||||||
if (!$.contains(this._ui.container[0], this.document[0].activeElement)) {
|
if (!$.contains(this._ui.container[0], this.document[0].activeElement)) {
|
||||||
this._safelyBlur(this.document[0].activeElement);
|
this._safelyBlur(this.document[0].activeElement);
|
||||||
}
|
}
|
||||||
if (firstFocus.length > 0) {
|
|
||||||
this._ui.focusElement = firstFocus;
|
|
||||||
}
|
|
||||||
this._ignoreResizeEvents();
|
this._ignoreResizeEvents();
|
||||||
if (id) {
|
if (id) {
|
||||||
this.document.find("[aria-haspopup='true'][aria-owns='" + id + "']").attr("aria-expanded", true);
|
this.document.find("[aria-haspopup='true'][aria-owns='" + id + "']").attr("aria-expanded", true);
|
||||||
|
|
|
@ -2767,236 +2767,6 @@ $.widget( "mobile.page", {
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(function( $, window, undefined ) {
|
|
||||||
|
|
||||||
// TODO remove direct references to $.mobile and properties, we should
|
|
||||||
// favor injection with params to the constructor
|
|
||||||
$.mobile.Transition = function() {
|
|
||||||
this.init.apply( this, arguments );
|
|
||||||
};
|
|
||||||
|
|
||||||
$.extend($.mobile.Transition.prototype, {
|
|
||||||
toPreClass: " ui-page-pre-in",
|
|
||||||
|
|
||||||
init: function( name, reverse, $to, $from ) {
|
|
||||||
$.extend(this, {
|
|
||||||
name: name,
|
|
||||||
reverse: reverse,
|
|
||||||
$to: $to,
|
|
||||||
$from: $from,
|
|
||||||
deferred: new $.Deferred()
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
cleanFrom: function() {
|
|
||||||
this.$from
|
|
||||||
.removeClass( $.mobile.activePageClass + " out in reverse " + this.name )
|
|
||||||
.height( "" );
|
|
||||||
},
|
|
||||||
|
|
||||||
// NOTE overridden by child object prototypes, noop'd here as defaults
|
|
||||||
beforeDoneIn: function() {},
|
|
||||||
beforeDoneOut: function() {},
|
|
||||||
beforeStartOut: function() {},
|
|
||||||
|
|
||||||
doneIn: function() {
|
|
||||||
this.beforeDoneIn();
|
|
||||||
|
|
||||||
this.$to.removeClass( "out in reverse " + this.name ).height( "" );
|
|
||||||
|
|
||||||
this.toggleViewportClass();
|
|
||||||
|
|
||||||
// In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition
|
|
||||||
// This ensures we jump to that spot after the fact, if we aren't there already.
|
|
||||||
if ( $.mobile.window.scrollTop() !== this.toScroll ) {
|
|
||||||
this.scrollPage();
|
|
||||||
}
|
|
||||||
if ( !this.sequential ) {
|
|
||||||
this.$to.addClass( $.mobile.activePageClass );
|
|
||||||
}
|
|
||||||
this.deferred.resolve( this.name, this.reverse, this.$to, this.$from, true );
|
|
||||||
},
|
|
||||||
|
|
||||||
doneOut: function( screenHeight, reverseClass, none, preventFocus ) {
|
|
||||||
this.beforeDoneOut();
|
|
||||||
this.startIn( screenHeight, reverseClass, none, preventFocus );
|
|
||||||
},
|
|
||||||
|
|
||||||
hideIn: function( callback ) {
|
|
||||||
// Prevent flickering in phonegap container: see comments at #4024 regarding iOS
|
|
||||||
this.$to.css( "z-index", -10 );
|
|
||||||
callback.call( this );
|
|
||||||
this.$to.css( "z-index", "" );
|
|
||||||
},
|
|
||||||
|
|
||||||
scrollPage: function() {
|
|
||||||
|
|
||||||
//if we are hiding the url bar or the page was previously scrolled scroll to hide or return to position
|
|
||||||
if ( $.mobile.hideUrlBar || this.toScroll !== $.mobile.defaultHomeScroll ) {
|
|
||||||
window.scrollTo( 0, this.toScroll );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
startIn: function( screenHeight, reverseClass, none, preventFocus ) {
|
|
||||||
this.hideIn(function() {
|
|
||||||
this.$to.addClass( $.mobile.activePageClass + this.toPreClass );
|
|
||||||
|
|
||||||
// Send focus to page as it is now display: block
|
|
||||||
if ( !preventFocus ) {
|
|
||||||
$.mobile.focusPage( this.$to );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set to page height
|
|
||||||
this.$to.height( screenHeight + this.toScroll );
|
|
||||||
|
|
||||||
if ( !none ) {
|
|
||||||
this.scrollPage();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.$to
|
|
||||||
.removeClass( this.toPreClass )
|
|
||||||
.addClass( this.name + " in " + reverseClass );
|
|
||||||
|
|
||||||
if ( !none ) {
|
|
||||||
this.$to.animationComplete( $.proxy(function() {
|
|
||||||
this.doneIn();
|
|
||||||
}, this ));
|
|
||||||
} else {
|
|
||||||
this.doneIn();
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
startOut: function( screenHeight, reverseClass, none ) {
|
|
||||||
this.beforeStartOut( screenHeight, reverseClass, none );
|
|
||||||
|
|
||||||
// Set the from page's height and start it transitioning out
|
|
||||||
// Note: setting an explicit height helps eliminate tiling in the transitions
|
|
||||||
this.$from
|
|
||||||
.height( screenHeight + $.mobile.window.scrollTop() )
|
|
||||||
.addClass( this.name + " out" + reverseClass );
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleViewportClass: function() {
|
|
||||||
$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + this.name );
|
|
||||||
},
|
|
||||||
|
|
||||||
transition: function() {
|
|
||||||
// NOTE many of these could be calculated/recorded in the constructor, it's my
|
|
||||||
// opinion that binding them as late as possible has value with regards to
|
|
||||||
// better transitions with fewer bugs. Ie, it's not guaranteed that the
|
|
||||||
// object will be created and transition will be run immediately after as
|
|
||||||
// it is today. So we wait until transition is invoked to gather the following
|
|
||||||
var none,
|
|
||||||
reverseClass = this.reverse ? " reverse" : "",
|
|
||||||
screenHeight = $.mobile.getScreenHeight(),
|
|
||||||
maxTransitionOverride = $.mobile.maxTransitionWidth !== false &&
|
|
||||||
$.mobile.window.width() > $.mobile.maxTransitionWidth;
|
|
||||||
|
|
||||||
this.toScroll = $.mobile.navigate.history.getActive().lastScroll || $.mobile.defaultHomeScroll;
|
|
||||||
|
|
||||||
none = !$.support.cssTransitions || !$.support.cssAnimations ||
|
|
||||||
maxTransitionOverride || !this.name || this.name === "none" ||
|
|
||||||
Math.max( $.mobile.window.scrollTop(), this.toScroll ) >
|
|
||||||
$.mobile.getMaxScrollForTransition();
|
|
||||||
|
|
||||||
this.toggleViewportClass();
|
|
||||||
|
|
||||||
if ( this.$from && !none ) {
|
|
||||||
this.startOut( screenHeight, reverseClass, none );
|
|
||||||
} else {
|
|
||||||
this.doneOut( screenHeight, reverseClass, none, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.deferred.promise();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})( jQuery, this );
|
|
||||||
|
|
||||||
|
|
||||||
(function( $ ) {
|
|
||||||
|
|
||||||
$.mobile.SerialTransition = function() {
|
|
||||||
this.init.apply(this, arguments);
|
|
||||||
};
|
|
||||||
|
|
||||||
$.extend($.mobile.SerialTransition.prototype, $.mobile.Transition.prototype, {
|
|
||||||
sequential: true,
|
|
||||||
|
|
||||||
beforeDoneOut: function() {
|
|
||||||
if ( this.$from ) {
|
|
||||||
this.cleanFrom();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeStartOut: function( screenHeight, reverseClass, none ) {
|
|
||||||
this.$from.animationComplete($.proxy(function() {
|
|
||||||
this.doneOut( screenHeight, reverseClass, none );
|
|
||||||
}, this ));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
|
||||||
|
|
||||||
(function( $ ) {
|
|
||||||
|
|
||||||
$.mobile.ConcurrentTransition = function() {
|
|
||||||
this.init.apply(this, arguments);
|
|
||||||
};
|
|
||||||
|
|
||||||
$.extend($.mobile.ConcurrentTransition.prototype, $.mobile.Transition.prototype, {
|
|
||||||
sequential: false,
|
|
||||||
|
|
||||||
beforeDoneIn: function() {
|
|
||||||
if ( this.$from ) {
|
|
||||||
this.cleanFrom();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeStartOut: function( screenHeight, reverseClass, none ) {
|
|
||||||
this.doneOut( screenHeight, reverseClass, none );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
|
||||||
|
|
||||||
(function( $ ) {
|
|
||||||
|
|
||||||
// generate the handlers from the above
|
|
||||||
var defaultGetMaxScrollForTransition = function() {
|
|
||||||
return $.mobile.getScreenHeight() * 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
//transition handler dictionary for 3rd party transitions
|
|
||||||
$.mobile.transitionHandlers = {
|
|
||||||
"sequential": $.mobile.SerialTransition,
|
|
||||||
"simultaneous": $.mobile.ConcurrentTransition
|
|
||||||
};
|
|
||||||
|
|
||||||
// Make our transition handler the public default.
|
|
||||||
$.mobile.defaultTransitionHandler = $.mobile.transitionHandlers.sequential;
|
|
||||||
|
|
||||||
$.mobile.transitionFallbacks = {};
|
|
||||||
|
|
||||||
// If transition is defined, check if css 3D transforms are supported, and if not, if a fallback is specified
|
|
||||||
$.mobile._maybeDegradeTransition = function( transition ) {
|
|
||||||
if ( transition && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ transition ] ) {
|
|
||||||
transition = $.mobile.transitionFallbacks[ transition ];
|
|
||||||
}
|
|
||||||
|
|
||||||
return transition;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Set the getMaxScrollForTransition to default if no implementation was set by user
|
|
||||||
$.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defaultGetMaxScrollForTransition;
|
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
|
||||||
(function( $, undefined ) {
|
(function( $, undefined ) {
|
||||||
|
|
||||||
var pageCache = {};
|
var pageCache = {};
|
||||||
|
@ -3788,8 +3558,7 @@ $.widget( "mobile.page", {
|
||||||
active, activeIsInitialPage,
|
active, activeIsInitialPage,
|
||||||
historyDir, pageTitle, isDialog,
|
historyDir, pageTitle, isDialog,
|
||||||
alreadyThere, newPageTitle,
|
alreadyThere, newPageTitle,
|
||||||
params, cssTransitionDeferred,
|
params;
|
||||||
beforeTransition;
|
|
||||||
|
|
||||||
triggerData.prevPage = settings.fromPage;
|
triggerData.prevPage = settings.fromPage;
|
||||||
|
|
||||||
|
@ -3830,8 +3599,7 @@ $.widget( "mobile.page", {
|
||||||
// the developer that turns on the allowSamePageTransitiona option to
|
// the developer that turns on the allowSamePageTransitiona option to
|
||||||
// either turn off transition animations, or make sure that an appropriate
|
// either turn off transition animations, or make sure that an appropriate
|
||||||
// animation transition is used.
|
// animation transition is used.
|
||||||
if ( fromPage && fromPage[0] === toPage[0] &&
|
if ( fromPage && fromPage[0] === toPage[0] ) {
|
||||||
!settings.allowSamePageTransition ) {
|
|
||||||
|
|
||||||
this._triggerWithDeprecated( "transition", triggerData );
|
this._triggerWithDeprecated( "transition", triggerData );
|
||||||
this._triggerWithDeprecated( "change", triggerData );
|
this._triggerWithDeprecated( "change", triggerData );
|
||||||
|
@ -3908,9 +3676,6 @@ $.widget( "mobile.page", {
|
||||||
toPage.jqmData( "title", pageTitle );
|
toPage.jqmData( "title", pageTitle );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we have a transition defined.
|
|
||||||
settings.transition = "none";
|
|
||||||
|
|
||||||
//add page to history stack if it's not back or forward
|
//add page to history stack if it's not back or forward
|
||||||
if ( !historyDir && alreadyThere ) {
|
if ( !historyDir && alreadyThere ) {
|
||||||
$.mobile.navigate.history.getActive().pageUrl = pageUrl;
|
$.mobile.navigate.history.getActive().pageUrl = pageUrl;
|
||||||
|
@ -3927,7 +3692,6 @@ $.widget( "mobile.page", {
|
||||||
|
|
||||||
// TODO the property names here are just silly
|
// TODO the property names here are just silly
|
||||||
params = {
|
params = {
|
||||||
transition: settings.transition,
|
|
||||||
title: pageTitle,
|
title: pageTitle,
|
||||||
pageUrl: pageUrl,
|
pageUrl: pageUrl,
|
||||||
role: settings.role
|
role: settings.role
|
||||||
|
@ -3973,10 +3737,6 @@ $.widget( "mobile.page", {
|
||||||
// the following deferred is resolved in the init file
|
// the following deferred is resolved in the init file
|
||||||
$.mobile.navreadyDeferred = $.Deferred();
|
$.mobile.navreadyDeferred = $.Deferred();
|
||||||
|
|
||||||
//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 = [];
|
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
(function( $, undefined ) {
|
(function( $, undefined ) {
|
||||||
|
@ -4043,11 +3803,6 @@ $.widget( "mobile.page", {
|
||||||
$.mobile.focusPage = function ( page ) {
|
$.mobile.focusPage = function ( page ) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// No-op implementation of transition degradation
|
|
||||||
$.mobile._maybeDegradeTransition = $.mobile._maybeDegradeTransition || function( transition ) {
|
|
||||||
return transition;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Exposed $.mobile methods
|
// Exposed $.mobile methods
|
||||||
|
|
||||||
$.mobile.changePage = function( to, options ) {
|
$.mobile.changePage = function( to, options ) {
|
||||||
|
@ -4055,7 +3810,6 @@ $.widget( "mobile.page", {
|
||||||
};
|
};
|
||||||
|
|
||||||
$.mobile.changePage.defaults = {
|
$.mobile.changePage.defaults = {
|
||||||
transition: undefined,
|
|
||||||
reverse: false,
|
reverse: false,
|
||||||
changeHash: true,
|
changeHash: true,
|
||||||
fromHashChange: false,
|
fromHashChange: false,
|
||||||
|
@ -4064,8 +3818,7 @@ $.widget( "mobile.page", {
|
||||||
pageContainer: undefined,
|
pageContainer: undefined,
|
||||||
showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage
|
showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage
|
||||||
dataUrl: undefined,
|
dataUrl: undefined,
|
||||||
fromPage: undefined,
|
fromPage: undefined
|
||||||
allowSamePageTransition: false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function parentWithTag(elem, tagName) {
|
function parentWithTag(elem, tagName) {
|
||||||
|
@ -4095,7 +3848,7 @@ $.widget( "mobile.page", {
|
||||||
|
|
||||||
baseUrl, href,
|
baseUrl, href,
|
||||||
useDefaultUrlHandling, isExternal,
|
useDefaultUrlHandling, isExternal,
|
||||||
transition, reverse, role;
|
reverse, role;
|
||||||
|
|
||||||
// If there is no link associated with the click or its not a left
|
// If there is no link associated with the click or its not a left
|
||||||
// click we want to ignore the click
|
// click we want to ignore the click
|
||||||
|
@ -4163,7 +3916,6 @@ $.widget( "mobile.page", {
|
||||||
}
|
}
|
||||||
|
|
||||||
//use ajax
|
//use ajax
|
||||||
transition = $link.jqmData( "transition" );
|
|
||||||
reverse = $link.jqmData( "direction" ) === "reverse" ||
|
reverse = $link.jqmData( "direction" ) === "reverse" ||
|
||||||
// deprecated - remove by 1.0
|
// deprecated - remove by 1.0
|
||||||
$link.jqmData( "back" );
|
$link.jqmData( "back" );
|
||||||
|
@ -4171,7 +3923,7 @@ $.widget( "mobile.page", {
|
||||||
//this may need to be more specific as we use data-rel more
|
//this may need to be more specific as we use data-rel more
|
||||||
role = link.getAttribute("data-" + $.mobile.ns + "rel") || undefined;
|
role = link.getAttribute("data-" + $.mobile.ns + "rel") || undefined;
|
||||||
|
|
||||||
$.mobile.changePage( href, { transition: transition, reverse: reverse, role: role, link: $link } );
|
$.mobile.changePage( href, { reverse: reverse, role: role, link: $link } );
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4244,7 +3996,7 @@ $.widget( "mobile.page", {
|
||||||
initializePage: function() {
|
initializePage: function() {
|
||||||
// find present pages
|
// find present pages
|
||||||
var path = $.mobile.path,
|
var path = $.mobile.path,
|
||||||
$pages = $("div[data-role='page']"),
|
$pages = $(document.querySelectorAll("div[data-role='page']")),
|
||||||
hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ),
|
hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ),
|
||||||
theLocation = $.mobile.path.parseLocation(),
|
theLocation = $.mobile.path.parseLocation(),
|
||||||
hashPage = hash ? document.getElementById( hash ) : undefined;
|
hashPage = hash ? document.getElementById( hash ) : undefined;
|
||||||
|
@ -4290,7 +4042,6 @@ $.widget( "mobile.page", {
|
||||||
}
|
}
|
||||||
|
|
||||||
$.mobile.changePage( $.mobile.firstPage, {
|
$.mobile.changePage( $.mobile.firstPage, {
|
||||||
transition: "none",
|
|
||||||
reverse: true,
|
reverse: true,
|
||||||
changeHash: false,
|
changeHash: false,
|
||||||
fromHashChange: true
|
fromHashChange: true
|
||||||
|
|
|
@ -348,12 +348,13 @@ paper-menu-item {
|
||||||
-webkit-flex: none;
|
-webkit-flex: none;
|
||||||
flex: none;
|
flex: none;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav paper-tabs {
|
.libraryViewNav paper-tabs {
|
||||||
flex: none;
|
flex: none;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
flex-grow: 0;
|
flex-grow: 1;
|
||||||
overflow-x: visible !important;
|
overflow-x: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +362,7 @@ paper-menu-item {
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
flex: none;
|
flex: none;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
flex-grow: 0;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-page-theme-b paper-item-body [secondary] {
|
.ui-page-theme-b paper-item-body [secondary] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue