Should definitively fix all ajax issues using Opera
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 19 Apr 2007 16:52:21 +0000 (16:52 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 19 Apr 2007 16:52:21 +0000 (16:52 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1719 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/javascript/ajax.js
templates/xnet/skin.tpl

index 8912dd6..a839afc 100644 (file)
@@ -50,6 +50,9 @@ function AjaxEngine()
         if (this.xml_client == null) {
             return true;
         }
+        if (src.match(/^http/i) == null) {
+            src = platal_baseurl + src;
+        }
         this.obj = obj;
         this.func = func;
         this.xml_client.abort();
@@ -127,7 +130,7 @@ function previewWiki(idFrom, idTo, withTitle, idShow)
     if (text == "") {
         return false;
     }   
-    var url  = platal_baseurl + "wiki_preview";
+    var url  = "wiki_preview";
     if (!withTitle) {
         url += "/notitle";
     }   
index e9492a7..5bd2db1 100644 (file)
@@ -41,6 +41,7 @@
     <link rel="stylesheet" type="text/css" href="css/{$css}" />
     {/foreach}
     <script type="text/javascript">
+    var platal_baseurl = "{#globals.baseurl#}/"
     if (window.top != window)
       document.write('<link rel="stylesheet" type="text/css" href="css/onlycontent.css" media="all"/>');
     </script>