Commit 641a0d75 authored by Steffen Michels's avatar Steffen Michels

allow selection in tree map of maps with children by clicking on the map icon,...

allow selection in tree map of maps with children by clicking on the map icon, not only on the label text
parent 35576fa0
Pipeline #26965 passed with stage
in 5 minutes and 11 seconds
......@@ -83,17 +83,21 @@
list-style: none;
input {
position: absolute;
top: 0;
left: 0;
margin: 0;
opacity: 0;
cursor: pointer;
display: none;
+ ol {
margin: -15px 0 0 -44px;
+ label {
display: inline-block;
background: url("/css/icons/toggle-small-expand.png") no-repeat;
width: 16px;
height: 16px;
background: url('#{$icon-path}toggle-small-expand.png') 44px 0 no-repeat;
position: absolute;
top: 0;
left: 0;
padding: 0;
}
~ ol {
margin: 0 0 0 -44px;
> li {
display: none;
......@@ -101,10 +105,14 @@
padding-left: 1px;
}
}
&:checked + ol {
padding: 20px 0 0 80px;
&:checked {
+ label {
background: url("/css/icons/toggle-small.png") no-repeat;
}
~ ol {
padding: 0 0 0 80px;
height: auto;
background: url('#{$icon-path}toggle-small.png') 44px 0 no-repeat;
> li {
display: block;
......@@ -114,6 +122,7 @@
margin: 0 0 1px;
}
}
}
}
}
&.#{$prefix}leaf > label {
......
......@@ -393,6 +393,11 @@ itasks.Tree = Object.assign({
},me);
node.appendChild(childExpand);
label = document.createElement('label');
label.setAttribute('for', childExpand.id);
node.appendChild(label);
childOl = document.createElement('ol');
option.children.forEach(function(option,childIdx) {
me.addNode(option,childOl,nodeId,childIdx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment