Index: openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl,v
diff -u -r1.6.2.6 -r1.6.2.7
--- openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 30 Aug 2014 16:39:31 -0000 1.6.2.6
+++ openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 7 Sep 2014 20:08:22 -0000 1.6.2.7
@@ -220,6 +220,7 @@
}
if {[info commands ::nx::Object] ne ""} {
+
::xotcl::Object instproc ad_proc {
{-private:switch false}
{-deprecated:switch false}
@@ -228,10 +229,11 @@
proc_name
arguments:parameter,0..*
doc
- body} {
- uplevel [list [self] proc $proc_name $arguments $body]
- my __api_make_doc "" $proc_name
- }
+ body
+ } {
+ uplevel [list [self] proc $proc_name $arguments $body]
+ my __api_make_doc "" $proc_name
+ }
::xotcl::Class instproc ad_instproc {
{-private:switch false}
@@ -241,10 +243,11 @@
proc_name
arguments:parameter,0..*
doc
- body} {
- uplevel [list [self] instproc $proc_name $arguments $body]
- my __api_make_doc inst $proc_name
- }
+ body
+ } {
+ uplevel [list [self] instproc $proc_name $arguments $body]
+ my __api_make_doc inst $proc_name
+ }
} else {
::xotcl::Object instproc ad_proc {
{-private:switch false}
@@ -332,51 +335,51 @@
}
-Class ::Test -ad_doc {
- Test Class for the documentation of
- Classes,
- Objects,
- instprocs, and
- procs.
- @author Gustaf Neumann
- @cvs-id $Id$
-}
-::Test ad_proc my-class-specific-proc {x y} {
- This is a proc of Class Test merely for testing purposes...
- @param x First Operand
- @param y Second Operand
-} {
- ns_log notice "hello world $x $y"
-}
+# Class ::Test -ad_doc {
+# Test Class for the documentation of
+# Classes,
+# Objects,
+# instprocs, and
+# procs.
+# @author Gustaf Neumann
+# @cvs-id $Id$
+# }
+# ::Test ad_proc my-class-specific-proc {x y} {
+# This is a proc of Class Test merely for testing purposes...
+# @param x First Operand
+# @param y Second Operand
+# } {
+# ns_log notice "hello world $x $y"
+# }
-::Test ad_instproc my-method {-id:required} {
- This is an instproc of Class Test merely for testing purposes...
- @param id Some Id
-} {
- ns_log notice "hello world $id"
-}
-::Test ad_instproc my-method2 {-id:required {-flag:boolean true}} {
- This is an instproc of Class Test merely for testing purposes...
- @param id Some Id
- @param flag Some flag
-} {
- ns_log notice "hello world $id"
-}
-::Test ad_instproc -private my-method3 {-id:required {-flag:boolean true} -switch:switch x {y 1}} {
- This is an instproc of Class Test merely for testing purposes...
- @param id Some Id
- @param flag Some flag
- @param switch Switch to turn on or off depending on default
- @param x First Operand
- @param y Second Operand
-} {
- ns_log notice "hello world $id"
-}
+# ::Test ad_instproc my-method {-id:required} {
+# This is an instproc of Class Test merely for testing purposes...
+# @param id Some Id
+# } {
+# ns_log notice "hello world $id"
+# }
+# ::Test ad_instproc my-method2 {-id:required {-flag:boolean true}} {
+# This is an instproc of Class Test merely for testing purposes...
+# @param id Some Id
+# @param flag Some flag
+# } {
+# ns_log notice "hello world $id"
+# }
+# ::Test ad_instproc -private my-method3 {-id:required {-flag:boolean true} -switch:switch x {y 1}} {
+# This is an instproc of Class Test merely for testing purposes...
+# @param id Some Id
+# @param flag Some flag
+# @param switch Switch to turn on or off depending on default
+# @param x First Operand
+# @param y Second Operand
+# } {
+# ns_log notice "hello world $id"
+# }
-Class ::SpecializedTest -superclass ::Test -ad_doc {
- A Class defined as a subclass of ::Test for testing the
- documentation stuff...
-}
+# Class ::SpecializedTest -superclass ::Test -ad_doc {
+# A Class defined as a subclass of ::Test for testing the
+# documentation stuff...
+# }
#
# Local variables:
Index: openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl,v
diff -u -r1.54.2.3 -r1.54.2.4
--- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 14 Feb 2014 18:20:44 -0000 1.54.2.3
+++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 7 Sep 2014 20:08:22 -0000 1.54.2.4
@@ -922,6 +922,8 @@
#
# templating and CSS
#
+ set use_template_head 1
+
Class create Page
Page proc requireCSS {{-order 1} name} {
set ::_xo_need_css($name) [expr {[array size ::_xo_need_css]+1000*$order}]
@@ -936,8 +938,12 @@
Page proc requireLink {-rel -type -title -href} {
regsub -all ' $title "'" title
regsub -all ' $href "'" href
- set key "rel='$rel' type='$type' title='$title' href='$href'"
- set ::_xo_need_link($key) 1
+ if {$::xo::use_template_head} {
+ template::head::add_link -rel $rel -href $href -type $type -title $title
+ } else {
+ set key "rel='$rel' type='$type' title='$title' href='$href'"
+ set ::_xo_need_link($key) 1
+ }
}
Page proc set_property {name element value} {
set ::xo_property_${name}($element) $value
@@ -959,30 +965,58 @@
}
return $result
}
+
Page proc header_stuff {} {
set result ""
- foreach link [array names ::_xo_need_link] {
- append result "\n"
- }
- foreach style [my sort_keys_by_value [array get ::_xo_need_style]] {
- append result "\n"
- }
- foreach file [my sort_keys_by_value [array get ::_xo_need_css]] {
- append result "\n"
- }
- if {[info exists ::_xo_js_order]} {
- set statements ""
- foreach file $::_xo_js_order {
- if {[string match "*;*" $file]} {
- # it is not a file, but some javascipt statements
- append statements $file \n
- } else {
- append result "\n"
+ if {$::xo::use_template_head} {
+ foreach style [my sort_keys_by_value [array get ::_xo_need_style]] {
+ template::head::add_style -style $style
+ }
+ set count 10
+ foreach file [my sort_keys_by_value [array get ::_xo_need_css]] {
+ template::head::add_css -href $file -media all -order [incr count]
+ }
+ if {[info exists ::_xo_js_order]} {
+ set statements ""
+ set order 10
+ foreach file $::_xo_js_order {
+ if {[string match "*;*" $file]} {
+ # it is not a file, but some javascipt statements
+ append statements $file \n
+ } else {
+ template::head::add_script -src $file -type text/javascript -order [incr order]
+ }
}
+ if {$statements ne ""} {
+ template::head::add_script -script $statements -type text/javascript -order [incr order]
+ }
}
- if {$statements ne ""} {
- append result \n "\n"
+
+
+ } else {
+ foreach link [array names ::_xo_need_link] {
+ append result "\n"
}
+ foreach style [my sort_keys_by_value [array get ::_xo_need_style]] {
+ append result "\n"
+ }
+ foreach file [my sort_keys_by_value [array get ::_xo_need_css]] {
+ append result "\n"
+ }
+ if {[info exists ::_xo_js_order]} {
+ set statements ""
+ foreach file $::_xo_js_order {
+ if {[string match "*;*" $file]} {
+ # it is not a file, but some javascipt statements
+ append statements $file \n
+ } else {
+ append result "\n"
+ }
+ }
+ if {$statements ne ""} {
+ append result \n "\n"
+ }
+ }
}
return $result
}