mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
tweaking and some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e3730ebdc8
commit
94826cdcf0
@ -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()
|
||||
}),
|
||||
|
||||
|
||||
|
||||
@ -254,7 +254,7 @@ var toggleSlideShowMode = createCSSClassToggler(
|
||||
|
||||
} else {
|
||||
window._slideshow_timer != null && clearInterval(_slideshow_timer)
|
||||
showStatus('Slideshow: stopped.')
|
||||
showStatus('Slideshow: canceled.')
|
||||
hideOverlay($('.viewer'))
|
||||
}
|
||||
})
|
||||
|
||||
29
ui/ui.js
29
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 ***/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user