X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=root%2Fjs%2Frelationship.js;h=0e253d8ff1132dbc05e04f31ab7213667f07a815;hb=e4bdf6606498d358c80e45b8cee69250b3bee6d3;hp=cf40f3efb49bb2913fa69e5ff76790d60b3be6e2;hpb=8e26de0f2079f2b952536a2be1af1ba159eba5c5;p=scpubgit%2Fstemmaweb.git
diff --git a/root/js/relationship.js b/root/js/relationship.js
index cf40f3e..0e253d8 100644
--- a/root/js/relationship.js
+++ b/root/js/relationship.js
@@ -600,6 +600,14 @@ function relation_factory() {
$('#delete_relation_type').text( relation.data('type') );
$('#delete_relation_scope').text( relation.data('scope') );
$('#delete_relation_attributes').empty();
+ var significance = ' is not ';
+ if( relation.data( 'is_significant' ) === 'yes') {
+ significance = ' is ';
+ } else if ( relation.data( 'is_significant' ) === 'maybe' ) {
+ significance = ' might be ';
+ }
+ $('#delete_relation_attributes').append(
+ "This relationship" + significance + "stemmatically significant
");
if( relation.data( 'a_derivable_from_b' ) ) {
$('#delete_relation_attributes').append(
"'" + relation.data('source_text') + "' derivable from '" + relation.data('target_text') + "'
");
@@ -1050,7 +1058,7 @@ $(document).ready(function () {
if( editable ) {
$( '#dialog-form' ).dialog( {
autoOpen: false,
- height: 270,
+ height: 350,
width: 330,
modal: true,
buttons: {
@@ -1100,11 +1108,15 @@ $(document).ready(function () {
$.each( relationship_scopes, function(index, value) {
$('#scope').append( $('').attr( "value", value ).text(value) );
});
- // Handler to clear the annotation field, the first time the relationship is
- // changed after opening the form.
+ $.each( ternary_values, function( index, value ) {
+ $('#is_significant').append( $('').attr( "value", value ).text(value) );
+ });
+ // Handler to reset fields to default, the first time the relationship
+ // is changed after opening the form.
$('#rel_type').change( function () {
if( !$(this).data( 'changed_after_open' ) ) {
$('#note').val('');
+ $(this).find(':checked').removeAttr('checked');
}
$(this).data( 'changed_after_open', true );
});
@@ -1132,7 +1144,8 @@ $(document).ready(function () {
$("#dialog_overlay").hide();
}
}).ajaxError( function(event, jqXHR, ajaxSettings, thrownError) {
- if( ajaxSettings.url == getTextURL('relationships')
+ if( ( ajaxSettings.url == getTextURL('relationships')
+ || ajaxSettings.url == getTextURL('merge') )
&& ajaxSettings.type == 'POST' && jqXHR.status == 403 ) {
var error;
if( jqXHR.responseText.indexOf('do not have permission to modify') > -1 ) {