Index: openacs-4/packages/xowiki/tcl/category-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/category-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/xowiki/tcl/category-procs.tcl 4 Jan 2009 19:24:39 -0000 1.16 +++ openacs-4/packages/xowiki/tcl/category-procs.tcl 13 May 2009 13:23:27 -0000 1.17 @@ -31,21 +31,17 @@ } CatTree instproc open_tree {} {;} - CatTree instproc render {{-tree_style:boolean false}} { - set content "" - if {$tree_style} { - #::xo::Page requireCSS "/resources/acs-templating/mktree.css" - ::xo::Page requireCSS "/resources/xowiki/cattree.css" - ::xo::Page requireJS "/resources/acs-templating/mktree.js" - - foreach c [my children] {append content [$c render] \n} - return "
\
$cat_content\n" Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.111 -r1.112 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 8 May 2009 09:12:15 -0000 1.111 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 13 May 2009 13:23:27 -0000 1.112 @@ -606,6 +606,7 @@ {-locale ""} {-open_page ""} {-order_items_by "title,asc"} + {-style "mktree"} {-category_ids ""} {-except_category_ids ""} {-allow_edit false} @@ -765,6 +766,10 @@ } append sql $locale_clause + if {!$tree_style} { + set style sections + } + if {$count} { db_foreach [my qn get_counts] \ "select count(*) as nr,category_id from $sql group by category_id" { @@ -773,7 +778,7 @@ $category($category_id) href [ad_conn url]?category_id=$category_id$s $category($category_id) open_tree } - append content [$cattree(0) render -tree_style $tree_style] + append content [$cattree(0) render -style $style] } else { foreach {orderby direction} [split $order_items_by ,] break ;# e.g. "title,asc" set increasing [expr {$direction ne "desc"}] @@ -794,7 +799,7 @@ -increasing $increasing \ -open_item [expr {$item_id == $open_item_id}] } - append content [$cattree(0) render -tree_style $tree_style] + append content [$cattree(0) render -style $style] } } return $content @@ -865,7 +870,7 @@ } $cattree add_to_category -category $categories($category_id) -itemobj $itemobj } - return [$cattree render] + return [$cattree render -style sections] } }