mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d0de6fbe9d
commit
b8ca5619bf
@ -161,7 +161,7 @@ if(typeof(args2array) != 'function'){
|
||||
// - an action will return the deepest (root) action's return, if that
|
||||
// return is undefined, then the action set is returned instead.
|
||||
//
|
||||
// NOTE: of the root handler is instance of Toggler (jli) and the action
|
||||
// NOTE: if the root handler is instance of Toggler (jli) and the action
|
||||
// is called with '?' as argument, then the toggler will be called
|
||||
// with the argument and return the result bypassing the handlers.
|
||||
// NOTE: actions once defined do not depend on the inheritance hierarchy,
|
||||
|
||||
@ -3197,11 +3197,19 @@ if(window.nodejs != null){
|
||||
|
||||
|
||||
var FileSystemLoaderActions = actions.Actions({
|
||||
// XXX
|
||||
loadPath: ['File/',
|
||||
// NOTE: when passed no path this will not do anything...
|
||||
// XXX should this set something like .path???
|
||||
// ...and how should this be handled when merging indexes or
|
||||
// viewing multiple/clustered indexes???
|
||||
// XXX look inside...
|
||||
loadPath: ['File/Load path',
|
||||
function(path, logger){
|
||||
var that = this
|
||||
|
||||
if(path == null){
|
||||
return
|
||||
}
|
||||
|
||||
// XXX get a logger...
|
||||
logger = logger || this.logger
|
||||
|
||||
@ -3242,7 +3250,6 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
// NOTE: res may contain multiple indexes...
|
||||
for(var k in res){
|
||||
|
||||
|
||||
// skip empty indexes...
|
||||
// XXX should we rebuild or list here???
|
||||
if(res[k].data == null || res[k].images == null){
|
||||
@ -3286,6 +3293,7 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
})
|
||||
|
||||
|
||||
// XXX is this a good name???
|
||||
var FileSystemLoader =
|
||||
module.FileSystemLoader = ImageGridFeatures.Feature({
|
||||
title: '',
|
||||
@ -3305,8 +3313,27 @@ module.FileSystemLoader = ImageGridFeatures.Feature({
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
var FileSystemLoaderUIActions = actions.Actions({
|
||||
// XXX BUG: for some reason this when run from .browseActions(..) loads
|
||||
// incorrectly while when called directly is OK...
|
||||
// NOTE: this is the same as .browsePath(..) if no argument is given.
|
||||
// the difference is how the first (path/base) argument is handled
|
||||
// here it's the path to load (now browser shown) and in
|
||||
// .browsePath(..) it's the base path to start from.
|
||||
// XXX should passing no path to this start browsing from the current
|
||||
// path or from the root?
|
||||
loadPath: ['File/Load path...',
|
||||
function(path, logger){
|
||||
var that = this
|
||||
if(path == null){
|
||||
// XXX should we set a start path here to current???
|
||||
return this.browsePath(path,
|
||||
function(path){
|
||||
return that.loadPath(path, logger)
|
||||
})
|
||||
}
|
||||
}],
|
||||
|
||||
// XXX BUG: for some reason this when run from .browseActions(..) or
|
||||
// any other Browse, loads incorrectly while when called
|
||||
// directly is OK...
|
||||
browsePath: ['File/Browse file system...',
|
||||
function(base, callback){
|
||||
var that = this
|
||||
@ -3341,6 +3368,7 @@ var FileSystemLoaderUIActions = actions.Actions({
|
||||
})
|
||||
|
||||
|
||||
// XXX is this a good name???
|
||||
var FileSystemLoaderUI =
|
||||
module.FileSystemLoaderUI = ImageGridFeatures.Feature({
|
||||
title: '',
|
||||
@ -3379,6 +3407,7 @@ ImageGridFeatures.Feature('viewer-testing', [
|
||||
|
||||
'fs-loader',
|
||||
'fs-loader-ui',
|
||||
|
||||
'app-control',
|
||||
|
||||
// chrome...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user