Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
4dd90452
Commit
4dd90452
authored
Jan 05, 2017
by
Piotr Gawron
Browse files
logoImg is obtained via API
parent
77e365d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/ConfigurationType.js
View file @
4dd90452
...
...
@@ -2,6 +2,7 @@
var
ConfigurationType
=
{
DEFAULT_MAP
:
"
DEFAULT_MAP
"
,
LOGO_IMG
:
"
LOGO_IMG
"
,
};
module
.
exports
=
ConfigurationType
;
frontend-js/src/main/js/ServerConnector.js
View file @
4dd90452
...
...
@@ -49,13 +49,6 @@ ServerConnector.lastActualization = 0;
ServerConnector
.
_customMap
=
null
;
/**
* Get name of the file that should be used as logo.
*/
ServerConnector
.
getLogoImg
=
function
()
{
return
document
.
getElementById
(
'
logoImg
'
).
value
;
};
/**
* Get link to the website that should be accessed when clicking on
* {@link ServerConnector.getLogoImg}.
...
...
@@ -1041,6 +1034,10 @@ ServerConnector.getProjectId = function(projectId) {
}
};
ServerConnector
.
getLogoImg
=
function
()
{
return
this
.
getConfigurationParam
(
ConfigurationType
.
LOGO_IMG
);
};
ServerConnector
.
getOverlayById
=
function
(
layoutId
,
projectId
)
{
var
self
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
...
...
frontend-js/src/main/js/map/CustomMap.js
View file @
4dd90452
...
...
@@ -106,11 +106,12 @@ CustomMap.prototype.createLogo = function() {
var
logoControlDiv2
=
document
.
createElement
(
'
DIV
'
);
var
logo2
=
document
.
createElement
(
'
IMG
'
);
var
url
=
ServerConnector
.
getLogoImg
();
if
(
!
/^
(
f|ht
)
tps
?
:
\/\/
/i
.
test
(
url
))
{
url
=
GuiConnector
.
getImgPrefix
()
+
url
;
}
logo2
.
src
=
url
;
ServerConnector
.
getLogoImg
().
then
(
function
(
url
){
if
(
!
/^
(
f|ht
)
tps
?
:
\/\/
/i
.
test
(
url
))
{
url
=
GuiConnector
.
getImgPrefix
()
+
url
;
}
logo2
.
src
=
url
;
});
logo2
.
style
.
cursor
=
'
pointer
'
;
logo2
.
style
.
width
=
"
80px
"
;
logoControlDiv2
.
appendChild
(
logo2
);
...
...
frontend-js/src/test/js/ServerConnector-mock.js
View file @
4dd90452
...
...
@@ -84,10 +84,6 @@ ServerConnectorMock.callListeners = function(type, param) {
}
};
ServerConnectorMock
.
getLogoImg
=
function
()
{
return
"
marker/empty.png
"
;
};
ServerConnectorMock
.
getZoomLevel
=
function
()
{
return
this
.
zoomLevel
;
};
...
...
web/src/main/webapp/WEB-INF/components/map/map.xhtml
View file @
4dd90452
...
...
@@ -38,7 +38,6 @@
<h:inputHidden
id=
"selectedDrugPolygon"
value=
"#{drugMB.polygon}"
/>
<input
type=
"hidden"
id=
"logoLink"
value=
"#{configurationMB.logoLink}"
readonly=
"true"
/>
<input
type=
"hidden"
id=
"logoImg"
value=
"#{configurationMB.logoImg}"
readonly=
"true"
/>
<p:remoteCommand
name=
"_actualizeParams"
actionListener=
"#{mapMB.actualizeParams}"
/>
<h:inputHidden
id=
"centerCoordinateX"
value=
"#{mapMB.topModelMapData.centerCoordinateX}"
/>
...
...
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