mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
minor refactoring + prep for making new index (tree) from gui
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f19894bf39
commit
b7d355329f
@ -629,15 +629,13 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
function(path, direction, logger){
|
function(path, direction, logger){
|
||||||
var that = this
|
var that = this
|
||||||
if(path == null){
|
if(path == null){
|
||||||
return
|
return }
|
||||||
}
|
|
||||||
|
|
||||||
if(logger === undefined
|
if(logger === undefined
|
||||||
&& direction
|
&& direction
|
||||||
&& typeof(direction) != typeof('str')){
|
&& typeof(direction) != typeof('str')){
|
||||||
logger = direction
|
logger = direction
|
||||||
direction = null
|
direction = null }
|
||||||
}
|
|
||||||
|
|
||||||
direction = direction || 'below'
|
direction = direction || 'below'
|
||||||
|
|
||||||
@ -675,9 +673,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// join images...
|
// join images...
|
||||||
that.images.join(imgs)
|
that.images.join(imgs)
|
||||||
|
|
||||||
that.reload(true)
|
that.reload(true) }) }],
|
||||||
})
|
|
||||||
}],
|
|
||||||
|
|
||||||
// XXX revise logger...
|
// XXX revise logger...
|
||||||
// XXX revise alignment...
|
// XXX revise alignment...
|
||||||
@ -1077,8 +1073,7 @@ var makeBrowseProxy = function(action, callback){
|
|||||||
function(path){
|
function(path){
|
||||||
var res = that[action](path, logger)
|
var res = that[action](path, logger)
|
||||||
callback && callback.call(that, path)
|
callback && callback.call(that, path)
|
||||||
return res
|
return res }) }) }
|
||||||
}) }) }
|
|
||||||
|
|
||||||
|
|
||||||
// XXX show list of indexes when more than one are found....
|
// XXX show list of indexes when more than one are found....
|
||||||
@ -1112,6 +1107,10 @@ var FileSystemLoaderUIActions = actions.Actions({
|
|||||||
'loadIndex: "$PATH"',
|
'loadIndex: "$PATH"',
|
||||||
'loadImages: "$PATH"',
|
'loadImages: "$PATH"',
|
||||||
//'loadPath: "$PATH"',
|
//'loadPath: "$PATH"',
|
||||||
|
|
||||||
|
// XXX add option to build and load index...
|
||||||
|
//loadNewIndex: "$PATH",
|
||||||
|
|
||||||
'---',
|
'---',
|
||||||
'loadImagesAsRibbon: "$PATH" "above" -- Load images to new ribbon above',
|
'loadImagesAsRibbon: "$PATH" "above" -- Load images to new ribbon above',
|
||||||
'loadImagesAsRibbon: "$PATH" "below" -- Load images to new ribbon below',
|
'loadImagesAsRibbon: "$PATH" "below" -- Load images to new ribbon below',
|
||||||
@ -1181,12 +1180,8 @@ var FileSystemLoaderUIActions = actions.Actions({
|
|||||||
// close self and parent...
|
// close self and parent...
|
||||||
.open(function(){
|
.open(function(){
|
||||||
so.close()
|
so.close()
|
||||||
o.close()
|
o.close() })
|
||||||
})
|
return so } })
|
||||||
|
|
||||||
return so
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// we closed the browser -- save settings to .config...
|
// we closed the browser -- save settings to .config...
|
||||||
.on('close', function(){
|
.on('close', function(){
|
||||||
var config =
|
var config =
|
||||||
@ -1197,11 +1192,11 @@ var FileSystemLoaderUIActions = actions.Actions({
|
|||||||
config.showDisabled = o.options.showDisabled
|
config.showDisabled = o.options.showDisabled
|
||||||
config.showNonTraversable = o.options.showNonTraversable
|
config.showNonTraversable = o.options.showNonTraversable
|
||||||
// normalize...
|
// normalize...
|
||||||
config.disableDotFiles = o.options.disableDotFiles ? 'on' : 'off'
|
config.disableDotFiles =
|
||||||
})
|
o.options.disableDotFiles ?
|
||||||
|
'on'
|
||||||
return o
|
: 'off' })
|
||||||
})],
|
return o })],
|
||||||
|
|
||||||
// Browse indexes/images...
|
// Browse indexes/images...
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user