Index: openacs-4/www/blank-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.tcl,v diff -u -r1.35 -r1.36 --- openacs-4/www/blank-master.tcl 6 Dec 2007 18:50:13 -0000 1.35 +++ openacs-4/www/blank-master.tcl 12 Dec 2007 00:06:48 -0000 1.36 @@ -184,25 +184,23 @@ # Concatenate the javascript event handlers for the body tag variable ::template::body_handlers if {[array exists body_handlers]} { - set names [array names body_handlers] - foreach name $names { + foreach name [array names body_handlers] { set event [lindex [split $name ","] 0] -ns_log notice "event $event name $name JS !!!$body_handlers($name)!!!" + # ns_log notice "event $event name $name JS !!!$body_handlers($name)!!!" foreach javascript $body_handlers($name) { - lappend body_handlers($event) "[string trimright $javascript "; "];" - ns_log notice "adding [string trimright $javascript "; "];" + lappend body_handlers($event) "[string trimright $javascript {; }];" } - unset body_handlers($name) } -} -# Now create the event handlers string -foreach {event script} [array get body_handlers] { - append event_handlers " ${event}=\"$script\"" + # Now create the event handlers string + foreach {event script} [array get body_handlers] { + append event_handlers " " $event = \" [join $script { }] \" + } + unset body_handlers } - + # Generate the body headers variable ::template::headers set header "" Index: openacs-4/www/site-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/site-master.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/www/site-master.tcl 6 Oct 2007 11:57:14 -0000 1.27 +++ openacs-4/www/site-master.tcl 12 Dec 2007 00:06:48 -0000 1.28 @@ -88,19 +88,20 @@ \[$xinha_plugins\]; // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING - if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return; + if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; xinha_editors = xinha_editors ? xinha_editors :\[ $htmlarea_ids \]; - xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config(); + xinha_config = xinha_config ? xinha_config() : new Xinha.Config(); $xinha_params $xinha_options xinha_editors = - HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); - HTMLArea.startEditors(xinha_editors); + Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); + Xinha.startEditors(xinha_editors); } - window.onload = xinha_init; + //window.onload = xinha_init; " + template::add_body_handler -event onload -script "xinha_init();" template::head::add_javascript -src ${::xinha_dir}XinhaCore.js }