svn commit: r745636 - in /lenya/branches/BRANCH_2_0_X/src/modules/editors: resources/javascript/sourceEditor/codemirror.js usecases/forms/oneform.jx

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Wed Feb 18 20:17:46 2009
New Revision: 745636

URL: http://svn.apache.org/viewvc?rev=745636&view=rev
Log:
Enable proxying for codemirror in source editor.

Modified:
    lenya/branches/BRANCH_2_0_X/src/modules/editors/resources/javascript/sourceEditor/codemirror.js
    lenya/branches/BRANCH_2_0_X/src/modules/editors/usecases/forms/oneform.jx

Modified: lenya/branches/BRANCH_2_0_X/src/modules/editors/resources/javascript/sourceEditor/codemirror.js
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/editors/resources/javascript/sourceEditor/codemirror.js?rev=745636&r1=745635&r2=745636&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/editors/resources/javascript/sourceEditor/codemirror.js (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/editors/resources/javascript/sourceEditor/codemirror.js Wed Feb 18 20:17:46 2009
@@ -19,9 +19,9 @@
 
 function insertEditor() {
     editor = CodeMirror.fromTextArea('editorContent', {
-        path: "/modules/editors/codemirror/0.60/js/",
+        path: WEBAPP_BASE_URI + "modules/editors/codemirror/0.60/js/",
         parserfile: "parsexml.js",
-        stylesheet: "/modules/editors/css/codemirror.css",
+        stylesheet: WEBAPP_BASE_URI + "modules/editors/css/codemirror.css",
         height: "400px",
         onChange: saveContent
     });
@@ -44,4 +44,4 @@
 function gotoPosition(lineNr, columnNr) {
     var line = editor.nthLine(lineNr);
     editor.selectLines(line, columnNr);
-}
\ No newline at end of file
+}

Modified: lenya/branches/BRANCH_2_0_X/src/modules/editors/usecases/forms/oneform.jx
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/editors/usecases/forms/oneform.jx?rev=745636&r1=745635&r2=745636&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/editors/usecases/forms/oneform.jx (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/editors/usecases/forms/oneform.jx Wed Feb 18 20:17:46 2009
@@ -22,10 +22,14 @@
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+  xmlns:proxy="http://apache.org/lenya/proxy/1.0"
   >
   
   <page:title><i18n:text>Edit</i18n:text></page:title>
   <page:head>
+    <script type="text/javascript">
+      WEBAPP_BASE_URI = '<proxy:url href="/"/>';
+    </script>
     <script type="text/javascript" src="/modules/editors/javascript/org.apache.lenya.editors.js"/>
     <script type="text/javascript" src="/modules/editors/javascript/sourceEditor/lenya_glue.js"/>
     <script type="text/javascript" src="/modules/editors/javascript/disablebackspace.js"/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.