mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update file input behavior
This commit is contained in:
parent
262f60b800
commit
5e27de701a
17 changed files with 173 additions and 149 deletions
|
@ -1,112 +1,110 @@
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
function getLocalMediaSource(serverId, itemId) {
|
function getLocalMediaSource(serverId, itemId) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [null]);
|
resolve(null);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveOfflineUser(user) {
|
function saveOfflineUser(user) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolve();
|
resolve();
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteOfflineUser(id) {
|
function deleteOfflineUser(id) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolve();
|
resolve();
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCameraPhotos() {
|
function getCameraPhotos() {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [[]]);
|
resolve([]);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOfflineActions(serverId) {
|
function getOfflineActions(serverId) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [[]]);
|
resolve([]);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteOfflineActions(actions) {
|
function deleteOfflineActions(actions) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [[]]);
|
resolve([]);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getServerItemIds(serverId) {
|
function getServerItemIds(serverId) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [[]]);
|
resolve([]);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeLocalItem(itemId, serverId) {
|
function removeLocalItem(itemId, serverId) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, []);
|
resolve();
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLocalItem(itemId, serverId) {
|
function getLocalItem(itemId, serverId) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, []);
|
resolve();
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addOrUpdateLocalItem(localItem) {
|
function addOrUpdateLocalItem(localItem) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, []);
|
resolve();
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function createLocalItem(libraryItem, serverInfo, originalFileName) {
|
function createLocalItem(libraryItem, serverInfo, originalFileName) {
|
||||||
|
|
||||||
var item = {};
|
return new Promise(function (resolve, reject) {
|
||||||
|
resolve({});
|
||||||
var deferred = DeferredBuilder.Deferred();
|
});
|
||||||
deferred.resolveWith(null, [item]);
|
|
||||||
return deferred.promise();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadFile(url, localPath) {
|
function downloadFile(url, localPath) {
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, []);
|
resolve();
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadSubtitles(url, localItem, subtitleStreamh) {
|
function downloadSubtitles(url, localItem, subtitleStreamh) {
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [""]);
|
resolve("");
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasImage(serverId, itemId, imageTag) {
|
function hasImage(serverId, itemId, imageTag) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [false]);
|
resolve(false);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadImage(url, serverId, itemId, imageTag) {
|
function downloadImage(url, serverId, itemId, imageTag) {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [false]);
|
resolve(false);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileExists(path) {
|
function fileExists(path) {
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [false]);
|
resolve(false);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function translateFilePath(path) {
|
function translateFilePath(path) {
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
return new Promise(function (resolve, reject) {
|
||||||
deferred.resolveWith(null, [path]);
|
resolve(path);
|
||||||
return deferred.promise();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.LocalAssetManager = {
|
window.LocalAssetManager = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-behaviors",
|
"name": "iron-behaviors",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"description": "Provides a set of behaviors for the iron elements",
|
"description": "Provides a set of behaviors for the iron elements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@ -29,14 +29,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||||
"_release": "1.0.11",
|
"_release": "1.0.12",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.12",
|
||||||
"commit": "084fbc7f60343d717bb2208f350774f4c9899777"
|
"commit": "657f526a2382a659cdf4e13be87ecc89261588a3"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -1,28 +1,22 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
sudo: false
|
sudo: false
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- node_js: stable
|
|
||||||
script: xvfb-run wct
|
|
||||||
addons:
|
|
||||||
firefox: latest
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- google-chrome
|
|
||||||
packages:
|
|
||||||
- google-chrome-stable
|
|
||||||
- node_js: node
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
|
||||||
wct -s 'default'
|
|
||||||
fi
|
|
||||||
before_script:
|
before_script:
|
||||||
- npm install bower
|
- npm install bower
|
||||||
- npm install web-component-tester
|
- npm install web-component-tester
|
||||||
- export PATH=$PWD/node_modules/.bin:$PATH
|
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||||
- bower install
|
- bower install
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
|
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
|
||||||
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
|
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
|
||||||
|
node_js: 4
|
||||||
|
addons:
|
||||||
|
firefox: latest
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- google-chrome
|
||||||
|
packages:
|
||||||
|
- google-chrome-stable
|
||||||
|
script:
|
||||||
|
- xvfb-run wct
|
||||||
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-behaviors",
|
"name": "iron-behaviors",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"description": "Provides a set of behaviors for the iron elements",
|
"description": "Provides a set of behaviors for the iron elements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
@ -145,7 +145,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
// Ignore the event if this is coming from a focused light child, since that
|
// Ignore the event if this is coming from a focused light child, since that
|
||||||
// element will deal with it.
|
// element will deal with it.
|
||||||
if (this.isLightDescendant(target))
|
if (this.isLightDescendant(/** @type {Node} */(target)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
keyboardEvent.preventDefault();
|
keyboardEvent.preventDefault();
|
||||||
|
@ -162,7 +162,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
// Ignore the event if this is coming from a focused light child, since that
|
// Ignore the event if this is coming from a focused light child, since that
|
||||||
// element will deal with it.
|
// element will deal with it.
|
||||||
if (this.isLightDescendant(target))
|
if (this.isLightDescendant(/** @type {Node} */(target)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.pressed) {
|
if (this.pressed) {
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html><!--
|
||||||
<!--
|
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||||
Code distributed by Google as part of the polymer project is also
|
Code distributed by Google as part of the polymer project is also
|
||||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
-->
|
--><html><head>
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
<script src="../../web-component-tester/browser.js"></script>
|
<script src="../../web-component-tester/browser.js"></script>
|
||||||
|
@ -18,8 +15,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
WCT.loadSuites([
|
WCT.loadSuites([
|
||||||
'focused-state.html',
|
'focused-state.html',
|
||||||
'active-state.html',
|
'active-state.html',
|
||||||
'disabled-state.html'
|
'disabled-state.html',
|
||||||
|
'focused-state.html?dom=shadow',
|
||||||
|
'active-state.html?dom=shadow',
|
||||||
|
'disabled-state.html?dom=shadow'
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
</body></html>
|
||||||
|
|
|
@ -31,14 +31,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-icon",
|
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||||
"_release": "1.0.7",
|
"_release": "1.0.7",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.7",
|
"tag": "v1.0.7",
|
||||||
"commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381"
|
"commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-icon"
|
"_originalSource": "polymerelements/iron-icon"
|
||||||
}
|
}
|
|
@ -26,14 +26,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"main": "iron-meta.html",
|
"main": "iron-meta.html",
|
||||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||||
"_release": "1.1.1",
|
"_release": "1.1.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.1",
|
"tag": "v1.1.1",
|
||||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.0.8",
|
"tag": "v1.0.8",
|
||||||
"commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff"
|
"commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
"_source": "git://github.com/polymerelements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-selector"
|
"_originalSource": "polymerelements/iron-selector"
|
||||||
}
|
}
|
|
@ -45,7 +45,7 @@
|
||||||
"tag": "v1.0.10",
|
"tag": "v1.0.10",
|
||||||
"commit": "4b244a542af2c6c271498dfb98b00ed284df1d6a"
|
"commit": "4b244a542af2c6c271498dfb98b00ed284df1d6a"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -24,14 +24,14 @@
|
||||||
"web-component-tester": "*"
|
"web-component-tester": "*"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/polymer/polymer",
|
"homepage": "https://github.com/Polymer/polymer",
|
||||||
"_release": "1.2.3",
|
"_release": "1.2.3",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.2.3",
|
"tag": "v1.2.3",
|
||||||
"commit": "aa535d1675342007cbf64dc9c66497cf74cbc616"
|
"commit": "aa535d1675342007cbf64dc9c66497cf74cbc616"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymer/polymer"
|
"_originalSource": "Polymer/polymer"
|
||||||
}
|
}
|
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request Quota (only for File System API)
|
// Request Quota (only for File System API)
|
||||||
var requestedBytes = 1024 * 1024 * 500; // 500MB
|
var requestedBytes = 1024 * 1024 * 600; // MB
|
||||||
var imageCacheDirectoryEntry;
|
var imageCacheDirectoryEntry;
|
||||||
var imageCacheFolder = 'images';
|
var imageCacheFolder = 'images';
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div id="fldNewImage">
|
<div id="fldNewImage">
|
||||||
<p>${ImageUploadAspectRatioHelp}</p>
|
<p>${ImageUploadAspectRatioHelp}</p>
|
||||||
<input type="file" accept="image/*" id="uploadUserImage" name="uploadUserImage" onchange="MyProfilePage.onFileUploadChange(this);" />
|
<input type="file" accept="image/*" id="uploadUserImage" name="uploadUserImage" />
|
||||||
|
|
||||||
<div id="userImageDropZone" class="imageDropZone">
|
<div id="userImageDropZone" class="imageDropZone">
|
||||||
<h3>${LabelDropImageHere}</h3>
|
<h3>${LabelDropImageHere}</h3>
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
<button type="submit" data-role="none" class="clearButton">
|
<button type="submit" data-role="none" class="clearButton">
|
||||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||||
</button>
|
</button>
|
||||||
<paper-button id="btnResetEasyPassword" style="display:none;" raised class="cancel block" onclick="UpdatePasswordPage.resetEasyPassword();"><iron-icon icon="lock"></iron-icon><span>${ButtonResetEasyPassword}</span></paper-button>
|
<paper-button id="btnResetEasyPassword" raised class="cancel block hide" onclick="UpdatePasswordPage.resetEasyPassword();"><iron-icon icon="lock"></iron-icon><span>${ButtonResetEasyPassword}</span></paper-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2123,8 +2123,6 @@
|
||||||
}
|
}
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="cardOverlayTarget"></div>';
|
|
||||||
|
|
||||||
if (item.LocationType == "Virtual" || item.LocationType == "Offline") {
|
if (item.LocationType == "Virtual" || item.LocationType == "Offline") {
|
||||||
if (options.showLocationTypeIndicator !== false) {
|
if (options.showLocationTypeIndicator !== false) {
|
||||||
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
||||||
|
@ -2193,8 +2191,6 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<div class="' + footerClass + '">';
|
|
||||||
|
|
||||||
if (options.cardLayout) {
|
if (options.cardLayout) {
|
||||||
html += '<div class="cardButtonContainer">';
|
html += '<div class="cardButtonContainer">';
|
||||||
html += '<paper-icon-button icon="' + AppInfo.moreIcon + '" class="listviewMenuButton btnCardOptions"></paper-icon-button>';
|
html += '<paper-icon-button icon="' + AppInfo.moreIcon + '" class="listviewMenuButton btnCardOptions"></paper-icon-button>';
|
||||||
|
@ -2307,8 +2303,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//cardFooter
|
if (html) {
|
||||||
html += "</div>";
|
html = '<div class="' + footerClass + '">' + html;
|
||||||
|
|
||||||
|
//cardFooter
|
||||||
|
html += "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,25 +17,36 @@
|
||||||
|
|
||||||
elem = elem.querySelector('.cardOverlayTarget');
|
elem = elem.querySelector('.cardOverlayTarget');
|
||||||
|
|
||||||
if ($(elem).is(':visible')) {
|
if (elem) {
|
||||||
slideDown(elem, 1);
|
slideDownToHide(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function slideDown(elem, iterations) {
|
function slideDownToHide(elem) {
|
||||||
|
|
||||||
|
if (elem.classList.contains('hide')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
requestAnimationFrame(function () {
|
requestAnimationFrame(function () {
|
||||||
var keyframes = [
|
var keyframes = [
|
||||||
{ height: '100%', offset: 0 },
|
{ height: '100%', offset: 0 },
|
||||||
{ height: '0', display: 'none', offset: 1 }];
|
{ height: '0', display: 'none', offset: 1 }];
|
||||||
var timing = { duration: 300, iterations: iterations, fill: 'forwards', easing: 'ease-out' };
|
var timing = { duration: 300, iterations: 1, fill: 'forwards', easing: 'ease-out' };
|
||||||
|
|
||||||
elem.animate(keyframes, timing).onfinish = function () {
|
elem.animate(keyframes, timing).onfinish = function () {
|
||||||
elem.style.display = 'none';
|
elem.classList.add('hide');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function slideUp(elem, iterations) {
|
function slideUpToShow(elem) {
|
||||||
|
|
||||||
|
if (!elem.classList.contains('hide')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.classList.remove('hide');
|
||||||
|
|
||||||
requestAnimationFrame(function () {
|
requestAnimationFrame(function () {
|
||||||
elem.style.display = 'block';
|
elem.style.display = 'block';
|
||||||
|
@ -43,7 +54,7 @@
|
||||||
var keyframes = [
|
var keyframes = [
|
||||||
{ height: '0', offset: 0 },
|
{ height: '0', offset: 0 },
|
||||||
{ height: '100%', offset: 1 }];
|
{ height: '100%', offset: 1 }];
|
||||||
var timing = { duration: 300, iterations: iterations, fill: 'forwards', easing: 'ease-out' };
|
var timing = { duration: 300, iterations: 1, fill: 'forwards', easing: 'ease-out' };
|
||||||
elem.animate(keyframes, timing);
|
elem.animate(keyframes, timing);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -690,6 +701,13 @@
|
||||||
|
|
||||||
var innerElem = elem.querySelector('.cardOverlayTarget');
|
var innerElem = elem.querySelector('.cardOverlayTarget');
|
||||||
|
|
||||||
|
if (!innerElem) {
|
||||||
|
innerElem = document.createElement('div');
|
||||||
|
innerElem.classList.add('hide');
|
||||||
|
innerElem.classList.add('cardOverlayTarget');
|
||||||
|
parentWithClass(elem, 'cardContent').appendChild(innerElem);
|
||||||
|
}
|
||||||
|
|
||||||
var dataElement = elem;
|
var dataElement = elem;
|
||||||
while (dataElement && !dataElement.getAttribute('data-itemid')) {
|
while (dataElement && !dataElement.getAttribute('data-itemid')) {
|
||||||
dataElement = dataElement.parentNode;
|
dataElement = dataElement.parentNode;
|
||||||
|
@ -721,7 +739,7 @@
|
||||||
|
|
||||||
$(innerElem).show();
|
$(innerElem).show();
|
||||||
|
|
||||||
slideUp(innerElem, 1);
|
slideUpToShow(innerElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onHoverIn(e) {
|
function onHoverIn(e) {
|
||||||
|
@ -920,7 +938,7 @@
|
||||||
|
|
||||||
if (!itemSelectionPanel) {
|
if (!itemSelectionPanel) {
|
||||||
|
|
||||||
require(['paper-checkbox'], function() {
|
require(['paper-checkbox'], function () {
|
||||||
itemSelectionPanel = document.createElement('div');
|
itemSelectionPanel = document.createElement('div');
|
||||||
itemSelectionPanel.classList.add('itemSelectionPanel');
|
itemSelectionPanel.classList.add('itemSelectionPanel');
|
||||||
|
|
||||||
|
@ -1273,19 +1291,27 @@
|
||||||
|
|
||||||
if (userData.Played) {
|
if (userData.Played) {
|
||||||
|
|
||||||
if (!$('.playedIndicator', card).length) {
|
var playedIndicator = card.querySelector('.playedIndicator');
|
||||||
|
|
||||||
$('<div class="playedIndicator"></div>').insertAfter($('.cardOverlayTarget', card));
|
if (!playedIndicator) {
|
||||||
|
|
||||||
|
playedIndicator = document.createElement('div');
|
||||||
|
playedIndicator.classList.add('playedIndicator');
|
||||||
|
card.querySelector('.cardContent').appendChild(playedIndicator);
|
||||||
}
|
}
|
||||||
$('.playedIndicator', card).html('<iron-icon icon="check"></iron-icon>');
|
playedIndicator.innerHTML = '<iron-icon icon="check"></iron-icon>';
|
||||||
}
|
}
|
||||||
else if (userData.UnplayedItemCount) {
|
else if (userData.UnplayedItemCount) {
|
||||||
|
|
||||||
if (!$('.playedIndicator', card).length) {
|
var playedIndicator = card.querySelector('.playedIndicator');
|
||||||
|
|
||||||
$('<div class="playedIndicator"></div>').insertAfter($('.cardOverlayTarget', card));
|
if (!playedIndicator) {
|
||||||
|
|
||||||
|
playedIndicator = document.createElement('div');
|
||||||
|
playedIndicator.classList.add('playedIndicator');
|
||||||
|
card.querySelector('.cardContent').appendChild(playedIndicator);
|
||||||
}
|
}
|
||||||
$('.playedIndicator', card).html(userData.UnplayedItemCount);
|
playedIndicator.innerHTML = userData.UnplayedItemCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
var progressHtml = LibraryBrowser.getItemProgressBarHtml(userData);
|
var progressHtml = LibraryBrowser.getItemProgressBarHtml(userData);
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
|
|
||||||
$('#fldImage', page).show().html('').html("<img width='140px' src='" + imageUrl + "' />");
|
$('#fldImage', page).show().html('').html("<img width='140px' src='" + imageUrl + "' />");
|
||||||
|
|
||||||
|
var showNewImageForm = false;
|
||||||
|
|
||||||
if (user.ConnectLinkType == 'Guest') {
|
if (user.ConnectLinkType == 'Guest') {
|
||||||
|
|
||||||
$('.newImageForm', page).hide();
|
|
||||||
$('#btnDeleteImage', page).hide();
|
$('#btnDeleteImage', page).hide();
|
||||||
$('.connectMessage', page).show();
|
$('.connectMessage', page).show();
|
||||||
}
|
}
|
||||||
|
@ -42,16 +42,22 @@
|
||||||
|
|
||||||
$('#btnDeleteImage', page).show();
|
$('#btnDeleteImage', page).show();
|
||||||
$('#headerUploadNewImage', page).show();
|
$('#headerUploadNewImage', page).show();
|
||||||
$('.newImageForm', page).show();
|
showNewImageForm = true;
|
||||||
$('.connectMessage', page).hide();
|
$('.connectMessage', page).hide();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.newImageForm', page).show();
|
showNewImageForm = true;
|
||||||
$('#btnDeleteImage', page).hide();
|
$('#btnDeleteImage', page).hide();
|
||||||
$('#headerUploadNewImage', page).show();
|
$('#headerUploadNewImage', page).show();
|
||||||
$('.connectMessage', page).hide();
|
$('.connectMessage', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showNewImageForm && AppInfo.supportsFileInput) {
|
||||||
|
$('.newImageForm', page).show();
|
||||||
|
} else {
|
||||||
|
$('.newImageForm', page).hide();
|
||||||
|
}
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -115,16 +121,14 @@
|
||||||
reader.onabort = onFileReaderAbort;
|
reader.onabort = onFileReaderAbort;
|
||||||
|
|
||||||
// Closure to capture the file information.
|
// Closure to capture the file information.
|
||||||
reader.onload = (function (theFile) {
|
reader.onload = function (e) {
|
||||||
return function (e) {
|
|
||||||
|
|
||||||
// Render thumbnail.
|
// Render thumbnail.
|
||||||
var html = ['<img style="max-width:500px;max-height:200px;" src="', e.target.result, '" title="', escape(theFile.name), '"/>'].join('');
|
var html = ['<img style="max-width:500px;max-height:200px;" src="', e.target.result, '" title="', escape(file.name), '"/>'].join('');
|
||||||
|
|
||||||
$('#userImageOutput', page).html(html);
|
$('#userImageOutput', page).html(html);
|
||||||
$('#fldUpload', page).show();
|
$('#fldUpload', page).show();
|
||||||
};
|
};
|
||||||
})(file);
|
|
||||||
|
|
||||||
// Read in the image file as a data URL.
|
// Read in the image file as a data URL.
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
|
@ -172,11 +176,6 @@
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.onFileUploadChange = function (fileUpload) {
|
|
||||||
|
|
||||||
setFiles($.mobile.activePage, fileUpload.files);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.MyProfilePage = new myProfilePage();
|
window.MyProfilePage = new myProfilePage();
|
||||||
|
@ -207,6 +206,9 @@
|
||||||
|
|
||||||
$('.newImageForm').off('submit', MyProfilePage.onImageSubmit).on('submit', MyProfilePage.onImageSubmit);
|
$('.newImageForm').off('submit', MyProfilePage.onImageSubmit).on('submit', MyProfilePage.onImageSubmit);
|
||||||
|
|
||||||
|
page.querySelector('#uploadUserImage').addEventListener('change', function(e) {
|
||||||
|
setFiles(page, e.target.files);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,10 +242,10 @@
|
||||||
|
|
||||||
if (user.HasConfiguredEasyPassword) {
|
if (user.HasConfiguredEasyPassword) {
|
||||||
$('#txtEasyPassword', page).val('').attr('placeholder', '******');
|
$('#txtEasyPassword', page).val('').attr('placeholder', '******');
|
||||||
$('#btnResetEasyPassword', page).show();
|
$('#btnResetEasyPassword', page).removeClass('hide');
|
||||||
} else {
|
} else {
|
||||||
$('#txtEasyPassword', page).val('').attr('placeholder', '');
|
$('#txtEasyPassword', page).val('').attr('placeholder', '');
|
||||||
$('#btnResetEasyPassword', page).hide();
|
$('#btnResetEasyPassword', page).addClass('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
page.querySelector('.chkEnableLocalEasyPassword').checked = user.Configuration.EnableLocalPassword;
|
page.querySelector('.chkEnableLocalEasyPassword').checked = user.Configuration.EnableLocalPassword;
|
||||||
|
|
|
@ -1590,6 +1590,9 @@ var AppInfo = {};
|
||||||
|
|
||||||
AppInfo.supportsDownloading = !(AppInfo.isNativeApp && isIOS);
|
AppInfo.supportsDownloading = !(AppInfo.isNativeApp && isIOS);
|
||||||
|
|
||||||
|
// This currently isn't working on android, unfortunately
|
||||||
|
AppInfo.supportsFileInput = !(AppInfo.isNativeApp && isAndroid);
|
||||||
|
|
||||||
AppInfo.enableUserImage = true;
|
AppInfo.enableUserImage = true;
|
||||||
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
|
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
|
||||||
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
|
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue