Commit 71291e1a authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Marc Duez
Browse files

builder.js: multi-germline menu with SystemBoxMenu

parent 686bf290
...@@ -447,7 +447,7 @@ line { ...@@ -447,7 +447,7 @@ line {
} }
.systemBox { .systemBox, .systemBoxMenu {
display: inline-block; display: inline-block;
width: @width_systemBox; width: @width_systemBox;
height: 16px; height: 16px;
...@@ -455,13 +455,22 @@ line { ...@@ -455,13 +455,22 @@ line {
border-radius: 3px; border-radius: 3px;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
float: left;
margin : 2px; margin : 2px;
margin-top: 0px; margin-top: 0px;
color: @select; color: @select;
font-family: monospace; font-family: monospace;
} }
.systemBox {
float: left;
}
.systemBoxNameMenu {
display: inline-block;
min-width: 90px;
}
.clusterBox{ .clusterBox{
width: @width_clusterBox; width: @width_clusterBox;
float: left; float: left;
......
...@@ -628,8 +628,24 @@ Builder.prototype = { ...@@ -628,8 +628,24 @@ Builder.prototype = {
checkbox.onchange = function () { checkbox.onchange = function () {
m.update_selected_system() m.update_selected_system()
} }
var span_system = document.createElement('span')
span_system.className = "systemBoxMenu";
/* TODO: factorize with list.js */
if ((typeof key != 'undefined') && (typeof germline.icon[key] != 'undefined')){
span_system.appendChild(document.createTextNode(germline.icon[key].letter));
span_system.style.background = germline.icon[key].color
span_system.title = key
}else{
span_system.appendChild(document.createTextNode("?"));
if (typeof key != 'undefined')
span_system.title = key ;
}
var span = document.createElement('span'); var span = document.createElement('span');
span.className = "systemBoxNameMenu";
span.appendChild(span_system)
span.appendChild(checkbox) span.appendChild(checkbox)
span.appendChild(document.createTextNode(key)) span.appendChild(document.createTextNode(key))
......
Supports Markdown
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