diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js index 4dcf234e2b51db0609ff3b80f14013da92e81b31..2511b62735670bcb4c389c981b4f86352bc3b2d8 100644 --- a/frontend-js/src/main/js/minerva.js +++ b/frontend-js/src/main/js/minerva.js @@ -15,6 +15,7 @@ var MiRnaDbOverlay = require('./map/overlay/MiRnaDbOverlay'); var MiRnaPanel = require('./gui/MiRnaPanel'); var OverlayPanel = require('./gui/OverlayPanel'); var OverviewDialog = require('./gui/OverviewDialog'); +var ProjectInfoPanel = require('./gui/ProjectInfoPanel'); var SearchDbOverlay = require('./map/overlay/SearchDbOverlay'); var SearchPanel = require('./gui/SearchPanel'); var SubmapPanel = require('./gui/SubmapPanel'); @@ -250,10 +251,17 @@ function create(params) { customMap : result }); + var infoPanel = new ProjectInfoPanel({ + element : document.getElementById("infoTab"), + customMap : result + }); + return new Promise(function(resolve, reject) { insertGoogleAnalyticsCode(result).then(function(){ return restoreSearchQuery(result); + }).then(function(){ + return infoPanel.refresh(); }).then(function(){ return restoreDrugQuery(result); }).then(function(){ diff --git a/frontend-js/src/test/js/helper.js b/frontend-js/src/test/js/helper.js index ed25ff83c3dcb90ffad31f4eb61b9b91294c9aea..d640a9158ee0e895a76097877b687fb5369f6ca0 100644 --- a/frontend-js/src/test/js/helper.js +++ b/frontend-js/src/test/js/helper.js @@ -95,6 +95,7 @@ Helper.prototype.createLeftPanelTab = function() { result.appendChild(this.createOverlayTab()); result.appendChild(this.createUserTab()); result.appendChild(this.createSubmapTab()); + result.appendChild(this.createProjectInfoTab()); result.appendChild(this.createLegendDiv()); return result; }; @@ -135,6 +136,13 @@ Helper.prototype.createSubmapTab = function() { return result; }; +Helper.prototype.createProjectInfoTab = function() { + var result = document.createElement("div"); + result.id = "infoTab"; + + return result; +}; + Helper.prototype.createLegendDiv = function() { var result = document.createElement("div"); result.id = "legend"; diff --git a/web/src/main/webapp/index.xhtml b/web/src/main/webapp/index.xhtml index b65efd69fc0beb2ff17e97aec93932ba7dc1a322..8060193bc1ff3c356673b35233eb2b20b9cad605 100644 --- a/web/src/main/webapp/index.xhtml +++ b/web/src/main/webapp/index.xhtml @@ -99,7 +99,7 @@ function initMap(){ <div id="submapTab"/> </p:tab > <p:tab id="infoTab" title="<div class='tngContainer'><div class='tng'></div></div><div class='maintabdiv'><i class='fa fa-info maintab'></i><br>PROJECT</div>" styleClass="leftTab"> - <ui:include src="/WEB-INF/components/map/infoPanel.xhtml" /> + <div id="infoTab"/> </p:tab > </p:tabView >