}
function detach_node( readings ) {
-
+ // separate out the deleted relationships, discard for now
+ delete readings['DELETED'];
// add new node(s)
$.extend( readingdata, readings );
// remove from existing readings the witnesses for the new nodes/readings
merge_node( source_node_id, target_node_id );
if( consequences.checkalign != null ) {
$.each( consequences.checkalign, function( index, node_ids ) {
- temp_relation = draw_relation( node_ids[0], node_ids[1], "#89a02c" );
+ var temp_relation = draw_relation( node_ids[0], node_ids[1], "#89a02c" );
var sy = parseInt( temp_relation.children('path').attr('d').split('C')[0].split(',')[1] );
var ey = parseInt( temp_relation.children('path').attr('d').split(' ')[2].split(',')[1] );
var yC = ey + (( sy - ey )/2);
$( '#' + merge_id ).parent().remove();
//notify backend
var ncpath = getTextURL( 'merge' );
- var form_values = "source_id=" + source_node_id + "&target_id=" + target_node_id + "&single=true";
+ var form_values = "source_id=" + node_ids[0] + "&target_id=" + node_ids[1] + "&single=true";
$.post( ncpath, form_values );
} );
$( '#no' + merge_id ).click( function( evt ) {
ncpath = getTextURL( 'merge' );
var jqjson = $.post( ncpath, form_values, function( data ) {
merge_nodes( $( '#source_node_id' ).val(), $( '#target_node_id' ).val(), data );
+ $(evt.target).button( 'enable' );
$( '#dialog-form' ).dialog( 'close' );
} );
},