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.10 -r1.11 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 18 Jan 2008 21:53:50 -0000 1.10 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 29 Jan 2008 23:04:07 -0000 1.11 @@ -1663,15 +1663,26 @@ "folders" {set s "folders/"} "default" {set s ""} } - ::xo::Page requireCSS "/resources/ajaxhelper/yui/treeview/assets/${s}tree.css" - ::xo::Page requireJS "/resources/ajaxhelper/yui/yahoo/yahoo.js" - ::xo::Page requireJS "/resources/ajaxhelper/yui/event/event.js" + set version 2.4.1 + if {$s ne ""} { + ::xo::Page requireCSS "/resources/ajaxhelper/yui/treeview/assets/${s}tree.css" + } else { + ::xo::Page requireCSS http://yui.yahooapis.com/$version/build/treeview/assets/skins/sam/treeview.css + } + #::xo::Page requireJS "/resources/ajaxhelper/yui/yahoo/yahoo.js" + #::xo::Page requireJS "/resources/ajaxhelper/yui/event/event.js" + ::xo::Page requireJS http://yui.yahooapis.com/$version/build/yahoo/yahoo-min.js + ::xo::Page requireJS http://yui.yahooapis.com/$version/build/event/event-min.js if {$ajax} { - ::xo::Page requireJS "/resources/ajaxhelper/yui/dom/dom.js" ;# ANIM - ::xo::Page requireJS "/resources/ajaxhelper/yui/connection/connection.js" - ::xo::Page requireJS "/resources/ajaxhelper/yui/animation/animation.js" ;# ANIM + #::xo::Page requireJS "/resources/ajaxhelper/yui/dom/dom.js" ;# ANIM + #::xo::Page requireJS "/resources/ajaxhelper/yui/connection/connection.js" + #::xo::Page requireJS "/resources/ajaxhelper/yui/animation/animation.js" ;# ANIM + ::xo::Page requireJS http://yui.yahooapis.com/$version/build/yahoo-dom-event/yahoo-dom-event.js + ::xo::Page requireJS http://yui.yahooapis.com/$version/build/connection/connection-min.js + ::xo::Page requireJS http://yui.yahooapis.com/$version/build/animation/animation-min.js } - ::xo::Page requireJS "/resources/ajaxhelper/yui/treeview/treeview.js" + #::xo::Page requireJS "/resources/ajaxhelper/yui/treeview/treeview.js" + ::xo::Page requireJS http://yui.yahooapis.com/$version/build/treeview/treeview-min.js my set book_mode $book_mode if {!$book_mode} { @@ -1915,7 +1926,8 @@ item-button instproc render_button { -page -package_id - -method + -method + -link -src -alt -title @@ -1928,15 +1940,16 @@ if {![info exists return_url]} {set return_url $p_link} if {![info exists alt]} {set alt $method} if {![info exists src]} {set src [my set src]} - if {[$page istype ::xowiki::Package]} { - set link [$package_id make_link $package_id edit-new object_type \ - return_url page_order source_item_id] - } else { - set p_link [$package_id pretty_link [$page name]] - set link [$package_id make_link -link $p_link $page $method \ - return_url page_order source_item_id] + if {![info exists link] || $link eq ""} { + if {[$page istype ::xowiki::Package]} { + set link [$package_id make_link $package_id edit-new object_type \ + return_url page_order source_item_id] + } else { + set p_link [$package_id pretty_link [$page name]] + set link [$package_id make_link -link $p_link $page $method \ + return_url page_order source_item_id] + } } - if {$link ne ""} { set html "\"$alt\"" } @@ -1971,7 +1984,8 @@ -src /resources/acs-subsite/Edit16.gif] } - ::xowiki::IncludeletClass create delete-item-button -superclass ::xowiki::includelet::item-button \ + ::xowiki::IncludeletClass create delete-item-button \ + -superclass ::xowiki::includelet::item-button \ -parameter { {__decoration none} {src /resources/acs-subsite/Delete16.gif} @@ -1993,6 +2007,31 @@ -return_url [::xo::cc url]] } + ::xowiki::IncludeletClass create view-item-button \ + -superclass ::xowiki::includelet::item-button \ + -parameter { + {__decoration none} + {src /resources/acs-subsite/Zoom16.gif} + {parameter_declaration { + {-page_id} + {-title "#xowiki.view#"} + {-alt "view"} + {-link ""} + {-book_mode false} + }} + } + + view-item-button instproc render {} { + my get_parameters + my instvar __including_page + set page [expr {[info exists page_id] ? $page_id : $__including_page}] + return [my render_button \ + -page $page -method view -package_id $package_id \ + -link $link -title $title -alt $alt \ + -return_url [::xo::cc url]] + } + + ::xowiki::IncludeletClass create create-item-button -superclass ::xowiki::includelet::item-button \ -parameter { {__decoration none}