Commit b448d193 authored by maxchaza's avatar maxchaza

Open tab with pubmed request

parent 646ece80
......@@ -88,8 +88,8 @@ Ext.define( 'metExploreViz.view.panel.comparePanel.ComparePanelController',{
viewModel = me.getViewModel(),
view = me.getView();
view.show();
view.expand(true);
// view.show();
// view.expand(true);
// var url = 'https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/'+compound+'/cids/TXT'; // une page locale
// var url = 'https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/'+compound+'/synonyms/JSON'; // une page locale
......@@ -108,18 +108,20 @@ Ext.define( 'metExploreViz.view.panel.comparePanel.ComparePanelController',{
compound=pubChemName;
compound = compound.split(" ").join("+");
if(document.getElementById("iFramePubChem"))document.getElementById("iFramePubChem").remove();
var iframe = document.createElement('iframe');
iframe.id = "iFramePubChem",
iframe.height = '100%',
iframe.width = '100%',
iframe.border = 0,
iframe.setAttribute("style", "border: none;top: 0; right: 0;bottom: 0; left: 0; width: 100%;height: 100%;");
var panel = view.lookupReference('pubMed').el.dom;
panel.insertBefore(iframe, panel.firstChild);
window.open("https://www.ncbi.nlm.nih.gov/pubmed/?term="+disease+"%5BMeSH+Terms%5D+AND+"+compound, "_blank");
// if(document.getElementById("iFramePubChem"))document.getElementById("iFramePubChem").remove();
// var iframe = document.createElement('iframe');
// iframe.id = "iFramePubChem",
// iframe.height = '100%',
// iframe.width = '100%',
// iframe.border = 0,
// iframe.setAttribute("style", "border: none;top: 0; right: 0;bottom: 0; left: 0; width: 100%;height: 100%;");
iframe.src = "https://www.ncbi.nlm.nih.gov/pubmed/?term="+disease+"%5BMeSH+Terms%5D+AND+"+compound;
// var panel = view.lookupReference('pubMed').el.dom;
// panel.insertBefore(iframe, panel.firstChild);
// iframe.src = "https://www.ncbi.nlm.nih.gov/pubmed/?term="+disease+"%5BMeSH+Terms%5D+AND+"+compound;
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment