Index: openacs-4/packages/xowiki/tcl/tree-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/tree-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/xowiki/tcl/tree-procs.tcl 13 Sep 2012 16:05:28 -0000 1.10 +++ openacs-4/packages/xowiki/tcl/tree-procs.tcl 27 Oct 2014 16:42:05 -0000 1.11 @@ -1,9 +1,9 @@ ::xo::library doc { - Classes for creating, manageing and rendering trees + Classes for creating, manageing and rendering trees - @creation-date 2009-05-29 - @author Gustaf Neumann - @cvs-id $Id$ + @creation-date 2009-05-29 + @author Gustaf Neumann + @cvs-id $Id$ } namespace eval ::xowiki { @@ -16,8 +16,8 @@ Class Tree \ -superclass ::xo::OrderedComposite \ -parameter { - {name ""} - id + {name ""} + id } # @@ -32,7 +32,7 @@ } Tree proc include_head_entries {{-renderer mktree} args} { - eval [my renderer $renderer] include_head_entries $args + [my renderer $renderer] include_head_entries {*}$args } # @@ -102,18 +102,18 @@ set level [regsub -all {[.]} [$o set page_order] _ page_order_js] if {$full || [my exists open_node($parent)] || [my exists open_node($page_order)]} { set href [$owner href $book_mode $name] - set is_current [expr {$open_page eq $name}] + set is_current [expr {$open_page eq $name}] set is_open [expr {$is_current || $expand_all}] set c [::xowiki::TreeNode new -orderby pos -pos [incr pos] -level $level \ - -object $o -owner [self] \ - -label $title -prefix $page_number -href $href \ - -highlight $is_current \ - -expanded $is_open \ - -open_requests 1] + -object $o -owner [self] \ + -label $title -prefix $page_number -href $href \ + -highlight $is_current \ + -expanded $is_open \ + -open_requests 1] set tree($level) $c - for {set l [expr {$level - 1}]} {![info exists tree($l)]} {incr l -1} {} + for {set l [expr {$level - 1}]} {![info exists tree($l)]} {incr l -1} {} $tree($l) add $c - if {$is_open} {$c open_tree} + if {$is_open} {$c open_tree} } } return $tree(-1) @@ -183,9 +183,9 @@ Class create TreeRenderer -superclass Class \ -parameter { - {subtree_wrapper_class} - {li_expanded_atts ""} - {highlight_atts {"style = 'font-weight:bold;'"}} + {subtree_wrapper_class} + {li_expanded_atts ""} + {highlight_atts {"style = 'font-weight:bold;'"}} } TreeRenderer instproc include_head_entries {args} { # to be overloaded @@ -233,7 +233,7 @@ if {![$item exists encoded(prefix)]} {set prefix [::xowiki::Includelet html_encode $prefix]} if {![$item exists encoded(suffix)]} {set suffix [::xowiki::Includelet html_encode $suffix]} append entry \ - $prefix "" [::xowiki::Includelet html_encode $title] "" $suffix + $prefix "" [::xowiki::Includelet html_encode $title] "" $suffix if {$highlight} { return "