small ui changes

This commit is contained in:
Torsten Ruger 2015-08-19 22:24:37 +02:00
parent 719f026d0f
commit 83b9511df3
4 changed files with 48 additions and 40 deletions

View File

@ -7,7 +7,7 @@ body {
margin: 0;
list-style: none;
float : left;
width : 9em;
width : 10em;
/*border around submenu goes here*/
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
@ -19,13 +19,13 @@ body {
position : relative;
float : left;
line-height : 1.25em;
width: 8em;
width: 9em;
}
#nav li ul { /* second-level lists */
position : absolute;
left: -999em;
margin-left : 9.05em;
margin-left : 10.05em;
margin-top : -1.35em;
}
@ -33,9 +33,9 @@ body {
left: -999em;
}
#nav li a {
margin-left: 0.5em;
width : 8.5em;
#nav li a , li span {
padding-left: 0.5em;
width : 9.5em;
display : block;
color : black;
font-weight : bold;
@ -50,10 +50,10 @@ body {
background-color : #F6C739;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
#nav li:hover ul ul, #nav li:hover ul ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul { /* lists nested under hovered list items */
left: auto;
}

View File

@ -7,10 +7,14 @@ module Main
def index_ready
container = Native(self.container).querySelector("ul")
return unless container
puts "li " + container.innerHTML + " lo"
all = container.querySelectorAll("a")
len = all.length - 1
while len >= 0
puts "li #{len}" + all.item(len).innerHTML + " lo"
len = len - 1
end
# red = -> (event) { container.style.backgroundColor = "red" }
red = -> (event) { puts container.tagName }
red = -> (event) { puts container.innerHTML }
container.addEventListener("mouseenter" , red)
end
@ -24,13 +28,17 @@ module Main
str + " : #{id.to_s}"
end
def class_header(id)
object = Virtual.machine.objects[id]
return "" unless object
clazz = object.class.name.split("::").last
"#{clazz}:#{id}"
end
def content(id)
object = Virtual.machine.objects[id]
fields = []
if object and ! object.is_a?(String)
clazz = object.class.name.split("::").last
fields << ["#{clazz}:#{object.object_id}" , 0]
fields << ["--------------------" , 0 ]
object.get_instance_variables.each do |variable|
f = object.get_instance_variable(variable)
fields << ["#{variable} : #{marker(f.object_id)}" , f.object_id]

View File

@ -4,22 +4,20 @@
<:Body>
<div class="classes">
<h4> Classes </h4>
<div class="one-class">
<ul id="nav">
{{page._classes.each do |clas| }}
<li>
<a href="#">{{ clas._name }}</a>
{{ unless variables(clas).empty? }}
<ul>
{{variables(clas).each do |var| }}
<li>
<a href="#">{{var}}</a>
</li>
{{ end }}
</ul>
<ul id="nav">
{{page._classes.each do |clas| }}
<li>
<a href="#">{{ clas._name }}</a>
{{ unless variables(clas).empty? }}
<ul>
{{variables(clas).each do |var| }}
<li>
<a href="#">{{var}}</a>
</li>
{{ end }}
</li>
{{end}}
</ul>
</div>
</ul>
{{ end }}
</li>
{{end}}
</ul>
</div>

View File

@ -2,12 +2,14 @@
objects index
<:Body>
{{ if(is_object?(attrs.id) ) }}
<ul>
{{content(attrs.id).each do |con3| }}
<li>
<a href="#">{{con3[0]}}</a>
</li>
{{end}}
</ul>
{{ end }}
<ul sid={{attrs.id}}>
<li>
<span>{{class_header(attrs.id)}}</span>
</li>
<li>&nbsp;&nbsp;-------------------------</li>
{{content(attrs.id).each do |con3| }}
<li>
<a href="#">{{con3[0]}}</a>
</li>
{{end}}
</ul>