Index: openacs-4/packages/xowiki/tcl/link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v diff -u -r1.30 -r1.31 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 28 Jul 2007 13:01:57 -0000 1.30 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 9 Aug 2007 18:05:53 -0000 1.31 @@ -26,6 +26,7 @@ type name lang stripped_name label page folder_id package_id title target + href } Link instproc atts {} { set atts "" @@ -182,7 +183,12 @@ return "$label" } } - + + Class create ::xowiki::Link::localimage -superclass ::xowiki::Link::image + ::xowiki::Link::localimage instproc render {} { + my render_found [my href] [my label] + } + Class create ::xowiki::Link::file -superclass ::xowiki::Link::image -parameter { width height align pluginspage pluginurl hidden href target autostart loop volume controls controller mastersound starttime endtime Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.84 -r1.85 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 1 Aug 2007 15:14:52 -0000 1.84 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 9 Aug 2007 18:05:53 -0000 1.85 @@ -62,7 +62,11 @@ # check first if we have widget_specs. # TODO: this part is likely to be removed in the future. - set s [$data get_rich_text_spec $__field ""] + if {[$data istype ::xowiki::PlainPage] && $__field eq "text"} { + set s "" + } else { + set s [$data get_rich_text_spec $__field ""] + } if {$s ne ""} { set __spec $s set __wspec [lindex $__spec 0] 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.162 -r1.163 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Aug 2007 20:09:42 -0000 1.162 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 9 Aug 2007 18:05:53 -0000 1.163 @@ -611,7 +611,27 @@ regexp {^([^|]+)[|](.*)$} $arg _ link label regexp {^([^|]+)[|](.*)$} $label _ label options if {[string match "http*//*" $link] || [string match "//*" $link]} { - regsub {^//} $link / link + if {[regsub {^//} $link / link]} { + my msg t=[::xowiki::guesstype $link] + switch -glob -- [::xowiki::guesstype $link] { + text/css { + ::xowiki::Page requireCSS $link + return $ch + } + application/x-javascript { + ::xowiki::Page requireJS $link + return $ch + } + image/* { + Link create [self]::link \ + -page [self] \ + -type localimage -label $label \ + -href $link + eval [self]::link configure $options + return $ch[[self]::link render] + } + } + } set l [ExternalLink new -label $label -href $link] eval $l configure $options set html [$l render] @@ -893,7 +913,7 @@ } PlainPage instproc get_content {} { - #my log "-- my class=[my info class]" + #my msg "-- my class=[my info class]" return [my substitute_markup [my set text]] } PlainPage instproc set_content {text} {