mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-31 19:30:07 +00:00
now image info dialog uses a custom (dumb) dialog rather than alert...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
016cc651cf
commit
02ae6904ea
22
ui/ui.js
22
ui/ui.js
@ -967,7 +967,7 @@ function sortImagesDialog(message){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XXX get EXIF...
|
// XXX get EXIF, IPTC...
|
||||||
function showImageInfo(){
|
function showImageInfo(){
|
||||||
var gid = getImageGID(getImage())
|
var gid = getImageGID(getImage())
|
||||||
var r = getRibbonIndex(getRibbon())
|
var r = getRibbonIndex(getRibbon())
|
||||||
@ -982,8 +982,8 @@ function showImageInfo(){
|
|||||||
comment = comment == null ? '' : comment
|
comment = comment == null ? '' : comment
|
||||||
comment = comment.replace(/\n/g, '<br>')
|
comment = comment.replace(/\n/g, '<br>')
|
||||||
|
|
||||||
// make this something other than alert...
|
return formDialog(null,
|
||||||
alert('<div>'+
|
('<div>'+
|
||||||
'<h2>"'+ name +'"</h2>'+
|
'<h2>"'+ name +'"</h2>'+
|
||||||
|
|
||||||
'<table>'+
|
'<table>'+
|
||||||
@ -1001,17 +1001,25 @@ function showImageInfo(){
|
|||||||
// add per editable and global dialog max-height and overflow
|
// add per editable and global dialog max-height and overflow
|
||||||
'<tr><td>Comment: </td><td class="comment" contenteditable>'+ comment +'</td></tr>'+
|
'<tr><td>Comment: </td><td class="comment" contenteditable>'+ comment +'</td></tr>'+
|
||||||
'</table>'+
|
'</table>'+
|
||||||
'</div>')
|
'<br>'+
|
||||||
.done(function(_, form){
|
'</div>'),
|
||||||
//var comment = $('.dialog .comment').html().replace(/<br>/ig, '\n')
|
// NOTE: without a save button, there will be no way to accept the
|
||||||
var comment = form.find('.comment').html().replace(/<br>/ig, '\n')
|
// form on a touch-only device...
|
||||||
|
{}, 'Save', 'showImageInfoDialog')
|
||||||
|
|
||||||
|
// save the form data...
|
||||||
|
.done(function(_, form){
|
||||||
|
// comment...
|
||||||
|
var comment = form.find('.comment').html().replace(/<br>/ig, '\n')
|
||||||
if(comment.trim() == ''){
|
if(comment.trim() == ''){
|
||||||
delete data.comment
|
delete data.comment
|
||||||
} else {
|
} else {
|
||||||
data.comment = comment
|
data.comment = comment
|
||||||
}
|
}
|
||||||
IMAGES_UPDATED.push(gid)
|
IMAGES_UPDATED.push(gid)
|
||||||
|
|
||||||
|
// XXX tags...
|
||||||
|
// XXX
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user