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.23.2.16 -r1.23.2.17 --- openacs-4/packages/xowiki/tcl/tree-procs.tcl 7 Mar 2022 14:06:47 -0000 1.23.2.16 +++ openacs-4/packages/xowiki/tcl/tree-procs.tcl 7 Mar 2022 16:00:36 -0000 1.23.2.17 @@ -113,7 +113,7 @@ set pos 0 if {${:verbose}} { :log "add_pages want to add [llength [$pages children]] pages" - } + } set ul_class [expr {[dict exists $properties CSSclass_ul] ? [dict get $properties CSSclass_ul] : ""}] foreach o [$pages children] { @@ -132,8 +132,6 @@ 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] \ Index: openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl 7 Mar 2022 15:02:24 -0000 1.1.2.1 +++ openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl 7 Mar 2022 16:00:36 -0000 1.1.2.2 @@ -42,21 +42,36 @@ # Create a trivial ToC page with "list" style and # check that this won't return an error # - foreach {name po} { - p1 1 - p1_1 1.1 - p1_2 1.2 - p1_10 1.10 - p1_2 2 + foreach {po} { + 1 + 1.1 + 1.2 + 1.10 + 1.1.1 + 2 + 2.1 + 3 + 3.1 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 10.1 + 100 } { - set id($name) [xowiki::test::require_page \ + set id($po) [xowiki::test::require_page \ -page_order $po \ - en:$name \ + en:p$po \ $f_id $package_id] - } - ::xo::db::CrClass get_instance_from_db -item_id $id(p1) - set HTML [$id(p1) include {toc -full 1 -decoration plain}] + } + ::xo::db::CrClass get_instance_from_db -item_id $id(1) + set HTML [$id(1) include {toc -full 1 -decoration plain}] + ns_log notice R0=$HTML + acs::test::dom_html root $HTML { set elements [lmap node [$root selectNodes //li] {lindex [$node asText] 0}] } @@ -65,9 +80,16 @@ aa_true "find 1.2" {[lsearch $elements 1.2] > -1} aa_true "find 1.10" {[lsearch $elements 1.10] > -1} aa_true "1.1 before 1.2" {[lsearch $elements 1.1] < [lsearch $elements 1.2]} - aa_true "1.2 before 1.10" {[lsearch $elements 1.2] < [lsearch $elements 1.10]} - ns_log notice R=$HTML + aa_true "1.2 before 1.10" {[lsearch $elements 1.2] < [lsearch $elements 1.10]} + aa_true "3.1 before 9" {[lsearch $elements 3.1] < [lsearch $elements 9]} + aa_true "2 before 100" {[lsearch $elements 2] < [lsearch $elements 100]} + #set HTML [$id(1) include {toc -style list -full 1 -decoration plain}] + #ns_log notice R1=$HTML + + #set HTML [$id(1) include {toc -style list -expand_all true -decoration plain}] + #ns_log notice R2=$HTML + } finally { # set node_id [site_node::get_node_id -url /$instance] # site_node::unmount -node_id $node_id Index: openacs-4/packages/xowiki/tcl/test/tree-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/tree-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/xowiki/tcl/test/tree-procs.tcl 7 Mar 2022 15:21:16 -0000 1.1.2.5 +++ openacs-4/packages/xowiki/tcl/test/tree-procs.tcl 7 Mar 2022 16:00:36 -0000 1.1.2.6 @@ -19,7 +19,6 @@ try { - set testfolder .testfolder ::xowiki::Package initialize -package $package_id set root_folder_id [::$package_id folder_id]