minor clean-ups, link-primary now has cursor set via role=button (go figure?) and face distance is not undefined on override, its deliberately set to N/A
This commit is contained in:
@@ -267,11 +267,13 @@ $(document).ready( function()
|
|||||||
function OverrideForceMatch( person_id, face_id, face_pos )
|
function OverrideForceMatch( person_id, face_id, face_pos )
|
||||||
{
|
{
|
||||||
ofm='&person_id='+person_id+'&face_id='+face_id
|
ofm='&person_id='+person_id+'&face_id='+face_id
|
||||||
// on success, close the dbox, force face drawing on and redraw the face with the new override
|
|
||||||
$.ajax({ type: 'POST', data: ofm, url: '/override_force_match', success: function(data) {
|
$.ajax({ type: 'POST', data: ofm, url: '/override_force_match', success: function(data) {
|
||||||
|
// on success, remember the original data, apply override values, close the dbox, force face drawing boxes on and redraw the face with the new override
|
||||||
if( objs[current].faces[face_pos].who )
|
if( objs[current].faces[face_pos].who )
|
||||||
objs[current].faces[face_pos].old_who=objs[current].faces[face_pos].who
|
objs[current].faces[face_pos].old_who=objs[current].faces[face_pos].who
|
||||||
|
objs[current].faces[face_pos].old_distance=objs[current].faces[face_pos].distance
|
||||||
objs[current].faces[face_pos].who=data.person_tag
|
objs[current].faces[face_pos].who=data.person_tag
|
||||||
|
objs[current].faces[face_pos].distance="N/A"
|
||||||
objs[current].faces[face_pos].override=1
|
objs[current].faces[face_pos].override=1
|
||||||
|
|
||||||
$('#dbox').modal('hide')
|
$('#dbox').modal('hide')
|
||||||
@@ -294,8 +296,12 @@ function SearchForPerson(face_id, face_pos)
|
|||||||
content='Click one of the link(s) below to manually connect this face as once-off connection to the person:<br><br>'
|
content='Click one of the link(s) below to manually connect this face as once-off connection to the person:<br><br>'
|
||||||
for( var key in data ) {
|
for( var key in data ) {
|
||||||
var person = data[key];
|
var person = data[key];
|
||||||
|
/*
|
||||||
content+= '<a class="link-primary" onClick="OverrideForceMatch('+person.id+','
|
content+= '<a class="link-primary" onClick="OverrideForceMatch('+person.id+','
|
||||||
+face_id+','+face_pos+')">'+person.firstname+' '+person.surname+' ('+person.tag+')</a><br>'
|
+face_id+','+face_pos+')">'+person.firstname+' '+person.surname+' ('+person.tag+')</a><br>'
|
||||||
|
*/
|
||||||
|
content+= '<a role=button class="link link-primary" onClick="OverrideForceMatch('+person.id+','
|
||||||
|
+face_id+','+face_pos+')">'+person.firstname+' '+person.surname+' ('+person.tag+')</a><br>'
|
||||||
}
|
}
|
||||||
$('#search_person_results').html( content )
|
$('#search_person_results').html( content )
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
{% if face.manual_override %}
|
{% if face.manual_override %}
|
||||||
data['override']=1
|
data['override']=1
|
||||||
data['who']='{{face.manual_override.person.tag}}'
|
data['who']='{{face.manual_override.person.tag}}'
|
||||||
|
data['distance']="N/A"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
e.faces.push( data )
|
e.faces.push( data )
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user