Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
0c4b3f21
Commit
0c4b3f21
authored
May 26, 2014
by
Marc Duez
Browse files
builder.js : build system display checkbox with available systems
parent
2b1fb1ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/builder.js
View file @
0c4b3f21
...
...
@@ -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
();
},
...
...
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