mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-19 17:51:41 +00:00
hooked up preview generator to loadDirectoryDialog(...)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
44517bcd44
commit
afd67252d4
24
ui/ui.js
24
ui/ui.js
@ -759,20 +759,36 @@ function exportPreviewsDialog(state, dfl){
|
|||||||
|
|
||||||
function loadDirectoryDialog(dfl){
|
function loadDirectoryDialog(dfl){
|
||||||
dfl = dfl == null ? BASE_URL : dfl
|
dfl = dfl == null ? BASE_URL : dfl
|
||||||
// browser version...
|
|
||||||
var getter = window.listDir != null ? getDir : prompt
|
|
||||||
|
|
||||||
updateStatus('Open...').show()
|
updateStatus('Open...').show()
|
||||||
|
|
||||||
getter('Path to open', dfl)
|
formDialog(null, 'Path to open', {
|
||||||
.done(function(path){
|
'': {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...
|
// reset the modes...
|
||||||
toggleSingleImageMode('off')
|
toggleSingleImageMode('off')
|
||||||
toggleSingleRibbonMode('off')
|
toggleSingleRibbonMode('off')
|
||||||
toggleMarkedOnlyView('off')
|
toggleMarkedOnlyView('off')
|
||||||
|
|
||||||
path = normalizePath(path.trim())
|
path = normalizePath(path.trim())
|
||||||
|
|
||||||
statusNotify(loadDir(path))
|
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(){
|
.fail(function(){
|
||||||
showStatusQ('Open: canceled.')
|
showStatusQ('Open: canceled.')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user