You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by jl...@apache.org on 2011/03/06 23:53:19 UTC

svn commit: r1078634 - /incubator/easyant/site/sources/xooki/tiddly/util.js

Author: jlboudart
Date: Sun Mar  6 23:53:19 2011
New Revision: 1078634

URL: http://svn.apache.org/viewvc?rev=1078634&view=rev
Log:
Still fixing \n refactoring on xooki pages, i think i found the main issue

Modified:
    incubator/easyant/site/sources/xooki/tiddly/util.js

Modified: incubator/easyant/site/sources/xooki/tiddly/util.js
URL: http://svn.apache.org/viewvc/incubator/easyant/site/sources/xooki/tiddly/util.js?rev=1078634&r1=1078633&r2=1078634&view=diff
==============================================================================
--- incubator/easyant/site/sources/xooki/tiddly/util.js (original)
+++ incubator/easyant/site/sources/xooki/tiddly/util.js Sun Mar  6 23:53:19 2011
@@ -66,20 +66,20 @@ xooki.io.getLocalPath = function (origin
         originalPath = "file://" + originalPath.substr(16);
     // Convert to a native file format assuming
     // "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
-    // "file://///server/share/path/path/path..." - FireFox pc network file --> "\server\share\path\path\path..."
+    // "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
     // "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
-    // "file://server/share/path/path/path..." - pc network file --> "\server\share\path\path\path..."
+    // "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
     var localPath;
     if(originalPath.charAt(9) == ":") // pc local file
-        localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\");
+        localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
     else if(originalPath.indexOf("file://///") == 0) // FireFox pc network file
-        localPath = "\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\");
+        localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
     else if(originalPath.indexOf("file:///") == 0) // mac/unix local file
         localPath = unescape(originalPath.substr(7));
     else if(originalPath.indexOf("file:/") == 0) // mac/unix local file
         localPath = unescape(originalPath.substr(5));
     else // pc network file
-        localPath = "\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\");
+        localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");
     return localPath;
 }
 
@@ -93,7 +93,7 @@ function ieSaveFile(filePath, content)
         }
     catch(e)
         {
-        //alert("Exception while attempting to save \n\n" + e.toString());
+        //alert("Exception while attempting to save\n\n" + e.toString());
         return(null);
         }
     var file = fso.OpenTextFile(filePath,2,-1,0);
@@ -140,9 +140,7 @@ function mozillaSaveFile(filePath, conte
             }
         catch(e)
             {
-            //alert("Exception while attempting to save
-
-" + e);
+            //alert("Exception while attempting to save\n\n" + e);
             return(false);
             }
     return(null);
@@ -167,7 +165,7 @@ function mozillaLoadFile(filePath)
             }
         catch(e)
             {
-            //alert("Exception while attempting to load \n\n" + e);
+            //alert("Exception while attempting to load\n\n" + e);
             return(false);
             }
     return(null);