Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
3ee32a9f
Commit
3ee32a9f
authored
Jan 12, 2017
by
Piotr Gawron
Browse files
clear button fixed to clear search results
parent
26d71277
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/ServerConnector.js
View file @
3ee32a9f
...
...
@@ -362,6 +362,8 @@ ServerConnector.sendClearRequest = function(overlayName) {
}
else
{
logger
.
warn
(
"
Clear function for
"
+
overlayName
+
"
doesn't exist
"
);
}
}
else
if
(
overlayName
===
"
search
"
||
overlayName
===
"
comment
"
){
logger
.
warn
(
"
Send clear request for overlay that doesn't support it:
"
+
overlayName
);
}
else
{
throw
new
Error
(
"
[Clear function] Unknown overlay:
"
,
overlayName
);
}
...
...
frontend-js/src/main/js/map/CustomMap.js
View file @
3ee32a9f
...
...
@@ -196,7 +196,11 @@ CustomMap.prototype.clearOverlays = function() {
for
(
var
overlayName
in
this
.
overlayCollections
)
{
if
(
this
.
overlayCollections
.
hasOwnProperty
(
overlayName
))
{
var
collection
=
this
.
overlayCollections
[
overlayName
];
this
.
clearOverlayCollection
(
collection
);
if
(
collection
.
constructor
.
name
===
"
OverlayCollection
"
)
{
this
.
clearOverlayCollection
(
collection
);
}
else
{
collection
.
clear
();
}
}
}
};
...
...
frontend-js/src/main/js/map/overlay/SearchDbOverlay.js
View file @
3ee32a9f
...
...
@@ -235,6 +235,8 @@ SearchDbOverlay.prototype.searchByEncodedQuery = function(originalQuery, perfect
}
};
SearchDbOverlay
.
prototype
.
clear
=
function
()
{
return
this
.
searchByQuery
(
""
);
};
module
.
exports
=
SearchDbOverlay
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment