You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/07/31 22:27:30 UTC

docs commit: Fix incorrect indentations in file examples.

Updated Branches:
  refs/heads/master 717182904 -> bf41ae22a


Fix incorrect indentations in file examples.

Conflicts:

	docs/en/edge/cordova/file/filetransfer/filetransfer.md


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/bf41ae22
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/bf41ae22
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/bf41ae22

Branch: refs/heads/master
Commit: bf41ae22adc348f607a43c1db453a54f6cd04471
Parents: 7171829
Author: lmnbeyond <lm...@gmail.com>
Authored: Mon Jul 29 19:32:44 2013 +0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Wed Jul 31 13:27:07 2013 -0700

----------------------------------------------------------------------
 .../file/directoryentry/directoryentry.md       | 54 ++++++++++----------
 .../en/edge/cordova/file/fileentry/fileentry.md | 38 +++++++-------
 .../cordova/file/filetransfer/filetransfer.md   |  9 ++++
 3 files changed, 55 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/bf41ae22/docs/en/edge/cordova/file/directoryentry/directoryentry.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/file/directoryentry/directoryentry.md b/docs/en/edge/cordova/file/directoryentry/directoryentry.md
index 702f733..cb4c6e6 100644
--- a/docs/en/edge/cordova/file/directoryentry/directoryentry.md
+++ b/docs/en/edge/cordova/file/directoryentry/directoryentry.md
@@ -135,31 +135,31 @@ __Quick Example__
 
     function setFolderMetadata(localFileSystem, subFolder, metadataKey, metadataValue)
     {
-            var onSetMetadataWin = function() {
-              console.log("success setting metadata")
-            }
+        var onSetMetadataWin = function() {
+            console.log("success setting metadata")
+        }
         var onSetMetadataFail = function() {
-              console.log("error setting metadata")
+            console.log("error setting metadata")
         }
 
-            var onGetDirectoryWin = function(parent) {
-              var data = {};
-              data[metadataKey] = metadataValue;
-              parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
-            }
-            var onGetDirectoryFail = function() {
-              console.log("error getting dir")
-            }
+        var onGetDirectoryWin = function(parent) {
+            var data = {};
+            data[metadataKey] = metadataValue;
+            parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
+        }
+        var onGetDirectoryFail = function() {
+            console.log("error getting dir")
+        }
 
-            var onFSWin = function(fileSystem) {
-              fileSystem.root.getDirectory(subFolder, {create: true, exclusive: false}, onGetDirectoryWin, onGetDirectoryFail);
-            }
+        var onFSWin = function(fileSystem) {
+            fileSystem.root.getDirectory(subFolder, {create: true, exclusive: false}, onGetDirectoryWin, onGetDirectoryFail);
+        }
 
-            var onFSFail = function(evt) {
-                  console.log(evt.target.error.code);
-            }
+        var onFSFail = function(evt) {
+            console.log(evt.target.error.code);
+        }
 
-            window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
+        window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
     }
 
         setFolderMetadata(LocalFileSystem.PERSISTENT, "Backups", "com.apple.MobileBackup", 1);
@@ -200,7 +200,7 @@ __Quick Example__
         alert(error.code);
     }
 
-        function moveDir(entry) {
+    function moveDir(entry) {
         var parent = document.getElementById('parent').value,
             parentName = parent.substring(parent.lastIndexOf('/')+1),
             newName = document.getElementById('newName').value,
@@ -233,15 +233,15 @@ __Parameters:__
 
 __Quick Example__
 
-        function win(entry) {
-            console.log("New Path: " + entry.fullPath);
-        }
+    function win(entry) {
+        console.log("New Path: " + entry.fullPath);
+    }
 
-        function fail(error) {
-            alert(error.code);
-        }
+    function fail(error) {
+        alert(error.code);
+    }
 
-        function copyDir(entry) {
+    function copyDir(entry) {
         var parent = document.getElementById('parent').value,
             parentName = parent.substring(parent.lastIndexOf('/')+1),
             newName = document.getElementById('newName').value,

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/bf41ae22/docs/en/edge/cordova/file/fileentry/fileentry.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/file/fileentry/fileentry.md b/docs/en/edge/cordova/file/fileentry/fileentry.md
index 4089ef1..357ec46 100644
--- a/docs/en/edge/cordova/file/fileentry/fileentry.md
+++ b/docs/en/edge/cordova/file/fileentry/fileentry.md
@@ -132,31 +132,31 @@ __Quick Example__
 
     function setFileMetadata(localFileSystem, filePath, metadataKey, metadataValue)
     {
-            var onSetMetadataWin = function() {
-              console.log("success setting metadata")
-            }
+        var onSetMetadataWin = function() {
+            console.log("success setting metadata")
+        }
         var onSetMetadataFail = function() {
-              console.log("error setting metadata")
+            console.log("error setting metadata")
         }
 
-            var onGetFileWin = function(parent) {
-              var data = {};
-              data[metadataKey] = metadataValue;
-              parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
-            }
-            var onGetFileFail = function() {
-              console.log("error getting file")
-            }
+        var onGetFileWin = function(parent) {
+            var data = {};
+            data[metadataKey] = metadataValue;
+            parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
+        }
+        var onGetFileFail = function() {
+            console.log("error getting file")
+        }
 
-            var onFSWin = function(fileSystem) {
-              fileSystem.root.getFile(filePath, {create: true, exclusive: false}, onGetFileWin, onGetFileFail);
-            }
+        var onFSWin = function(fileSystem) {
+            fileSystem.root.getFile(filePath, {create: true, exclusive: false}, onGetFileWin, onGetFileFail);
+        }
 
-            var onFSFail = function(evt) {
-                  console.log(evt.target.error.code);
-            }
+        var onFSFail = function(evt) {
+            console.log(evt.target.error.code);
+        }
 
-            window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
+        window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
     }
 
         setFileMetadata(LocalFileSystem.PERSISTENT, "Backups/sqlite.db", "com.apple.MobileBackup", 1);

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/bf41ae22/docs/en/edge/cordova/file/filetransfer/filetransfer.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/file/filetransfer/filetransfer.md b/docs/en/edge/cordova/file/filetransfer/filetransfer.md
index 7db3932..f7d74dc 100644
--- a/docs/en/edge/cordova/file/filetransfer/filetransfer.md
+++ b/docs/en/edge/cordova/file/filetransfer/filetransfer.md
@@ -265,6 +265,9 @@ __Quick Example__
 
     var win = function(r) {
         console.log("Should not be called.");
+        console.log("Code = " + r.responseCode);
+        console.log("Response = " + r.response);
+        console.log("Sent = " + r.bytesSent);
     }
 
     var fail = function(error) {
@@ -279,6 +282,12 @@ __Quick Example__
     options.fileName="myphoto.jpg";
     options.mimeType="image/jpeg";
 
+    var params = {};
+    params.value1 = "test";
+    params.value2 = "param";
+
+    options.params = params;
+
     var ft = new FileTransfer();
     ft.upload(fileURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
     ft.abort();