Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
6fc2f18c
Commit
6fc2f18c
authored
Feb 03, 2017
by
Piotr Gawron
Browse files
clear button moved from custommap
parent
bb88002a
Changes
4
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/map/CustomMap.js
View file @
6fc2f18c
...
...
@@ -288,26 +288,6 @@ CustomMap.prototype.createMapMenu = function() {
})();
this
.
divBelt
.
appendChild
(
submenuButtonDiv2
);
}
var
rightHeaderMenu
=
document
.
createElement
(
'
div
'
);
rightHeaderMenu
.
className
=
"
rightHeaderMenu
"
;
var
submenuButtonDiv
=
document
.
createElement
(
'
button
'
);
submenuButtonDiv
.
id
=
"
clear_button
"
;
submenuButtonDiv
.
className
=
"
overview_button
"
;
submenuButtonDiv
.
innerHTML
=
"
<i class='fa fa-times' style='font-size:18px; font-weight:300; padding-right:10px;'></i> CLEAR
"
;
submenuButtonDiv
.
title
=
"
Clear all queries
"
;
submenuButtonDiv
.
style
.
display
=
'
inline
'
;
submenuButtonDiv
.
onclick
=
(
function
()
{
return
function
()
{
selfMap
.
clearData
();
return
false
;
};
})();
rightHeaderMenu
.
appendChild
(
submenuButtonDiv
);
this
.
divBelt
.
appendChild
(
rightHeaderMenu
);
};
CustomMap
.
prototype
.
registerSource
=
function
(
overlayCollection
)
{
...
...
frontend-js/src/main/js/minerva.js
View file @
6fc2f18c
...
...
@@ -283,7 +283,16 @@ function create(params) {
return
false
;
};
})();
var
clearButton
=
document
.
getElementsByName
(
"
clearButton
"
)[
0
];
clearButton
.
onclick
=
(
function
()
{
return
function
()
{
result
.
clearData
();
return
false
;
};
})();
if
(
ServerConnector
.
getSessionData
().
getShowComments
())
{
result
.
getControl
(
ControlType
.
COMMENT_CHECKBOX
).
checked
=
true
;
return
result
.
refreshComments
();
...
...
frontend-js/src/test/js/helper.js
View file @
6fc2f18c
...
...
@@ -61,6 +61,10 @@ Helper.prototype.createMenuDiv = function() {
refreshCommentButton
.
setAttribute
(
"
name
"
,
"
refreshCommentButton
"
);
result
.
appendChild
(
refreshCommentButton
);
var
clearButton
=
document
.
createElement
(
"
button
"
);
clearButton
.
setAttribute
(
"
name
"
,
"
clearButton
"
);
result
.
appendChild
(
clearButton
);
return
result
;
};
...
...
web/src/main/webapp/index.xhtml
View file @
6fc2f18c
...
...
@@ -134,6 +134,10 @@ function initMap(){
<i
class=
'fa fa-refresh'
style=
'font-size:21px; font-weight:400;'
></i>
</button>
</div>
<button
name=
"clearButton"
class=
"overview_button"
title=
"Clear all queries"
>
<i
class=
'fa fa-times'
style=
'font-size:18px; font-weight:300; padding-right:10px;'
></i>
CLEAR
</button>
</div>
</div>
<div
id=
"mapElement"
class=
"mapClass"
/>
...
...
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