added match_add_refimg support to context menu, allows us to take existing (presumably) better image and make it a refimg for someone its matched
This commit is contained in:
@@ -237,6 +237,8 @@ $(document).ready( function()
|
|||||||
else if( objs[current].faces[i].who )
|
else if( objs[current].faces[i].who )
|
||||||
{
|
{
|
||||||
item_list['match']={ 'name': objs[current].faces[i].who, 'which_face': i, 'id': objs[current].faces[i].id }
|
item_list['match']={ 'name': objs[current].faces[i].who, 'which_face': i, 'id': objs[current].faces[i].id }
|
||||||
|
item_list['match_add_refimg']={ 'name': 'Add this as refimg for ' + objs[current].faces[i].who,
|
||||||
|
'person_id': objs[current].faces[i].pid, 'who': objs[current].faces[i].who, 'which_face': i, 'id': objs[current].faces[i].id, }
|
||||||
item_list['wrong_person']={ 'name': 'wrong person', 'which_face': i, 'id': objs[current].faces[i].id }
|
item_list['wrong_person']={ 'name': 'wrong person', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -494,10 +496,23 @@ function FaceDBox(key, item)
|
|||||||
{
|
{
|
||||||
div+=AddSearch( 'Click one of the link(s) below to add this face as a reference image to the person:<br><br>', key, face_pos );
|
div+=AddSearch( 'Click one of the link(s) below to add this face as a reference image to the person:<br><br>', key, face_pos );
|
||||||
}
|
}
|
||||||
|
if ( key == 'match_add_refimg' )
|
||||||
|
{
|
||||||
|
func='AddRefimgTo('+item[key]['person_id']+',\''+key+'\''
|
||||||
|
func_sn=func+ ', true )'
|
||||||
|
func_ao=func+ ', false )'
|
||||||
|
div+=`<script>console.log( "AddExistingFaceAsRefimgToMatchedPerson()" )</script>`
|
||||||
|
div+="Confirm you wish to add this face as a reference image for " + item[key]['who']
|
||||||
|
div+= '<div class="col">' + item[key]['who'] + '</div><div class="col input-group">'
|
||||||
|
div+= '<button onClick="'+func_sn+'" class="btn btn-success py-1 input-group-prepend">Add & search now</button> '
|
||||||
|
div+= '<button onClick="'+func_ao+'" class="btn btn-outline-success py-1 input-group-append">Add only</button></div>'
|
||||||
|
|
||||||
|
}
|
||||||
if ( key == 'wrong_person' )
|
if ( key == 'wrong_person' )
|
||||||
{
|
{
|
||||||
div+='<br>wrong person, so mark this as the wrong person/refimg connection, for face#' + item[key]['which_face']
|
div+='<br>wrong person, so mark this as the wrong person/refimg connection, for face#' + item[key]['which_face']
|
||||||
div+='<br>face db id: ' + item[key]['id']
|
div+='<br>face db id: ' + item[key]['id']
|
||||||
|
div += '<br>not yet'
|
||||||
}
|
}
|
||||||
if( /NMO_/.test(key) )
|
if( /NMO_/.test(key) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user