fix BUG-98 (user cancel of a job not dealing with dependant jobs) & constrain the width of the chosen face in DBox for overrides/create refimg

This commit is contained in:
2022-07-19 20:45:54 +10:00
parent 382647a91b
commit fd79ee2cf4
4 changed files with 36 additions and 14 deletions

View File

@@ -422,17 +422,17 @@ function FaceDBox(key, item)
face_pos=item[key]['which_face']
div ='<div class="col-6"><p>'
div+='Face position #' + face_pos
div+='<div id="face_img"></div>'
// use w-100 to force width to not make face image wider than half the dbox
div+='</p><div class="col-6 w-100"> <img id="face_img" class="w-100"></img></div>'
$.ajax({ type: 'POST', data: null, url: '/get_face_from_image/'+item[key].id,
success: function(img_data) {
item[key].refimg_data=img_data
$('#face_img').html( '<img src="data:image/jpeg;base64,' + img_data + '"></img>' )
// used for create_new_person only, so this will do nothing for
// option menu items
$('#face_img').prop('src', 'data:image/jpeg;base64,' + img_data )
// used for create_new_person only, so this will do nothing for option menu items
$('#refimg_data').val(img_data)
}
} )
div+='</p></div><div class="col-6">'
div+='</div><div class="col-6">'
if ( key == 'remove_override_force_match' )
{
if( objs[current].faces[face_pos].override.type_name == 'Manual match to existing person' )
@@ -468,6 +468,7 @@ function FaceDBox(key, item)
`
div+='<button class="btn btn-primary offset-3 col-2" type="button"'
div+='onClick="CreatePersonAndRefimg(\''+key+'\')">Save</button>'
div+='</div>'
}
if ( key == 'no_match_new_refimg' )
{