diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index 5d74fa6525..b5f528b092 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -29,14 +29,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/iron-behaviors", + "homepage": "https://github.com/PolymerElements/iron-behaviors", "_release": "1.0.11", "_resolution": { "type": "version", "tag": "v1.0.11", "commit": "084fbc7f60343d717bb2208f350774f4c9899777" }, - "_source": "git://github.com/polymerelements/iron-behaviors.git", + "_source": "git://github.com/PolymerElements/iron-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-behaviors" + "_originalSource": "PolymerElements/iron-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json index 75ac273a15..1dd6bd32f0 100644 --- a/dashboard-ui/bower_components/iron-icon/.bower.json +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -31,14 +31,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-icon", + "homepage": "https://github.com/polymerelements/iron-icon", "_release": "1.0.7", "_resolution": { "type": "version", "tag": "v1.0.7", "commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381" }, - "_source": "git://github.com/PolymerElements/iron-icon.git", + "_source": "git://github.com/polymerelements/iron-icon.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-icon" + "_originalSource": "polymerelements/iron-icon" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icons/.bower.json b/dashboard-ui/bower_components/iron-icons/.bower.json index 93533ec1bd..1fbaa11e5c 100644 --- a/dashboard-ui/bower_components/iron-icons/.bower.json +++ b/dashboard-ui/bower_components/iron-icons/.bower.json @@ -40,7 +40,7 @@ "tag": "v1.0.5", "commit": "39da54afbc17af343d1f95e62c5c0c477492677a" }, - "_source": "git://github.com/PolymerElements/iron-icons.git", + "_source": "git://github.com/polymerelements/iron-icons.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-icons" + "_originalSource": "polymerelements/iron-icons" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index ebb18c5b7b..52d44c1907 100644 --- a/dashboard-ui/bower_components/iron-selector/.bower.json +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -36,7 +36,7 @@ "tag": "v1.0.8", "commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff" }, - "_source": "git://github.com/polymerelements/iron-selector.git", + "_source": "git://github.com/PolymerElements/iron-selector.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-selector" + "_originalSource": "PolymerElements/iron-selector" } \ No newline at end of file diff --git a/dashboard-ui/components/imagestore.js b/dashboard-ui/components/imagestore.js index 7736c58b2a..17bdf8f199 100644 --- a/dashboard-ui/components/imagestore.js +++ b/dashboard-ui/components/imagestore.js @@ -178,7 +178,7 @@ window.ImageStore = self; } - require(['cryptojs-sha1'], function () { + require(['cryptojs-md5'], function () { new imageFileStore(); }); diff --git a/dashboard-ui/components/testermessage.js b/dashboard-ui/components/testermessage.js index 467e753cf7..813c7e8950 100644 --- a/dashboard-ui/components/testermessage.js +++ b/dashboard-ui/components/testermessage.js @@ -2,11 +2,15 @@ function onPageShow() { + if (!browserInfo.android) { + return; + } + var msg; var settingsKey = "betatester"; - var expectedValue = new Date().toDateString() + "3"; + var expectedValue = new Date().toDateString() + "5"; if (appStorage.getItem(settingsKey) == expectedValue) { return; } @@ -18,10 +22,12 @@ Dashboard.alert({ message: msg, - title: 'Hello Emby Beta Tester!' + title: 'Hello Emby Beta Tester!', + callback: function () { + appStorage.setItem(settingsKey, expectedValue); + } }); - appStorage.setItem(settingsKey, expectedValue); } pageClassOn('pageshow', "homePage", onPageShow); diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index b4c3888571..f91478addc 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -1546,7 +1546,7 @@ progress { z-index: 9999998; } -.nativeApp * { +.nativeApp *:not(input):not(select):not(textarea) { -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index bc3cccb35a..ad5f7f49a3 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -560,7 +560,9 @@ var Dashboard = { navigator.notification.alert(options.message, options.callback || function () { }, options.title || Globalize.translate('HeaderAlert')); } else { - Dashboard.confirmInternal(options.message, options.title || Globalize.translate('HeaderAlert'), false, options.callback); + require(['paper-dialog', 'fade-in-animation', 'fade-out-animation'], function () { + Dashboard.confirmInternal(options.message, options.title || Globalize.translate('HeaderAlert'), false, options.callback); + }); } }, @@ -587,9 +589,15 @@ var Dashboard = { confirmInternal: function (message, title, showCancel, callback) { - var id = 'paperdlg' + new Date().getTime(); + var dlg = document.createElement('paper-dialog'); - var html = ''; + dlg.setAttribute('with-backdrop', 'with-backdrop'); + dlg.setAttribute('role', 'alertdialog'); + dlg.entryAnimation = 'fade-in-animation'; + dlg.exitAnimation = 'fade-out-animation'; + dlg.setAttribute('with-backdrop', 'with-backdrop'); + + var html = ''; html += '

' + title + '

