diff --git a/dashboard-ui/bower_components/iron-media-query/.bower.json b/dashboard-ui/bower_components/iron-media-query/.bower.json new file mode 100644 index 0000000000..ce3268073c --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/.bower.json @@ -0,0 +1,40 @@ +{ + "name": "iron-media-query", + "version": "1.0.2", + "description": "Lets you bind to a CSS media query", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "media" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-media-query" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/iron-media-query", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "web-component-tester": "*", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "34abf0a3b8bf9e9e478352dbb3d9e6a76bf3669a" + }, + "_source": "git://github.com/PolymerElements/iron-media-query.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/iron-media-query" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-media-query/.gitignore b/dashboard-ui/bower_components/iron-media-query/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-media-query/bower.json b/dashboard-ui/bower_components/iron-media-query/bower.json new file mode 100644 index 0000000000..48c342af80 --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/bower.json @@ -0,0 +1,31 @@ +{ + "name": "iron-media-query", + "version": "1.0.2", + "description": "Lets you bind to a CSS media query", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "media" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-media-query" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/iron-media-query", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "web-component-tester": "*", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-media-query/demo/index.html b/dashboard-ui/bower_components/iron-media-query/demo/index.html new file mode 100644 index 0000000000..2f3856fe9e --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/demo/index.html @@ -0,0 +1,45 @@ + + + + + + iron-media-query demo + + + + + + + + + + + + + +
+

<iron-media-query>

+ + +
+ + + diff --git a/dashboard-ui/bower_components/iron-media-query/hero.svg b/dashboard-ui/bower_components/iron-media-query/hero.svg new file mode 100644 index 0000000000..9b5e2a615a --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/hero.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-media-query/index.html b/dashboard-ui/bower_components/iron-media-query/index.html new file mode 100644 index 0000000000..7aee5c1a2c --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/index.html @@ -0,0 +1,29 @@ + + + + + + + + + iron-media-query + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-media-query/iron-media-query.html b/dashboard-ui/bower_components/iron-media-query/iron-media-query.html new file mode 100644 index 0000000000..8325eb2f7f --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/iron-media-query.html @@ -0,0 +1,77 @@ + + + + + + + diff --git a/dashboard-ui/bower_components/iron-media-query/test/basic.html b/dashboard-ui/bower_components/iron-media-query/test/basic.html new file mode 100644 index 0000000000..34346c290d --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/test/basic.html @@ -0,0 +1,71 @@ + + + + + + + iron-media-query-basic + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-media-query/test/index.html b/dashboard-ui/bower_components/iron-media-query/test/index.html new file mode 100644 index 0000000000..7baa57f6df --- /dev/null +++ b/dashboard-ui/bower_components/iron-media-query/test/index.html @@ -0,0 +1,30 @@ + + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/.bower.json b/dashboard-ui/bower_components/paper-drawer-panel/.bower.json new file mode 100644 index 0000000000..44bb924e3b --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/.bower.json @@ -0,0 +1,43 @@ +{ + "name": "paper-drawer-panel", + "version": "1.0.2", + "description": "A responsive drawer panel", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "drawer", + "responsive", + "layout" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-drawer-panel.git" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-drawer-panel", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-selector": "PolymerElements/iron-selector#^1.0.0", + "iron-media-query": "PolymerElements/iron-media-query#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "691739c877914f7231eaca16b724bdca295dfe8d" + }, + "_source": "git://github.com/PolymerElements/paper-drawer-panel.git", + "_target": "~1.0.2", + "_originalSource": "PolymerElements/paper-drawer-panel", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-drawer-panel/.gitignore b/dashboard-ui/bower_components/paper-drawer-panel/.gitignore new file mode 100644 index 0000000000..fbe05fc93b --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/.gitignore @@ -0,0 +1 @@ +bower_components/ diff --git a/dashboard-ui/bower_components/paper-drawer-panel/bower.json b/dashboard-ui/bower_components/paper-drawer-panel/bower.json new file mode 100644 index 0000000000..f87cca9340 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/bower.json @@ -0,0 +1,33 @@ +{ + "name": "paper-drawer-panel", + "version": "1.0.2", + "description": "A responsive drawer panel", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "drawer", + "responsive", + "layout" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-drawer-panel.git" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-drawer-panel", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-selector": "PolymerElements/iron-selector#^1.0.0", + "iron-media-query": "PolymerElements/iron-media-query#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html b/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html new file mode 100644 index 0000000000..f69df9fb3c --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html @@ -0,0 +1,85 @@ + + + + + paper-drawer-panel demo + + + + + + + + + + + + + + + + + + + +
+
+
+ flip drawer +
+
+ toggle drawer +
+
+
+ + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/hero.svg b/dashboard-ui/bower_components/paper-drawer-panel/hero.svg new file mode 100644 index 0000000000..5dfef365d9 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/hero.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/index.html b/dashboard-ui/bower_components/paper-drawer-panel/index.html new file mode 100644 index 0000000000..1390eccff0 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/index.html @@ -0,0 +1,29 @@ + + + + + + + + + paper-drawer-panel + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css new file mode 100644 index 0000000000..ab7c568efc --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css @@ -0,0 +1,142 @@ +/** +@license +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 +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 +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 + +*/ +:host { + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: hidden; +} + +iron-selector > #drawer { + position: absolute; + top: 0; + left: 0; + height: 100%; + background-color: white; + will-change: transform; + box-sizing: border-box; + -moz-box-sizing: border-box; + + @apply(--paper-drawer-panel-drawer-container); +} + +.transition > #drawer { + transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s; + transition: transform ease-in-out 0.3s, width ease-in-out 0.3s; +} + +.left-drawer > #drawer { + @apply(--paper-drawer-panel-left-drawer-container); +} + +.right-drawer > #drawer { + left: auto; + right: 0; + + @apply(--paper-drawer-panel-right-drawer-container); +} + +iron-selector > #main { + position: absolute; + top: 0; + right: 0; + bottom: 0; + + @apply(--paper-drawer-panel-main-container); +} + +.transition > #main { + transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; +} + +.right-drawer > #main { + left: 0; +} + +.right-drawer.transition > #main { + transition: right ease-in-out 0.3s, padding ease-in-out 0.3s; +} + +#main > ::content > [main] { + height: 100%; +} + +#drawer > ::content > [drawer] { + height: 100%; +} + +#scrim { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + visibility: hidden; + opacity: 0; + transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s; + background-color: rgba(0, 0, 0, 0.3); +} + +.narrow-layout > #drawer.iron-selected { + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); +} + +.right-drawer.narrow-layout > #drawer.iron-selected { + box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15); +} + +.narrow-layout > #drawer > ::content > [drawer] { + border: 0; +} + +.left-drawer.narrow-layout > #drawer:not(.iron-selected) { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} + +.right-drawer.narrow-layout > #drawer:not(.iron-selected) { + left: auto; + -webkit-transform: translateX(100%); + transform: translateX(100%); +} + +.narrow-layout > #main { + left: 0 !important; + padding: 0; +} + +.right-drawer.narrow-layout > #main { + left: 0; + right: 0; + padding: 0; +} + +.narrow-layout > #main:not(.iron-selected) > #scrim, +.dragging > #main > #scrim { + visibility: visible; + opacity: var(--paper-drawer-panel-scrim-opacity, 1); +} + +.narrow-layout > #main > * { + margin: 0; + min-height: 100%; + left: 0; + right: 0; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { + display: none; +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html new file mode 100644 index 0000000000..148cfeb1c2 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html @@ -0,0 +1,591 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 0e2994d71b..62b55c1025 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -25,14 +25,10 @@ } .backdropContainer { - position: fixed; - top: 0; - right: 0; - left: 0; - bottom: 0; background-repeat: no-repeat; background-position: center center; background-size: cover; + background-attachment: fixed; } .libraryPage .header { diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index b4b7757ad3..92a42c81f6 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -244,9 +244,9 @@ border-bottom: 5px solid transparent; } -.libraryViewNav a:not(.ui-btn-active):hover { - color: #2ad !important; -} + .libraryViewNav a:not(.ui-btn-active):hover { + color: #2ad !important; + } @media all and (max-width: 500px) { @@ -287,4 +287,4 @@ .libraryDocument .dashboardMenuButton { display: none !important; -} +} \ No newline at end of file diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 3f253695fe..ad8ff342da 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -288,11 +288,6 @@ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } -/* Prevent white flickering */ -html, body { - background-color: #1f1f1f; -} - /* For some reason jquery mobile 1.4.5 wants to horitontally pad mini form fields. */ .ui-mini { margin-left: 0; @@ -307,12 +302,17 @@ html, body { html { -ms-touch-action: manipulation; touch-action: manipulation; + /* Prevent white flickering */ + background-color: #1f1f1f; } body { overflow-y: scroll !important; font-size: 13px; font-family: Roboto, Arial, Helvetica, sans-serif; + -webkit-overflow-scrolling: touch; + /* Remove the white default from jqm */ + background-color: transparent !important; } .bodyWithPopupOpen { diff --git a/dashboard-ui/itembynamedetails.html b/dashboard-ui/itembynamedetails.html index 18e672fcbd..a164987d37 100644 --- a/dashboard-ui/itembynamedetails.html +++ b/dashboard-ui/itembynamedetails.html @@ -136,18 +136,18 @@
- - ${ButtonSync} - + ${ButtonPlay} + ${ButtonSync} +
- - ${ButtonSync} - + ${ButtonPlay} + ${ButtonSync} +

diff --git a/dashboard-ui/livetvchannel.html b/dashboard-ui/livetvchannel.html index 2f26c7b797..e1eba2d366 100644 --- a/dashboard-ui/livetvchannel.html +++ b/dashboard-ui/livetvchannel.html @@ -4,7 +4,7 @@ Emby -
+
info${TabSuggestions} grid_on${TabGuide} @@ -28,10 +28,10 @@
diff --git a/dashboard-ui/livetvprogram.html b/dashboard-ui/livetvprogram.html index 400da208bf..5c975dd718 100644 --- a/dashboard-ui/livetvprogram.html +++ b/dashboard-ui/livetvprogram.html @@ -39,13 +39,13 @@
diff --git a/dashboard-ui/livetvrecording.html b/dashboard-ui/livetvrecording.html index dc7417d0ca..10b63db886 100644 --- a/dashboard-ui/livetvrecording.html +++ b/dashboard-ui/livetvrecording.html @@ -4,7 +4,7 @@ Emby -
+
- ${ButtonSync} + ${ButtonSync}
diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js index d167ed665b..cc2d0082ab 100644 --- a/dashboard-ui/scripts/actionsheet.js +++ b/dashboard-ui/scripts/actionsheet.js @@ -15,7 +15,11 @@ var style = ""; - if (options.positionTo) { + var windowHeight = $(window).height(); + + // If the window height is under a certain amount, don't bother trying to position + // based on an element. + if (options.positionTo && windowHeight > 600) { var pos = $(options.positionTo).offset(); @@ -27,7 +31,7 @@ pos.left -= 24; // Account for popup size - we can't predict this yet so just estimate - pos.top -= 100; + pos.top -= (55 * options.items.length) / 2; pos.left -= 80; // Account for scroll position @@ -53,7 +57,13 @@ html += ''; } - html += ''; + // There seems to be a bug with this in safari causing it to immediately roll up to 0 height + var isScrollable = !$.browser.safari; + + if (isScrollable) { + html += ''; + } + for (var i = 0, length = options.items.length; i < length; i++) { var option = options.items[i]; @@ -67,7 +77,7 @@ html += ''; } - html += ''; + //html += ''; if (options.showCancel) { html += '
'; @@ -75,16 +85,18 @@ html += '
'; } - html += ''; + if (isScrollable) { + html += ''; + } - $(html).appendTo(document.body); + $(document.body).append(html); setTimeout(function () { var dlg = document.getElementById(id); dlg.open(); // Has to be assigned a z-index after the call to .open() - $(dlg).css('z-index', '999999').on('iron-overlay-closed', onClosed); + $(dlg).on('iron-overlay-closed', onClosed); $('.btnOption', dlg).on('click', function () { diff --git a/dashboard-ui/scripts/autoorganizelog.js b/dashboard-ui/scripts/autoorganizelog.js index d6d78e6323..e509bac735 100644 --- a/dashboard-ui/scripts/autoorganizelog.js +++ b/dashboard-ui/scripts/autoorganizelog.js @@ -368,7 +368,7 @@ $(ApiClient).on("websocketmessage.autoorganizelog", onWebSocketMessage); - }).on('pagehide', "#libraryFileOrganizerLogPage", function () { + }).on('pagebeforehide', "#libraryFileOrganizerLogPage", function () { var page = this; diff --git a/dashboard-ui/scripts/backdrops.js b/dashboard-ui/scripts/backdrops.js index 646a781c2a..019ac14664 100644 --- a/dashboard-ui/scripts/backdrops.js +++ b/dashboard-ui/scripts/backdrops.js @@ -2,14 +2,14 @@ function getElement() { - var elem = $('.backdropContainer'); + //var elem = $('.backdropContainer'); - if (!elem.length) { + //if (!elem.length) { - elem = $('
').prependTo(document.body); - } + // elem = $('
').prependTo(document.body); + //} - return elem; + return $(document.documentElement).addClass('backdropContainer'); } function getRandom(min, max) { @@ -112,7 +112,7 @@ function clearBackdrop() { - $('.backdropContainer').css('backgroundImage', ''); + $('.backdropContainer').css('backgroundImage', '').removeClass('backdropContainer'); } function isEnabledByDefault() { @@ -122,12 +122,6 @@ return false; } - // It flickers too much in IE - if ($.browser.msie) { - - return false; - } - if ($.browser.android && AppInfo.isNativeApp) { return screen.availWidth >= 1200; } diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 4b5e2cf274..cee52bf056 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -1009,7 +1009,7 @@ } }; -$(document).on('pageshowready', "#dashboardPage", DashboardPage.onPageShow).on('pagehide', "#dashboardPage", DashboardPage.onPageHide); +$(document).on('pageshowready', "#dashboardPage", DashboardPage.onPageShow).on('pagebeforehide', "#dashboardPage", DashboardPage.onPageHide); (function ($, document, window) { diff --git a/dashboard-ui/scripts/editcollectionitems.js b/dashboard-ui/scripts/editcollectionitems.js index 567e0eb23f..e5f897ceae 100644 --- a/dashboard-ui/scripts/editcollectionitems.js +++ b/dashboard-ui/scripts/editcollectionitems.js @@ -289,7 +289,7 @@ $("#txtLookupName").focus().select(); }); - }).on('pagehide', "#editCollectionTitlesPage", function () { + }).on('pagebeforehide', "#editCollectionTitlesPage", function () { var page = this; diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js index 561fe709f8..6e5b52901b 100644 --- a/dashboard-ui/scripts/edititemimages.js +++ b/dashboard-ui/scripts/edititemimages.js @@ -596,7 +596,7 @@ return false; }); - }).on('pagehide', "#editItemImagesPage", function () { + }).on('pagebeforehide', "#editItemImagesPage", function () { var page = this; diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 592d62bda9..7ebf40ffed 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -1462,7 +1462,7 @@ } }); - }).on('pagehide', "#editItemMetadataPage", function () { + }).on('pagebeforehide', "#editItemMetadataPage", function () { var page = this; $(LibraryBrowser).off('itemdeleting.editor'); diff --git a/dashboard-ui/scripts/edititemsubtitles.js b/dashboard-ui/scripts/edititemsubtitles.js index e1812d763c..49b2308f5a 100644 --- a/dashboard-ui/scripts/edititemsubtitles.js +++ b/dashboard-ui/scripts/edititemsubtitles.js @@ -343,7 +343,7 @@ $(ApiClient).on("websocketmessage", onWebSocketMessageReceived); - }).on('pagehide', "#editItemSubtitlesPage", function () { + }).on('pagebeforehide', "#editItemSubtitlesPage", function () { var page = this; diff --git a/dashboard-ui/scripts/homelatest.js b/dashboard-ui/scripts/homelatest.js index 24cd2a692e..059ac32545 100644 --- a/dashboard-ui/scripts/homelatest.js +++ b/dashboard-ui/scripts/homelatest.js @@ -23,9 +23,16 @@ var latestMediElem = $('.section0', page); - Sections.loadRecentlyAdded(latestMediElem, user, context); - Sections.loadLatestLiveTvRecordings($(".section1", page), userId); - Sections.loadLatestChannelItems($(".section2", page), userId); + Dashboard.showLoadingMsg(); + var promises = []; + + promises.push(Sections.loadRecentlyAdded(latestMediElem, user, context)); + promises.push(Sections.loadLatestLiveTvRecordings($(".section1", page), userId)); + promises.push(Sections.loadLatestChannelItems($(".section2", page), userId)); + + $.when(promises).done(function() { + Dashboard.hideLoadingMsg(); + }); } $(document).on('pagebeforeshowready', "#homeLatestPage", function () { diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index 8f3e42c26e..0f12ba395d 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -77,9 +77,9 @@ Dashboard.getCurrentUser().done(function (user) { if (MediaController.canPlay(item)) { - $('.btnPlay', page).show(); + $('.btnPlay', page).visible(true); } else { - $('.btnPlay', page).hide(); + $('.btnPlay', page).visible(false); } if (SyncManager.isAvailable(item, user)) { @@ -93,9 +93,9 @@ $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, editImagesHref, true)); if (LibraryBrowser.getMoreCommands(item, user).length) { - $('.btnMoreCommands', page).show(); + $('.btnMoreCommands', page).visible(true); } else { - $('.btnMoreCommands', page).show(); + $('.btnMoreCommands', page).visible(false); } }); @@ -593,7 +593,7 @@ reload(page); - }).on('pagehide', "#itemByNameDetailPage", function () { + }).on('pagebeforehide', "#itemByNameDetailPage", function () { currentItem = null; }); diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index dcfe93b172..c7ea2522aa 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1664,7 +1664,7 @@ } }); - }).on('pagehide', "#itemDetailPage", function () { + }).on('pagebeforehide', "#itemDetailPage", function () { $(LibraryBrowser).off('itemdeleting.detailpage'); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index a132d773cc..602e904234 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -270,7 +270,7 @@ updateFilterControls(page); - }).on('pagehide', "#itemListPage", function () { + }).on('pagebeforehide', "#itemListPage", function () { currentItem = null; diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 6faf7e0a93..efe9a18caf 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -185,169 +185,6 @@ return false; } - function onAddToCollectionButtonClick() { - - var id = this.getAttribute('data-itemid'); - - closeContextMenu(); - - BoxSetEditor.showPanel([id]); - - return false; - } - - function onAddToPlaylistButtonClick() { - - var id = this.getAttribute('data-itemid'); - - closeContextMenu(); - - PlaylistManager.showPanel([id]); - - return false; - } - - function onShuffleButtonClick() { - - var id = this.getAttribute('data-itemid'); - - MediaController.shuffle(id); - - closeContextMenu(); - - return false; - } - - function onInstantMixButtonClick() { - - var id = this.getAttribute('data-itemid'); - - MediaController.instantMix(id); - - closeContextMenu(); - - return false; - } - - function onQueueButtonClick() { - - var id = this.getAttribute('data-itemid'); - - MediaController.queue(id); - - closeContextMenu(); - - return false; - } - - function onPlayButtonClick() { - - var id = this.getAttribute('data-itemid'); - - MediaController.play(id); - - closeContextMenu(); - - return false; - } - - function onDeleteButtonClick() { - - var id = this.getAttribute('data-itemid'); - - closeContextMenu(); - - LibraryBrowser.deleteItem(id); - - return false; - } - - function onSyncButtonClick() { - - var id = this.getAttribute('data-itemid'); - - closeContextMenu(); - - SyncManager.showMenu({ - items: [ - { - Id: id - }] - }); - - return false; - } - - function onExternalPlayerButtonClick() { - - closeContextMenu(); - - var id = this.getAttribute('data-itemid'); - - LibraryBrowser.playInExternalPlayer(id); - - return false; - } - - function onPlayAllFromHereButtonClick() { - - var index = this.getAttribute('data-index'); - - var page = $(this).parents('.page'); - - var itemsContainer = $('.hasContextMenu', page).parents('.itemsContainer'); - - closeContextMenu(); - - itemsContainer.trigger('playallfromhere', [index]); - - return false; - } - - function onQueueAllFromHereButtonClick() { - - var index = this.getAttribute('data-index'); - - var page = $(this).parents('.page'); - - var itemsContainer = $('.hasContextMenu', page).parents('.itemsContainer'); - - closeContextMenu(); - - itemsContainer.trigger('queueallfromhere', [index]); - - return false; - } - - function onRemoveFromPlaylistButtonClick() { - - var playlistItemId = this.getAttribute('data-playlistitemid'); - - var page = $(this).parents('.page'); - - var itemsContainer = $('.hasContextMenu', page).parents('.itemsContainer'); - - itemsContainer.trigger('removefromplaylist', [playlistItemId]); - - closeContextMenu(); - - return false; - } - - function onResumeButtonClick() { - - var id = this.getAttribute('data-itemid'); - - MediaController.play({ - ids: [id], - startPositionTicks: parseInt(this.getAttribute('data-ticks')) - }); - - closeContextMenu(); - - return false; - } - function onCardTapHold(e) { showContextMenu(this, {}); @@ -379,116 +216,256 @@ var albumid = card.getAttribute('data-albumid'); var artistid = card.getAttribute('data-artistid'); - $(card).addClass('hasContextMenu'); - Dashboard.getCurrentUser().done(function (user) { - var html = '
'; - - html += ''; + var href = card.getAttribute('data-href') || card.href || $('a', card).attr('href'); - html += '
'; + require(['actionsheet'], function () { - $($.mobile.activePage).append(html); + ActionSheetElement.show({ + items: items, + positionTo: displayContextItem, + callback: function (id) { - var elem = $('.tapHoldMenu').popup({ positionTo: displayContextItem }).trigger('create').popup("open").on("popupafterclose", function () { + switch (id) { + + case 'addtocollection': + BoxSetEditor.showPanel([itemId]); + break; + case 'playlist': + PlaylistManager.showPanel([itemId]); + break; + case 'delete': + LibraryBrowser.deleteItem(itemId); + break; + case 'download': + { + var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", { + api_key: ApiClient.accessToken() + }); + window.location.href = downloadHref; + + break; + } + case 'edit': + Dashboard.navigate('edititemmetadata.html?id=' + itemId); + break; + case 'refresh': + ApiClient.refreshItem(itemId, { + + Recursive: true, + ImageRefreshMode: 'FullRefresh', + MetadataRefreshMode: 'FullRefresh', + ReplaceAllImages: false, + ReplaceAllMetadata: true + }); + break; + case 'instantmix': + MediaController.instantMix(itemId); + break; + case 'shuffle': + MediaController.shuffle(itemId); + break; + case 'open': + Dashboard.navigate(href); + break; + case 'album': + Dashboard.navigate('itemdetails.html?id=' + albumid); + break; + case 'artist': + Dashboard.navigate('tembynamedetails.html?context=music&id=' + artistid); + break; + case 'play': + MediaController.MediaController(itemId); + break; + case 'playallfromhere': + $(card).parents('.itemsContainer').trigger('playallfromhere', [index]); + break; + case 'queue': + MediaController.queue(itemId); + break; + case 'trailer': + ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), itemId).done(function (trailers) { + MediaController.play({ items: trailers }); + }); + break; + case 'resume': + MediaController.play({ + ids: [itemId], + startPositionTicks: playbackPositionTicks + }); + break; + case 'queueallfromhere': + $(card).parents('.itemsContainer').trigger('queueallfromhere', [index]); + break; + case 'sync': + SyncManager.showMenu({ + items: [ + { + Id: itemId + }] + }); + break; + case 'externalplayer': + LibraryBrowser.playInExternalPlayer(itemId); + break; + case 'removefromplaylist': + $(card).parents('.itemsContainer').trigger('removefromplaylist', [playlistItemId]); + break; + default: + break; + } + } + }); - $(this).off("popupafterclose").remove(); - $(card).removeClass('hasContextMenu'); }); - - $('.btnPlay', elem).on('click', onPlayButtonClick); - $('.btnResume', elem).on('click', onResumeButtonClick); - $('.btnQueue', elem).on('click', onQueueButtonClick); - $('.btnInstantMix', elem).on('click', onInstantMixButtonClick); - $('.btnShuffle', elem).on('click', onShuffleButtonClick); - $('.btnPlayTrailer', elem).on('click', onTrailerButtonClick); - $('.btnAddToPlaylist', elem).on('click', onAddToPlaylistButtonClick); - $('.btnRemoveFromPlaylist', elem).on('click', onRemoveFromPlaylistButtonClick); - $('.btnPlayAllFromHere', elem).on('click', onPlayAllFromHereButtonClick); - $('.btnQueueAllFromHere', elem).on('click', onQueueAllFromHereButtonClick); - $('.btnExternalPlayer', elem).on('click', onExternalPlayerButtonClick); - $('.btnDelete', elem).on('click', onDeleteButtonClick); - $('.btnSync', elem).on('click', onSyncButtonClick); - $('.btnAddToCollection', elem).on('click', onAddToCollectionButtonClick); }); } @@ -506,8 +483,6 @@ var itemId = card.getAttribute('data-itemid'); var context = card.getAttribute('data-context'); - $(card).addClass('hasContextMenu'); - var userId = Dashboard.getCurrentUserId(); var options = { @@ -816,10 +791,6 @@ elem = $('a', elem)[0]; - if ($(elem).hasClass('hasContextMenu')) { - return; - } - if ($('.itemSelectionPanel:visible', elem).length) { return; } diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 8b7056eb0d..20be1c8e31 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -675,7 +675,7 @@ onPageShowDocumentReady(page); - }).on('pagehide', ".page", function () { + }).on('pagebeforehide', ".page", function () { if (addNextToBackStack) { var text = $('.libraryMenuButtonText').text() || document.title; @@ -685,8 +685,6 @@ addNextToBackStack = true; - }).on('pagebeforehide', ".page", function () { - $('.headroomEnabled').addClass('headroomDisabled'); }); diff --git a/dashboard-ui/scripts/librarypathmapping.js b/dashboard-ui/scripts/librarypathmapping.js index 0bba54ecfb..0146651035 100644 --- a/dashboard-ui/scripts/librarypathmapping.js +++ b/dashboard-ui/scripts/librarypathmapping.js @@ -129,7 +129,7 @@ }); - }).on('pagehide', "#libraryPathMappingPage", function () { + }).on('pagebeforehide', "#libraryPathMappingPage", function () { currentConfig = null; diff --git a/dashboard-ui/scripts/livetvchannel.js b/dashboard-ui/scripts/livetvchannel.js index ebbca9b4d5..5f1a4f582a 100644 --- a/dashboard-ui/scripts/livetvchannel.js +++ b/dashboard-ui/scripts/livetvchannel.js @@ -166,12 +166,12 @@ var page = this; - $('#btnPlay', page).on('click', function () { + $('.btnPlay', page).on('click', function () { var userdata = currentItem.UserData || {}; LibraryBrowser.showPlayMenu(null, currentItem.Id, currentItem.Type, false, currentItem.MediaType, userdata.PlaybackPositionTicks); }); - $('#btnEdit', page).on('click', function () { + $('.btnEdit', page).on('click', function () { Dashboard.navigate("edititemmetadata.html?channelid=" + currentItem.Id); }); @@ -182,7 +182,7 @@ reload(page); - }).on('pagehide', "#liveTvChannelPage", function () { + }).on('pagebeforehide', "#liveTvChannelPage", function () { currentItem = null; programs = null; diff --git a/dashboard-ui/scripts/livetvnewrecording.js b/dashboard-ui/scripts/livetvnewrecording.js index 692a3d14fa..0218ed5801 100644 --- a/dashboard-ui/scripts/livetvnewrecording.js +++ b/dashboard-ui/scripts/livetvnewrecording.js @@ -175,7 +175,7 @@ reload(page); - }).on('pagehide', "#liveTvNewRecordingPage", function () { + }).on('pagebeforehide', "#liveTvNewRecordingPage", function () { currentProgram = null; diff --git a/dashboard-ui/scripts/livetvprogram.js b/dashboard-ui/scripts/livetvprogram.js index 7df553ce31..6d5e99d8be 100644 --- a/dashboard-ui/scripts/livetvprogram.js +++ b/dashboard-ui/scripts/livetvprogram.js @@ -98,7 +98,7 @@ var page = this; - $('#btnRecord', page).on('click', function() { + $('.btnRecord', page).on('click', function() { var id = getParameterByName('id'); @@ -106,7 +106,7 @@ }); - $('#btnPlay', page).on('click', function () { + $('.btnPlay', page).on('click', function () { ApiClient.getLiveTvChannel(currentItem.ChannelId, Dashboard.getCurrentUserId()).done(function (channel) { @@ -116,7 +116,7 @@ }); }); - $('#btnCancelRecording', page).on('click', function () { + $('.btnCancelRecording', page).on('click', function () { deleteTimer(page, currentItem.TimerId); }); @@ -127,7 +127,7 @@ reload(page); - }).on('pagehide', "#liveTvProgramPage", function () { + }).on('pagebeforehide', "#liveTvProgramPage", function () { currentItem = null; }); diff --git a/dashboard-ui/scripts/livetvrecording.js b/dashboard-ui/scripts/livetvrecording.js index cb9ec7c1c5..fa6d62591d 100644 --- a/dashboard-ui/scripts/livetvrecording.js +++ b/dashboard-ui/scripts/livetvrecording.js @@ -106,8 +106,8 @@ var page = this; - $('#btnDelete', page).on('click', deleteRecording); - $('#btnPlay', page).on('click', play); + $('.btnDelete', page).on('click', deleteRecording); + $('.btnPlay', page).on('click', play); $('.btnSync', page).on('click', function () { @@ -122,7 +122,7 @@ reload(page); - }).on('pagehide', "#liveTvRecordingPage", function () { + }).on('pagebeforehide', "#liveTvRecordingPage", function () { currentItem = null; }); diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js index 5c57d49c87..165645abe5 100644 --- a/dashboard-ui/scripts/livetvseriestimer.js +++ b/dashboard-ui/scripts/livetvseriestimer.js @@ -285,7 +285,7 @@ reload(page); - }).on('pagehide', "#liveTvSeriesTimerPage", function () { + }).on('pagebeforehide', "#liveTvSeriesTimerPage", function () { currentItem = null; }); diff --git a/dashboard-ui/scripts/livetvstatus.js b/dashboard-ui/scripts/livetvstatus.js index 1b84c53bc6..4b4de3fedc 100644 --- a/dashboard-ui/scripts/livetvstatus.js +++ b/dashboard-ui/scripts/livetvstatus.js @@ -190,7 +190,7 @@ taskKey: 'RefreshGuide' }); - }).on('pagehide', "#liveTvStatusPage", function () { + }).on('pagebeforehide', "#liveTvStatusPage", function () { var page = this; diff --git a/dashboard-ui/scripts/livetvtimer.js b/dashboard-ui/scripts/livetvtimer.js index 2d7347f3b3..acde2b74f0 100644 --- a/dashboard-ui/scripts/livetvtimer.js +++ b/dashboard-ui/scripts/livetvtimer.js @@ -121,7 +121,7 @@ reload(page); - }).on('pagehide', "#liveTvTimerPage", function () { + }).on('pagebeforehide', "#liveTvTimerPage", function () { currentItem = null; }); diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index 2a13ef6a3e..e47f611517 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -383,7 +383,7 @@ var WizardLibraryPage = { taskKey: 'RefreshLibrary' }); - }).on('pagehide', "#mediaLibraryPage", function () { + }).on('pagebeforehide', "#mediaLibraryPage", function () { var page = this; diff --git a/dashboard-ui/scripts/mypreferencesdisplay.js b/dashboard-ui/scripts/mypreferencesdisplay.js index f0a6c5ecec..37a5a0c37c 100644 --- a/dashboard-ui/scripts/mypreferencesdisplay.js +++ b/dashboard-ui/scripts/mypreferencesdisplay.js @@ -236,8 +236,7 @@ ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () { Dashboard.alert(Globalize.translate('SettingsSaved')); - loadForm(page, user, false); - + loadForm(page, user); }); } diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js index 9c68a1a504..3d91ec75b1 100644 --- a/dashboard-ui/scripts/nowplayingbar.js +++ b/dashboard-ui/scripts/nowplayingbar.js @@ -29,8 +29,8 @@ html += '
'; // The onclicks are needed due to the return false above - html += ''; - html += ''; + html += ''; + html += ''; html += ''; diff --git a/dashboard-ui/scripts/nowplayingpage.js b/dashboard-ui/scripts/nowplayingpage.js index 3ec6cf54cf..d227ef3d65 100644 --- a/dashboard-ui/scripts/nowplayingpage.js +++ b/dashboard-ui/scripts/nowplayingpage.js @@ -749,7 +749,7 @@ showIntro(); loadPlaylist(page); - }).on('pagehide', "#nowPlayingPage", function () { + }).on('pagebeforehide', "#nowPlayingPage", function () { releaseCurrentPlayer(); diff --git a/dashboard-ui/scripts/scheduledtaskspage.js b/dashboard-ui/scripts/scheduledtaskspage.js index da2c6d587b..76cb0ad5af 100644 --- a/dashboard-ui/scripts/scheduledtaskspage.js +++ b/dashboard-ui/scripts/scheduledtaskspage.js @@ -215,7 +215,7 @@ $(ApiClient).on("websocketmessage", onWebSocketMessage).on("websocketopen", onWebSocketConnectionOpen); - }).on('pagehide', "#scheduledTasksPage", function () { + }).on('pagebeforehide', "#scheduledTasksPage", function () { var page = this; diff --git a/dashboard-ui/scripts/search.js b/dashboard-ui/scripts/search.js index 8a5d697dc5..3a5b969e8d 100644 --- a/dashboard-ui/scripts/search.js +++ b/dashboard-ui/scripts/search.js @@ -239,7 +239,7 @@ }); } - $(document).on('pagehide', ".libraryPage", function () { + $(document).on('pagebeforehide', ".libraryPage", function () { $('#txtSearch', this).val(''); $('#searchHints', this).empty(); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index cfd572976d..a3d7f8f36d 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1661,7 +1661,7 @@ var AppInfo = {}; if (isCordova) { AppInfo.enableBottomTabs = true; AppInfo.cardMargin = 'mediumCardMargin'; - AppInfo.enableSectionTransitions = true; + //AppInfo.enableSectionTransitions = true; } else { if (isMobile) { diff --git a/dashboard-ui/scripts/syncactivity.js b/dashboard-ui/scripts/syncactivity.js index 1cbcf77031..9b956fd3f0 100644 --- a/dashboard-ui/scripts/syncactivity.js +++ b/dashboard-ui/scripts/syncactivity.js @@ -314,7 +314,7 @@ startListening(page); $(ApiClient).on("websocketmessage.syncactivity", onWebSocketMessage); - }).on('pagehide', ".syncActivityPage", function () { + }).on('pagebeforehide', ".syncActivityPage", function () { var page = this; diff --git a/dashboard-ui/scripts/syncjob.js b/dashboard-ui/scripts/syncjob.js index f93620dc5c..3299338fc8 100644 --- a/dashboard-ui/scripts/syncjob.js +++ b/dashboard-ui/scripts/syncjob.js @@ -395,7 +395,7 @@ startListening(page); $(ApiClient).on("websocketmessage.syncJobPage", onWebSocketMessage); - }).on('pagehide', ".syncJobPage", function () { + }).on('pagebeforehide', ".syncJobPage", function () { var page = this; diff --git a/dashboard-ui/thirdparty/emby-icons.html b/dashboard-ui/thirdparty/emby-icons.html index 71a98728c8..fa946ea05a 100644 --- a/dashboard-ui/thirdparty/emby-icons.html +++ b/dashboard-ui/thirdparty/emby-icons.html @@ -38,6 +38,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for + @@ -49,17 +50,20 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for + + + diff --git a/dashboard-ui/thirdparty/jquery.unveil-custom.js b/dashboard-ui/thirdparty/jquery.unveil-custom.js index f53f271b02..c88e275f0c 100644 --- a/dashboard-ui/thirdparty/jquery.unveil-custom.js +++ b/dashboard-ui/thirdparty/jquery.unveil-custom.js @@ -20,7 +20,7 @@ // Need to fix those before this can be set to 0 if (window.AppInfo && AppInfo.isNativeApp && $.browser.safari) { - return 8000; + return 7500; } var screens = $.browser.mobile ? 2.5 : 1; @@ -102,7 +102,7 @@ function setImageIntoElement(elem, url) { - if (elem.tagName === "DIV") { + if (elem.tagName !== "IMG") { elem.style.backgroundImage = "url('" + url + "')"; diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js index 8a5f845cc3..95d435eabd 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js @@ -4903,6 +4903,112 @@ $.fn.grid = function( options ) { $.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + this.name ); }, + slide: function (Velocity) { + + var trans = this; + + if (trans.reverse) { + + $(trans.$from).show().css('left', '0').css('right', '0'); + + Velocity.animate($(trans.$from)[0], { "left": "100%", "right": "-100%" }, + { + easing: "ease-in-out", + duration: 800, + + begin: function (elements, complete, remaining, start, tweenValue) { + + $(trans.$to).show().css('left', '-100%').css('right', '100%'); + + Velocity.animate($(trans.$to)[0], { "left": "0", "right": "0" }, + { + complete: function () { + $(trans.$from).hide(); + trans.toggleViewportClass(); + trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true); + }, + + easing: "ease-in-out", + duration: 800 + + }); + } + + }); + + } else { + + Velocity.animate($(trans.$from)[0], { + "left": "-100%", + "right": "100%" + }, + { + easing: "ease-in-out", + duration: 800, + + begin: function (elements, complete, remaining, start, tweenValue) { + + $(trans.$to).show().css('left', '100%'); + + Velocity.animate($(trans.$to)[0], { "left": "0px" }, + { + complete: function () { + $(trans.$from).hide(); + trans.toggleViewportClass(); + trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true); + }, + + easing: "ease-in-out", + duration: 800 + + }); + } + + }); + + } + }, + + slideUp: function (Velocity) { + + var trans = this; + + if (trans.reverse) { + + $(trans.$to).show(); + + Velocity.animate($(trans.$from)[0], { "top": "100%", bottom: '-100%' }, + { + complete: function () { + $(trans.$from).hide(); + trans.toggleViewportClass(); + trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true); + }, + + easing: "ease-in-out", + duration: 800 + + }); + + } else { + + $(trans.$to).show().css('top', '100%').css('bottom', '-100%'); + + Velocity.animate($(trans.$to)[0], { "top": "0px", bottom: 0 }, + { + complete: function () { + $(trans.$from).hide(); + trans.toggleViewportClass(); + trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true); + }, + + easing: "ease-in-out", + duration: 800 + + }); + } + }, + transition: function() { // NOTE many of these could be calculated/recorded in the constructor, it's my // opinion that binding them as late as possible has value with regards to @@ -4924,11 +5030,25 @@ $.fn.grid = function( options ) { this.toggleViewportClass(); - if ( this.$from && !none ) { - this.startOut( screenHeight, reverseClass, none ); - } else { - this.doneOut( screenHeight, reverseClass, none, true ); - } + if (none) { + if (this.$from && !none) { + this.startOut(screenHeight, reverseClass, none); + } else { + this.doneOut(screenHeight, reverseClass, none, true); + } + } else { + + var trans = this; + + require(["jquery", "velocity"], function (d, Velocity) { + + if (trans.name == 'slideup') { + trans.slideUp(Velocity); + } else { + trans.slide(Velocity); + } + }); + } return this.deferred.promise(); } diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.min.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.min.js index 792e97e7e3..9921b5d000 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.min.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.min.js @@ -1,3 +1,6 @@ -/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */ - -(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,r){"$:nomunge";function l(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var i="hashchange",s=n,o,u=e.event.special,a=s.documentMode,f="on"+i in t&&(a===r||a>7);e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.fn[i].delay=50,u[i]=e.extend(u[i],{setup:function(){if(f)return!1;e(o.start)},teardown:function(){if(f)return!1;e(o.stop)}}),o=function(){function p(){var n=l(),r=h(u);n!==u?(c(u=n,r),e(t).trigger(i)):r!==u&&(location.href=location.href.replace(/#.*/,"")+r),o=setTimeout(p,e.fn[i].delay)}var n={},o,u=l(),a=function(e){return e},c=a,h=a;return n.start=function(){o||p()},n.stop=function(){o&&clearTimeout(o),o=r},t.attachEvent&&!t.addEventListener&&!f&&function(){var t,r;n.start=function(){t||(r=e.fn[i].src,r=r&&r+l(),t=e('