X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=stemmaweb%2Froot%2Fjs%2Frelationship.js;h=cd3d867d0ed8ed8d01c2470ff8a913cba3f2cd5f;hb=a1411d50483bfd6cc561d7f8d81941cd6d6f61a9;hp=72f83b2a0f415a6d7c1ed57847b5962641027e84;hpb=f52467de2be0f8d7de9da735d717a016cbc23aac;p=scpubgit%2Fstemmatology.git diff --git a/stemmaweb/root/js/relationship.js b/stemmaweb/root/js/relationship.js index 72f83b2..cd3d867 100644 --- a/stemmaweb/root/js/relationship.js +++ b/stemmaweb/root/js/relationship.js @@ -708,8 +708,8 @@ $(document).ready(function () { && ajaxSettings.type == 'POST' && jqXHR.status == 403 ) { var errobj = jQuery.parseJSON( jqXHR.responseText ); $('#status').append( '

Error: ' + errobj.error + '
The relationship cannot be made.

' ); - $(event.target).parent().find('.ui-button').button("enable"); } + $(event.target).parent().find('.ui-button').button("enable"); } ); $( "#delete-form" ).dialog({ @@ -772,9 +772,11 @@ $(document).ready(function () { 'normal_form': $('#reading_normal_form').val() }; // Add the morphology values $('.reading_morphology').each( function() { - var rmid = $(this).attr('id'); - rmid = rmid.substring(8); - form_values[rmid] = $(this).val(); + if( $(this).val() != '(Click to select)' ) { + var rmid = $(this).attr('id'); + rmid = rmid.substring(8); + form_values[rmid] = $(this).val(); + } }); // Make the JSON call ncpath = getReadingURL( reading_id ); @@ -803,6 +805,7 @@ $(document).ready(function () { $("#dialog_overlay").height( $("#enlargement_container").height() ); $("#dialog_overlay").width( $("#enlargement_container").innerWidth() ); $("#dialog_overlay").offset( $("#enlargement_container").offset() ); + $("#reading-form").parent().find('.ui-button').button("enable"); }, close: function() { $("#dialog_overlay").hide(); @@ -812,8 +815,8 @@ $(document).ready(function () { && ajaxSettings.type == 'POST' && jqXHR.status == 403 ) { var errobj = jQuery.parseJSON( jqXHR.responseText ); $('#reading_status').append( '

Error: ' + errobj.error + '

' ); - $(event.target).parent().find('.ui-button').button("enable"); } + $(event.target).parent().find('.ui-button').button("enable"); });