From 1ad5681827c6a3efa52ae7241c400f96e754aeb7 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 22 Aug 2015 17:19:07 +0200 Subject: [PATCH] remove DOM usage from object --- lib/object_view.rb | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/object_view.rb b/lib/object_view.rb index 1cf93a1..a51278e 100644 --- a/lib/object_view.rb +++ b/lib/object_view.rb @@ -9,19 +9,13 @@ class ObjectView < ElementView def draw # todo, remove the DOM use - DOM do |dom| - dom.ul.nav! do # :sid => @object_id - dom.li do - dom.span {class_header(@object_id)} - end - dom.li { "  -------------------------"} - content(@object_id).each do |con3| - dom.li do - dom.a(:href => "#") { con3[0]} - end - end - end + @element = div("ul.nav!") + add( "li" ) << div("span" , class_header(@object_id) ) + @element << div("li" , "-------------------------") + content(@object_id).each do |con3| + add("li") << div("a" , con3[0]) end + return @element end def object_changed reg