mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a15397c1af
commit
261a8690f4
@ -1198,6 +1198,8 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
'export-preview-size'))
|
||||
|
||||
},
|
||||
// XXX make this editable on open and remove "new" from history...
|
||||
// XXX add "history" button...
|
||||
'target_dir': function(actions, make, overlay){
|
||||
return make(['To: ',
|
||||
function(){ return actions.config['export-path'] || './' }],
|
||||
@ -1219,8 +1221,17 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
// XXX ugly...
|
||||
overlay.focus()
|
||||
})
|
||||
}]
|
||||
}],
|
||||
['histroy', widgets.makeNestedConfigListEditor(actions, overlay,
|
||||
'export-paths',
|
||||
'export-path',
|
||||
{
|
||||
new_button: false,
|
||||
// XXX add 'edit' button...
|
||||
//itemButtons: []
|
||||
})],
|
||||
]})
|
||||
// XXX make this editable???
|
||||
.on('open',
|
||||
widgets.makeNestedConfigListEditor(actions, overlay,
|
||||
'export-paths',
|
||||
|
||||
@ -114,15 +114,19 @@ function(actions, list_key, options){
|
||||
.push(txt)
|
||||
|
||||
// unique...
|
||||
if(options.unique){
|
||||
if(options.unique == null || options.unique){
|
||||
actions.config[list_key] = actions.config[list_key]
|
||||
.unique(options.unique !== true ? options.unique : undefined)
|
||||
.unique(typeof(options.unique) == typeof(function(){}) ?
|
||||
options.unique
|
||||
: undefined)
|
||||
}
|
||||
|
||||
// sort...
|
||||
if(options.sort){
|
||||
actions.config[list_key] = actions.config[list_key]
|
||||
.sort(options.sort !== true ? options.sort : undefined)
|
||||
.sort(typeof(options.sort) == typeof(function(){}) ?
|
||||
options.sort
|
||||
: undefined)
|
||||
}
|
||||
|
||||
// update the list data...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user