diff --git a/ui/keybindings.js b/ui/keybindings.js index 6ee28445..c9ccb48f 100755 --- a/ui/keybindings.js +++ b/ui/keybindings.js @@ -274,14 +274,7 @@ var KEYBOARD_CONFIG = { // XXX STUB: use a real path browser... O: doc('Open a directory path', function(){ - // browser version... - var getter = window.listDir != null ? getDir : prompt - - getter('Path to open', BASE_URL) - .done(function(path){ - path = path.trim() - statusNotify(loadDir(path)) - }) + loadDirectory() }), diff --git a/ui/modes.js b/ui/modes.js index f9544174..524d78f0 100755 --- a/ui/modes.js +++ b/ui/modes.js @@ -254,7 +254,7 @@ var toggleSlideShowMode = createCSSClassToggler( } else { window._slideshow_timer != null && clearInterval(_slideshow_timer) - showStatus('Slideshow: stopped.') + showStatus('Slideshow: canceled.') hideOverlay($('.viewer')) } }) diff --git a/ui/ui.js b/ui/ui.js index 2fe0167d..033ff7b4 100755 --- a/ui/ui.js +++ b/ui/ui.js @@ -647,6 +647,8 @@ function exportPreviews(dfl){ dfl = dfl == null ? BASE_URL : dfl var res = $.Deferred() + updateStatus('Export...').show() + formDialog(null, 'Export previews', { 'Image name pattern': '%f', 'Fav directory name': 'fav', @@ -658,16 +660,39 @@ function exportPreviews(dfl){ data['Image name pattern'], data['Fav directory name']) - showStatusQ('Exporting data...') + // XXX do real reporting... + showStatusQ('Copying data...') res.resolve(data['']) }) - .fail(function(){ res.reject() }) + .fail(function(){ + showStatusQ('Export: canceled.') + + res.reject() + }) return res } +function loadDirectory(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){ + path = path.trim() + statusNotify(loadDir(path)) + }) + .fail(function(){ + showStatusQ('Open: canceled.') + }) +} + + /************************************************ Specific dialogs ***/