Uses angular-locker to store settings in localStorage
- settings.js now has its own module : 'jamstash.settings.controller'. This makes it easier to test it and identify what dependencies it has. - Renames 'jamstash.settings' module into 'jamstash.settings.service' - Adds an angular constant to hold the current Jamstash version in app.js. - Adds a way to upgrade incrementally what was in localStorage : in 4.4.5, DefaultSearchType will no longer be an object but an int, so we must init it with an int value, otherwise a blank option will be displayed. We detect what version we are using and what version was stored using persistence-service.js and run the upgrade accordingly. - Refactors almost completely persistence-service_test.js - Unit-tests some of settings.js's methods.
This commit is contained in:
parent
f98740d613
commit
a97e5159bc
17 changed files with 383 additions and 150 deletions
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Provides generally useful functions, like sorts, date-related functions, localStorage access, etc.
|
||||
*/
|
||||
angular.module('jamstash.utils', ['jamstash.settings'])
|
||||
angular.module('jamstash.utils', ['jamstash.settings.service'])
|
||||
|
||||
.service('utils', ['$rootScope', 'globals', function ($rootScope, globals) {
|
||||
'use strict';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue