mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 19:00:09 +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...
|
// XXX STUB: use a real path browser...
|
||||||
O: doc('Open a directory path',
|
O: doc('Open a directory path',
|
||||||
function(){
|
function(){
|
||||||
// browser version...
|
loadDirectory()
|
||||||
var getter = window.listDir != null ? getDir : prompt
|
|
||||||
|
|
||||||
getter('Path to open', BASE_URL)
|
|
||||||
.done(function(path){
|
|
||||||
path = path.trim()
|
|
||||||
statusNotify(loadDir(path))
|
|
||||||
})
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -254,7 +254,7 @@ var toggleSlideShowMode = createCSSClassToggler(
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
window._slideshow_timer != null && clearInterval(_slideshow_timer)
|
window._slideshow_timer != null && clearInterval(_slideshow_timer)
|
||||||
showStatus('Slideshow: stopped.')
|
showStatus('Slideshow: canceled.')
|
||||||
hideOverlay($('.viewer'))
|
hideOverlay($('.viewer'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
29
ui/ui.js
29
ui/ui.js
@ -647,6 +647,8 @@ function exportPreviews(dfl){
|
|||||||
dfl = dfl == null ? BASE_URL : dfl
|
dfl = dfl == null ? BASE_URL : dfl
|
||||||
var res = $.Deferred()
|
var res = $.Deferred()
|
||||||
|
|
||||||
|
updateStatus('Export...').show()
|
||||||
|
|
||||||
formDialog(null, 'Export previews', {
|
formDialog(null, 'Export previews', {
|
||||||
'Image name pattern': '%f',
|
'Image name pattern': '%f',
|
||||||
'Fav directory name': 'fav',
|
'Fav directory name': 'fav',
|
||||||
@ -658,16 +660,39 @@ function exportPreviews(dfl){
|
|||||||
data['Image name pattern'],
|
data['Image name pattern'],
|
||||||
data['Fav directory name'])
|
data['Fav directory name'])
|
||||||
|
|
||||||
showStatusQ('Exporting data...')
|
// XXX do real reporting...
|
||||||
|
showStatusQ('Copying data...')
|
||||||
|
|
||||||
res.resolve(data[''])
|
res.resolve(data[''])
|
||||||
})
|
})
|
||||||
.fail(function(){ res.reject() })
|
.fail(function(){
|
||||||
|
showStatusQ('Export: canceled.')
|
||||||
|
|
||||||
|
res.reject()
|
||||||
|
})
|
||||||
|
|
||||||
return res
|
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 ***/
|
/************************************************ Specific dialogs ***/
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user