aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
authorKris Kowal2012-07-09 16:38:08 -0700
committerKris Kowal2012-07-09 16:38:08 -0700
commit7bee50379c1df86bb571e0e8d6c08e24d25231f5 (patch)
tree5b11abd0414e0a3ab50ec6276b6334fbd168db7e /js/io
parent26d4b5ce30e6e0ea6e0fde870853c1e2a673a7b4 (diff)
downloadninja-7bee50379c1df86bb571e0e8d6c08e24d25231f5.tar.gz
BSD License
Diffstat (limited to 'js/io')
-rw-r--r--js/io/system/chromeapi.js27
-rwxr-xr-xjs/io/system/coreioapi.js37
-rwxr-xr-xjs/io/system/fileio.js29
-rw-r--r--js/io/system/ninjalibrary.js35
-rwxr-xr-xjs/io/system/projectio.js23
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.html23
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js23
-rw-r--r--js/io/ui/cloudpopup.reel/css/cloudpopup.css23
-rwxr-xr-xjs/io/ui/cloudpopup.reel/css/cloudpopup.scss23
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.css23
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.html23
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.js23
-rwxr-xr-xjs/io/ui/file-picker/file-picker-controller.js23
-rwxr-xr-xjs/io/ui/file-picker/file-picker-model.js23
-rw-r--r--js/io/ui/file-picker/picker-navigator.reel/picker-navigator.css23
-rwxr-xr-xjs/io/ui/file-picker/picker-navigator.reel/picker-navigator.html23
-rw-r--r--js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js27
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css23
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html23
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js23
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css23
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html23
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js25
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-controller.js23
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-model.js23
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.css23
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html23
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js23
28 files changed, 357 insertions, 329 deletions
diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js
index 0650385f..44afd10c 100644
--- a/js/io/system/chromeapi.js
+++ b/js/io/system/chromeapi.js
@@ -1,24 +1,25 @@
1/* <copyright> 1/* <copyright>
2Copyright (c) 2012, Motorola Mobility, Inc 2Copyright (c) 2012, Motorola Mobility LLC.
3All Rights Reserved. 3All Rights Reserved.
4BSD License.
5 4
6Redistribution and use in source and binary forms, with or without 5Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met: 6modification, are permitted provided that the following conditions are met:
8 7
9 - Redistributions of source code must retain the above copyright notice, 8* Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer. 9 this list of conditions and the following disclaimer.
11 - Redistributions in binary form must reproduce the above copyright 10
12 notice, this list of conditions and the following disclaimer in the 11* Redistributions in binary form must reproduce the above copyright notice,
13 documentation and/or other materials provided with the distribution. 12 this list of conditions and the following disclaimer in the documentation
14 - Neither the name of Motorola Mobility nor the names of its contributors 13 and/or other materials provided with the distribution.
15 may be used to endorse or promote products derived from this software 14
16 without specific prior written permission. 15* Neither the name of Motorola Mobility LLC nor the names of its
16 contributors may be used to endorse or promote products derived from this
17 software without specific prior written permission.
17 18
18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -34,7 +35,7 @@ NOTES:
34 35
35 The init function starts up the file system API, and a size must be 36 The init function starts up the file system API, and a size must be
36 set, no unlimited available as of now. 37 set, no unlimited available as of now.
37 38
38//////////////////////////////////////////////////////////////////////// 39////////////////////////////////////////////////////////////////////////
39///////////////////////////////////////////////////////////////////// */ 40///////////////////////////////////////////////////////////////////// */
40// 41//
@@ -287,7 +288,7 @@ exports.ChromeApi = Montage.create(Object.prototype, {
287 } 288 }
288 } 289 }
289 //////////////////////////////////////////////////////////////////// 290 ////////////////////////////////////////////////////////////////////
290 //////////////////////////////////////////////////////////////////// 291 ////////////////////////////////////////////////////////////////////
291}); 292});
292//////////////////////////////////////////////////////////////////////// 293////////////////////////////////////////////////////////////////////////
293//////////////////////////////////////////////////////////////////////// 294////////////////////////////////////////////////////////////////////////
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index d3977106..b8c08832 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -1,24 +1,25 @@
1/* <copyright> 1/* <copyright>
2Copyright (c) 2012, Motorola Mobility, Inc 2Copyright (c) 2012, Motorola Mobility LLC.
3All Rights Reserved. 3All Rights Reserved.
4BSD License.
5 4
6Redistribution and use in source and binary forms, with or without 5Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met: 6modification, are permitted provided that the following conditions are met:
8 7
9 - Redistributions of source code must retain the above copyright notice, 8* Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer. 9 this list of conditions and the following disclaimer.
11 - Redistributions in binary form must reproduce the above copyright 10
12 notice, this list of conditions and the following disclaimer in the 11* Redistributions in binary form must reproduce the above copyright notice,
13 documentation and/or other materials provided with the distribution. 12 this list of conditions and the following disclaimer in the documentation
14 - Neither the name of Motorola Mobility nor the names of its contributors 13 and/or other materials provided with the distribution.
15 may be used to endorse or promote products derived from this software 14
16 without specific prior written permission. 15* Neither the name of Motorola Mobility LLC nor the names of its
16 contributors may be used to endorse or promote products derived from this
17 software without specific prior written permission.
17 18
18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -33,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
33NOTES: 34NOTES:
34 35
35 Core API reference in NINJA: this.application.ninja.coreIoApi 36 Core API reference in NINJA: this.application.ninja.coreIoApi
36 37
37//////////////////////////////////////////////////////////////////////// 38////////////////////////////////////////////////////////////////////////
38///////////////////////////////////////////////////////////////////// */ 39///////////////////////////////////////////////////////////////////// */
39var Montage = require("montage/core/core").Montage, 40var Montage = require("montage/core/core").Montage,
@@ -101,7 +102,7 @@ exports.CoreIoApi = Montage.create(Component, {
101 this.ninjaLibrary.addEventListener('sync', this, false); 102 this.ninjaLibrary.addEventListener('sync', this, false);
102 //Sending library to be synced to chrome 103 //Sending library to be synced to chrome
103 this.ninjaLibrary.synchronize(e._event.ninjaChromeLibrary, this.chromeFileSystem); 104 this.ninjaLibrary.synchronize(e._event.ninjaChromeLibrary, this.chromeFileSystem);
104 105
105 } 106 }
106 }, 107 },
107 //////////////////////////////////////////////////////////////////// 108 ////////////////////////////////////////////////////////////////////
@@ -389,7 +390,7 @@ exports.CoreIoApi = Montage.create(Component, {
389 try { 390 try {
390 var serviceURL = this._prepareServiceURL(this.fileServiceURL, file.uri), 391 var serviceURL = this._prepareServiceURL(this.fileServiceURL, file.uri),
391 xhr = new XMLHttpRequest(); 392 xhr = new XMLHttpRequest();
392 // 393 //
393 xhr.open("GET", serviceURL, false); 394 xhr.open("GET", serviceURL, false);
394 xhr.setRequestHeader("check-existence-only", "true"); 395 xhr.setRequestHeader("check-existence-only", "true");
395 xhr.send(); 396 xhr.send();
@@ -434,12 +435,12 @@ exports.CoreIoApi = Montage.create(Component, {
434 xhr = new XMLHttpRequest(); 435 xhr = new XMLHttpRequest();
435 // 436 //
436 xhr.open("POST", serviceURL, false); 437 xhr.open("POST", serviceURL, false);
437 //xhr.responseType = "arraybuffer"; 438 //xhr.responseType = "arraybuffer";
438 if(file.contentType && file.contentType.length) 439 if(file.contentType && file.contentType.length)
439 xhr.setRequestHeader("Content-Type", file.contentType); 440 xhr.setRequestHeader("Content-Type", file.contentType);
440 else 441 else
441 xhr.setRequestHeader("Content-Type", "text/plain"); 442 xhr.setRequestHeader("Content-Type", "text/plain");
442 443
443 if (file.contents) 444 if (file.contents)
444 xhr.send(file.contents); 445 xhr.send(file.contents);
445 else 446 else
@@ -700,7 +701,7 @@ exports.CoreIoApi = Montage.create(Component, {
700 // status: int indicating the request HTTP status code 701 // status: int indicating the request HTTP status code
701 // 200 - the file was read and its contents were returned 702 // 200 - the file was read and its contents were returned
702 // 404 - the file does not exist 703 // 404 - the file does not exist
703 // 500 - unknown server error occurred 704 // 500 - unknown server error occurred
704 readExternalFile: { 705 readExternalFile: {
705 enumerable: false, 706 enumerable: false,
706 value: function(file) { 707 value: function(file) {
@@ -893,7 +894,7 @@ exports.CoreIoApi = Montage.create(Component, {
893 var retValue = { success:null, content:null, status:null }; 894 var retValue = { success:null, content:null, status:null };
894 if(dir && dir.uri && dir.uri.length) { 895 if(dir && dir.uri && dir.uri.length) {
895 try { 896 try {
896 var serviceURL = this._prepareServiceURL(this.directoryServiceURL, dir.uri), 897 var serviceURL = this._prepareServiceURL(this.directoryServiceURL, dir.uri),
897 xhr = new XMLHttpRequest(); 898 xhr = new XMLHttpRequest();
898 //