+
+ // ID of line currently open for modification
+ var in_modification_id = null;
+ function modify_people(ele, id){
+ if (in_modification_id != null) {
+ // reset to normal values
+ $('#modify_'+in_modification_id).text("Modify or delete");
+ $('#modify_'+in_modification_id).attr("class", "btn btn-xs btn-warning");
+ $('#line_'+in_modification_id).css("background-color", "");
+ $('#delete_'+in_modification_id).css("display", "none");
+ }
+ if (in_modification_id != id) {
+ // activate modifiable mode
+ $('#modify_'+id).text("Done");
+ $('#modify_'+id).attr("class", "btn btn-xs btn-success");
+ $('#line_'+id).css("background-color", "LightYellow");
+ $('#delete_'+id).show();
+
+ in_modification_id = id;
+ } else {
+ in_modification_id = null;
+ }
+ }