mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
minor refactoring and fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b5403e5542
commit
92c90fa466
@ -726,7 +726,7 @@ var CacheActions = actions.Actions({
|
||||
// }) }],
|
||||
//
|
||||
cache: function(title, lister){
|
||||
if(!this.config.cache){
|
||||
if(!(this.config || {}).cache){
|
||||
return lister.call(this)
|
||||
}
|
||||
var cache = this.__cache = this.__cache || {}
|
||||
|
||||
@ -65,19 +65,18 @@ var StoreActions = actions.Actions({
|
||||
// .stores_actions - dict of store-specific actions
|
||||
get stores(){
|
||||
return this.cache('stores', function(d){
|
||||
var res = {}
|
||||
|
||||
this.actions.forEach(function(action){
|
||||
return d ?
|
||||
Object.assign({}, d)
|
||||
: this.actions
|
||||
.reduce(function(res, action){
|
||||
var store = this.getActionAttr(action, 'handle_data_store')
|
||||
res[store]
|
||||
&& console.warn('Multiple handlers for store:', store)
|
||||
if(store){
|
||||
res[store] = action
|
||||
}
|
||||
}.bind(this))
|
||||
|
||||
return res
|
||||
}) },
|
||||
}.bind(this), {}) }) },
|
||||
|
||||
// events...
|
||||
// XXX update signature -- see doc for: .loadStore(..)
|
||||
|
||||
@ -1949,12 +1949,17 @@ var BrowseActionsActions = actions.Actions({
|
||||
getKeys('browseActions!: "'+ p +'"'),
|
||||
].filter(function(e){ return e.trim() != '' }).join(' / '),
|
||||
},
|
||||
// hide dirs containing only hidden stuff...
|
||||
// XXX this will only check statically hidden stuff...
|
||||
// ...the rest may still get dynamically hidden...
|
||||
hidden: options.no_hidden ?
|
||||
false
|
||||
// hide dirs containing only (statically)
|
||||
// hidden items...
|
||||
// NOTE: we are not checking browseMode
|
||||
// of other items actively here at
|
||||
// this point to avoid side-effects...
|
||||
: Object.keys(cur[key])
|
||||
// XXX we still need to check browseMode of each child...
|
||||
.filter(function(k){
|
||||
return (cur[key][k] || [])[1] != 'hidden' })
|
||||
.length == 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user