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

update sync process

This commit is contained in:
Luke Pulverenti 2015-09-24 13:08:10 -04:00
parent cc428aac1d
commit 504384e83d
109 changed files with 553 additions and 289 deletions

View file

@ -194,16 +194,10 @@
} }
}; };
getNewItem(jobItems[index], apiClient, serverInfo).done(goNext).fail(goNext); getNewItem(jobItems[index], apiClient, serverInfo, options).done(goNext).fail(goNext);
options = options || {};
if (options.enableBackgroundTransfer) {
// Give it 2 seconds, then move on
setTimeout(goNext, 2000);
}
} }
function getNewItem(jobItem, apiClient, serverInfo) { function getNewItem(jobItem, apiClient, serverInfo, options) {
Logger.log('Begin getNewItem'); Logger.log('Begin getNewItem');
@ -214,7 +208,12 @@
var libraryItem = jobItem.Item; var libraryItem = jobItem.Item;
LocalAssetManager.createLocalItem(libraryItem, serverInfo, jobItem.OriginalFileName).done(function (localItem) { LocalAssetManager.createLocalItem(libraryItem, serverInfo, jobItem.OriginalFileName).done(function (localItem) {
downloadMedia(apiClient, jobItem, localItem).done(function () { downloadMedia(apiClient, jobItem, localItem, options).done(function (isQueued) {
if (isQueued) {
deferred.resolve();
return;
}
getImages(apiClient, jobItem, localItem).done(function () { getImages(apiClient, jobItem, localItem).done(function () {
@ -238,7 +237,7 @@
return deferred.promise(); return deferred.promise();
} }
function downloadMedia(apiClient, jobItem, localItem) { function downloadMedia(apiClient, jobItem, localItem, options) {
Logger.log('Begin downloadMedia'); Logger.log('Begin downloadMedia');
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
@ -253,11 +252,17 @@
Logger.log('Downloading media. Url: ' + url + '. Local path: ' + localPath); Logger.log('Downloading media. Url: ' + url + '. Local path: ' + localPath);
LocalAssetManager.downloadFile(url, localPath).done(function () { options = options || {};
LocalAssetManager.downloadFile(url, localPath, options.enableBackgroundTransfer).done(function (path, isQueued) {
if (isQueued) {
deferred.resolveWith(null, [true]);
return;
}
LocalAssetManager.addOrUpdateLocalItem(localItem).done(function () { LocalAssetManager.addOrUpdateLocalItem(localItem).done(function () {
deferred.resolve(); deferred.resolveWith(null, [false]);
}).fail(getOnFail(deferred)); }).fail(getOnFail(deferred));

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-autogrow-textarea", "name": "iron-autogrow-textarea",
"version": "1.0.5", "version": "1.0.6",
"description": "A textarea element that automatically grows with input", "description": "A textarea element that automatically grows with input",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -37,11 +37,11 @@
"paper-styles": "PolymerElements/paper-styles#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.5", "_release": "1.0.6",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.0.6",
"commit": "2f354b99a4fda5d601629b0119d0a6c9dd77d336" "commit": "e0465d41019cf03827f4820a254ce80e56266e99"
}, },
"_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git", "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-autogrow-textarea", "name": "iron-autogrow-textarea",
"version": "1.0.5", "version": "1.0.6",
"description": "A textarea element that automatically grows with input", "description": "A textarea element that automatically grows with input",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"

View file

@ -218,6 +218,36 @@ this element's `bind-value` instead for imperative updates.
return this.$.textarea; return this.$.textarea;
}, },
/**
* Returns textarea's selection start.
* @type Number
*/
get selectionStart() {
return this.$.textarea.selectionStart;
},
/**
* Returns textarea's selection end.
* @type Number
*/
get selectionEnd() {
return this.$.textarea.selectionEnd;
},
/**
* Sets the textarea's selection start.
*/
set selectionStart(value) {
this.$.textarea.selectionStart = value;
},
/**
* Sets the textarea's selection end.
*/
set selectionEnd(value) {
this.$.textarea.selectionEnd = value;
},
/** /**
* Returns true if `value` is valid. The validator provided in `validator` * Returns true if `value` is valid. The validator provided in `validator`
* will be used first, if it exists; otherwise, the `textarea`'s validity * will be used first, if it exists; otherwise, the `textarea`'s validity

View file

@ -87,6 +87,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var finalHeight = autogrow.offsetHeight var finalHeight = autogrow.offsetHeight
assert.isTrue(finalHeight < initialHeight); assert.isTrue(finalHeight < initialHeight);
}); });
test('textarea selection works', function() {
var autogrow = fixture('basic');
var textarea = autogrow.textarea;
autogrow.bindValue = 'batman\nand\nrobin';
autogrow.selectionStart = 3;
autogrow.selectionEnd = 5;
assert.equal(textarea.selectionStart, 3);
assert.equal(textarea.selectionEnd, 5);
});
}); });
suite('focus/blur events', function() { suite('focus/blur events', function() {

View file

@ -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"
} }

View file

@ -23,14 +23,14 @@
"paper-styles": "polymerelements/paper-styles#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/PolymerElements/iron-flex-layout", "homepage": "https://github.com/polymerelements/iron-flex-layout",
"_release": "1.0.3", "_release": "1.0.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.3", "tag": "v1.0.3",
"commit": "e6c2cfec18354973ac03e70dcd8afcc3c72d09b9" "commit": "e6c2cfec18354973ac03e70dcd8afcc3c72d09b9"
}, },
"_source": "git://github.com/PolymerElements/iron-flex-layout.git", "_source": "git://github.com/polymerelements/iron-flex-layout.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-flex-layout" "_originalSource": "polymerelements/iron-flex-layout"
} }

View file

@ -1,13 +1,13 @@
{ {
"name": "paper-behaviors", "name": "paper-behaviors",
"version": "1.0.3", "version": "1.0.4",
"description": "Common behaviors across the paper elements", "description": "Common behaviors across the paper elements",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
], ],
"main": [ "main": [
"paper-button-behavior.html", "paper-button-behavior.html",
"paper-radio-button-behavior.html" "paper-inky-focus-behavior.html"
], ],
"keywords": [ "keywords": [
"web-components", "web-components",
@ -36,11 +36,11 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.3", "_release": "1.0.4",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.3", "tag": "v1.0.4",
"commit": "90b54de14264c19693601b9fc16af6b68a9d48e4" "commit": "a7ac7fbdb79b4d82416ec9b41613575386d0d226"
}, },
"_source": "git://github.com/PolymerElements/paper-behaviors.git", "_source": "git://github.com/PolymerElements/paper-behaviors.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -1,13 +1,13 @@
{ {
"name": "paper-behaviors", "name": "paper-behaviors",
"version": "1.0.3", "version": "1.0.4",
"description": "Common behaviors across the paper elements", "description": "Common behaviors across the paper elements",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
], ],
"main": [ "main": [
"paper-button-behavior.html", "paper-button-behavior.html",
"paper-radio-button-behavior.html" "paper-inky-focus-behavior.html"
], ],
"keywords": [ "keywords": [
"web-components", "web-components",

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-progress", "name": "paper-progress",
"version": "1.0.5", "version": "1.0.6",
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design progress bar", "description": "A material design progress bar",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
@ -29,11 +29,11 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/PolymerElements/paper-progress", "homepage": "https://github.com/PolymerElements/paper-progress",
"_release": "1.0.5", "_release": "1.0.6",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.0.6",
"commit": "baf8049bb33c3f9557d0d3608dc0824847ac34c4" "commit": "520d84592d98cac975bfcedfcc5765e51d2c2871"
}, },
"_source": "git://github.com/PolymerElements/paper-progress.git", "_source": "git://github.com/PolymerElements/paper-progress.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -331,7 +331,7 @@ Custom property | Description
}, },
_disabledChanged: function(disabled) { _disabledChanged: function(disabled) {
this.$.progressContainer.setAttribute('aria-disabled', disabled ? 'true' : 'false'); this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
}, },
_hideSecondaryProgress: function(secondaryRatio) { _hideSecondaryProgress: function(secondaryRatio) {

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-tabs", "name": "paper-tabs",
"version": "1.0.2", "version": "1.0.3",
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"description": "Material design tabs", "description": "Material design tabs",
"private": true, "private": true,
@ -39,11 +39,11 @@
"web-component-tester": "*" "web-component-tester": "*"
}, },
"homepage": "https://github.com/PolymerElements/paper-tabs", "homepage": "https://github.com/PolymerElements/paper-tabs",
"_release": "1.0.2", "_release": "1.0.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.2", "tag": "v1.0.3",
"commit": "61abed79e3c4e7c87dd826f7f81ef9c7ecb5df78" "commit": "19546ca9fbe23da457177cac8de1a7720cb62c57"
}, },
"_source": "git://github.com/PolymerElements/paper-tabs.git", "_source": "git://github.com/PolymerElements/paper-tabs.git",
"_target": "~1.0.0", "_target": "~1.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-tabs", "name": "paper-tabs",
"version": "1.0.2", "version": "1.0.3",
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"description": "Material design tabs", "description": "Material design tabs",
"private": true, "private": true,

View file

@ -174,7 +174,7 @@ Custom property | Description | Default
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown"></paper-icon-button> <paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown"></paper-icon-button>
<div id="tabsContainer" class="flex" on-scroll="_scroll"> <div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down">
<div id="tabsContent" class$="[[_computeTabsContentClass(scrollable)]]"> <div id="tabsContent" class$="[[_computeTabsContentClass(scrollable)]]">
@ -310,6 +310,10 @@ Custom property | Description | Default
'iron-deselect': '_onIronDeselect' 'iron-deselect': '_onIronDeselect'
}, },
ready: function() {
this.setScrollDirection('y', this.$.tabsContainer);
},
_computeScrollButtonClass: function(hideThisButton, scrollable, hideScrollButtons) { _computeScrollButtonClass: function(hideThisButton, scrollable, hideScrollButtons) {
if (!scrollable || hideScrollButtons) { if (!scrollable || hideScrollButtons) {
return 'hidden'; return 'hidden';
@ -364,24 +368,43 @@ Custom property | Description | Default
); );
}, },
_scroll: function() {
var scrollLeft;
_scroll: function(e, detail) {
if (!this.scrollable) { if (!this.scrollable) {
return; return;
} }
scrollLeft = this.$.tabsContainer.scrollLeft; var ddx = (detail && -detail.ddx) || 0;
this._affectScroll(ddx);
},
_down: function(e) {
// go one beat async to defeat IronMenuBehavior
// autorefocus-on-no-selection timeout
this.async(function() {
if (this._defaultFocusAsync) {
this.cancelAsync(this._defaultFocusAsync);
this._defaultFocusAsync = null;
}
}, 1);
},
_affectScroll: function(dx) {
this.$.tabsContainer.scrollLeft += dx;
var scrollLeft = this.$.tabsContainer.scrollLeft;
this._leftHidden = scrollLeft === 0; this._leftHidden = scrollLeft === 0;
this._rightHidden = scrollLeft === this._tabContainerScrollSize; this._rightHidden = scrollLeft === this._tabContainerScrollSize;
}, },
_onLeftScrollButtonDown: function() { _onLeftScrollButtonDown: function() {
this._scrollToLeft();
this._holdJob = setInterval(this._scrollToLeft.bind(this), this._holdDelay); this._holdJob = setInterval(this._scrollToLeft.bind(this), this._holdDelay);
}, },
_onRightScrollButtonDown: function() { _onRightScrollButtonDown: function() {
this._scrollToRight();
this._holdJob = setInterval(this._scrollToRight.bind(this), this._holdDelay); this._holdJob = setInterval(this._scrollToRight.bind(this), this._holdDelay);
}, },
@ -391,11 +414,11 @@ Custom property | Description | Default
}, },
_scrollToLeft: function() { _scrollToLeft: function() {
this.$.tabsContainer.scrollLeft -= this._step; this._affectScroll(-this._step);
}, },
_scrollToRight: function() { _scrollToRight: function() {
this.$.tabsContainer.scrollLeft += this._step; this._affectScroll(this._step);
}, },
_tabChanged: function(tab, old) { _tabChanged: function(tab, old) {

View file

@ -11,8 +11,8 @@
} }
switch (name) { switch (name) {
case 'Featured': case 'Favorites':
Dashboard.navigate('index.html'); Dashboard.navigate('favorites.html');
break; break;
case 'Library': case 'Library':
Dashboard.navigate('index.html'); Dashboard.navigate('index.html');
@ -68,8 +68,8 @@
*/ */
var items = [ var items = [
{ name: 'Featured', label: Globalize.translate('ButtonForYou'), image: 'tabButton:Featured', options: {} },
{ name: 'Library', label: Globalize.translate('ButtonLibrary'), image: 'tabbar/tab-library.png', options: {} }, { name: 'Library', label: Globalize.translate('ButtonLibrary'), image: 'tabbar/tab-library.png', options: {} },
{ name: 'Favorites', label: Globalize.translate('ButtonFavorites'), image: 'tabButton:Favorites', options: {} },
{ name: 'Search', label: Globalize.translate('ButtonSearch'), image: 'tabButton:Search', options: {} }, { name: 'Search', label: Globalize.translate('ButtonSearch'), image: 'tabButton:Search', options: {} },
{ name: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabbar/tab-nowplaying.png', options: {} }, { name: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabbar/tab-nowplaying.png', options: {} },
{ name: 'Sync', label: Globalize.translate('ButtonSync'), image: 'tabbar/tab-sync.png', options: {} }, { name: 'Sync', label: Globalize.translate('ButtonSync'), image: 'tabbar/tab-sync.png', options: {} },
@ -113,11 +113,11 @@
Events.on(ConnectionManager, 'localusersignedin', showTabs); Events.on(ConnectionManager, 'localusersignedin', showTabs);
Events.on(ConnectionManager, 'localusersignedout', hideTabs); Events.on(ConnectionManager, 'localusersignedout', hideTabs);
Events.on(ConnectionManager, 'playbackstart', onPlaybackStop); Events.on(MediaController, 'playbackstart', onPlaybackStop);
Events.on(ConnectionManager, 'playbackstop', onPlaybackStart); Events.on(MediaController, 'playbackstop', onPlaybackStart);
}); });
pageClassOn('pageshowready', "page", function () { pageClassOn('pageshow', "page", function () {
var page = this; var page = this;

View file

@ -459,10 +459,20 @@
return filename; return filename;
} }
function downloadFile(url, localPath) { function downloadFile(url, localPath, enableBackground) {
if (!enableBackground) {
return downloadWithFileTransfer(url, localPath);
}
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
if (localStorage.getItem('sync-' + url) == '1') {
Logger.log('file was downloaded previously');
deferred.resolveWith(null, [localPath]);
return deferred.promise();
}
Logger.log('downloading: ' + url + ' to ' + localPath); Logger.log('downloading: ' + url + ' to ' + localPath);
getFileSystem().done(function (fileSystem) { getFileSystem().done(function (fileSystem) {
@ -478,10 +488,8 @@
var downloadPromise = download.startAsync().then(function () { var downloadPromise = download.startAsync().then(function () {
// on success // on success
var localUrl = localPath; Logger.log('Downloaded local url: ' + localPath);
localStorage.setItem('sync-' + url, '1');
Logger.log('Downloaded local url: ' + localUrl);
deferred.resolveWith(null, [localUrl]);
}, function () { }, function () {
@ -495,6 +503,34 @@
//Logger.log('download progress: ' + value); //Logger.log('download progress: ' + value);
}); });
// true indicates that it's queued
deferred.resolveWith(null, [localPath, true]);
});
}).fail(getOnFail(deferred));;
}).fail(getOnFail(deferred));
return deferred.promise();
}
function downloadWithFileTransfer(url, localPath) {
var deferred = DeferredBuilder.Deferred();
Logger.log('downloading: ' + url + ' to ' + localPath);
getFileSystem().done(function (fileSystem) {
createDirectory(getParentDirectoryPath(localPath)).done(function () {
var path = fileSystem.root.toURL() + "/emby/cache/" + key;
var ft = new FileTransfer();
ft.download(url, path, function (entry) {
deferred.resolveWith(null, [localPath]);
}); });
}).fail(getOnFail(deferred));; }).fail(getOnFail(deferred));;
@ -552,10 +588,6 @@
return deferred.promise(); return deferred.promise();
} }
function getParentDirectoryPath(path) {
return path.substring(0, path.lastIndexOf('/'));;
}
function downloadSubtitles(url, localItem, subtitleStream) { function downloadSubtitles(url, localItem, subtitleStream) {
var path = item.LocalPath; var path = item.LocalPath;

View file

@ -458,10 +458,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
padding: 0; padding: 0;
} }
.lnkSibling:hover {
text-decoration: underline;
}
.lnkSibling:not(.hide) { .lnkSibling:not(.hide) {
display: block; display: block;
} }
@ -973,10 +969,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
text-decoration: none; text-decoration: none;
} }
.detailPageParentLink:hover {
text-decoration: underline;
}
.itemMiscInfo { .itemMiscInfo {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
@ -1049,7 +1041,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
border-radius: 50%; border-radius: 50%;
color: #fff; color: #fff;
line-height: 19px; line-height: 19px;
background-color: #38c; background-color: #52B54B;
} }
.playedIndicator + .syncIndicator { .playedIndicator + .syncIndicator {
@ -1556,6 +1548,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
display: none !important; display: none !important;
} }
.homeFavoritesDisabled .homeFavoritesTab {
display: none !important;
}
.detailsMenu { .detailsMenu {
width: 280px; width: 280px;
} }

View file

@ -352,10 +352,6 @@ body {
text-decoration: none; text-decoration: none;
} }
.textlink:hover {
text-decoration: underline;
}
h1, h1 a { h1, h1 a {
font-weight: 300 !important; font-weight: 300 !important;
font-size: 24px; font-size: 24px;
@ -382,7 +378,7 @@ h2 {
font-weight: 500 !important; font-weight: 500 !important;
} }
a { a, a:active, a:hover {
text-decoration: none; text-decoration: none;
} }
@ -1105,10 +1101,6 @@ paper-input + .fieldDescription {
background-color: rgba(26,26,26,.94); background-color: rgba(26,26,26,.94);
} }
.footerOverBottomTabs {
bottom: 52px !important;
}
.footerNotification { .footerNotification {
padding: .75em 1em; padding: .75em 1em;
margin: 0; margin: 0;
@ -1588,3 +1580,22 @@ progress {
.supporterMembershipDisabled .tabSupporterMembership { .supporterMembershipDisabled .tabSupporterMembership {
display: none; display: none;
} }
.syncActivityForTarget {
margin: 0 0 3em 0;
}
.syncActivityForTarget paper-fab {
border-radius: 0;
}
@media all and (min-width: 800px) {
.syncActivityForTarget {
max-width: 600px;
margin: 0 3em 3em 0;
display: inline-block;
vertical-align: top;
min-width: 400px;
}
}

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Emby</title>
</head>
<body>
<div id="favoritesPage" data-role="page" class="page homePage libraryPage allLibraryPage noSecondaryNavPage" data-title="${TabFavorites}" data-require="scripts/favorites">
<div data-role="content">
<div class="sections"></div>
</div>
</div>
</body>
</html>

View file

@ -10,13 +10,13 @@
<paper-tabs hidescrollbuttons noink> <paper-tabs hidescrollbuttons noink>
<paper-tab>${TabHome}</paper-tab> <paper-tab>${TabHome}</paper-tab>
<paper-tab>${TabNextUp}</paper-tab> <paper-tab>${TabNextUp}</paper-tab>
<paper-tab>${TabFavorites}</paper-tab> <paper-tab class="homeFavoritesTab">${TabFavorites}</paper-tab>
<paper-tab>${TabUpcoming}</paper-tab> <paper-tab>${TabUpcoming}</paper-tab>
</paper-tabs> </paper-tabs>
<div class="legacyTabs"> <div class="legacyTabs">
<a href="index.html">${TabHome}</a> <a href="index.html">${TabHome}</a>
<a href="index.html?tab=1">${TabNextUp}</a> <a href="index.html?tab=1">${TabNextUp}</a>
<a href="index.html?tab=2">${TabFavorites}</a> <a href="index.html?tab=2" class="homeFavoritesTab">${TabFavorites}</a>
<a href="index.html?tab=3">${TabUpcoming}</a> <a href="index.html?tab=3">${TabUpcoming}</a>
</div> </div>
</div> </div>

View file

@ -7,7 +7,7 @@
<div id="liveTvSuggestedPage" data-dom-cache="true" data-role="page" class="page libraryPage liveTvPage pageWithAbsoluteTabs" data-contextname="${HeaderLiveTv}" data-backdroptype="series,movie" data-require="jqmpanel,scripts/livetvsuggested,livetvcss,scripts/livetvcomponents"> <div id="liveTvSuggestedPage" data-dom-cache="true" data-role="page" class="page libraryPage liveTvPage pageWithAbsoluteTabs" data-contextname="${HeaderLiveTv}" data-backdroptype="series,movie" data-require="jqmpanel,scripts/livetvsuggested,livetvcss,scripts/livetvcomponents">
<div class="libraryViewNav libraryViewNavWithMinHeight"> <div class="libraryViewNav libraryViewNavWithMinHeight">
<paper-tabs hidescrollbuttons> <paper-tabs hidescrollbuttons noink>
<paper-tab>${TabSuggestions}</paper-tab> <paper-tab>${TabSuggestions}</paper-tab>
<paper-tab>${TabGuide}</paper-tab> <paper-tab>${TabGuide}</paper-tab>
<paper-tab>${TabChannels}</paper-tab> <paper-tab>${TabChannels}</paper-tab>

View file

@ -77,6 +77,15 @@
</paper-item-body> </paper-item-body>
</paper-icon-item> </paper-icon-item>
</a> </a>
<a href="dashboard.html" class="clearLink lnkServer hide">
<paper-icon-item>
<paper-fab class="listAvatar" icon="settings" style="background-color:#444;" item-icon></paper-fab>
<paper-item-body two-line>
<div>${ButtonManageServer}</div>
</paper-item-body>
</paper-icon-item>
</a>
</div> </div>
</div> </div>
</div> </div>

View file

@ -24,7 +24,7 @@
<div class="localSyncStatus hide" style="text-align:right;margin:0 0 1em;"> <div class="localSyncStatus hide" style="text-align:right;margin:0 0 1em;">
<span style="vertical-align: middle;margin-right:.5em;" class="labelSyncStatus"></span> <span style="vertical-align: middle;margin-right:.5em;" class="labelSyncStatus"></span>
<paper-spinner class="syncSpinner" active style="vertical-align: middle;"></paper-spinner> <paper-spinner class="syncSpinner" active style="vertical-align: middle;"></paper-spinner>
<paper-fab class="btnSyncNow mini accent" icon="sync"></paper-fab> <paper-fab class="btnSyncNow mini accent" icon="sync" style="margin-right:.5em;"></paper-fab>
</div> </div>
<div class="syncActivity"> <div class="syncActivity">

View file

@ -8,7 +8,7 @@
<div data-role="content" style="overflow:visible;"> <div data-role="content" style="overflow:visible;">
<paper-fab mini icon="arrow-back" class="white" onclick="history.back()" style="position:relative;top:5px;left:5px;"></paper-fab> <paper-fab mini icon="arrow-back" class="white nowPlayingPageBackButton" onclick="history.back()" style="position:relative;top:5px;left:5px;"></paper-fab>
<div style="float:right;position:relative;top:5px;right:5px;text-align:right;"> <div style="float:right;position:relative;top:5px;right:5px;text-align:right;">
<div> <div>
<span class="nowPlayingSelectedPlayer"></span> <span class="nowPlayingSelectedPlayer"></span>
@ -149,7 +149,7 @@
</neon-animatable> </neon-animatable>
</neon-animated-pages> </neon-animated-pages>
<paper-tabs selected="{{selected}}" style="position:fixed;bottom:0;left:0;right:0;" class="bottomTabs" hidescrollbuttons noink> <paper-tabs selected="{{selected}}" style="position:fixed;bottom:0;left:0;right:0;" class="bottomTabs nowPlayingPagePaperTabs" hidescrollbuttons noink>
<paper-tab>${TabNowPlaying}</paper-tab> <paper-tab>${TabNowPlaying}</paper-tab>
<paper-tab>${TabControls}</paper-tab> <paper-tab>${TabControls}</paper-tab>

View file

@ -1,6 +1,6 @@
(function ($, document) { (function ($, document) {
$(document).on('pageshowready', "#aboutPage", function () { $(document).on('pageshow', "#aboutPage", function () {
var page = this; var page = this;

View file

@ -172,7 +172,7 @@
$('.addPluginForm').off('submit', AddPluginPage.onSubmit).on('submit', AddPluginPage.onSubmit); $('.addPluginForm').off('submit', AddPluginPage.onSubmit).on('submit', AddPluginPage.onSubmit);
}).on('pageshowready', "#addPluginPage", function () { }).on('pageshow', "#addPluginPage", function () {
var page = this; var page = this;

View file

@ -70,7 +70,7 @@
return false; return false;
} }
$(document).on('pageshowready', "#advancedConfigurationPage", function () { $(document).on('pageshow', "#advancedConfigurationPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -98,7 +98,7 @@
$('.sectionTabs', page).hide(); $('.sectionTabs', page).hide();
$('.' + context + 'SectionTabs', page).show(); $('.' + context + 'SectionTabs', page).show();
}).on('pageshowready', "#appServicesPage", function () { }).on('pageshow', "#appServicesPage", function () {
var page = this; var page = this;

View file

@ -352,7 +352,7 @@
$('.episodeCorrectionForm').off('submit', onEpisodeCorrectionFormSubmit).on('submit', onEpisodeCorrectionFormSubmit); $('.episodeCorrectionForm').off('submit', onEpisodeCorrectionFormSubmit).on('submit', onEpisodeCorrectionFormSubmit);
}).on('pageshowready', "#libraryFileOrganizerLogPage", function () { }).on('pageshow', "#libraryFileOrganizerLogPage", function () {
var page = this; var page = this;

View file

@ -153,7 +153,7 @@
$('.libraryFileOrganizerForm').off('submit', onSubmit).on('submit', onSubmit); $('.libraryFileOrganizerForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#libraryFileOrganizerPage", function () { }).on('pageshow', "#libraryFileOrganizerPage", function () {
var page = this; var page = this;

View file

@ -31,7 +31,7 @@
$('.channelSettingsForm', page).off('submit', onSubmit).on('submit', onSubmit); $('.channelSettingsForm', page).off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#channelSettingsPage", function () { }).on('pageshow', "#channelSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -75,7 +75,7 @@
$('.cinemaModeConfigurationForm').off('submit', onSubmit).on('submit', onSubmit); $('.cinemaModeConfigurationForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#cinemaModeConfigurationPage", function () { }).on('pageshow', "#cinemaModeConfigurationPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -103,7 +103,7 @@
$('.dashboardGeneralForm').off('submit', onSubmit).on('submit', onSubmit); $('.dashboardGeneralForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#dashboardGeneralPage", function () { }).on('pageshow', "#dashboardGeneralPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -40,7 +40,7 @@
return false; return false;
} }
$(document).on('pageshowready', "#dashboardHostingPage", function () { $(document).on('pageshow', "#dashboardHostingPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -82,7 +82,7 @@
$('.deviceForm').off('submit', onSubmit).on('submit', onSubmit); $('.deviceForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#devicePage", function () { }).on('pageshow', "#devicePage", function () {
var page = this; var page = this;

View file

@ -90,7 +90,7 @@
}); });
} }
$(document).on('pageshowready', "#devicesPage", function () { $(document).on('pageshow', "#devicesPage", function () {
var page = this; var page = this;

View file

@ -136,7 +136,7 @@
$('.devicesUploadForm').off('submit', onSubmit).on('submit', onSubmit); $('.devicesUploadForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#devicesUploadPage", function () { }).on('pageshow', "#devicesUploadPage", function () {
var page = this; var page = this;

View file

@ -1066,7 +1066,7 @@
$('.xmlAttributeForm').off('submit', DlnaProfilePage.onXmlAttributeFormSubmit).on('submit', DlnaProfilePage.onXmlAttributeFormSubmit); $('.xmlAttributeForm').off('submit', DlnaProfilePage.onXmlAttributeFormSubmit).on('submit', DlnaProfilePage.onXmlAttributeFormSubmit);
$('.subtitleProfileForm').off('submit', DlnaProfilePage.onSubtitleProfileFormSubmit).on('submit', DlnaProfilePage.onSubtitleProfileFormSubmit); $('.subtitleProfileForm').off('submit', DlnaProfilePage.onSubtitleProfileFormSubmit).on('submit', DlnaProfilePage.onSubtitleProfileFormSubmit);
}).on('pageshowready', "#dlnaProfilePage", function () { }).on('pageshow', "#dlnaProfilePage", function () {
var page = this; var page = this;

View file

@ -104,7 +104,7 @@
} }
$(document).on('pageshowready', "#dlnaProfilesPage", function () { $(document).on('pageshow', "#dlnaProfilesPage", function () {
var page = this; var page = this;

View file

@ -43,7 +43,7 @@
$('.dlnaServerSettingsForm').off('submit', onSubmit).on('submit', onSubmit); $('.dlnaServerSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#dlnaServerSettingsPage", function () { }).on('pageshow', "#dlnaServerSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -32,7 +32,7 @@
$('.dlnaSettingsForm').off('submit', onSubmit).on('submit', onSubmit); $('.dlnaSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#dlnaSettingsPage", function () { }).on('pageshow', "#dlnaSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -1475,7 +1475,7 @@
showMoreMenu(page, this); showMoreMenu(page, this);
}); });
}).on('pageshowready', "#editItemMetadataPage", function () { }).on('pageshow', "#editItemMetadataPage", function () {
var page = this; var page = this;

View file

@ -68,7 +68,7 @@
$('.encodingSettingsForm').off('submit', onSubmit).on('submit', onSubmit); $('.encodingSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#encodingSettingsPage", function () { }).on('pageshow', "#encodingSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -141,10 +141,24 @@
}); });
} }
window.HomePage.renderFavorites = function (page, tabContent) { function initHomePage() {
if (LibraryBrowser.needsRefresh(tabContent)) {
loadSections(tabContent, Dashboard.getCurrentUserId()); window.HomePage.renderFavorites = function (page, tabContent) {
if (LibraryBrowser.needsRefresh(tabContent)) {
loadSections(tabContent, Dashboard.getCurrentUserId());
}
};
}
initHomePage();
pageIdOn('pageshow', "favoritesPage", function () {
var page = this;
if (LibraryBrowser.needsRefresh(page)) {
loadSections(page, Dashboard.getCurrentUserId());
} }
}; });
})(jQuery, document); })(jQuery, document);

View file

@ -40,7 +40,7 @@
if (duration) { if (duration) {
if (time >= (duration - 1)) { if (time >= (duration - 1)) {
onEnded(); //onEnded();
return; return;
} }
} }

View file

@ -246,7 +246,7 @@
}); });
}); });
pageIdOn('pageshowready', "indexPage", function () { pageIdOn('pageshow', "indexPage", function () {
var page = this; var page = this;
$(MediaController).on('playbackstop', onPlaybackStop); $(MediaController).on('playbackstop', onPlaybackStop);

View file

@ -1085,30 +1085,29 @@
var reviews = result.Items; var reviews = result.Items;
html += '<div class="paperList">';
for (var i = 0, length = reviews.length; i < length; i++) { for (var i = 0, length = reviews.length; i < length; i++) {
var review = reviews[i]; var review = reviews[i];
html += '<div class="criticReview">'; html += '<paper-icon-item style="padding-top:.5em;padding-bottom:.5em;">';
html += '<div class="reviewScore">';
if (review.Score != null) { if (review.Score != null) {
html += review.Score; //html += review.Score;
} }
else if (review.Likes != null) { else if (review.Likes != null) {
if (review.Likes) { if (review.Likes) {
html += '<img src="css/images/fresh.png" />'; html += '<paper-fab class="listAvatar" style="background-color:transparent;background-image:url(\'css/images/fresh.png\');background-repeat:no-repeat;background-position:center center;background-size: cover;" item-icon></paper-fab>';
} else { } else {
html += '<img src="css/images/rotten.png" />'; html += '<paper-fab class="listAvatar" style="background-color:transparent;background-image:url(\'css/images/rotten.png\');background-repeat:no-repeat;background-position:center center;background-size: cover;" item-icon></paper-fab>';
} }
} }
html += '</div>'; html += '<paper-item-body three-line>';
html += '<div class="reviewCaption">' + review.Caption + '</div>'; html += '<div style="white-space:normal;">' + review.Caption + '</div>';
var vals = []; var vals = [];
@ -1119,8 +1118,7 @@
vals.push(review.Publisher); vals.push(review.Publisher);
} }
html += '<div class="reviewerName">' + vals.join(', ') + '.'; html += '<div secondary>' + vals.join(', ') + '.';
if (review.Date) { if (review.Date) {
try { try {
@ -1134,15 +1132,17 @@
} }
} }
html += '</div>'; html += '</div>';
if (review.Url) { if (review.Url) {
html += '<div class="reviewLink"><a class="textlink" href="' + review.Url + '" target="_blank">' + Globalize.translate('ButtonFullReview') + '</a></div>'; html += '<div secondary><a class="textlink" href="' + review.Url + '" target="_blank">' + Globalize.translate('ButtonFullReview') + '</a></div>';
} }
html += '</div>'; html += '</paper-item-body>';
html += '</paper-icon-item>';
} }
html += '</div>';
if (limit && result.TotalRecordCount > limit) { if (limit && result.TotalRecordCount > limit) {
html += '<p style="margin: 0;"><paper-button raised class="more moreCriticReviews">' + Globalize.translate('ButtonMore') + '</paper-button></p>'; html += '<p style="margin: 0;"><paper-button raised class="more moreCriticReviews">' + Globalize.translate('ButtonMore') + '</paper-button></p>';

View file

@ -75,7 +75,7 @@
return false; return false;
} }
$(document).on('pageshowready', "#kidsPage", function () { $(document).on('pageshow', "#kidsPage", function () {
var page = this; var page = this;

View file

@ -223,11 +223,6 @@
tabs.noink = true; tabs.noink = true;
} }
if (AppInfo.enableBottomTabs) {
tabs.alignBottom = true;
tabs.classList.add('bottomTabs');
}
if (LibraryBrowser.enableFullPaperTabs()) { if (LibraryBrowser.enableFullPaperTabs()) {
if ($.browser.safari) { if ($.browser.safari) {
@ -255,7 +250,7 @@
$('.libraryViewNav', ownerpage).removeClass('libraryViewNavWithMinHeight'); $('.libraryViewNav', ownerpage).removeClass('libraryViewNavWithMinHeight');
} }
$(ownerpage).on('pageshowready', LibraryBrowser.onTabbedpagebeforeshow); $(ownerpage).on('pageshow', LibraryBrowser.onTabbedpagebeforeshow);
pages.addEventListener('iron-select', function () { pages.addEventListener('iron-select', function () {
// When transition animations are used, add a content loading delay to allow the animations to finish // When transition animations are used, add a content loading delay to allow the animations to finish
@ -389,13 +384,20 @@
pages.exitAnimation = null; pages.exitAnimation = null;
var tabs = this.querySelector('paper-tabs'); var tabs = this.querySelector('paper-tabs');
var noSlide = tabs.noSlide;
tabs.noSlide = true;
tabs.selected = index;
pages.entryAnimation = entryAnimation; // For some reason the live tv page will not switch tabs in IE and safari
pages.exitAnimation = exitAnimation; var delay = $.browser.chrome ? 0 : 100;
tabs.noSlide = noSlide;
setTimeout(function () {
var noSlide = tabs.noSlide;
tabs.noSlide = true;
tabs.selected = index;
pages.entryAnimation = entryAnimation;
pages.exitAnimation = exitAnimation;
tabs.noSlide = noSlide;
}, delay);
} }
} }
}; };
@ -404,7 +406,7 @@
afterNavigate.call($($.mobile.activePage)[0]); afterNavigate.call($($.mobile.activePage)[0]);
} else { } else {
$(document).one('pageshowready', '.page', afterNavigate); $(document).one('pageshow', '.page', afterNavigate);
Dashboard.navigate(url); Dashboard.navigate(url);
} }
}, },

View file

@ -818,7 +818,7 @@
}); });
pageClassOn('pageshowready', 'page', function () { pageClassOn('pageshow', 'page', function () {
var page = this; var page = this;

View file

@ -117,7 +117,7 @@
$('.libraryPathMappingForm').off('submit', onSubmit).on('submit', onSubmit); $('.libraryPathMappingForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#libraryPathMappingPage", function () { }).on('pageshow', "#libraryPathMappingPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -39,7 +39,7 @@
return false; return false;
} }
$(document).on('pageshowready', "#librarySettingsPage", function () { $(document).on('pageshow', "#librarySettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -30,7 +30,7 @@
}); });
} }
$(document).on('pageshowready', "#liveTvGuideProviderPage", function () { $(document).on('pageshow', "#liveTvGuideProviderPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -63,7 +63,7 @@
}); });
}); });
}).on('pageshowready', "#liveTvSettingsPage", function () { }).on('pageshow', "#liveTvSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -487,7 +487,7 @@
addProvider(this); addProvider(this);
}); });
}).on('pageshowready', "#liveTvStatusPage", function () { }).on('pageshow', "#liveTvStatusPage", function () {
var page = this; var page = this;

View file

@ -67,7 +67,7 @@
return false; return false;
}); });
}).on('pageshowready', "#liveTvTunerProviderHdHomerunPage", function () { }).on('pageshow', "#liveTvTunerProviderHdHomerunPage", function () {
var providerId = getParameterByName('id'); var providerId = getParameterByName('id');
var page = this; var page = this;

View file

@ -60,7 +60,7 @@
return false; return false;
}); });
}).on('pageshowready', "#liveTvTunerProviderM3UPage", function () { }).on('pageshow', "#liveTvTunerProviderM3UPage", function () {
var providerId = getParameterByName('id'); var providerId = getParameterByName('id');
var page = this; var page = this;

View file

@ -226,4 +226,4 @@ $(document).on('pageinit', "#loginPage", function () {
Dashboard.navigate('forgotpassword.html'); Dashboard.navigate('forgotpassword.html');
}); });
}).on('pageshowready', "#loginPage", LoginPage.onPageShow); }).on('pageshow', "#loginPage", LoginPage.onPageShow);

View file

@ -1,6 +1,6 @@
(function () { (function () {
$(document).on('pageshowready', "#logPage", function () { $(document).on('pageshow', "#logPage", function () {
var page = this; var page = this;

View file

@ -347,7 +347,7 @@
} }
}; };
$(document).on('pageinit', ".mediaLibraryPage", MediaLibraryPage.onPageInit).on('pageshowready', ".mediaLibraryPage", MediaLibraryPage.onPageShow); $(document).on('pageinit', ".mediaLibraryPage", MediaLibraryPage.onPageInit).on('pageshow', ".mediaLibraryPage", MediaLibraryPage.onPageShow);
var WizardLibraryPage = { var WizardLibraryPage = {
@ -371,7 +371,7 @@ var WizardLibraryPage = {
(function ($, document, window) { (function ($, document, window) {
$(document).on('pageshowready', "#mediaLibraryPage", function () { $(document).on('pageshow', "#mediaLibraryPage", function () {
var page = this; var page = this;

View file

@ -94,7 +94,7 @@
$('.advancedMetadataConfigurationForm').on('submit', onSubmit).on('submit', onSubmit); $('.advancedMetadataConfigurationForm').on('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#advancedMetadataConfigurationPage", function () { }).on('pageshow', "#advancedMetadataConfigurationPage", function () {
var page = this; var page = this;

View file

@ -42,7 +42,7 @@
$('.metadataConfigurationForm').off('submit', onSubmit).on('submit', onSubmit); $('.metadataConfigurationForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#metadataConfigurationPage", function () { }).on('pageshow', "#metadataConfigurationPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -562,7 +562,7 @@
$('.metadataImagesConfigurationForm').off('submit', onSubmit).on('submit', onSubmit); $('.metadataImagesConfigurationForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#metadataImagesConfigurationPage", function () { }).on('pageshow', "#metadataImagesConfigurationPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -43,7 +43,7 @@
$('.metadataNfoForm').off('submit', onSubmit).on('submit', onSubmit); $('.metadataNfoForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#metadataNfoPage", function () { }).on('pageshow', "#metadataNfoPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -81,7 +81,7 @@
$('.metadataSubtitlesForm').off('submit', onSubmit).on('submit', onSubmit); $('.metadataSubtitlesForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#metadataSubtitlesPage", function () { }).on('pageshow', "#metadataSubtitlesPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -338,7 +338,7 @@
}); });
}); });
pageIdOn('pageshowready', "moviesPage", function () { pageIdOn('pageshow', "moviesPage", function () {
var page = this; var page = this;

View file

@ -288,7 +288,7 @@
loadTab(page, parseInt(this.selected)); loadTab(page, parseInt(this.selected));
}); });
}).on('pageshowready', "#musicRecommendedPage", function () { }).on('pageshow', "#musicRecommendedPage", function () {
var page = this; var page = this;

View file

@ -1,4 +1,4 @@
$(document).on('pageshowready', "#myPreferencesMenuPage", function () { $(document).on('pageshow', "#myPreferencesMenuPage", function () {
var page = this; var page = this;
@ -15,4 +15,10 @@
} else { } else {
page.querySelector('.lnkSync').classList.add('hide'); page.querySelector('.lnkSync').classList.add('hide');
} }
if (AppInfo.isNativeApp && $.browser.safari) {
page.querySelector('.lnkServer').classList.remove('hide');
} else {
page.querySelector('.lnkServer').classList.add('hide');
}
}); });

View file

@ -59,7 +59,7 @@
$('.displayPreferencesForm').off('submit', onSubmit).on('submit', onSubmit); $('.displayPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#displayPreferencesPage", function () { }).on('pageshow', "#displayPreferencesPage", function () {
var page = this; var page = this;

View file

@ -269,7 +269,7 @@
$('.homeScreenPreferencesForm').off('submit', onSubmit).on('submit', onSubmit); $('.homeScreenPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#homeScreenPreferencesPage", function () { }).on('pageshow', "#homeScreenPreferencesPage", function () {
var page = this; var page = this;

View file

@ -143,7 +143,7 @@
$('.languagePreferencesForm').off('submit', onSubmit).on('submit', onSubmit); $('.languagePreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#languagePreferencesPage", function () { }).on('pageshow', "#languagePreferencesPage", function () {
var page = this; var page = this;

View file

@ -413,7 +413,7 @@
$('.updatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit); $('.updatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
$('.localAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit); $('.localAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
}).on('pageshowready', ".userPasswordPage", function () { }).on('pageshow', ".userPasswordPage", function () {
var page = this; var page = this;

View file

@ -47,7 +47,7 @@
syncNow(page); syncNow(page);
}); });
}).on('pageshowready', "#mySyncActivityPage", function () { }).on('pageshow', "#mySyncActivityPage", function () {
var page = this; var page = this;

View file

@ -52,7 +52,7 @@
}); });
}); });
}).on('pageshowready', "#syncPreferencesPage", function () { }).on('pageshow', "#syncPreferencesPage", function () {
var page = this; var page = this;

View file

@ -1,6 +1,6 @@
(function ($, document, Notifications) { (function ($, document, Notifications) {
$(document).on("pageshowready", "#notificationsPage", function () { $(document).on("pageshow", "#notificationsPage", function () {
// If there is no user logged in there can be no notifications // If there is no user logged in there can be no notifications
if (!Dashboard.getCurrentUserId()) return; if (!Dashboard.getCurrentUserId()) return;

View file

@ -199,7 +199,7 @@
}); });
}); });
pageClassOn('pageshowready', "type-interior", function () { pageClassOn('pageshow', "type-interior", function () {
var page = $(this); var page = $(this);

View file

@ -177,7 +177,7 @@
$('.notificationSettingForm').off('submit', onSubmit).on('submit', onSubmit); $('.notificationSettingForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#notificationSettingPage", function () { }).on('pageshow', "#notificationSettingPage", function () {
var page = this; var page = this;

View file

@ -60,7 +60,7 @@
}); });
} }
$(document).on('pageshowready', "#notificationSettingsPage", function () { $(document).on('pageshow', "#notificationSettingsPage", function () {
var page = this; var page = this;

View file

@ -31,7 +31,7 @@
$('.playbackConfigurationForm').off('submit', onSubmit).on('submit', onSubmit); $('.playbackConfigurationForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#playbackConfigurationPage", function () { }).on('pageshow', "#playbackConfigurationPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -271,7 +271,7 @@
reloadList(page); reloadList(page);
}); });
}).on('pageshowready', "#pluginCatalogPage", function () { }).on('pageshow', "#pluginCatalogPage", function () {
var page = this; var page = this;

View file

@ -219,7 +219,7 @@
}); });
} }
$(document).on('pageshowready', "#pluginsPage", function () { $(document).on('pageshow', "#pluginsPage", function () {
reloadList(this); reloadList(this);
}); });

