FIX: Poprawienie ścieżek w XMLEditor, żeby były budowane na podstawie STATIC_URL.
authorzuber <marek@stepniowski.com>
Thu, 15 Oct 2009 16:49:38 +0000 (18:49 +0200)
committerzuber <marek@stepniowski.com>
Thu, 15 Oct 2009 16:49:38 +0000 (18:49 +0200)
platforma/static/js/views/xml.js
platforma/templates/explorer/editor.html

index 5c18432..6f0b6fa 100644 (file)
@@ -29,8 +29,8 @@ var XMLView = View.extend({
 
         this.editor = new CodeMirror($('.xmlview', this.element).get(0), {
             parserfile: 'parsexml.js',
 
         this.editor = new CodeMirror($('.xmlview', this.element).get(0), {
             parserfile: 'parsexml.js',
-            path: "/static/js/lib/codemirror/",
-            stylesheet: "/static/css/xmlcolors.css",
+            path: documentInfo.staticURL + "js/lib/codemirror/",
+            stylesheet: documentInfo.staticURL + "css/xmlcolors.css",
             parserConfig: {
                 useHTMLKludges: false
             },
             parserConfig: {
                 useHTMLKludges: false
             },
index 576a793..daa1b9e 100644 (file)
@@ -12,7 +12,8 @@
                 userID: '{{ euser }}',
                 docURL: '{% url document_view fileid %}{% if euser %}?user={{ euser|urlencode }}{% endif %}',
                 toolbarURL: '{% url toolbar_buttons %}',
                 userID: '{{ euser }}',
                 docURL: '{% url document_view fileid %}{% if euser %}?user={{ euser|urlencode }}{% endif %}',
                 toolbarURL: '{% url toolbar_buttons %}',
-                renderURL: '{% url api.views.render %}'
+                renderURL: '{% url api.views.render %}',
+                               staticURL: '{{ STATIC_URL }}'
             }          
                 
        </script>
             }          
                 
        </script>