From 02ae6904eae5bf642c017fb5244f601cbda3d8ae Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 13 Sep 2013 17:44:14 +0400 Subject: [PATCH] now image info dialog uses a custom (dumb) dialog rather than alert... Signed-off-by: Alex A. Naanou --- ui/ui.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/ui/ui.js b/ui/ui.js index 3894fcf9..690cf828 100755 --- a/ui/ui.js +++ b/ui/ui.js @@ -967,7 +967,7 @@ function sortImagesDialog(message){ } -// XXX get EXIF... +// XXX get EXIF, IPTC... function showImageInfo(){ var gid = getImageGID(getImage()) var r = getRibbonIndex(getRibbon()) @@ -982,8 +982,8 @@ function showImageInfo(){ comment = comment == null ? '' : comment comment = comment.replace(/\n/g, '
') - // make this something other than alert... - alert('
'+ + return formDialog(null, + ('
'+ '

"'+ name +'"

'+ ''+ @@ -1001,17 +1001,25 @@ function showImageInfo(){ // add per editable and global dialog max-height and overflow ''+ '
Comment: '+ comment +'
'+ - '
') - .done(function(_, form){ - //var comment = $('.dialog .comment').html().replace(/
/ig, '\n') - var comment = form.find('.comment').html().replace(/
/ig, '\n') + '
'+ + '
'), + // NOTE: without a save button, there will be no way to accept the + // form on a touch-only device... + {}, 'Save', 'showImageInfoDialog') + // save the form data... + .done(function(_, form){ + // comment... + var comment = form.find('.comment').html().replace(/
/ig, '\n') if(comment.trim() == ''){ delete data.comment } else { data.comment = comment } IMAGES_UPDATED.push(gid) + + // XXX tags... + // XXX }) }