Commit 961a437d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

focus on the right page

parent 2670a139
Pipeline #40086 failed with stage
in 33 minutes and 46 seconds
......@@ -9,6 +9,8 @@ minerva (16.0.0~alpha.2) stable; urgency=medium
* Small improvement: glyph quality is improved (#1458)
* Bug fix: arrows without a "process" box had an irregular empty space in
their lines (#1471)
* Bug fix: when selecting drug in the alias window the input text is updated
(#1365)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 26 Mar 2021 10:00:00 +0200
......
......@@ -66,7 +66,7 @@ AbstractDbPanel.prototype._createEventHandlers = function () {
minLength: 1,
hint: true
}, {
displayKey: function(suggestion) {
displayKey: function (suggestion) {
return suggestion;
},
source: function (query, callback) {
......@@ -87,6 +87,14 @@ AbstractDbPanel.prototype._createEventHandlers = function () {
self.getOverlayDb().addListener("onSearch", function (data) {
if (data.arg.type === AbstractDbOverlay.QueryType.SEARCH_BY_COORDINATES) {
$(searchInput).val("");
} else if (data.arg.type === AbstractDbOverlay.QueryType.SEARCH_BY_QUERY) {
$(searchInput).val(data.arg.query);
if (data.arg.query !== '') {
var link = $("a[href='#" + self.getElement().id + "']", self.getElement().parentNode.parentNode)[0];
if (link !== undefined) {
link.click();
}
}
}
});
};
......
......@@ -913,7 +913,6 @@ CustomMap.prototype.getOverlayDataForIdentifiedElement = function (identifiedEle
var promises = [];
var overlays = [];
var allOverlays = this.getDbOverlays();
console.log(allOverlays);
for (var i = 0; i < allOverlays.length; i++) {
var overlay = allOverlays[i];
if (overlay.allowGeneralSearch() || overlay.allowSearchById()) {
......
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