remove reading-dialog decollation remnants from UI
[scpubgit/stemmaweb.git] / root / js / relationship.js
index 8eb8f80..cf40f3e 100644 (file)
@@ -58,14 +58,6 @@ function node_dblclick_listener( evt ) {
        }
        $('#reading_normal_form').attr( 'size', nfboxsize )
        $('#reading_normal_form').val( normal_form );
-       if( editable ) {
-               // Fill in the witnesses for the de-collation box.
-               $('#reading_decollate_witnesses').empty();
-               $.each( reading_info['witnesses'], function( idx, wit ) {
-                       $('#reading_decollate_witnesses').append( $('<option/>').attr(
-                               'value', wit ).text( wit ) );
-               });
-       }
        // Now do the morphological properties.
        morphology_form( reading_info['lexemes'] );
        // and then open the dialog.
@@ -970,8 +962,9 @@ function readings_equivalent( source, target ) {
                return true;
        }
        // Lowercase and strip punctuation from both and compare again
-       var stlc = sourcetext.toLowerCase().replace(/[^\w\s]|_/g, "");
-       var ttlc = targettext.toLowerCase().replace(/[^\w\s]|_/g, "");
+       var nonwc = XRegExp('[^\\p{L}\\s]|_');
+       var stlc = XRegExp.replace( sourcetext.toLocaleLowerCase(), nonwc, "", 'all' );
+       var ttlc = XRegExp.replace( targettext.toLocaleLowerCase(), nonwc, "", 'all' );
        if( stlc === ttlc ) {
                return true;
        }       
@@ -1162,7 +1155,7 @@ $(document).ready(function () {
   $( "#delete-form" ).dialog({
     autoOpen: false,
     height: 135,
-    width: 250,
+    width: 300,
     modal: false,
     buttons: {
         OK: function() { $( this ).dialog( "close" ); },
@@ -1291,11 +1284,6 @@ $(document).ready(function () {
   // function for reading form dialog should go here; 
   // just hide the element for now if we don't have morphology
   if( can_morphologize ) {
-         if( editable ) {
-                 $('#reading_decollate_witnesses').multiselect();
-         } else {
-                 $('#decollation').hide();
-         }
          $('#reading-form').dialog({
                autoOpen: false,
                // height: 400,
@@ -1351,8 +1339,6 @@ $(document).ready(function () {
                },
                open: function() {
                        $(".ui-widget-overlay").css("background", "none");
-                       $('#reading_decollate_witnesses').multiselect("refresh");
-                       $('#reading_decollate_witnesses').multiselect("uncheckAll");
                        $("#dialog_overlay").show();
                        $('#reading_status').empty();
                        $("#dialog_overlay").height( $("#enlargement_container").height() );