diff --git a/dashboard-ui/scripts/backdrops.js b/dashboard-ui/scripts/backdrops.js index 4df75a91a..9508973b4 100644 --- a/dashboard-ui/scripts/backdrops.js +++ b/dashboard-ui/scripts/backdrops.js @@ -141,7 +141,7 @@ var userId = Dashboard.getCurrentUserId(); - var val = store.getItem('enableBackdrops-' + userId); + var val = appStorage.getItem('enableBackdrops-' + userId); // For bandwidth return val == '1' || (val != '0' && isEnabledByDefault()); diff --git a/dashboard-ui/scripts/connectlogin.js b/dashboard-ui/scripts/connectlogin.js index 333b92499..37800f02c 100644 --- a/dashboard-ui/scripts/connectlogin.js +++ b/dashboard-ui/scripts/connectlogin.js @@ -40,12 +40,12 @@ break; case MediaBrowser.ConnectionState.ServerSignIn: { - Dashboard.navigate('login.html?serverid=' + result.Servers[0].Id); + Dashboard.navigate('login.html?serverid=' + result.Servers[0].Id, false, 'none'); } break; case MediaBrowser.ConnectionState.ServerSelection: { - Dashboard.navigate('selectserver.html'); + Dashboard.navigate('selectserver.html', false, 'none'); } break; case MediaBrowser.ConnectionState.ConnectSignIn: diff --git a/dashboard-ui/scripts/externalplayer.js b/dashboard-ui/scripts/externalplayer.js index afe9a69db..cffa8bbe1 100644 --- a/dashboard-ui/scripts/externalplayer.js +++ b/dashboard-ui/scripts/externalplayer.js @@ -478,4 +478,4 @@ showMenu: showPlayMenu }; -})(window, window.store); \ No newline at end of file +})(window, window.appStorage); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 1f0b0ad7d..bdd29390f 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -2893,4 +2893,4 @@ } }; -})(window, document, jQuery, screen, window.store); \ No newline at end of file +})(window, document, jQuery, screen, window.appStorage); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 69b9af38a..25b8a34db 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -371,7 +371,7 @@ function getTopParentId() { - return getParameterByName('topParentId') /*|| sessionStore.getItem('topParentId')*/ || null; + return getParameterByName('topParentId') || null; } window.LibraryMenu = { diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index eaa0df8aa..0887999b3 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -746,4 +746,4 @@ mirrorIfEnabled(info); }); -})(jQuery, window, window.store); \ No newline at end of file +})(jQuery, window, window.appStorage); \ No newline at end of file diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index c5fa0537d..0ace4e90c 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -1740,4 +1740,4 @@ }); -})(document, setTimeout, clearTimeout, screen, window.store, $, setInterval, window); \ No newline at end of file +})(document, setTimeout, clearTimeout, screen, window.appStorage, $, setInterval, window); \ No newline at end of file diff --git a/dashboard-ui/scripts/mypreferenceswebclient.js b/dashboard-ui/scripts/mypreferenceswebclient.js index 2d4d2c470..d92a9e2fa 100644 --- a/dashboard-ui/scripts/mypreferenceswebclient.js +++ b/dashboard-ui/scripts/mypreferenceswebclient.js @@ -2,7 +2,7 @@ function loadForm(page, userId, displayPreferences) { - var externalPlayers = JSON.parse(store.getItem('externalplayers') || '[]'); + var externalPlayers = JSON.parse(appStorage.getItem('externalplayers') || '[]'); $('#selectMaxBitrate', page).val(AppSettings.maxStreamingBitrate()).selectmenu("refresh"); $('#selectMaxChromecastBitrate', page).val(AppSettings.maxChromecastBitrate()).selectmenu("refresh"); @@ -18,8 +18,8 @@ }).checkboxradio('refresh'); - $('#selectThemeSong', page).val(store.getItem('enableThemeSongs-' + userId) || '').selectmenu("refresh"); - $('#selectBackdrop', page).val(store.getItem('enableBackdrops-' + userId) || '').selectmenu("refresh"); + $('#selectThemeSong', page).val(appStorage.getItem('enableThemeSongs-' + userId) || '').selectmenu("refresh"); + $('#selectBackdrop', page).val(appStorage.getItem('enableBackdrops-' + userId) || '').selectmenu("refresh"); $('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '').selectmenu("refresh"); $('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '').selectmenu("refresh"); @@ -33,8 +33,8 @@ function saveUser(page, userId, displayPreferences) { - store.setItem('enableThemeSongs-' + userId, $('#selectThemeSong', page).val()); - store.setItem('enableBackdrops-' + userId, $('#selectBackdrop', page).val()); + appStorage.setItem('enableThemeSongs-' + userId, $('#selectThemeSong', page).val()); + appStorage.setItem('enableBackdrops-' + userId, $('#selectBackdrop', page).val()); displayPreferences.CustomPrefs.home0 = $('#selectHomeSection1', page).val(); displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val(); @@ -64,7 +64,7 @@ }); - store.setItem('externalplayers', JSON.stringify(externalPlayers)); + appStorage.setItem('externalplayers', JSON.stringify(externalPlayers)); AppSettings.maxStreamingBitrate($('#selectMaxBitrate', page).val()); AppSettings.maxChromecastBitrate($('#selectMaxChromecastBitrate', page).val()); @@ -138,4 +138,4 @@ }; -})(window, window.store); \ No newline at end of file +})(window, window.appStorage); \ No newline at end of file diff --git a/dashboard-ui/scripts/nowplayingpage.js b/dashboard-ui/scripts/nowplayingpage.js index 93b991c61..d8d438569 100644 --- a/dashboard-ui/scripts/nowplayingpage.js +++ b/dashboard-ui/scripts/nowplayingpage.js @@ -633,12 +633,12 @@ var expected = '2'; - if (store.getItem('remotecontrolswipedown') != expected) { + if (appStorage.getItem('remotecontrolswipedown') != expected) { Dashboard.alert({ message: Globalize.translate('MessageSwipeDownOnRemoteControl'), title: Globalize.translate('HeaderAlert') }); - store.setItem('remotecontrolswipedown', expected); + appStorage.setItem('remotecontrolswipedown', expected); } } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index d42cec7bf..a73ee4f21 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -420,7 +420,7 @@ var Dashboard = { return "ConfigurationPage?name=" + encodeURIComponent(name); }, - navigate: function (url, preserveQueryString) { + navigate: function (url, preserveQueryString, transition) { if (!url) { throw new Error('url cannot be null or empty'); @@ -430,7 +430,14 @@ var Dashboard = { if (preserveQueryString && queryString) { url += queryString; } - $.mobile.changePage(url); + + var options = {}; + + if (transition) { + options.transition = transition; + } + + $.mobile.changePage(url, options); }, showLoadingMsg: function () { @@ -1979,7 +1986,7 @@ $(document).on('pagecreate', ".page", function () { } } - if (this.id !== "loginPage" && !page.hasClass('forgotPasswordPage') && !page.hasClass('wizardPage') && !isConnectMode) { + if (!isConnectMode && this.id !== "loginPage" && !page.hasClass('forgotPasswordPage') && !page.hasClass('wizardPage')) { console.log('Not logged into server. Redirecting to login.'); Dashboard.logout(true, true); diff --git a/dashboard-ui/scripts/taskbutton.js b/dashboard-ui/scripts/taskbutton.js index 5aa6cff11..47f139b5f 100644 --- a/dashboard-ui/scripts/taskbutton.js +++ b/dashboard-ui/scripts/taskbutton.js @@ -77,7 +77,7 @@ $.fn.taskButton = function (options) { var key = 'scheduledTaskButton' + options.taskKey; var expectedValue = '4'; - if (store.getItem(key) == expectedValue) { + if (appStorage.getItem(key) == expectedValue) { onScheduledTaskMessageConfirmed(instance, id); } else { @@ -90,7 +90,7 @@ $.fn.taskButton = function (options) { if (result) { - store.setItem(key, expectedValue); + appStorage.setItem(key, expectedValue); onScheduledTaskMessageConfirmed(instance, id); } }); diff --git a/dashboard-ui/scripts/thememediaplayer.js b/dashboard-ui/scripts/thememediaplayer.js index d2e243b8e..4c2844e0e 100644 --- a/dashboard-ui/scripts/thememediaplayer.js +++ b/dashboard-ui/scripts/thememediaplayer.js @@ -44,7 +44,7 @@ var userId = Dashboard.getCurrentUserId(); - var val = store.getItem('enableThemeSongs-' + userId); + var val = appStorage.getItem('enableThemeSongs-' + userId); var localAutoPlayers = MediaController.getPlayers().filter(function (p) { diff --git a/dashboard-ui/thirdparty/apiclient/credentials.js b/dashboard-ui/thirdparty/apiclient/credentials.js index b5cbf47a8..656c52f82 100644 --- a/dashboard-ui/thirdparty/apiclient/credentials.js +++ b/dashboard-ui/thirdparty/apiclient/credentials.js @@ -12,7 +12,7 @@ function ensure() { - credentials = credentials || JSON.parse(store.getItem(key) || '{}'); + credentials = credentials || JSON.parse(appStorage.getItem(key) || '{}'); credentials.servers = credentials.servers || []; } @@ -26,7 +26,7 @@ if (data) { credentials = data; - store.setItem(key, JSON.stringify(data)); + appStorage.setItem(key, JSON.stringify(data)); } else { self.clear(); } @@ -34,7 +34,7 @@ self.clear = function () { credentials = null; - store.removeItem(key); + appStorage.removeItem(key); }; self.credentials = function (data) { diff --git a/dashboard-ui/thirdparty/apiclient/device.js b/dashboard-ui/thirdparty/apiclient/device.js index 2e2afd9d3..8f51acbfb 100644 --- a/dashboard-ui/thirdparty/apiclient/device.js +++ b/dashboard-ui/thirdparty/apiclient/device.js @@ -17,13 +17,13 @@ var randomId = ''; // Since the above is not guaranteed to be unique per device, add a little more - randomId = store.getItem(keyName); + randomId = appStorage.getItem(keyName); if (!randomId) { randomId = new Date().getTime(); - store.setItem(keyName, randomId.toString()); + appStorage.setItem(keyName, randomId.toString()); } keys.push(randomId); diff --git a/dashboard-ui/thirdparty/apiclient/store.js b/dashboard-ui/thirdparty/apiclient/store.js index bcb184c4a..bbe40ac6d 100644 --- a/dashboard-ui/thirdparty/apiclient/store.js +++ b/dashboard-ui/thirdparty/apiclient/store.js @@ -44,7 +44,7 @@ }; } - globalScope.store = new myStore(localStorage); + globalScope.appStorage = new myStore(localStorage); globalScope.sessionStore = new myStore(sessionStorage); })(window, window.localStorage, window.sessionStorage); \ No newline at end of file