Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
6fbc1aab
Commit
6fbc1aab
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
fix for onSearch event listeners (when searching for the sam thing
twice)
parent
016e04f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
fix for onSearch event listeners
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend-js/src/main/js/map/overlay/SearchDbOverlay.js
+1
-1
1 addition, 1 deletion
frontend-js/src/main/js/map/overlay/SearchDbOverlay.js
frontend-js/src/test/js/minerva-test.js
+7
-0
7 additions, 0 deletions
frontend-js/src/test/js/minerva-test.js
with
8 additions
and
1 deletion
frontend-js/src/main/js/map/overlay/SearchDbOverlay.js
+
1
−
1
View file @
6fbc1aab
...
...
@@ -175,7 +175,7 @@ SearchDbOverlay.prototype.searchBySingleQuery = function(originalQuery, perfect)
var
self
=
this
;
var
query
=
self
.
encodeQuery
(
AbstractDbOverlay
.
QueryType
.
SEARCH_BY_QUERY
,
originalQuery
,
perfect
);
if
(
self
.
_elementsByQuery
[
query
]
!==
undefined
)
{
Promise
.
resolve
(
self
.
_elementsByQuery
[
query
]);
return
Promise
.
resolve
(
self
.
_elementsByQuery
[
query
]);
}
else
{
return
ServerConnector
.
getElementsByQuery
({
query
:
originalQuery
,
...
...
This diff is collapsed.
Click to expand it.
frontend-js/src/test/js/minerva-test.js
+
7
−
0
View file @
6fbc1aab
...
...
@@ -201,11 +201,14 @@ describe('minerva global', function() {
it
(
'
add search listener
'
,
function
()
{
var
callbackOk
=
false
;
var
globalResult
;
return
ServerConnectorMock
.
getProject
().
then
(
function
(
project
)
{
var
options
=
helper
.
createCustomMapOptions
(
project
);
options
.
setDebug
(
true
);
return
minerva
.
create
(
options
);
}).
then
(
function
(
result
)
{
globalResult
=
result
;
result
.
addListener
({
dbOverlayName
:
"
search
"
,
type
:
"
onSearch
"
,
...
...
@@ -214,6 +217,10 @@ describe('minerva global', function() {
}
});
return
result
.
customMap
.
getOverlayByName
(
"
search
"
).
searchByQuery
(
"
s1
"
);
}).
then
(
function
()
{
assert
.
ok
(
callbackOk
);
callbackOk
=
false
;
return
globalResult
.
customMap
.
getOverlayByName
(
"
search
"
).
searchByQuery
(
"
s1
"
);
}).
then
(
function
()
{
assert
.
ok
(
callbackOk
);
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment