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.63 -r1.64 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 9 Oct 2008 22:19:07 -0000 1.63 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 10 Oct 2008 07:39:35 -0000 1.64 @@ -263,6 +263,15 @@ } } + ::xowiki::Includelet instproc include_head_entries {} { + # The purpose of this method is to contain all calls to include + # CSS files, javascript, etc. in the HTML Head. This kind of + # requirements could as well be included e.g. in render, but this + # won't work, if "render" is cached. This method is called before + # render to be executed even when render is not due to caching. + # It is intended to be overloaded by subclasses. + } + ::xowiki::Includelet instproc initialize {} { # This method is called at a time after init and before render. # It can be used to alter specified parameter from the user, @@ -1515,7 +1524,7 @@ # ::xowiki::IncludeletClass create toc \ -superclass ::xowiki::Includelet \ - -cacheable false -personalized false -aggregating true \ + -cacheable true -personalized false -aggregating true \ -parameter { {__decoration plain} {parameter_declaration { @@ -1812,12 +1821,11 @@ } - toc instproc render_yui_tree {pages s} { - my get_parameters + toc instproc include_head_entries_yui_tree {ajax style} { set ajaxhelper 1 - ::xo::Page requireCSS "/resources/ajaxhelper/yui/treeview/assets/${s}tree.css" - if {$s eq ""} { + ::xo::Page requireCSS "/resources/ajaxhelper/yui/treeview/assets/${style}tree.css" + if {$style eq ""} { ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper \ treeview/assets/skins/sam/treeview.css } @@ -1830,7 +1838,12 @@ ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "animation/animation-min.js" ;# ANIM } ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "treeview/treeview.js" + } + + toc instproc render_yui_tree {pages style} { + my get_parameters + my set book_mode $book_mode if {!$book_mode} { ###### my set book_mode [[my set __including_page] exists __is_book_page] @@ -1866,6 +1879,13 @@ return $html } + toc instproc include_head_entries {} { + my get_parameters + if {$style ne "list"} { + my include_head_entries_yui_tree $ajax $style + } + } + toc instproc render {} { my get_parameters set list_mode 0