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
bbf1e3d4
Commit
bbf1e3d4
authored
Feb 03, 2017
by
Piotr Gawron
Browse files
hiding button removed from customMap
parent
50d77142
Changes
7
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/map/CustomMap.js
View file @
bbf1e3d4
...
...
@@ -133,42 +133,6 @@ CustomMap.prototype.createBelt = function() {
this
.
divBelt
=
document
.
createElement
(
'
DIV
'
);
this
.
divBelt
.
className
=
"
headerBelt
"
;
var
hideDivButton
=
document
.
createElement
(
'
DIV
'
);
hideDivButton
.
className
=
"
headerHideDivButton
"
;
var
hideButton
=
document
.
createElement
(
'
button
'
);
hideButton
.
id
=
"
hide_button
"
;
hideButton
.
className
=
"
headerHideButton
"
;
hideButton
.
innerHTML
=
"
<i class='fa fa-chevron-left'></i>
"
;
// when there is no div to hide we should allow hiding
if
(
self
.
getHideDiv
()
!==
undefined
)
{
hideButton
.
onclick
=
(
function
()
{
var
button
=
hideButton
;
var
div
=
self
.
getHideDiv
();
var
left
=
GuiConnector
.
getObjectByPrimefaceId
(
self
.
getGoogleMap
().
getDiv
().
id
).
offset
().
left
;
return
function
()
{
if
(
button
.
innerHTML
.
indexOf
(
'
fa-chevron-left
'
)
>
0
)
{
button
.
innerHTML
=
"
<i class='fa fa-chevron-right'></i>
"
;
div
.
style
.
display
=
'
none
'
;
self
.
getGoogleMap
().
getDiv
().
style
.
left
=
"
0px
"
;
}
else
{
div
.
style
.
display
=
'
block
'
;
button
.
innerHTML
=
"
<i class='fa fa-chevron-left'></i>
"
;
self
.
getGoogleMap
().
getDiv
().
style
.
left
=
left
+
"
px
"
;
}
google
.
maps
.
event
.
trigger
(
self
.
getGoogleMap
(),
'
resize
'
);
return
false
;
};
})();
}
else
{
hideButton
.
disabled
=
true
;
logger
.
warn
(
"
Left panel hiding disabled
"
);
}
hideDivButton
.
appendChild
(
hideButton
);
hideDivButton
.
index
=
1
;
// used for ordering
this
.
divBelt
.
appendChild
(
hideDivButton
);
var
controlText
=
document
.
createElement
(
'
div
'
);
controlText
.
className
=
"
headerTextBold
"
;
controlText
.
innerHTML
=
this
.
getProject
().
getName
();
...
...
frontend-js/src/main/js/minerva.js
View file @
bbf1e3d4
...
...
@@ -246,6 +246,19 @@ function create(params) {
legend
.
style
.
display
=
"
none
"
;
}
};
var
hideButton
=
document
.
getElementsByName
(
"
hideButton
"
)[
0
];
var
panel
=
document
.
getElementsByName
(
"
leftPanel
"
)[
0
];
var
icon
=
document
.
getElementsByName
(
"
hideButtonIcon
"
)[
0
];
hideButton
.
onclick
=
function
(){
if
(
icon
.
className
.
indexOf
(
"
fa-chevron-left
"
)
>=
0
)
{
icon
.
className
=
"
fa fa-chevron-right
"
;
leftPanel
.
style
.
display
=
"
none
"
;
}
else
{
icon
.
className
=
"
fa fa-chevron-left
"
;
leftPanel
.
style
.
display
=
"
block
"
;
}
google
.
maps
.
event
.
trigger
(
result
.
getGoogleMap
(),
'
resize
'
);
};
if
(
ServerConnector
.
getSessionData
().
getShowComments
())
{
result
.
getControl
(
ControlType
.
COMMENT_CHECKBOX
).
checked
=
true
;
return
result
.
refreshComments
();
...
...
frontend-js/src/test/js/helper.js
View file @
bbf1e3d4
...
...
@@ -28,6 +28,42 @@ function Helper() {
this
.
idCounter
=
1000000
;
}
Helper
.
prototype
.
createMenuDiv
=
function
()
{
var
result
=
document
.
createElement
(
"
div
"
);
var
hideDiv
=
document
.
createElement
(
"
div
"
);
result
.
appendChild
(
hideDiv
);
var
button
=
document
.
createElement
(
"
button
"
);
button
.
setAttribute
(
"
name
"
,
"
hideButton
"
)
hideDiv
.
appendChild
(
button
);
var
icon
=
document
.
createElement
(
"
i
"
);
icon
.
className
=
"
fa fa-chevron-left
"
;
icon
.
setAttribute
(
"
name
"
,
"
hideButtonIcon
"
);
button
.
appendChild
(
icon
);
var
legendCheckbox
=
document
.
createElement
(
"
input
"
);
legendCheckbox
.
setAttribute
(
"
type
"
,
"
checkbox
"
);
legendCheckbox
.
setAttribute
(
"
name
"
,
"
legendCheckbox
"
);
result
.
appendChild
(
legendCheckbox
);
return
result
;
};
Helper
.
prototype
.
createLeftPanelTab
=
function
()
{
var
result
=
document
.
createElement
(
"
div
"
);
result
.
appendChild
(
this
.
createSearchTab
());
result
.
appendChild
(
this
.
createDrugTab
());
result
.
appendChild
(
this
.
createChemicalTab
());
result
.
appendChild
(
this
.
createMiRnaTab
());
result
.
appendChild
(
this
.
createOverlayTab
());
result
.
appendChild
(
this
.
createUserTab
());
result
.
appendChild
(
this
.
createSubmapTab
());
result
.
appendChild
(
this
.
createLegendDiv
());
return
result
;
};
Helper
.
prototype
.
createSearchTab
=
function
()
{
return
this
.
createPanelTab
(
"
searchTab
"
);
};
...
...
@@ -144,31 +180,19 @@ Helper.prototype.createSubmapTab = function() {
return
result
;
};
Helper
.
prototype
.
createMenuDiv
=
function
()
{
var
result
=
document
.
createElement
(
"
div
"
);
result
.
id
=
"
menuDiv
"
;
var
legendCheckbox
=
document
.
createElement
(
"
input
"
);
legendCheckbox
.
setAttribute
(
"
type
"
,
"
checkbox
"
);
legendCheckbox
.
setAttribute
(
"
name
"
,
"
legendCheckbox
"
);
result
.
appendChild
(
legendCheckbox
);
return
result
;
};
Helper
.
prototype
.
createLegendDiv
=
function
()
{
var
result
=
document
.
createElement
(
"
div
"
);
result
.
id
=
"
legend
"
;
result
.
className
=
"
carousel slide legendBox
"
;
result
.
setAttribute
(
"
data-ride
"
,
"
carousel
"
);
result
.
className
=
"
carousel slide legendBox
"
;
result
.
setAttribute
(
"
data-ride
"
,
"
carousel
"
);
var
indicators
=
document
.
createElement
(
"
div
"
);
indicators
.
className
=
"
carousel-indicators
"
;
indicators
.
className
=
"
carousel-indicators
"
;
indicators
.
setAttribute
(
"
name
"
,
"
indicators
"
);
result
.
appendChild
(
indicators
);
var
slides
=
document
.
createElement
(
"
div
"
);
slides
.
className
=
"
carousel-inner
"
;
slides
.
className
=
"
carousel-inner
"
;
slides
.
setAttribute
(
"
name
"
,
"
slides
"
);
slides
.
setAttribute
(
"
role
"
,
"
listbox
"
);
result
.
appendChild
(
slides
);
...
...
@@ -230,7 +254,7 @@ Helper.prototype.createDbOverlay = function(map) {
map
:
map
,
name
:
"
search
"
,
});
result
.
clear
=
function
(){
result
.
clear
=
function
()
{
logger
.
debug
(
"
Clear mock
"
);
};
map
.
registerSource
(
result
);
...
...
@@ -316,9 +340,9 @@ Helper.prototype.createProject = function() {
Helper
.
prototype
.
createUser
=
function
()
{
var
result
=
new
User
({
login
:
"
testlogin
"
,
id
:
this
.
idCounter
++
,
name
:
"
some name
"
,
surname
:
"
surn
"
,
id
:
this
.
idCounter
++
,
name
:
"
some name
"
,
surname
:
"
surn
"
,
});
return
result
;
};
...
...
frontend-js/src/test/js/minerva-test.js
View file @
bbf1e3d4
...
...
@@ -18,43 +18,15 @@ describe('minerva global', function() {
});
beforeEach
(
function
()
{
global
.
search
Tab
=
helper
.
create
Search
Tab
();
document
.
body
.
appendChild
(
global
.
search
Tab
);
global
.
leftPanel
Tab
=
helper
.
create
LeftPanel
Tab
();
document
.
body
.
appendChild
(
global
.
leftPanel
Tab
);
global
.
drugTab
=
helper
.
createDrugTab
();
document
.
body
.
appendChild
(
global
.
drugTab
);
global
.
chemicalTab
=
helper
.
createChemicalTab
();
document
.
body
.
appendChild
(
global
.
chemicalTab
);
global
.
mirnaTab
=
helper
.
createMiRnaTab
();
document
.
body
.
appendChild
(
global
.
mirnaTab
);
global
.
overlayTab
=
helper
.
createOverlayTab
();
document
.
body
.
appendChild
(
global
.
overlayTab
);
global
.
userTab
=
helper
.
createUserTab
();
document
.
body
.
appendChild
(
global
.
userTab
);
global
.
submapTab
=
helper
.
createSubmapTab
();
document
.
body
.
appendChild
(
global
.
submapTab
);
global
.
legendDiv
=
helper
.
createLegendDiv
();
document
.
body
.
appendChild
(
global
.
legendDiv
);
global
.
menuDiv
=
helper
.
createMenuDiv
();
document
.
body
.
appendChild
(
global
.
menuDiv
);
});
afterEach
(
function
()
{
document
.
body
.
removeChild
(
global
.
searchTab
);
document
.
body
.
removeChild
(
global
.
drugTab
);
document
.
body
.
removeChild
(
global
.
chemicalTab
);
document
.
body
.
removeChild
(
global
.
mirnaTab
);
document
.
body
.
removeChild
(
global
.
overlayTab
);
document
.
body
.
removeChild
(
global
.
userTab
);
document
.
body
.
removeChild
(
global
.
submapTab
);
document
.
body
.
removeChild
(
global
.
legendDiv
);
document
.
body
.
removeChild
(
global
.
leftPanelTab
);
document
.
body
.
removeChild
(
global
.
menuDiv
);
});
...
...
web/src/main/webapp/index.xhtml
View file @
bbf1e3d4
...
...
@@ -115,7 +115,12 @@ function initMap(){
</div>
<div
style=
"display: table-cell;height:100%;width:100%;"
>
<div
id=
"menuDiv"
style=
"background-color:#ff0000;float:left;width:100%;height:30px "
>
<div
class=
"menuBelt"
>
<div
class=
"headerHideDivButton"
>
<button
name=
"hideButton"
class=
"headerHideButton"
>
<i
name=
"hideButtonIcon"
class=
'fa fa-chevron-left'
/>
</button>
</div>
<input
type=
"checkbox"
name =
"legendCheckbox"
/>
<label
for =
"legendCheckbox"
>
LEGEND
</label>
</div>
...
...
web/src/main/webapp/resources/css/global.css
View file @
bbf1e3d4
.menuBelt
{
width
:
100%
;
min-height
:
36px
;
height
:
auto
;
float
:
left
;
z-index
:
-1
;
background
:
#13ACE0
;
background
:
-moz-linear-gradient
(
top
,
#2CCAFE
,
#13ACE0
);
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#2CCAFE
),
to
(
#13ACE0
));
}
.headerBelt
{
width
:
100%
;
min-height
:
36px
;
height
:
auto
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
-1
;
background
:
#13ACE0
;
background
:
-moz-linear-gradient
(
top
,
#2CCAFE
,
#13ACE0
);
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#2CCAFE
),
to
(
#13ACE0
));
}
.headerHideDivButton
{
display
:
inline
;
width
:
auto
;
height
:
36px
;
float
:
left
}
.headerHideButton
{
color
:
#FFFFFF
;
height
:
36px
;
line-height
:
36px
;
padding
:
0
16px
;
margin
:
0
;
border
:
none
;
background-color
:
transparent
;
font-size
:
20px
;
border-right
:
1px
solid
#9DE1F8
;
cursor
:
pointer
;
transition
:
background-color
0.4s
ease-in-out
0s
;
}
.headerHideButton
:hover
{
background-color
:
#01536D
;
transition
:
background-color
0.4s
ease-in-out
0s
;
}
.headerTextBold
{
display
:
inline
;
width
:
auto
;
height
:
36px
;
float
:
left
;
line-height
:
36px
;
padding
:
0
17px
;
color
:
#FFFFFF
;
font-weight
:
900
;
font-size
:
13px
;
text-align
:
center
;
border-right
:
1px
solid
#9DE1F8
;
}
.legendBox
{
position
:
absolute
;
position
:
absolute
;
bottom
:
10px
;
right
:
10px
;
box-shadow
:
0
3px
20px
#999999
;
border-top
:
6px
solid
#017DA7
;
padding-top
:
15px
;
}
;
right
:
10px
;
box-shadow
:
0
3px
20px
#999999
;
border-top
:
6px
solid
#017DA7
;
padding-top
:
15px
;
}
;
.searchPanel
{
height
:
100%
;
background-color
:
#FFFFFF
;
...
...
@@ -120,4 +187,4 @@
.tt-suggestion.tt-cursor
{
color
:
#fff
;
background-color
:
#0097cf
;
}
}
\ No newline at end of file
web/src/main/webapp/resources/css/style.css
View file @
bbf1e3d4
...
...
@@ -1034,12 +1034,6 @@ a.mainTitle:hover {background-color:#000000; transition: background-color 0.4s e
#footerLinks
a
:link
,
#footerLinks
a
:visited
{
text-decoration
:
none
;
font-size
:
13px
;
font-weight
:
900
;
color
:
#ffffff
;
transition
:
all
0.4s
ease-in-out
0s
;}
#footerLinks
a
:hover
{
color
:
#999999
;
transition
:
all
0.4s
ease-in-out
0s
;}
.headerBelt
{
width
:
100%
;
min-height
:
36px
;
height
:
auto
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
-1
;
background
:
#13ACE0
;
background
:
-moz-linear-gradient
(
top
,
#2CCAFE
,
#13ACE0
);
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#2CCAFE
),
to
(
#13ACE0
));
}
.headerHideDivButton
{
display
:
inline
;
width
:
auto
;
height
:
36px
;
float
:
left
}
.headerHideButton
{
color
:
#FFFFFF
;
height
:
36px
;
line-height
:
36px
;
padding
:
0
16px
;
margin
:
0
;
border
:
none
;
background-color
:
transparent
;
font-size
:
20px
;
border-right
:
1px
solid
#9DE1F8
;
cursor
:
pointer
;
transition
:
background-color
0.4s
ease-in-out
0s
;}
.headerHideButton
:hover
{
background-color
:
#01536D
;
transition
:
background-color
0.4s
ease-in-out
0s
;
}
.headerTextBold
{
display
:
inline
;
width
:
auto
;
height
:
36px
;
float
:
left
;
line-height
:
36px
;
padding
:
0
17px
;
color
:
#FFFFFF
;
font-weight
:
900
;
font-size
:
13px
;
text-align
:
center
;
border-right
:
1px
solid
#9DE1F8
;
}
.overview_button
{
color
:
#FFFFFF
;
height
:
36px
;
line-height
:
35px
;
padding
:
0
18px
;
margin
:
0
;
border
:
none
;
background-color
:
#017DA7
;
font-size
:
13px
;
font-weight
:
900
;
border-right
:
1px
solid
#9DE1F8
;
cursor
:
pointer
;
transition
:
background-color
0.4s
ease-in-out
0s
;
}
.overview_button
:hover
{
background-color
:
#01536D
;
transition
:
background-color
0.4s
ease-in-out
0s
;
}
...
...
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