From afd67252d46bfa3fe6887f478de3ce332c5e2fac Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 3 Jul 2013 06:42:14 +0400 Subject: [PATCH] hooked up preview generator to loadDirectoryDialog(...)... Signed-off-by: Alex A. Naanou --- ui/ui.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/ui/ui.js b/ui/ui.js index 39468894..f0df60c0 100755 --- a/ui/ui.js +++ b/ui/ui.js @@ -759,20 +759,36 @@ function exportPreviewsDialog(state, dfl){ function loadDirectoryDialog(dfl){ dfl = dfl == null ? BASE_URL : dfl - // browser version... - var getter = window.listDir != null ? getDir : prompt updateStatus('Open...').show() - getter('Path to open', dfl) - .done(function(path){ + formDialog(null, 'Path to open', { + '': {ndir: dfl}, + 'Precess previews': false, + }, 'OK', 'getDir') + //getter('Path to open', dfl) + // .done(function(path){ + .done(function(data){ + var path = data[''] + var process_previews = data['Precess previews'] // reset the modes... toggleSingleImageMode('off') toggleSingleRibbonMode('off') toggleMarkedOnlyView('off') path = normalizePath(path.trim()) + statusNotify(loadDir(path)) + .done(function(){ + // XXX do we need to test anything else here??? + if(!process_previews){ + showStatusQ('Previews: processing started...') + makeImagesPreviewsQ(DATA.order) + .done(function(){ + showStatusQ('Previews: processing done.') + }) + } + }) }) .fail(function(){ showStatusQ('Open: canceled.')