big change to get metadata working fully in DB and on Filesystem, and recover from most common scenarios, improved GUI as well for allowing an immediate search after adding refimg as well
This commit is contained in:
@@ -232,7 +232,7 @@ $(document).ready( function()
|
||||
{
|
||||
if( objs[current].faces[i].override )
|
||||
{
|
||||
item_list['remove_override_force_match']={ 'name': 'Remove override for this face', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['remove_force_match_override']={ 'name': 'Remove override for this face', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
}
|
||||
else if( objs[current].faces[i].who )
|
||||
{
|
||||
@@ -277,7 +277,7 @@ function OverrideForceMatch( person_id, key )
|
||||
}
|
||||
}
|
||||
ofm='&person_id='+person_id+'&face_id='+item[key].id
|
||||
$.ajax({ type: 'POST', data: ofm, url: '/override_force_match', success: function(data) {
|
||||
$.ajax({ type: 'POST', data: ofm, url: '/add_force_match_override', success: function(data) {
|
||||
objs[current].faces[item[key].which_face].override={}
|
||||
objs[current].faces[item[key].which_face].override.who=data.person_tag
|
||||
objs[current].faces[item[key].which_face].override.distance='N/A'
|
||||
@@ -340,17 +340,18 @@ function SearchForPerson(content, key, face_id, face_pos, type_id)
|
||||
if( key == "NMO_1" )
|
||||
{
|
||||
func='OverrideForceMatch('+person.id+',\''+key+'\' )'
|
||||
func_sn=func_func_ao=func
|
||||
content+= '<div class="col">' + person.tag + ' (' + person.firstname+' '+person.surname+ ') </div>'
|
||||
content+= '<button onClick="'+func+'" class="col btn btn-success py-1 input-group-prepend">Add Override</button>'
|
||||
}
|
||||
if( key == 'no_match_new_refimg' )
|
||||
{
|
||||
func='AddRefimgTo('+person.id+',\''+key+'\''
|
||||
func_sn=func+ ', true )'
|
||||
func_ao=func+ ', false )'
|
||||
content+= '<div class="col">' + person.tag + ' (' + person.firstname+' '+person.surname+ ') </div><div class="col input-group">'
|
||||
content+= '<button onClick="'+func_sn+'" class="btn btn-success py-1 input-group-prepend">Add & search now</button> '
|
||||
content+= '<button onClick="'+func_ao+'" class="btn btn-outline-success py-1 input-group-append">Add only</button></div>'
|
||||
}
|
||||
content+= '<div class="col">' + person.tag + ' (' + person.firstname+' '+person.surname+ ') </div><div class="col input-group">'
|
||||
content+= '<button onClick="'+func_sn+'" class="btn btn-success py-1 input-group-prepend">Add & search now</a> '
|
||||
content+= '<button onClick="'+func_ao+'" class="btn btn-outline-success py-1 input-group-append">Add only</a></div>'
|
||||
content+='</div class="row">'
|
||||
}
|
||||
$('#search_person_results').html( content )
|
||||
@@ -361,9 +362,13 @@ function SearchForPerson(content, key, face_id, face_pos, type_id)
|
||||
|
||||
function RemoveOverrideForceMatch(face_pos)
|
||||
{
|
||||
d='&face_id='+objs[current].faces[face_pos].id+'&person_tag='+objs[current].faces[face_pos].who+
|
||||
'&file_eid='+current
|
||||
$.ajax({ type: 'POST', data: d, url: '/remove_override_force_match',
|
||||
if( objs[current].faces[face_pos].override )
|
||||
who=objs[current].faces[face_pos].override.who
|
||||
else
|
||||
who=objs[current].faces[face_pos].who
|
||||
|
||||
d='&face_id='+objs[current].faces[face_pos].id+'&person_tag='+who+'&file_eid='+current
|
||||
$.ajax({ type: 'POST', data: d, url: '/remove_force_match_override',
|
||||
success: function(data) {
|
||||
delete objs[current].faces[face_pos].override
|
||||
$('#dbox').modal('hide')
|
||||
@@ -377,7 +382,7 @@ function RemoveOverrideForceMatch(face_pos)
|
||||
function RemoveOverrideNoMatch(face_pos, type_id)
|
||||
{
|
||||
d='&face_id='+objs[current].faces[face_pos].id+'&type_id='+type_id
|
||||
$.ajax({ type: 'POST', data: d, url: '/remove_override_no_match',
|
||||
$.ajax({ type: 'POST', data: d, url: '/remove_no_match_override',
|
||||
success: function(data) {
|
||||
delete objs[current].faces[face_pos].override
|
||||
$('#dbox').modal('hide')
|
||||
@@ -442,7 +447,7 @@ function FaceDBox(key, item)
|
||||
}
|
||||
} )
|
||||
div+='</div><div class="col-6">'
|
||||
if ( key == 'remove_override_force_match' )
|
||||
if ( key == 'remove_force_match_override' )
|
||||
{
|
||||
if( objs[current].faces[face_pos].override.type_name == 'Manual match to existing person' )
|
||||
div+='<div class="row col-12">remove this override (force match to: ' + objs[current].faces[face_pos].override.who + ')</div>'
|
||||
|
||||
Reference in New Issue
Block a user