'; html += '
' + message + '
'; html += '
'; @@ -601,30 +609,22 @@ var Dashboard = { } html += '
'; - html += '
'; - $(document.body).append(html); + dlg.innerHTML = html; + document.body.appendChild(dlg); - // This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use - // element onload never fires - setTimeout(function () { + // Has to be assigned a z-index after the call to .open() + dlg.addEventListener('iron-overlay-closed', function (e) { - var dlg = document.getElementById(id); + var confirmed = dlg.closingReason.confirmed; + dlg.parentNode.removeChild(dlg); - // Has to be assigned a z-index after the call to .open() - dlg.addEventListener('iron-overlay-closed', function (e) { + if (callback) { + callback(confirmed); + } + }); - var confirmed = dlg.closingReason.confirmed; - dlg.parentNode.removeChild(dlg); - - if (callback) { - callback(confirmed); - } - }); - - dlg.open(); - - }, 300); + dlg.open(); }, refreshSystemInfoFromServer: function () { @@ -1806,6 +1806,7 @@ var AppInfo = {}; define("paper-slider", ["html!bower_components/paper-slider/paper-slider.html"]); define("paper-tabs", ["html!bower_components/paper-tabs/paper-tabs.html"]); define("paper-menu", ["html!bower_components/paper-menu/paper-menu.html"]); + define("paper-dialog", ["html!bower_components/paper-dialog/paper-dialog.html"]); define("paper-dialog-scrollable", ["html!bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html"]); define("paper-button", ["html!bower_components/paper-button/paper-button.html"]); define("paper-icon-button", ["html!bower_components/paper-icon-button/paper-icon-button.html"]); @@ -1824,7 +1825,6 @@ var AppInfo = {}; define("fade-in-animation", ["html!bower_components/neon-animation/animations/fade-in-animation.html"]); define("fade-out-animation", ["html!bower_components/neon-animation/animations/fade-out-animation.html"]); define("scale-up-animation", ["html!bower_components/neon-animation/animations/scale-up-animation.html"]); - define("paper-dialog", ["html!bower_components/paper-dialog/paper-dialog.html"]); define("paper-fab", ["html!bower_components/paper-fab/paper-fab.html"]); define("paper-progress", ["html!bower_components/paper-progress/paper-progress.html"]); define("paper-input", ["html!bower_components/paper-input/paper-input.html"]); @@ -1968,6 +1968,14 @@ var AppInfo = {}; }); } + function getRequirePromise(deps) { + + return new Promise(function (resolve, reject) { + + require(deps, resolve); + }); + } + function initAfterDependencies(promiseResolve) { var drawer = document.querySelector('.mainDrawerPanel'); @@ -1991,20 +1999,13 @@ var AppInfo = {}; require(['cordova/android/logging']); } - deps.push('scripts/librarybrowser'); deps.push('appstorage'); deps.push('scripts/mediaplayer'); deps.push('scripts/appsettings'); deps.push('apiclient/apiclient'); deps.push('apiclient/connectionmanager'); - deps.push('apiclient/deferred'); deps.push('apiclient/credentials'); - deps.push('thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js'); - - deps.push('paper-button'); - deps.push('paper-icon-button'); - require(deps, function () { // TODO: This needs to be deprecated, but it's used heavily @@ -2044,11 +2045,21 @@ var AppInfo = {}; capabilities.DeviceProfile = MediaPlayer.getDeviceProfile(Math.max(screen.height, screen.width)); + var promises = []; deps = []; - deps.push(Globalize.ensure()); - deps.push(createConnectionManager(capabilities)); + deps.push('thirdparty/jquery.unveil-custom.js'); + deps.push('html!thirdparty/emby-icons.html'); + deps.push('paper-icon-button'); + deps.push('paper-button'); + deps.push('thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js'); + deps.push('scripts/librarybrowser'); + promises.push(getRequirePromise(deps)); - Promise.all(deps).then(function () { + promises.push(Globalize.ensure()); + promises.push(createConnectionManager(capabilities)); + + + Promise.all(promises).then(function () { document.title = Globalize.translateDocument(document.title, 'html'); @@ -2142,11 +2153,11 @@ var AppInfo = {}; deps.push('scripts/search'); deps.push('scripts/librarylist'); deps.push('scripts/alphapicker'); - deps.push('thirdparty/jquery.unveil-custom.js'); deps.push('scripts/playlistmanager'); deps.push('scripts/sync'); deps.push('scripts/backdrops'); deps.push('scripts/librarymenu'); + deps.push('apiclient/deferred'); require(deps, function () { @@ -2197,7 +2208,7 @@ var AppInfo = {}; postInitDependencies.push('scripts/nowplayingbar'); } - //postInitDependencies.push('components/testermessage'); + postInitDependencies.push('components/testermessage'); require(postInitDependencies); }); @@ -2387,7 +2398,6 @@ var AppInfo = {}; function onWebComponentsReady() { var polymerDependencies = []; - polymerDependencies.push('html!thirdparty/emby-icons.html'); require(polymerDependencies, function () { diff --git a/dashboard-ui/thirdparty/jquery.unveil-custom.js b/dashboard-ui/thirdparty/jquery.unveil-custom.js index 0af25ae071..ce5e66414b 100644 --- a/dashboard-ui/thirdparty/jquery.unveil-custom.js +++ b/dashboard-ui/thirdparty/jquery.unveil-custom.js @@ -98,13 +98,6 @@ unveil(); } - function bindEvent(elems, method, name, fn) { - - for (var i = 0, length = elems.length; i < length; i++) { - elems[i][method](name, fn); - } - } - function fillImages(elems) { for (var i = 0, length = elems.length; i < length; i++) {