Commit 0c4b3f21 authored by Marc Duez's avatar Marc Duez
Browse files

builder.js : build system display checkbox with available systems

parent 2b1fb1ab
......@@ -279,10 +279,13 @@ Builder.prototype = {
var displaySelector = document.getElementById("displaySelector")
var listTag = displaySelector.getElementsByTagName("ul")[0]
var listSystem = document.getElementById("system_list")
//reset
listTag.innerHTML = "";
listSystem.innerHTML = "";
//init tag list
for (var i = 0; i < tagName.length; i++) {
(function (i) {
var span3 = document.createElement('span');
......@@ -315,6 +318,7 @@ Builder.prototype = {
})(i)
}
//init slider
var max_top = 0;
for (var i = 0; i < this.m.windows.length; i++) {
if (this.m.windows[i].top > max_top)
......@@ -324,9 +328,40 @@ Builder.prototype = {
document.getElementById("top_slider")
.max = max_top;
if (m.notation_type == "scientific") {
//init notation
if (this.m.notation_type == "scientific") {
document.getElementById("notation").checked = true
}
//init system
if (this.m.system == "multi") {
$("#system_menu").css("display", "")
for (var key in this.m.system_segmented) {
var checkbox=document.createElement("input");
checkbox.type="checkbox";
checkbox.id = "checkbox_system_"+key
checkbox.appendChild(document.createTextNode(key))
checkbox.checked=true
checkbox.onchange = function () {
m.update_selected_system()
}
var div = document.createElement('div');
div.appendChild(checkbox)
div.appendChild(document.createTextNode(key))
var li = document.createElement('li');
li.appendChild(div)
listSystem.appendChild(li);
}
}else{
$("#system_menu").css("display", "none")
}
initTag();
},
......
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