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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/xowiki/tcl/category-procs.tcl 25 Feb 2006 13:36:23 -0000 1.1
@@ -0,0 +1,55 @@
+namespace eval ::xowiki {
+ Class CatTree -superclass ::xo::OrderedComposite
+
+ CatTree instproc add_to_category {
+ -category_id
+ -itemobj
+ {-pos 0}
+ {-open_item:boolean false}
+ } {
+ set catobj [self]::$category_id
+ if {![my isobject $catobj]} {
+ ::xo::OrderedComposite create $catobj
+ $catobj set pos $pos
+ $catobj set open_requests 0
+ my add $catobj
+ }
+ if {$open_item} {$catobj incr open_requests}
+ $catobj add $itemobj
+ }
+
+ CatTree instproc render {} {
+ set content ""
+ foreach c [my children] {
+ set cat_content ""
+ foreach i [$c children] {
+ $i instvar title page_title prefix
+ append cat_content $prefix " $page_title
\n"
+ }
+ append content "
[category::get_name [namespace tail $c]]
" \
+ $cat_content "
\n"
+ }
+ return $content
+ }
+
+ CatTree instproc render-li {} {
+ ::xowiki::Page requireCSS "/resources/acs-templating/mktree.css"
+ ::xowiki::Page requireJS "/resources/acs-templating/mktree.js"
+ set content ""
+ foreach c [my children] {
+ set cat_content ""
+ foreach i [$c children] {
+ $i instvar title page_title prefix
+ append cat_content "- " \
+ $prefix "$page_title
\n"
+ }
+ set open_state [expr {[$c set open_requests]>0?"class='liOpen'" : "class='liClosed'"}]
+ append content "- [category::get_name [namespace tail $c]]" \
+ "\n"
+ }
+ return "$content
"
+ }
+
+}
Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/xowiki/tcl/chat-procs.tcl 6 Feb 2006 11:45:09 -0000 1.2
+++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 25 Feb 2006 13:36:23 -0000 1.3
@@ -111,6 +111,7 @@
}
Chat proc login {-chat_id -package_id} {
auth::require_login
+ ::xowiki::Page requireJS "/resources/xowiki/get-http-object.js"
if {![info exists package_id]} {set package_id [ad_conn package_id] }
if {![info exists chat_id]} {set chat_id $package_id }
Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 22 Feb 2006 12:35:54 -0000 1.20
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 25 Feb 2006 13:36:23 -0000 1.21
@@ -347,7 +347,7 @@
ObjectForm instproc init {} {
my instvar data
if {[$data exists title]} {
- # don't call vaidate on the folder object, don't let people change its name
+ # don't call validate on the folder object, don't let people change its name
set title [$data set title]
if {$title eq "::[$data set parent_id]"} {
my f.title {title:text(inform) {label #xowiki.name#}}
@@ -499,6 +499,19 @@
namespace eval ::xowiki {
+ Page proc requireCSS name {set ::need_css($name) 1}
+ Page proc requireJS name {set ::need_js($name) 1}
+ Page proc header_stuff {} {
+ set result ""
+ foreach file [array names ::need_css] {
+ append result "\n"
+ }
+ foreach file [array names ::need_js] {
+ append result ""
+ }
+ return $result
+ }
Page instproc get_name {uid} {
if {$uid ne "" && $uid != 0} {
@@ -534,11 +547,14 @@
} {
} {
if {![::xotcl::Object isobject ::$folder_id]} {
- set item_id [CrItem lookup -title ::$folder_id -parent_id $folder_id]
+ set item_id [ns_cache eval xotcl_object_type_cache item-of-$folder_id {
+ set item_id [CrItem lookup -title ::$folder_id -parent_id $folder_id]
+ }]
if {$item_id != 0} {
#my log "--f fetch folder object -object ::$folder_id -item_id $item_id"
set o [::xowiki::Object fetch_object -object ::$folder_id -item_id $item_id]
} else {
+ ns_cache flush xotcl_object_type_cache item-of-$folder_id
#my log "--f save new folder object"
set o [::xowiki::Object create ::$folder_id]
$o set text "# this is the payload of the folder object\n\nset index_page \"\"\n"
Index: openacs-4/packages/xowiki/www/view.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/view.adp,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/xowiki/www/view.adp 24 Feb 2006 14:30:18 -0000 1.10
+++ openacs-4/packages/xowiki/www/view.adp 25 Feb 2006 13:36:24 -0000 1.11
@@ -1,53 +1,8 @@
@page_title;noquote@
@context;noquote@
- note.title
+ @header_stuff;noquote@
-
-
-
-
-