Index: openacs-4/www/blank-master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.adp,v
diff -u -r1.25 -r1.26
--- openacs-4/www/blank-master.adp 18 Sep 2007 07:06:33 -0000 1.25
+++ openacs-4/www/blank-master.adp 6 Oct 2007 11:57:14 -0000 1.26
@@ -7,6 +7,18 @@
lang="@link.lang;noquote@" title="@link.title;noquote@" type="@link.type;noquote@" media="@link.media@">
+
+
+ These two variables have to be set before the XinhaCore.js is loaded. To
+ enforce the order, it is put here.
+
+
+
+
+
Index: openacs-4/www/site-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/site-master.tcl,v
diff -u -r1.26 -r1.27
--- openacs-4/www/site-master.tcl 15 Sep 2007 07:22:40 -0000 1.26
+++ openacs-4/www/site-master.tcl 6 Oct 2007 11:57:14 -0000 1.27
@@ -55,6 +55,56 @@
template::head::add_javascript -src "/resources/acs-subsite/core.js"
#
+# Temporary (?) fix to get xinha working
+#
+if {[info exists ::acs_blank_master(xinha)]} {
+ set ::xinha_dir /resources/acs-templating/xinha-nightly/
+ set ::xinha_lang [lang::conn::language]
+ #
+ # Xinha localization covers 33 languages, removing
+ # the following restriction should be fine.
+ #
+ #if {$::xinha_lang ne "en" && $::xinha_lang ne "de"} {
+ # set ::xinha_lang en
+ #}
+
+ # We could add site wide Xinha configurations (.js code) into xinha_params
+ set xinha_params ""
+
+ # Per call configuration
+ set xinha_plugins $::acs_blank_master(xinha.plugins)
+ set xinha_options $::acs_blank_master(xinha.options)
+
+ # HTML ids of the textareas used for Xinha
+ set htmlarea_ids '[join $::acs_blank_master__htmlareas "','"]'
+
+ template::head::add_script -type text/javascript -script "
+ xinha_editors = null;
+ xinha_init = null;
+ xinha_config = null;
+ xinha_plugins = null;
+ xinha_init = xinha_init ? xinha_init : function() {
+ xinha_plugins = xinha_plugins ? xinha_plugins :
+ \[$xinha_plugins\];
+
+ // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
+ if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
+
+ xinha_editors = xinha_editors ? xinha_editors :\[ $htmlarea_ids \];
+ xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
+ $xinha_params
+ $xinha_options
+ xinha_editors =
+ HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
+ HTMLArea.startEditors(xinha_editors);
+ }
+ window.onload = xinha_init;
+ "
+
+ template::head::add_javascript -src ${::xinha_dir}XinhaCore.js
+}
+
+#
# Fire subsite callbacks to get header content
# FIXME: it's not clear why these callbacks are scoped to subsite or if
# FIXME callbacks are the right way to add content of this type. Either way