mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
started work on export history/presets...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3963da3630
commit
90f00b5a83
@ -2544,6 +2544,7 @@ var FileSystemWriterUIActions = actions.Actions({
|
|||||||
alias: 'index',
|
alias: 'index',
|
||||||
action: 'exportIndex',
|
action: 'exportIndex',
|
||||||
data: [
|
data: [
|
||||||
|
//'name',
|
||||||
'base_path',
|
'base_path',
|
||||||
'target_dir',
|
'target_dir',
|
||||||
'clean_target_dir',
|
'clean_target_dir',
|
||||||
@ -2561,6 +2562,7 @@ var FileSystemWriterUIActions = actions.Actions({
|
|||||||
alias: 'images',
|
alias: 'images',
|
||||||
action: 'exportDirs',
|
action: 'exportDirs',
|
||||||
data: [
|
data: [
|
||||||
|
//'name',
|
||||||
'pattern',
|
'pattern',
|
||||||
'size',
|
'size',
|
||||||
'include_virtual',
|
'include_virtual',
|
||||||
@ -2576,15 +2578,31 @@ var FileSystemWriterUIActions = actions.Actions({
|
|||||||
// XXX format:
|
// XXX format:
|
||||||
// [
|
// [
|
||||||
// {
|
// {
|
||||||
|
// // XXX optional -- auto-generated if not given...
|
||||||
|
// name: <name>,
|
||||||
// // XXX key in .config['export-dialog-modes']
|
// // XXX key in .config['export-dialog-modes']
|
||||||
// type: <preset-tipe>,
|
// type: <preset-tipe>,
|
||||||
|
//
|
||||||
|
// // these depend on preset type...
|
||||||
// ...
|
// ...
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
// XXX should this be a dict or a list???
|
// XXX should this be a dict or a list???
|
||||||
// ...a dict would require keys (gid/title??)
|
// ...a dict would require keys (gid/title??)
|
||||||
// XXX should this api be accessible from outside the ui???
|
// XXX should this api be accessible from outside the ui???
|
||||||
'export-presets': [],
|
'export-presets': [
|
||||||
|
// XXX examples...
|
||||||
|
{
|
||||||
|
type: 'images',
|
||||||
|
pattern: '%(fav)l%n%(-bookmarked)b%(-m)m%(-%c)c',
|
||||||
|
size: '1000',
|
||||||
|
include_virtual: true,
|
||||||
|
target_dir: './select',
|
||||||
|
clean_target_dir: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'export-history': [
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
// XXX this needs feedback...
|
// XXX this needs feedback...
|
||||||
@ -3007,8 +3025,17 @@ var FileSystemWriterUIActions = actions.Actions({
|
|||||||
// XXX need a means to save/manage/run presets...
|
// XXX need a means to save/manage/run presets...
|
||||||
exportPresets: ['- File/Export...',
|
exportPresets: ['- File/Export...',
|
||||||
widgets.makeUIDialog(function(mode){
|
widgets.makeUIDialog(function(mode){
|
||||||
// XXX
|
var that = this
|
||||||
})],
|
return browse.makeLister(null, function(path, make){
|
||||||
|
|
||||||
|
make('Export...')
|
||||||
|
|
||||||
|
make('---')
|
||||||
|
|
||||||
|
|
||||||
|
make('---')
|
||||||
|
|
||||||
|
}) })],
|
||||||
|
|
||||||
// XXX these do note need the ui -- move to a separate feature...
|
// XXX these do note need the ui -- move to a separate feature...
|
||||||
// XXX these are essentially the same as the history API, make a
|
// XXX these are essentially the same as the history API, make a
|
||||||
|
|||||||
@ -759,8 +759,7 @@ function(list, options){
|
|||||||
// we need to return the list itself...
|
// we need to return the list itself...
|
||||||
&& lst
|
&& lst
|
||||||
// in case the list(..) returns nothing...
|
// in case the list(..) returns nothing...
|
||||||
|| lst
|
|| lst }
|
||||||
}
|
|
||||||
// save item to lst...
|
// save item to lst...
|
||||||
var saveItem = function(txt, replace){
|
var saveItem = function(txt, replace){
|
||||||
if(txt == replace || txt.trim() == ''){
|
if(txt == replace || txt.trim() == ''){
|
||||||
@ -841,8 +840,7 @@ function(list, options){
|
|||||||
|
|
||||||
lst = write(dialog.__list[id], lst)
|
lst = write(dialog.__list[id], lst)
|
||||||
|
|
||||||
return txt
|
return txt }
|
||||||
}
|
|
||||||
// edit item inline...
|
// edit item inline...
|
||||||
var editItem = function(elem){
|
var editItem = function(elem){
|
||||||
var elem = $(elem).find('.text').last()
|
var elem = $(elem).find('.text').last()
|
||||||
@ -876,8 +874,7 @@ function(list, options){
|
|||||||
title = title.replace(/\$/g, '')
|
title = title.replace(/\$/g, '')
|
||||||
dialog.update()
|
dialog.update()
|
||||||
.then(function(){ dialog.select(`"${title}"`) })
|
.then(function(){ dialog.select(`"${title}"`) })
|
||||||
})
|
}) }
|
||||||
}
|
|
||||||
|
|
||||||
dialog.__list = dialog.__list || {}
|
dialog.__list = dialog.__list || {}
|
||||||
dialog.__editable = dialog.__editable || {}
|
dialog.__editable = dialog.__editable || {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user