Commit fdf293e0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

drug data is restored from session

parent 707a417b
......@@ -53,6 +53,15 @@ function restoreSearchQuery(customMap) {
}
};
function restoreDrugQuery(customMap) {
var query = ServerConnector.getSessionData().getDrugQuery();
if (query!==undefined) {
return customMap.getOverlayByName("drug").searchByEncodedQuery(query);
} else {
return Promise.resolve();
}
};
function create(params) {
if (global.GuiConnector === undefined) {
global.GuiConnector = OriginalGuiConnector;
......@@ -126,6 +135,8 @@ function create(params) {
result.refreshOverlays().then(function() {
return restoreSearchQuery(result);
}).then(function(){
return restoreDrugQuery(result);
}).then(function(){
if (ServerConnector.getSessionData().getShowComments()) {
result.getControl(ControlType.COMMENT_CHECKBOX).checked=true;
......
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