From 79be90c700e2cbad52badcddae9e807886f40e47 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 24 Oct 2015 14:07:17 +0200 Subject: [PATCH] Renamed sessionStorage to localStorage. --- .../app/controllers/_settings/area.coffee | 2 +- .../app/lib/app_post/collection.coffee | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_settings/area.coffee b/app/assets/javascripts/app/controllers/_settings/area.coffee index f7ae38654..e31195d6f 100644 --- a/app/assets/javascripts/app/controllers/_settings/area.coffee +++ b/app/assets/javascripts/app/controllers/_settings/area.coffee @@ -16,7 +16,7 @@ class App.SettingsArea extends App.Controller processData: true success: (data, status, xhr) => @stopLoading() - App.Collection.load( localStorage: false, type: 'Setting', data: data ) + App.Collection.load( sessionStorage: false, type: 'Setting', data: data ) @render() ) diff --git a/app/assets/javascripts/app/lib/app_post/collection.coffee b/app/assets/javascripts/app/lib/app_post/collection.coffee index 9ca84fad6..20bf5e2b9 100644 --- a/app/assets/javascripts/app/lib/app_post/collection.coffee +++ b/app/assets/javascripts/app/lib/app_post/collection.coffee @@ -46,16 +46,16 @@ class _collectionSingleton extends Spine.Module @resetCollections( data ) # find collections to load - @_loadObjectsFromLocalStore() + @_loadObjectsFromSessionStore() - _loadObjectsFromLocalStore: -> + _loadObjectsFromSessionStore: -> list = App.Store.list() for key in list parts = key.split('::') if parts[0] is 'collection' - data = App.Store.get( key ) - data['type'] = parts[1] - data['localStorage'] = true + data = App.Store.get( key ) + data['type'] = parts[1] + data['sessionStorage'] = true @log 'debug', 'load INIT', data @load( data ) @@ -64,7 +64,7 @@ class _collectionSingleton extends Spine.Module # load assets for type, collection of data @log 'debug', 'resetCollection:trigger', type, collection - @reset( localStorage: data.localStorage, type: type, data: collection ) + @reset( sessionStorage: data.sessionStorage, type: type, data: collection ) reset: (params) -> @@ -87,7 +87,7 @@ class _collectionSingleton extends Spine.Module loadAssets: (assets) -> @log 'debug', 'loadAssets', assets for type, collections of assets - @load( localStorage: false, type: type, data: collections ) + @load( sessionStorage: false, type: type, data: collections ) load: (params) -> @@ -100,14 +100,14 @@ class _collectionSingleton extends Spine.Module @log 'error', 'reset', "no such collection #{params.type}", params return - localStorage = params.localStorage + sessionStorage = params.sessionStorage # load full array once if _.isArray( params.data ) appObject.refresh( params.data ) # remember in store if not already requested from local storage - if !localStorage + if !sessionStorage for object in params.data @localStore( params.type, object ) return @@ -128,7 +128,7 @@ class _collectionSingleton extends Spine.Module appObject.refresh( object ) # remember in store if not already requested from local storage - if !localStorage + if !sessionStorage @localStore( params.type, object) localDelete: (type) ->