diff --git a/Viewer/features/filesystem.js b/Viewer/features/filesystem.js index 39ba7e75..683838f5 100755 --- a/Viewer/features/filesystem.js +++ b/Viewer/features/filesystem.js @@ -2544,6 +2544,7 @@ var FileSystemWriterUIActions = actions.Actions({ alias: 'index', action: 'exportIndex', data: [ + //'name', 'base_path', 'target_dir', 'clean_target_dir', @@ -2561,6 +2562,7 @@ var FileSystemWriterUIActions = actions.Actions({ alias: 'images', action: 'exportDirs', data: [ + //'name', 'pattern', 'size', 'include_virtual', @@ -2576,15 +2578,31 @@ var FileSystemWriterUIActions = actions.Actions({ // XXX format: // [ // { + // // XXX optional -- auto-generated if not given... + // name: , // // XXX key in .config['export-dialog-modes'] // type: , + // + // // these depend on preset type... // ... // } // ] // XXX should this be a dict or a list??? // ...a dict would require keys (gid/title??) // 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... @@ -3007,8 +3025,17 @@ var FileSystemWriterUIActions = actions.Actions({ // XXX need a means to save/manage/run presets... exportPresets: ['- File/Export...', 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 are essentially the same as the history API, make a diff --git a/Viewer/lib/widget/browse.js b/Viewer/lib/widget/browse.js index 47d7e715..8ed09ec6 100755 --- a/Viewer/lib/widget/browse.js +++ b/Viewer/lib/widget/browse.js @@ -759,8 +759,7 @@ function(list, options){ // we need to return the list itself... && lst // in case the list(..) returns nothing... - || lst - } + || lst } // save item to lst... var saveItem = function(txt, replace){ if(txt == replace || txt.trim() == ''){ @@ -841,8 +840,7 @@ function(list, options){ lst = write(dialog.__list[id], lst) - return txt - } + return txt } // edit item inline... var editItem = function(elem){ var elem = $(elem).find('.text').last() @@ -876,8 +874,7 @@ function(list, options){ title = title.replace(/\$/g, '') dialog.update() .then(function(){ dialog.select(`"${title}"`) }) - }) - } + }) } dialog.__list = dialog.__list || {} dialog.__editable = dialog.__editable || {}