mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-30 23:15:14 -04:00
Update options.
This commit is contained in:
parent
2d54c23a2c
commit
0022264a8e
3 changed files with 48 additions and 37 deletions
|
@ -2,6 +2,7 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/s
|
|||
|
||||
var settings = _.extend({
|
||||
enabled: false,
|
||||
show: true,
|
||||
maxSubfolders: 50
|
||||
}, allsettings.tree);
|
||||
var template =
|
||||
|
@ -192,8 +193,10 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/s
|
|||
ev.preventDefault();
|
||||
});
|
||||
|
||||
// ensure stored value is boolean, default to true
|
||||
store.put(storekey, store.get(storekey) !== false);
|
||||
// ensure stored value is boolean, otherwise set default
|
||||
if (typeof(store.get(storekey)) !== 'boolean') {
|
||||
store.put(storekey, settings.show);
|
||||
}
|
||||
updateSettings();
|
||||
|
||||
event.sub('location.changed', onLocationChanged);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue