Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7E8A10081 for ; Wed, 31 Jul 2013 20:27:30 +0000 (UTC) Received: (qmail 14457 invoked by uid 500); 31 Jul 2013 20:27:30 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 14437 invoked by uid 500); 31 Jul 2013 20:27:30 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 14430 invoked by uid 99); 31 Jul 2013 20:27:30 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2013 20:27:30 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 77DA9831DE2; Wed, 31 Jul 2013 20:27:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mwbrooks@apache.org To: commits@cordova.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: docs commit: Fix incorrect indentations in file examples. Date: Wed, 31 Jul 2013 20:27:30 +0000 (UTC) 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 Authored: Mon Jul 29 19:32:44 2013 +0800 Committer: Michael Brooks 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();