Index: openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl,v diff -u -r1.7.2.3 -r1.7.2.4 --- openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl 27 Sep 2016 08:04:02 -0000 1.7.2.3 +++ openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl 6 Oct 2016 10:30:16 -0000 1.7.2.4 @@ -289,38 +289,54 @@ if {$element(mode) eq "edit"} { if { $storage_type eq "" } { - append output "" - append output "
" + append output [subst { + +
+ }] + template::add_event_listener \ + -id "$element(id).storage_type_file" \ + -script [subst {acs_RichText_Or_File_InputMethodChanged('$element(form_id)', '$element(id)', this);}] + } else { - append output "" + append output [subst { + + }] } if { $storage_type eq "" || $storage_type eq "text" } { - append output {} - - append output [textarea_internal "$element(id).text" attributes $text] - append output "
Format: [menu "$element(id).mime_type" [template::util::richtext_or_file::format_options] $mime_type attributes]" + append output [subst {} \ + [textarea_internal "$element(id).text" attributes $text] \ + [subst {
Format: \ + [menu "$element(id).mime_type" \ + [template::util::richtext_or_file::format_options] \ + $mime_type \ + attributes]}] } if { $storage_type eq "" } { - append output "
" - append output "" - append output "" - append output "
" + append output [subst { +
+ + +
+ }] + template::add_event_listener \ + -id "$element(id).storage_type_file" \ + -script [subst {acs_RichText_Or_File_InputMethodChanged('$element(form_id)', '$element(id)', this);}] + } if {$storage_type eq "file"} { - append output [template::util::richtext_or_file::get_property html_value $element(value)] - append output "

Replace uploaded file: " - append output "" + append output \ + [template::util::richtext_or_file::get_property html_value $element(value)] \ + "

Replace uploaded file: " \ + [subst {}] } if { $storage_type eq "" } { - append output "" + append output [subst {}] } - if { $storage_type eq "" } { append output "

"