View file

@ -847,7 +847,7 @@
reloadItems(page); reloadItems(page);
}); });
}) })
.on('pageshowready', "#libraryReportManagerPage", function () { .on('pageshow', "#libraryReportManagerPage", function () {
query.UserId = Dashboard.getCurrentUserId(); query.UserId = Dashboard.getCurrentUserId();
var page = this; var page = this;

View file

@ -314,7 +314,7 @@
$('.addTriggerForm').off('submit', onSubmit).on('submit', onSubmit); $('.addTriggerForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#scheduledTaskPage", function () { }).on('pageshow', "#scheduledTaskPage", function () {
ScheduledTaskPage.refreshScheduledTask(); ScheduledTaskPage.refreshScheduledTask();
}); });

View file

@ -219,7 +219,7 @@
}); });
}); });
}).on('pageshowready', "#scheduledTasksPage", function () { }).on('pageshow', "#scheduledTasksPage", function () {
var page = this; var page = this;

View file

@ -4,7 +4,7 @@
var options = { var options = {
SortBy: "IsFavoriteOrLike,Random", SortBy: "IsFavoriteOrLiked,Random",
IncludeItemTypes: "Movie,Series,MusicArtist", IncludeItemTypes: "Movie,Series,MusicArtist",
Limit: 20, Limit: 20,
Recursive: true, Recursive: true,
@ -18,9 +18,9 @@
var href = LibraryBrowser.getHref(i); var href = LibraryBrowser.getHref(i);
var itemHtml = '<a href="' + href + '" style="display:block;padding:.5em 0;">'; var itemHtml = '<div><a style="display:inline-block;padding:.55em 1em;" href="' + href + '">';
itemHtml += i.Name; itemHtml += i.Name;
itemHtml += '</a>'; itemHtml += '</a></div>';
return itemHtml; return itemHtml;
}).join(''); }).join('');
@ -29,7 +29,7 @@
}); });
} }
pageIdOn('pageshowready', "searchPage", function () { pageIdOn('pageshow', "searchPage", function () {
var page = this; var page = this;
loadSuggestions(page); loadSuggestions(page);

View file

@ -346,7 +346,7 @@
var page = this; var page = this;
updatePageStyle(page); updatePageStyle(page);
}).on('pageshowready', "#selectServerPage", function () { }).on('pageshow', "#selectServerPage", function () {
var page = this; var page = this;

View file

@ -79,7 +79,7 @@
}); });
}).on('pageshowready', "#publicSharedItemPage", function () { }).on('pageshow', "#publicSharedItemPage", function () {
var page = this; var page = this;

View file

@ -1564,7 +1564,7 @@ var Dashboard = {
// The native app can handle a little bit more than safari // The native app can handle a little bit more than safari
if (AppInfo.isNativeApp) { if (AppInfo.isNativeApp) {
quality -= 10; quality -= 5;
} else { } else {
@ -1724,6 +1724,8 @@ var AppInfo = {};
AppInfo.enableMovieHomeSuggestions = true; AppInfo.enableMovieHomeSuggestions = true;
AppInfo.enableNavDrawer = true; AppInfo.enableNavDrawer = true;
AppInfo.enableSearchInTopMenu = true; AppInfo.enableSearchInTopMenu = true;
AppInfo.enableHomeFavorites = true;
AppInfo.enableNowPlayingBar = true;
AppInfo.enableAppStorePolicy = isCordova; AppInfo.enableAppStorePolicy = isCordova;
@ -1741,6 +1743,8 @@ var AppInfo = {};
//AppInfo.enableSectionTransitions = true; //AppInfo.enableSectionTransitions = true;
AppInfo.enableNavDrawer = false; AppInfo.enableNavDrawer = false;
AppInfo.enableSearchInTopMenu = false; AppInfo.enableSearchInTopMenu = false;
AppInfo.enableHomeFavorites = false;
AppInfo.enableNowPlayingBar = false;
} else { } else {
if (isMobile) { if (isMobile) {
@ -1915,6 +1919,10 @@ var AppInfo = {};
if (AppInfo.isNativeApp) { if (AppInfo.isNativeApp) {
elem.classList.add('nativeApp'); elem.classList.add('nativeApp');
} }
if (!AppInfo.enableHomeFavorites) {
elem.classList.add('homeFavoritesDisabled');
}
} }
function onDocumentReady() { function onDocumentReady() {
@ -1990,6 +1998,11 @@ var AppInfo = {};
} }
} }
if (AppInfo.enableNowPlayingBar) {
require(['scripts/nowplayingbar']);
Dashboard.importCss('css/nowplayingbar.css');
}
if (navigator.splashscreen) { if (navigator.splashscreen) {
navigator.splashscreen.hide(); navigator.splashscreen.hide();
} }

View file

@ -49,7 +49,7 @@
$('.streamingSettingsForm').off('submit', onSubmit).on('submit', onSubmit); $('.streamingSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#streamingSettingsPage", function () { }).on('pageshow', "#streamingSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -120,7 +120,7 @@
}; };
$(document).on('pageshowready', "#supporterKeyPage", SupporterKeyPage.onPageShow); $(document).on('pageshow', "#supporterKeyPage", SupporterKeyPage.onPageShow);
(function () { (function () {
@ -267,7 +267,7 @@ $(document).on('pageshowready', "#supporterKeyPage", SupporterKeyPage.onPageShow
$('#linkKeysForm').on('submit', SupporterKeyPage.linkSupporterKeys); $('#linkKeysForm').on('submit', SupporterKeyPage.linkSupporterKeys);
$('.popupAddUserForm').on('submit', SupporterKeyPage.onAddConnectUserSubmit).on('submit', SupporterKeyPage.onAddConnectUserSubmit); $('.popupAddUserForm').on('submit', SupporterKeyPage.onAddConnectUserSubmit).on('submit', SupporterKeyPage.onAddConnectUserSubmit);
}).on('pageshowready', "#supporterKeyPage", function () { }).on('pageshow', "#supporterKeyPage", function () {
var page = this; var page = this;
loadConnectSupporters(page); loadConnectSupporters(page);

View file

@ -182,7 +182,7 @@
$('.supporterForm').off('submit', onSubmit).on('submit', onSubmit); $('.supporterForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#supporterPage", function () { }).on('pageshow', "#supporterPage", function () {
var page = this; var page = this;

View file

@ -407,7 +407,7 @@
onCategorySyncButtonClick(page, this); onCategorySyncButtonClick(page, this);
}); });
}).on('pageshowready', ".libraryPage", function () { }).on('pageshow', ".libraryPage", function () {
var page = this; var page = this;

View file

@ -48,7 +48,7 @@
} }
var html = ''; var html = '';
html += '<div class="syncStatusBanner" data-status="' + job.Status + '" style="background-color:' + background + ';position:absolute;top:0;right:0;padding:.5em .5em; text-align:left;color: #fff; font-weight: 500; text-transform:uppercase; border-bottom-left-radius: 3px;">'; html += '<div class="syncStatus" secondary data-status="' + job.Status + '" style="color:' + background + ';">';
html += text; html += text;
html += '</div>'; html += '</div>';
@ -59,59 +59,23 @@
var html = ''; var html = '';
html += "<div class='card squareCard' data-id='" + job.Id + "' data-status='" + job.Status + "'>"; html += '<paper-icon-item class="syncJobItem" data-id="' + job.Id + '" data-status="' + job.Status + '">';
html += '<div class="' + cardBoxCssClass + '">';
html += '<div class="cardScalable">';
html += '<div class="cardPadder"></div>';
syncJobPage += '?id=' + job.Id;
html += '<a class="cardContent" href="' + syncJobPage + '">';
var imgUrl;
var style = '';
if (job.PrimaryImageItemId) { if (job.PrimaryImageItemId) {
imgUrl = ApiClient.getScaledImageUrl(job.PrimaryImageItemId, { var imgUrl = ApiClient.getScaledImageUrl(job.PrimaryImageItemId, {
type: "Primary", type: "Primary",
width: 400, width: 40,
tag: job.PrimaryImageTag tag: job.PrimaryImageTag,
minScale: 3
}); });
style = "background-position:center center;"; html += '<paper-fab class="listAvatar blue" style="background-image:url(\'' + imgUrl + '\');background-repeat:no-repeat;background-position:center center;background-size: cover;" item-icon></paper-fab>';
} else { } else {
style = "background-color:#38c;background-position:center center;"; html += '<paper-fab class="listAvatar blue" icon="sync" item-icon></paper-fab>';
imgUrl = "css/images/items/detail/video.png";
} }
html += '<div class="cardImage coveredCardImage lazy" data-src="' + imgUrl + '" style="' + style + '">'; html += '<paper-item-body three-line style="min-height:120px;">';
syncJobPage += '?id=' + job.Id;
var progress = job.Progress || 0; html += '<a class="clearLink" href="' + syncJobPage + '">';
var footerClass = 'cardFooter fullCardFooter lightCardFooter';
if (progress == 0 || progress >= 100) {
footerClass += ' hide';
}
html += '<div class="' + footerClass + '">';
html += "<div class='cardText cardProgress'>";
html += '<progress class="itemProgressBar" min="0" max="100" value="' + progress + '"></progress>';
html += "</div>";
html += "</div>";
html += "</div>";
html += getSyncStatusBanner(job);
// cardContent
html += "</a>";
// cardScalable
html += "</div>";
html += '<div class="cardFooter outerCardFooter">';
var textLines = []; var textLines = [];
@ -131,24 +95,80 @@
textLines.push('&nbsp;'); textLines.push('&nbsp;');
} }
html += '<div class="cardText" style="text-align:right; float:right;padding:0;">';
html += '<paper-icon-button icon="' + AppInfo.moreIcon + '" class="btnJobMenu"></paper-icon-button>';
html += "</div>";
for (var i = 0, length = textLines.length; i < length; i++) { for (var i = 0, length = textLines.length; i < length; i++) {
html += "<div class='cardText' style='margin-right:30px;'>";
if (i == 0) {
html += "<div>";
} else {
html += "<div secondary>";
}
html += textLines[i]; html += textLines[i];
html += "</div>"; html += "</div>";
} }
// cardFooter html += getSyncStatusBanner(job);
html += "</div>";
// cardBox html += '<div secondary class="syncProgresContainer" style="padding-top:5px;">';
html += "</div>"; html += '<paper-progress class="mini" style="width:100%;" value="' + (job.Progress || 0) + '"></paper-progress>';
html += '</div>';
// card html += '</a>';
html += "</div>"; html += '</paper-item-body>';
html += '<paper-icon-button icon="' + AppInfo.moreIcon + '" class="btnJobMenu"></paper-icon-button>';
html += '</paper-icon-item>';
//html += "<div class='card squareCard'>";
//html += '<div class="' + cardBoxCssClass + '">';
//html += '<div class="cardScalable">';
//html += '<div class="cardPadder"></div>';
//html += '<a class="cardContent" href="' + syncJobPage + '">';
//var imgUrl;
//var style = '';
//html += '<div class="cardImage coveredCardImage lazy" data-src="' + imgUrl + '" style="' + style + '">';
//var progress = job.Progress || 0;
//var footerClass = 'cardFooter fullCardFooter lightCardFooter';
//if (progress == 0 || progress >= 100) {
// footerClass += ' hide';
//}
//html += '<div class="' + footerClass + '">';
//html += "<div class='cardText cardProgress'>";
//html += '<progress class="itemProgressBar" min="0" max="100" value="' + progress + '"></progress>';
//html += "</div>";
//html += "</div>";
//html += "</div>";
//// cardContent
//html += "</a>";
//// cardScalable
//html += "</div>";
//html += '<div class="cardFooter outerCardFooter">';
//html += '<div class="cardText" style="text-align:right; float:right;padding:0;">';
//html += '<paper-icon-button icon="' + AppInfo.moreIcon + '" class="btnJobMenu"></paper-icon-button>';
//html += "</div>";
//// cardFooter
//html += "</div>";
//// cardBox
//html += "</div>";
//// card
//html += "</div>";
return html; return html;
} }
@ -187,24 +207,26 @@
if (targetName != lastTargetName) { if (targetName != lastTargetName) {
if (lastTargetName) { if (lastTargetName) {
html += '<br/>'; html += '</div>';
html += '<br/>'; html += '</div>';
html += '<br/>';
} }
lastTargetName = targetName; lastTargetName = targetName;
html += '<div class="detailSectionHeader">'; html += '<div class="syncActivityForTarget">';
html += '<h1>' + targetName + '</h1>';
html += '<div>' + targetName + '</div>'; html += '<div class="paperList">';
html += '</div>';
} }
} }
html += getSyncJobHtml(page, job, cardBoxCssClass, syncJobPage); html += getSyncJobHtml(page, job, cardBoxCssClass, syncJobPage);
} }
if (jobs.length) {
html += '</div>';
html += '</div>';
}
var elem = $('.syncActivity', page).html(html).lazyChildren(); var elem = $('.syncActivity', page).html(html).lazyChildren();
Events.trigger(elem[0], 'create'); Events.trigger(elem[0], 'create');
@ -229,38 +251,32 @@
function refreshJob(page, job) { function refreshJob(page, job) {
var card = page.querySelector('.card[data-id=\'' + job.Id + '\']'); var card = page.querySelector('.syncJobItem[data-id=\'' + job.Id + '\']');
if (!card) { if (!card) {
return; return;
} }
var banner = card.querySelector('.syncStatusBanner'); var banner = card.querySelector('.syncStatus');
if (banner.getAttribute('data-status') == job.Status) { if (banner.getAttribute('data-status') == job.Status) {
var elem = document.createElement('div'); var elem = document.createElement('div');
elem.innerHTML = getSyncStatusBanner(job); elem.innerHTML = getSyncStatusBanner(job);
elem = elem.querySelector('.syncStatusBanner'); elem = elem.querySelector('.syncStatus');
elem.parentNode.removeChild(elem); elem.parentNode.removeChild(elem);
banner.parentNode.replaceChild(elem, banner); banner.parentNode.replaceChild(elem, banner);
} }
var progress = job.Progress || 0; var progress = job.Progress || 0;
var cardFooter = card.querySelector('.cardFooter'); var syncProgresContainer = card.querySelector('.syncProgresContainer');
if (progress == 0 || progress >= 100) { syncProgresContainer.querySelector('paper-progress').value = progress;
cardFooter.classList.add('hide');
}
else {
cardFooter.classList.remove('hide');
cardFooter.querySelector('.itemProgressBar').value = progress;
}
} }
function showJobMenu(page, elem) { function showJobMenu(page, elem) {
var card = $(elem).parents('.card'); var card = $(elem).parents('.syncJobItem');
var jobId = card.attr('data-id'); var jobId = card.attr('data-id');
var status = card.attr('data-status'); var status = card.attr('data-status');
@ -377,7 +393,7 @@
} }
$(document).on('pageshowready', ".syncActivityPage", function () { $(document).on('pageshow', ".syncActivityPage", function () {
var page = this; var page = this;
lastDataLoad = 0; lastDataLoad = 0;

View file

@ -394,7 +394,7 @@
$('.syncJobForm').off('submit', onSubmit).on('submit', onSubmit); $('.syncJobForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', ".syncJobPage", function () { }).on('pageshow', ".syncJobPage", function () {
var page = this; var page = this;
loadJob(page); loadJob(page);

View file

@ -52,7 +52,7 @@
$('.syncSettingsForm').off('submit', onSubmit).on('submit', onSubmit); $('.syncSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#syncSettingsPage", function () { }).on('pageshow', "#syncSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();

View file

@ -285,7 +285,7 @@
}); });
}); });
pageIdOn('pageshowready', "tvRecommendedPage", function () { pageIdOn('pageshow', "tvRecommendedPage", function () {
var page = this; var page = this;

View file

@ -201,7 +201,7 @@
$('.userLibraryAccessForm').off('submit', onSubmit).on('submit', onSubmit); $('.userLibraryAccessForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#userLibraryAccessPage", function () { }).on('pageshow', "#userLibraryAccessPage", function () {
var page = this; var page = this;

View file

@ -151,7 +151,7 @@
$('.newUserProfileForm').off('submit', onSubmit).on('submit', onSubmit); $('.newUserProfileForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#newUserPage", function () { }).on('pageshow', "#newUserPage", function () {
var page = this; var page = this;

View file

@ -388,7 +388,7 @@
$('.scheduleForm').off('submit', UserParentalControlPage.onScheduleFormSubmit).on('submit', UserParentalControlPage.onScheduleFormSubmit); $('.scheduleForm').off('submit', UserParentalControlPage.onScheduleFormSubmit).on('submit', UserParentalControlPage.onScheduleFormSubmit);
$('.userParentalControlForm').off('submit', UserParentalControlPage.onSubmit).on('submit', UserParentalControlPage.onSubmit); $('.userParentalControlForm').off('submit', UserParentalControlPage.onSubmit).on('submit', UserParentalControlPage.onSubmit);
}).on('pageshowready', "#userParentalControlPage", function () { }).on('pageshow', "#userParentalControlPage", function () {
var page = this; var page = this;

View file

@ -91,7 +91,7 @@
$('.btnSkip', page).on('click', skip); $('.btnSkip', page).on('click', skip);
$('.btnNext', page).on('click', next); $('.btnNext', page).on('click', next);
}).on('pageshowready', "#wizardGuidePage", function () { }).on('pageshow', "#wizardGuidePage", function () {
var page = this; var page = this;

Some files were not shown because too many files have changed in this diff Show more