5 /ontology/associate_ontology.mas - a component for printing a generic 'associate_ontology' javasript form and displaying the ontology annotation
20 the type of the object you are annotating
22 =item cvterm_autocomplete_uri
24 defaults to /ajax/cvterm/autocomplete
28 the uri for associating the cvterm with your object
30 =iterm relationships_uri
32 populate the relationships drop down menu. defaults to /ajax/cvterm/relationships
36 populate the evidence code menu. Defaults to /ajax/cvterm/evidence
38 =item evidence_description_uri
40 populate the evidence description menu. Defaults to /ajax/cvterm/evidence_description
44 whether the associate form should be printed. Usually only if the user is logged-in
48 the url for displaying the ontology annotation
54 Naama Menda <nm249@cornell.edu>
65 $cvterm_autocomplete_uri => '/ajax/cvterm/autocomplete'
67 $relationships_uri => '/ajax/cvterm/relationships'
68 $evidence_uri => '/ajax/cvterm/evidence'
69 $evidence_description_uri => '/ajax/cvterm/evidence_description'
70 $reference_uri => '/stock/'.$object_id.'/references'
72 $div_id => 'ontology_terms'
81 border: 1px dotted gray;
84 #ontology_show_details {
88 #ontology_show_details label {
91 .active#ontology_show_details {
96 <& /util/import_javascript.mas, classes=>[qw[ jquery jqueryui popup CXGN.AJAX.Ontology] ]&>
98 <div id="ontology_show_details" style="display: none">
99 <form> <input type="checkbox" id="show_details" disabled="true" />
100 <label for="show_details">Show complete details</label>
104 <div id="ontology" >[loading...] </div>
106 <script language="javascript">
109 Ontology.displayOntologies("ontology" , "<% $ontology_url %>");
114 <div id="associate_cvterm_form">
115 <b>Associate ontology term</b>
116 <form name="cvterm_form" >
117 <div id="cvterm_search" >
118 <input type="text" style="width: 50%" id="term_name" name="term_name" value="Type a term name" onchange="Ontology.updateAutocomplete('<% $cvterm_autocomplete_uri %>')" />
119 <input type="hidden" id="object_id" name="object_id" value="<% $object_id %>" />
121 <select id = "db_name" onchange="jQuery('#term_name').val('---Type a term name---')")">
122 <option value="GO">GO (gene ontology)</option>
123 <option value="PO">PO (plant ontology)</option>
124 <option value="SP">SP (Solanaceae phenotypes)</option>
127 <div style="font-size: 80%; margin-left: 1em; color: #333">type a cvterm name</div>
128 <div id ="ontology_evidence">
129 <b>Relationship type:</b>
130 <select id="relationship_select" style="width: 100%"
131 onchange="Ontology.populateEvidence('evidence_code_select', '<% $evidence_uri %>' )">
133 <b>Evidence code:</b>
134 <select id="evidence_code_select" style="width: 100%"
135 onchange="jQuery('#associate_ontology_button').removeAttr('disabled');Ontology.populateEvidence('evidence_description_select', '<% $evidence_description_uri %>' + '?evidence_code_id=' + jQuery('#evidence_code_select').val() );Ontology.getEvidenceWith();Ontology.populateEvidence('reference_select', '<% $reference_uri %>')">
138 <b>Evidence description:</b>
139 <select id="evidence_description_select" style="width: 100%">
142 <b>Evidence with:</b>
143 <select id="evidence_with_select" style="width: 100%">
147 <select id="reference_select" style="width: 100%">
149 <div id="ontology_select_button">
151 id="associate_ontology_button"
152 value="associate term"
154 onclick="javascript:Ontology.submitCvtermForm('<% $cvterm_add_uri %>', '<% $ontology_url %>');this.disabled=true"