2 * Provides methods dealing with localStorage- and memory-store.
4 * Base class for History and Favorites.
6 Ext.define("Docs.LocalStore", {
10 * Initializes store management.
12 * Initializes this.store variable and loads the store if
13 * localStorage available.
16 this.localStorage = ('localStorage' in window && window['localStorage'] !== null);
17 this.store = Ext.getStore(this.storeName);
18 this.localStorage && this.store.load();
22 * Syncs the store with localStorage if possible.
24 syncStore: function() {
25 this.localStorage && this.store.sync();