diff --git a/frontend-js/src/main/js/gui/leftPanel/ChemicalPanel.js b/frontend-js/src/main/js/gui/leftPanel/ChemicalPanel.js index cf773acd3bffa346f359b3b7b75b89102a20e36d..b927d2f85c6f1c5f9d805c9c5a3be02ef977161e 100644 --- a/frontend-js/src/main/js/gui/leftPanel/ChemicalPanel.js +++ b/frontend-js/src/main/js/gui/leftPanel/ChemicalPanel.js @@ -11,22 +11,25 @@ var PanelControlElementType = require('../PanelControlElementType'); function ChemicalPanel(params) { params.panelName = "chemical"; params.helpTip = '<p>source: Comparative Toxicogenomics Database <a target="_ctd" href="http://ctdbase.org/">ctdbase.org</a></p>' - + '<p>use only the full name of chemicals according to <a target="_ctd_chemicals" href="http://ctdbase.org/voc.go?type=chem"> ctdbase/chem</a> for search</p>' - + '<p>only curated associations between genes and chemicals with direct evidence to ' - + 'Parkinson Disease (<a href="http://bioportal.bioontology.org/ontologies/1351?p=terms&conceptid=D010300" target="_blank">D010300</a>) are displayed</p>' - + '<p>separate multiple search by semicolon'; + + '<p>only associations between genes and chemicals with direct evidence to ' + + 'Parkinson Disease (<a href="http://bioportal.bioontology.org/ontologies/1351?p=terms&conceptid=D010300" target="_blank">D010300</a>) are displayed</p>' + + '<p>use only the full name of chemicals according to <a target="_ctd_chemicals" href="http://ctdbase.org/voc.go?type=chem"> ctdbase/chem</a> for search</p>' + + 'if the chemical name includes comma(s), place a semicolon behind the name to avoid a segmentation of the name</p>' + + '<p>separate multiple search by semicolon'; params.placeholder = "full chemical name (CTD)"; + AbstractDbPanel.call(this, params); if (this.getMap().getProject().getDisease() === undefined) { this.disablePanel("DISEASE NOT DEFINED FOR PROJECT. PLEASE, DEFINE IT IN THE ADMIN SECTION."); } } + ChemicalPanel.prototype = Object.create(AbstractDbPanel.prototype); ChemicalPanel.prototype.constructor = ChemicalPanel; -ChemicalPanel.prototype.createPreamble = function(chemical) { +ChemicalPanel.prototype.createPreamble = function (chemical) { var self = this; var guiUtils = self.getGuiUtils(); var result = document.createElement("div"); @@ -37,8 +40,7 @@ ChemicalPanel.prototype.createPreamble = function(chemical) { result.appendChild(guiUtils.createParamLine("Description: ", chemical.getDescription())); result.appendChild(guiUtils.createArrayParamLine("Synonyms: ", chemical.getSynonyms())); result.appendChild(guiUtils.createParamLine("Direct Evidence: ", chemical.getDirectEvidence())); - result.appendChild(guiUtils - .createAnnotations("Directe Evidence Publications: ", chemical.getDirectEvidenceReferences())); + result.appendChild(guiUtils.createAnnotations("Direct Evidence Publications: ", chemical.getDirectEvidenceReferences())); result.appendChild(guiUtils.createAnnotations("Sources: ", chemical.getReferences())); result.appendChild(guiUtils.createNewLine()); } @@ -46,18 +48,18 @@ ChemicalPanel.prototype.createPreamble = function(chemical) { return result; }; -ChemicalPanel.prototype.createTableElement = function(target, icon) { +ChemicalPanel.prototype.createTableElement = function (target, icon) { return this.createTargetRow(target, icon); }; -ChemicalPanel.prototype.searchByQuery = function() { +ChemicalPanel.prototype.searchByQuery = function () { var self = this; var query = self.getControlElement(PanelControlElementType.SEARCH_INPUT).value; return self.getOverlayDb().searchByQuery(query); }; -ChemicalPanel.prototype.init = function() { +ChemicalPanel.prototype.init = function () { var query = ServerConnector.getSessionData().getChemicalQuery(); if (query !== undefined) { return this.getOverlayDb().searchByEncodedQuery(query);