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

View File

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

View File

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

View File

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