From: tla Date: Wed, 15 Jan 2014 18:40:02 +0000 (+0100) Subject: fix absolute links to merge yes/no buttons. Fixes #30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48156ccde369b0fbd72c5efb322e2f6e04f5444b;p=scpubgit%2Fstemmaweb.git fix absolute links to merge yes/no buttons. Fixes #30 --- diff --git a/root/js/relationship.js b/root/js/relationship.js index c98077b..0f5ae09 100644 --- a/root/js/relationship.js +++ b/root/js/relationship.js @@ -800,8 +800,8 @@ function merge_nodes( source_node_id, target_node_id, consequences ) { parent_g = svg.group( $('#svgenlargement svg g') ); var ids_text = node_ids[0] + '-' + node_ids[1]; var merge_id = 'merge-' + ids_text; - svg.image( parent_g, xC, (yC-8), 16, 16, '/images/tick_circle_frame.png', { id: merge_id } ); - svg.image( parent_g, (xC+20), (yC-8), 16, 16, '/images/no_entry.png', { id: 'no' + merge_id } ); + svg.image( parent_g, xC, (yC-8), 16, 16, merge_button_yes, { id: merge_id } ); + svg.image( parent_g, (xC+20), (yC-8), 16, 16, merge_button_no, { id: 'no' + merge_id } ); $( '#' + merge_id ).hover( function(){ $(this).addClass( 'draggable' ) }, function(){ $(this).removeClass( 'draggable' ) } ); $( '#no' + merge_id ).hover( function(){ $(this).addClass( 'draggable' ) }, function(){ $(this).removeClass( 'draggable' ) } ); $( '#' + merge_id ).click( function( evt ){ diff --git a/root/src/relate.tt b/root/src/relate.tt index 15ae28d..b01ab41 100644 --- a/root/src/relate.tt +++ b/root/src/relate.tt @@ -9,6 +9,9 @@ var basepath = "[% c.uri_for( '/relation/' ) %]"; var textid = "[% textid %]"; var can_morphologize = "[% can_morphologize %]"; var editable = "[% permission %]" === "full"; +// URLs for images referenced in Javascript +var merge_button_yes = "[% c.uri_for( '/images/tick_circle_frame.png' ) %]"; +var merge_button_no = "[% c.uri_for( '/images/no_entry.png' ) %]"; [% IF error -%] var relationship_types = []; var relationship_scopes = [];