5 /ontology/browser.mas - a mason component that displays an ontology browser
9 The ontology browser is relying on JavaScript and uses AJAX requests to pull in the data. The AJAX requests are handled by a Catalyst controller SGN::Controller::AJAX::Onto. The JavaScript code is in js/CXGN/Tools/Onto.js.
11 To configure which ontologies should be displayed, insert a line of the following format into the catalysts local conf file (sgn_local.conf on SGN):
13 C<onto_root_namespaces GO (Gene Ontology), PO (Plant Ontology), SO (Sequence Ontology), PATO (Phenotype and Trait Ontology), SP (Solanaceae Ontology)>
15 where onto_root_namespaces is the conf key, "GO" the two letter code of the ontology (as it appears in the db database table), and in parenthesis is the human readable name of the ontology.
19 Lukas Mueller <lam87@cornell.edu>
26 # comma separated list of root nodes (optional)
31 <& /util/import_javascript.mas,
39 'CXGN.Page.FormattingHelpers',
44 % #$root_nodes = 'GO PO SP'; #for testing
46 <table title="ontology browser input form" cellpadding="0" summary="" border="0"><tr><td><div id="ontology_browser_input" > </div></td></tr>
47 <tr><td><div id="ontology_term_input" >loading...</div></td></tr></table>
48 <input id="hide_link" type="button" value="show results" display="none" onClick="MochiKit.Visual.toggle('search_results', 'blind'); o.toggleSearchResultsVisible(); o.setSearchButtonText(); "><br />
50 <div id="search_results" ></div>
51 <div id="ontology_browser" style="font-size:12px; line-height:10px; font-face:arial,helvetica" > </div>
54 <script language="javascript" type="text/javascript" defer="defer" >
58 jQuery(document).ready( function() {
59 o = new CXGN.Onto.Browser('<% $root_nodes %>');
61 o.initializeBrowser('<% $root_nodes %>');
63 o.renderSearchByName('<% $db_name %>');
64 var rn = o.rootnode.getChildren();
65 var expand = "<% $expand %>";
67 for (var i=0; i<rn.length; i++) {