Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
4af38cd7
Commit
4af38cd7
authored
Apr 16, 2018
by
Piotr Gawron
Browse files
clicking on overview image to search result fixed
parent
f5545817
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
4af38cd7
minerva
(
11.0.10
)
stable
;
urgency
=
medium
*
Bug
fix
:
link
from
overview
image
to
search
result
was
broken
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Wed
,
16
Apr
2018
15
:
00
:
00
+
0200
minerva
(
11.0.9
)
stable
;
urgency
=
medium
*
Bug
fix
:
some
comment
couldn
't be loaded
* Bug fix: when adding comment it didn'
t
appear
on
map
immediately
...
...
frontend-js/src/main/js/gui/OverviewDialog.js
View file @
4af38cd7
...
...
@@ -197,7 +197,7 @@ OverviewDialog.prototype.openLink = function(link) {
self
.
showOverview
(
link
.
imageLinkId
);
}
else
if
(
link
.
type
===
"
OverviewSearchLink
"
)
{
logger
.
debug
(
"
Sending search query. Query:
"
+
link
.
query
);
GuiConnector
.
search
(
link
.
query
);
return
map
.
getOverlayByName
(
"
search
"
).
searchByQuery
(
link
.
query
);
$
(
self
.
getElement
()).
dialog
(
"
close
"
);
}
else
{
logger
.
warn
(
"
Unknown type of link:
"
+
link
.
type
+
"
. Don't know what to do... LinkId:
"
+
link
.
idObject
);
...
...
frontend-js/src/test/js/gui/OverviewDialog-test.js
View file @
4af38cd7
...
...
@@ -12,17 +12,17 @@ var chai = require('chai');
var
assert
=
chai
.
assert
;
var
logger
=
require
(
'
../logger
'
);
describe
(
'
OverviewDialog
'
,
function
()
{
describe
(
'
OverviewDialog
'
,
function
()
{
it
(
'
open image
'
,
function
()
{
it
(
'
open image
'
,
function
()
{
helper
.
setUrl
(
"
http://test/?id=complex_model_with_images
"
);
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
var
options
=
helper
.
createOptions
(
project
);
var
map
=
new
CustomMap
(
options
);
var
dialog
=
new
OverviewDialog
({
element
:
testDiv
,
customMap
:
map
element
:
testDiv
,
customMap
:
map
});
dialog
.
showOverview
(
project
.
getOverviewImages
()[
1
].
idObject
);
...
...
@@ -30,15 +30,15 @@ describe('OverviewDialog', function() {
});
});
it
(
'
open invalid image
'
,
function
()
{
it
(
'
open invalid image
'
,
function
()
{
helper
.
setUrl
(
"
http://test/?id=complex_model_with_images
"
);
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
var
options
=
helper
.
createOptions
(
project
);
var
map
=
new
CustomMap
(
options
);
var
dialog
=
new
OverviewDialog
({
element
:
testDiv
,
customMap
:
map
element
:
testDiv
,
customMap
:
map
});
dialog
.
showOverview
(
-
1123
);
...
...
@@ -46,22 +46,22 @@ describe('OverviewDialog', function() {
});
});
describe
(
'
openLink
'
,
function
()
{
it
(
'
link to map
'
,
function
()
{
describe
(
'
openLink
'
,
function
()
{
it
(
'
link to map
'
,
function
()
{
helper
.
setUrl
(
"
http://test/?id=complex_model_with_images
"
);
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
var
options
=
helper
.
createOptions
(
project
);
var
map
=
new
CustomMap
(
options
);
var
dialog
=
new
OverviewDialog
({
element
:
testDiv
,
customMap
:
map
element
:
testDiv
,
customMap
:
map
});
dialog
.
openLink
({
type
:
"
OverviewModelLink
"
,
modelLinkId
:
map
.
getId
(),
latLng
:
new
google
.
maps
.
LatLng
(
1
,
34
)
type
:
"
OverviewModelLink
"
,
modelLinkId
:
map
.
getId
(),
latLng
:
new
google
.
maps
.
LatLng
(
1
,
34
)
});
assert
.
equal
(
logger
.
getWarnings
().
length
,
0
);
assert
.
equal
(
1
,
map
.
getGoogleMap
().
getCenter
().
lat
());
...
...
@@ -69,6 +69,29 @@ describe('OverviewDialog', function() {
dialog
.
destroy
();
});
});
it
(
'
link to search result
'
,
function
()
{
var
overlay
,
dialog
;
return
ServerConnector
.
getProject
().
then
(
function
(
project
)
{
var
options
=
helper
.
createOptions
(
project
);
var
map
=
new
CustomMap
(
options
);
overlay
=
helper
.
createSearchDbOverlay
(
map
);
dialog
=
new
OverviewDialog
({
element
:
testDiv
,
customMap
:
map
});
return
dialog
.
openLink
({
type
:
"
OverviewSearchLink
"
,
query
:
"
s1
"
});
}).
then
(
function
()
{
assert
.
equal
(
logger
.
getWarnings
().
length
,
0
);
var
query
=
overlay
.
decodeQuery
(
overlay
.
getQueries
()[
0
]);
assert
.
equal
(
query
.
query
,
"
s1
"
);
dialog
.
destroy
();
});
});
});
});
persist/src/db/11.0.10/fix_db_20180416.sql
0 → 100644
View file @
4af38cd7
-- empty file to force directory to be commited to git repo
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment