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

create localStorage abstraction

This commit is contained in:
Luke Pulverenti 2014-07-15 15:16:16 -04:00
parent ecba850f43
commit c5a40e9616
19 changed files with 138 additions and 103 deletions

View file

@ -2,8 +2,8 @@
function loadForm(page, userId, displayPreferences) {
$('#selectThemeSong', page).val(LocalSettings.val('enableThemeSongs', userId) || '').selectmenu("refresh");
$('#selectBackdrop', page).val(LocalSettings.val('enableBackdrops', userId) || '').selectmenu("refresh");
$('#selectThemeSong', page).val(store.getItem('enableThemeSongs', userId) || '').selectmenu("refresh");
$('#selectBackdrop', page).val(store.getItem('enableBackdrops', userId) || '').selectmenu("refresh");
$('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '').selectmenu("refresh");
$('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '').selectmenu("refresh");
@ -15,8 +15,8 @@
function saveUser(page, userId, displayPreferences) {
LocalSettings.val('enableThemeSongs', userId, $('#selectThemeSong', page).val());
LocalSettings.val('enableBackdrops', userId, $('#selectBackdrop', page).val());
store.setItem('enableThemeSongs', userId, $('#selectThemeSong', page).val());
store.setItem('enableBackdrops', userId, $('#selectBackdrop', page).val());
displayPreferences.CustomPrefs.home0 = $('#selectHomeSection1', page).val();
displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val();