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.6 -r1.7 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 7 Dec 2007 14:25:04 -0000 1.6 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 17 Dec 2007 12:22:52 -0000 1.7 @@ -73,19 +73,10 @@ return $result } - ::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, - # or to influence the rendering of a decoration (e.g. title etc.) + ::xowiki::Includelet proc js_name {name} { + return [string map [list : _ # _] $name] } - ::xowiki::Includelet instproc js_name {} { - return [string map [list : _ # _] [self]] - } - - ::xowiki::Includelet instproc self_id {} { - return [string map [list : _ # _] [self]] - } ::xowiki::Includelet proc html_id {name} { # Construct a valid HTML id or name. # For details, see http://www.w3.org/TR/html4/types.html @@ -118,11 +109,6 @@ return $link } - ::xowiki::Includelet instproc screen_name {user_id} { - acs_user::get -user_id $user_id -array user - return [expr {$user(screen_name) ne "" ? $user(screen_name) : $user(name)}] - } - ::xowiki::Includelet proc incr_page_order {p} { regexp {^(.*[.]?)([^.])$} $p _ prefix suffix if {[string is integer -strict $suffix]} { @@ -236,7 +222,21 @@ foreach page $pages {set page_order($page) [incr i]} } } + + ::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, + # or to influence the rendering of a decoration (e.g. title etc.) + } + ::xowiki::Includelet instproc js_name {} { + return [[self class] js_name [self]] + } + + ::xowiki::Includelet instproc screen_name {user_id} { + acs_user::get -user_id $user_id -array user + return [expr {$user(screen_name) ne "" ? $user(screen_name) : $user(name)}] + } } namespace eval ::xowiki::includelet {