diff options
Diffstat (limited to 'js/io/system/coreioapi.js')
-rwxr-xr-x | js/io/system/coreioapi.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 121b4410..c3782aef 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
33 | NOTES: | 33 | NOTES: |
34 | 34 | ||
35 | Core API reference in NINJA: this.application.ninja.coreIoApi | 35 | Core API reference in NINJA: this.application.ninja.coreIoApi |
36 | 36 | ||
37 | //////////////////////////////////////////////////////////////////////// | 37 | //////////////////////////////////////////////////////////////////////// |
38 | ///////////////////////////////////////////////////////////////////// */ | 38 | ///////////////////////////////////////////////////////////////////// */ |
39 | var Montage = require("montage/core/core").Montage, | 39 | var Montage = require("montage/core/core").Montage, |
@@ -101,7 +101,7 @@ exports.CoreIoApi = Montage.create(Component, { | |||
101 | this.ninjaLibrary.addEventListener('sync', this, false); | 101 | this.ninjaLibrary.addEventListener('sync', this, false); |
102 | //Sending library to be synced to chrome | 102 | //Sending library to be synced to chrome |
103 | this.ninjaLibrary.synchronize(e._event.ninjaChromeLibrary, this.chromeFileSystem); | 103 | this.ninjaLibrary.synchronize(e._event.ninjaChromeLibrary, this.chromeFileSystem); |
104 | 104 | ||
105 | } | 105 | } |
106 | }, | 106 | }, |
107 | //////////////////////////////////////////////////////////////////// | 107 | //////////////////////////////////////////////////////////////////// |
@@ -389,7 +389,7 @@ exports.CoreIoApi = Montage.create(Component, { | |||
389 | try { | 389 | try { |
390 | var serviceURL = this._prepareServiceURL(this.fileServiceURL, file.uri), | 390 | var serviceURL = this._prepareServiceURL(this.fileServiceURL, file.uri), |
391 | xhr = new XMLHttpRequest(); | 391 | xhr = new XMLHttpRequest(); |
392 | // | 392 | // |
393 | xhr.open("GET", serviceURL, false); | 393 | xhr.open("GET", serviceURL, false); |
394 | xhr.setRequestHeader("check-existence-only", "true"); | 394 | xhr.setRequestHeader("check-existence-only", "true"); |
395 | xhr.send(); | 395 | xhr.send(); |
@@ -434,12 +434,12 @@ exports.CoreIoApi = Montage.create(Component, { | |||
434 | xhr = new XMLHttpRequest(); | 434 | xhr = new XMLHttpRequest(); |
435 | // | 435 | // |
436 | xhr.open("POST", serviceURL, false); | 436 | xhr.open("POST", serviceURL, false); |
437 | //xhr.responseType = "arraybuffer"; | 437 | //xhr.responseType = "arraybuffer"; |
438 | if(file.contentType && file.contentType.length) | 438 | if(file.contentType && file.contentType.length) |
439 | xhr.setRequestHeader("Content-Type", file.contentType); | 439 | xhr.setRequestHeader("Content-Type", file.contentType); |
440 | else | 440 | else |
441 | xhr.setRequestHeader("Content-Type", "text/plain"); | 441 | xhr.setRequestHeader("Content-Type", "text/plain"); |
442 | 442 | ||
443 | if (file.contents) | 443 | if (file.contents) |
444 | xhr.send(file.contents); | 444 | xhr.send(file.contents); |
445 | else | 445 | else |
@@ -700,7 +700,7 @@ exports.CoreIoApi = Montage.create(Component, { | |||
700 | // status: int indicating the request HTTP status code | 700 | // status: int indicating the request HTTP status code |
701 | // 200 - the file was read and its contents were returned | 701 | // 200 - the file was read and its contents were returned |
702 | // 404 - the file does not exist | 702 | // 404 - the file does not exist |
703 | // 500 - unknown server error occurred | 703 | // 500 - unknown server error occurred |
704 | readExternalFile: { | 704 | readExternalFile: { |
705 | enumerable: false, | 705 | enumerable: false, |
706 | value: function(file) { | 706 | value: function(file) { |
@@ -893,7 +893,7 @@ exports.CoreIoApi = Montage.create(Component, { | |||
893 | var retValue = { success:null, content:null, status:null }; | 893 | var retValue = { success:null, content:null, status:null }; |
894 | if(dir && dir.uri && dir.uri.length) { | 894 | if(dir && dir.uri && dir.uri.length) { |
895 | try { | 895 | try { |
896 | var serviceURL = this._prepareServiceURL(this.directoryServiceURL, dir.uri), | 896 | var serviceURL = this._prepareServiceURL(this.directoryServiceURL, dir.uri), |
897 | xhr = new XMLHttpRequest(); | 897 | xhr = new XMLHttpRequest(); |
898 | // | 898 | // |
899 | xhr.open("GET", serviceURL, false); | 899 | xhr.open("GET", serviceURL, false); |