<commit_before><%@ include file="taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><studyTags:htmlTitle study="${command.study}" /></title>
<%--<tags:includeScriptaculous/>--%>
<tags:dwrJavascriptLink objects="StudyAjaxFacade"/>
<script type="text/javascript">
	var CategorySelector = Class.create();
	
	Object.extend(CategorySelector.prototype, {
	initialize: function() {
		this.win = null;
        this.termList = new Array();
    },
	
	showWindow:function(wUrl, wTitle, wWidth, wHeight){
		win = new Window({
            className:"alphacube",
            destroyOnClose:true,
            title:wTitle,
            width:wWidth,
            height:wHeight,
            recenterAuto:true,
            resizable: false,
            minimizable : false,
            maximizable: false
        });
		this.win = win;
		win.setContent('chooseCategory');
        win.showCenter(true);
	},

	finishMultiTermsSelection:function() {
        var selectedDiseasTerms ='' ;
        var selectedTerms = $$('input.AddedTermXYZ');
        selectedTerms.each(function(el) {
            if (el.checked) {
            	selectedDiseasTerms = selectedDiseasTerms + el.value +',';
            }
        });
        catSel.addStudyDisease(selectedDiseasTerms);
        Windows.close(this.win.getId());
        catSel.termList = new Array();
        $('disease-subcategories').innerHTML = "";
        $('disease-added-terms').innerHTML = "";
        return;
	},

	addStudyDisease:function(selectedTerms){
		 <tags:tabMethod method="addStudyDiseases" viewName="/study/asynchronous/study_disease_section" divElement="'studyDiseases'" formName="'tabMethodForm'" javaScriptParam="'selectedDiseaseTerms='+selectedTerms" onComplete="hideDiseaseIndicator"/> ;
	},
	
    cancelTermsSelection:function(){
		Windows.close(this.win.getId());
		terms.options.length=0;
		categories.selectedIndex = -1;
		hideDiseaseIndicator();
	},

	addTerms:function (id){
        StudyAjaxFacade.getDiseaseTerms(id, function(diseaseTerms) {
        	diseaseTerms.each(function(diseaseTerm) {
              var termName = (diseaseTerm.ctepTerm.length > 30 ? diseaseTerm.ctepTerm.substring(0, 30) + "..." : diseaseTerm.ctepTerm);
              catSel.addTerm("disease-added-terms", diseaseTerm.id, termName, diseaseTerm.ctepTerm);
            });
        });
	},

    addTerm: function(ulID, termID, termText, title) {
        if (catSel.termList[termID]) {<commit_msg>cpr-1936 passing a paramter to not save diseases<commit_after><%@ include file="taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><studyTags:htmlTitle study="${command.study}" /></title>
<%--<tags:includeScriptaculous/>--%>
<tags:dwrJavascriptLink objects="StudyAjaxFacade"/>
<script type="text/javascript">
	var CategorySelector = Class.create();
	
	Object.extend(CategorySelector.prototype, {
	initialize: function() {
		this.win = null;
        this.termList = new Array();
    },
	
	showWindow:function(wUrl, wTitle, wWidth, wHeight){
		win = new Window({
            className:"alphacube",
            destroyOnClose:true,
            title:wTitle,
            width:wWidth,
            height:wHeight,
            recenterAuto:true,
            resizable: false,
            minimizable : false,
            maximizable: false
        });
		this.win = win;
		win.setContent('chooseCategory');
        win.showCenter(true);
	},

	finishMultiTermsSelection:function() {
        var selectedDiseasTerms ='' ;
        var selectedTerms = $$('input.AddedTermXYZ');
        selectedTerms.each(function(el) {
            if (el.checked) {
            	selectedDiseasTerms = selectedDiseasTerms + el.value +',';
            }
        });
        catSel.addStudyDisease(selectedDiseasTerms);
        Windows.close(this.win.getId());
        catSel.termList = new Array();
        $('disease-subcategories').innerHTML = "";
        $('disease-added-terms').innerHTML = "";
        return;
	},

	addStudyDisease:function(selectedTerms){
		 <tags:tabMethod method="addStudyDiseases" viewName="/study/asynchronous/study_disease_section" divElement="'studyDiseases'" formName="'tabMethodForm'" javaScriptParam="'selectedDiseaseTerms='+selectedTerms+'&_doNotSave=true'" onComplete="hideDiseaseIndicator"/> ;
	},
	
    cancelTermsSelection:function(){
		Windows.close(this.win.getId());
		terms.options.length=0;
		categories.selectedIndex = -1;
		hideDiseaseIndicator();
	},

	addTerms:function (id){
        StudyAjaxFacade.getDiseaseTerms(id, function(diseaseTerms) {
        	diseaseTerms.each(function(diseaseTerm) {
              var termName = (diseaseTerm.ctepTerm.length > 30 ? diseaseTerm.ctepTerm.substring(0, 30) + "..." : diseaseTerm.ctepTerm);
              catSel.addTerm("disease-added-terms", diseaseTerm.id, termName, diseaseTerm.ctepTerm);
            });
        });
	},

    addTerm: function(ulID, termID, termText, title) {
        if (catSel.termList[termID]) {
{'fraction_non_alphanumeric': 0.14439569206222577, 'fraction_numerical': 0.005584363781412046, 'mean_word_length': 3.203688181056161, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2369315', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1534, 'n_words': 223}