Poprawienie urli w JS.
authorzuber <marek@stepniowski.com>
Tue, 5 Jan 2010 00:35:28 +0000 (01:35 +0100)
committerzuber <marek@stepniowski.com>
Tue, 5 Jan 2010 00:35:28 +0000 (01:35 +0100)
platforma/static/js/main.js
platforma/static/js/xslt.js
platforma/templates/wiki/document_details.html

index 7b20458..ddbe756 100644 (file)
@@ -94,7 +94,7 @@ function gallery(element, url) {
         zoom();
     });
     $('.change-gallery', element).click(function() {
-        $('.chosen-gallery').val($('#document-meta .gallery').html() || '/gallery/');
+        $('.chosen-gallery').val($('#document-meta .gallery').html() || STATIC_URL + 'gallery/');
         $('.gallery-image').animate({top: 53}, 200);
         $('.chosen-gallery').focus();
     });
index 7397d34..e098a7d 100644 (file)
@@ -132,12 +132,12 @@ function withStylesheets(block, onError) {
     }
     $.blockUI({message: 'Ładowanie arkuszy stylów...'});
     $.ajax({
-        url: '/static/xsl/wl2html_client.xsl',
+        url: STATIC_URL + 'xsl/wl2html_client.xsl',
         dataType: 'xml',
         success: function(data) {
             xml2htmlStylesheet = createXSLT(data);
             $.ajax({
-                url: '/static/xsl/html2wl_client.xsl',
+                url: STATIC_URL + 'xsl/html2wl_client.xsl',
                 dataType: 'xml',
                 success: function(data) {
                     html2xmlStylesheet = createXSLT(data);
index 5aac2e6..752f4f2 100644 (file)
@@ -4,6 +4,9 @@
 {% block extrahead %}
     <link rel="stylesheet" href="{{STATIC_URL}}css/master.css" type="text/css" media="screen" charset="utf-8" />
     <link rel="stylesheet" href="{{STATIC_URL}}css/html.css" type="text/css" media="screen" charset="utf-8" />
+    <script type="text/javascript" charset="utf-8">
+        var STATIC_URL = '{{STATIC_URL}}';
+    </script>
     <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
     <script src="{{STATIC_URL}}js/jquery.blockui.js" type="text/javascript" charset="utf-8"></script>
     <script src="{{STATIC_URL}}js/button_scripts.js" type="text/javascript" charset="utf-8"></script>