Index: other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.js
===================================================================
--- other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.js	(revision 31614)
+++ other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.js	(revision 31618)
@@ -1,4 +1,3 @@
 
-//var langs_with_pos =["da","de","en","nl","pt"];
 var langs_with_pos =["en","de","pt","da","nl", "sv"];
 var langs_without_pos =["af","ar","bg","bn","cs","el","es","et","fa","fi","fr","he","hi","hr","hu","id","it","ja","kn","ko","lt","lv","mk","ml","mr","ne","no","pa","pl","ro","ru","sk","sl","so","sq","sv","sw","ta","te","th","tl","tr","uk","ur","vi","zh-cn","zh-tw"];
@@ -70,6 +69,4 @@
 	var page = id_pages[pi];
 	
-	//var seqnum = page - 1;
-	//var seqnum = page + 1;
 	var seqnum = page;
 	var babel_url = "https://babel.hathitrust.org/cgi/pt?id="+id+";view=1up;seq="+seqnum;
@@ -86,8 +83,4 @@
 	    else {
 		html_item += ', <a target="_blank" href="' + babel_url + '">seq ' + seqnum + '</a> ';
-		
-		//var result_item = '<a target="_blank" href="' + babel_url + '">' + id + ', seq ' + seqnum + '</a>';
-		//result_item += ' <span style="font-style: italic;" name="'+id+'"><span style="cursor: progress;">Loading ...</span></span>';
-		//html_item += '<p ' + css_class + '>'+result_item+'</p>';
 	    }
 	}
@@ -130,6 +123,6 @@
     }
 
-    
-    // https://babel.hathitrust.org/cgi/pt?id=hvd.hnnssu;view=1up;seq=11
+    // Example form of URL
+    //   https://babel.hathitrust.org/cgi/pt?id=hvd.hnnssu;view=1up;seq=11
 
     var htids = [];
@@ -141,11 +134,8 @@
     var line_num = 0;
     while (i<num_docs) {
-//    for (var i=0; i<num_docs; i++) {
 	var doc = docs[i];
 	var id_and_page = doc.id.split(".page-");
 	var id = id_and_page[0];
 	var seqnum = parseInt(id_and_page[1]) +1; // fix up ingest error
-	//var page = seqnum+1;
-	//var page = seqnum-1;
 	var page = seqnum;
 
@@ -162,13 +152,4 @@
 	}
 	
-//	var css_class = (i%2 == 0) ? 'class="evenline"' : 'class="oddline"';
-//	//var restful_safe_id = id.replace(/\./g,",").replace(/:/g, "+").replace(/\//g, "=");
-	
-//	var babel_url = "https://babel.hathitrust.org/cgi/pt?id="+id+";view=1up;seq="+seqnum;
-
-//	var result_item = '<a target="_blank" href="' + babel_url + '">' + id + ', page ' + page + '</a>';
-//	result_item += ' <span style="font-style: italic;" name="'+id+'"><span style="cursor: progress;">Loading ...</span></span>';
-//	$search_results.append('<p ' + css_class + '>'+result_item+'</p>');
-
 	htids.push("htid:"+id);
 
@@ -195,5 +176,5 @@
     
     // Example URL for catalog metadata (multiple items)
-    // http://catalog.hathitrust.org/api/volumes/brief/json/id:552;lccn:70628581|isbn:0030110408
+    //   http://catalog.hathitrust.org/api/volumes/brief/json/id:552;lccn:70628581|isbn:0030110408
 
     var htids_str = htids.join("|",htids);
@@ -204,8 +185,4 @@
 	    jsonpCallback: "add_titles"
 	});
-
-
-    //var json_pretty = JSON.stringify(jsonData.response, null, '\t');
-    //$('#search-results').text(json_pretty)
 }
 
@@ -332,49 +309,4 @@
     }
     
-    /*
-    var fields = [];
-    var universal_pos_tags = [ "VERB", "NOUN", "ADJ", "ADV", "ADP", "CONJ", "DET", "NUM", "PRT", "X" ];
-    
-    for (var li=0; li<langs_with_pos.length; li++) {
-	var lang = langs_with_pos[li];
-	var lang_enabled_id = lang + "-enabled";
-	var $lang_enabled_cb = $('#'+lang_enabled_id);
-	if ($lang_enabled_cb.is(':checked')) {
-	    console.log("Extracting POS tags for: " + lang);
-	    
-	    for (var ti=0; ti<universal_pos_tags.length; ti++) {
-		var tag = universal_pos_tags[ti];
-		var lang_tag_id = lang+"-"+tag+"-htrctoken-cb";
-		var $lang_tag_cb = $('#'+lang_tag_id);
-		if (search_all_checked || ($lang_tag_cb.is(':checked'))) {		    
-		    var lang_tag_field = lang+"_"+tag+"_htrctoken";
-		    fields.push(lang_tag_field+":"+q_text);
-		}
-	    }
-	}
-    }
-
-    for (var li=0; li<langs_without_pos.length; li++) {
-	var lang = langs_without_pos[li];
-	var lang_enabled_id = lang + "-enabled";
-	var $lang_enabled_cb = $('#'+lang_enabled_id);
-
-	if (search_all_checked || ($lang_enabled_cb.is(':checked'))) {
-	    console.log("Adding in non-POS field for: " + lang);
-	    var lang_tag_field = lang+"_htrctoken";
-	    fields.push(lang_tag_field+":"+q_text);	    
-	}
-    }
-    */
-
-    /*
-    if (fields.length == 0) {
-	$('.search-in-progress').css("cursor","auto");
-	alert("No languages selected");
-	return;
-    }
-    
-    var arg_q = fields.join(" OR ");
-    */
     
     // Example search on one of the htrc-full-ef fields is: 
@@ -476,9 +408,4 @@
     }
 
-
-    //$('#en-enabled').click(lang_pos_toggle);
-    //$('#de-enabled').click(lang_pos_toggle);
-    //$('#de-pos-choice *').prop('disabled',true);
-
     show_hide_lang()
 }
@@ -527,5 +454,5 @@
 	
 	labeled_checkbox += '<label for="'+lang+'-enabled" style="padding-left: 5px; padding-right: 10px;" ' + opt_title + '>'+lang_full+'</label>';
-	//labeled_checkbox += '</span>\n';
+
 	labeled_checkbox += '</nobr> ';
 	
