Skip to content
Snippets Groups Projects
Commit f6422bae authored by Piotr Gawron's avatar Piotr Gawron
Browse files

chemical query is restored from session

parent 880f878b
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -65,6 +65,15 @@ function restoreDrugQuery(customMap) {
}
};
function restoreChemicalQuery(customMap) {
var query = ServerConnector.getSessionData().getChemicalQuery();
if (query!==undefined) {
return customMap.getOverlayByName("chemical").searchByEncodedQuery(query);
} else {
return Promise.resolve();
}
};
function create(params) {
var project = params.project;
if (project===undefined) {
......@@ -153,6 +162,8 @@ function create(params) {
}).then(function(){
return restoreDrugQuery(result);
}).then(function(){
return restoreChemicalQuery(result);
}).then(function(){
if (ServerConnector.getSessionData().getShowComments()) {
result.getControl(ControlType.COMMENT_CHECKBOX).checked=true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment