aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
Diffstat (limited to 'js/io')
-rwxr-xr-xjs/io/system/coreioapi.js31
-rw-r--r--js/io/system/ninjalibrary.js2
-rw-r--r--js/io/system/ninjalibrary.json3
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.html2
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js4
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.css28
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.html31
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.js120
-rwxr-xr-xjs/io/ui/file-picker/file-picker-controller.js494
-rwxr-xr-xjs/io/ui/file-picker/file-picker-model.js128
-rw-r--r--js/io/ui/file-picker/picker-navigator.reel/picker-navigator.css253
-rwxr-xr-xjs/io/ui/file-picker/picker-navigator.reel/picker-navigator.html80
-rw-r--r--js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js1072
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html2
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js21
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html2
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js21
17 files changed, 2254 insertions, 40 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index a75b59bb..2051da43 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -1096,37 +1096,6 @@ exports.CoreIoApi = Montage.create(Component, {
1096 } 1096 }
1097 return status; 1097 return status;
1098 } 1098 }
1099 },
1100
1101 ////////////////////////////////////////////////////////////////////
1102 /***
1103 * check if the file exists
1104 */
1105 checkFileExists:{
1106 value: function(fileName, folderUri, fileType){
1107 var uri = "", response=null, status=true;
1108
1109 //prepare absolute uri
1110 if(/[^/\\]$/g.test(folderUri)){
1111 folderUri = folderUri + "/";
1112 }
1113
1114 if(!!fileType && (fileName.lastIndexOf(fileType) !== (fileName.length - fileType.length))){
1115 fileName = fileName+fileType;
1116 }
1117
1118 uri = ""+folderUri+fileName;
1119
1120 response = this.fileExists({"uri":uri});
1121 if(!!response && response.success && (response.status === 204)){
1122 status = true;
1123 }else if(!!response && response.success && (response.status === 404)){
1124 status = false;
1125 }else{
1126 status = false;
1127 }
1128 return status;
1129 }
1130 } 1099 }
1131 //////////////////////////////////////////////////////////////////// 1100 ////////////////////////////////////////////////////////////////////
1132}); 1101});
diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js
index 8c58883a..960bdef9 100644
--- a/js/io/system/ninjalibrary.js
+++ b/js/io/system/ninjalibrary.js
@@ -145,6 +145,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
145 synchronize: { 145 synchronize: {
146 enumerable: true, 146 enumerable: true,
147 value: function(chromeLibs, chrome) { 147 value: function(chromeLibs, chrome) {
148 //TODO: Remove
149 window.wipeLibrary = this.deleteLibraries.bind(this);
148 // 150 //
149 this.chromeApi = chrome; 151 this.chromeApi = chrome;
150 // 152 //
diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json
index 05e0a427..a61c30d1 100644
--- a/js/io/system/ninjalibrary.json
+++ b/js/io/system/ninjalibrary.json
@@ -1,7 +1,6 @@
1{ 1{
2 "libraries": [ 2 "libraries": [
3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"}, 3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"},
4 {"name": "Assets", "path": "/assets/descriptor.json", "version": "0.5.0.0"}, 4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.0.1"}
5 {"name": "RDGE", "path": "/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.5.0.0", "file": "rdge-compiled.js"}
6 ] 5 ]
7} \ No newline at end of file 6} \ No newline at end of file
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.html b/js/io/ui/cloudpopup.reel/cloudpopup.html
index 2c1c169a..e58041ec 100755
--- a/js/io/ui/cloudpopup.reel/cloudpopup.html
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.html
@@ -36,7 +36,7 @@
36 36
37 <p>Connection to the Cloud Server was not detected. Please verify <br />that the server is running and the URL below is correct.</p> 37 <p>Connection to the Cloud Server was not detected. Please verify <br />that the server is running and the URL below is correct.</p>
38 38
39 <label for="cloud_url">Cloud Server URL:</label><input type="text" id="cloud_url" class="cloud_url" value="http://localhost:16380" /> 39 <label for="cloud_url">Cloud Server URL:</label><input type="text" id="cloud_url" class="cloud_url" value="" />
40 40
41 <button class="btn_test nj-skinned">Test</button> 41 <button class="btn_test nj-skinned">Test</button>
42 42
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js
index a2283d46..d2e82662 100755
--- a/js/io/ui/cloudpopup.reel/cloudpopup.js
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.js
@@ -63,6 +63,10 @@ exports.CloudPopup = Montage.create(Component, {
63 enumerable: false, 63 enumerable: false,
64 value: function() { 64 value: function() {
65 // 65 //
66 if (window.localStorage['ioRootUrl']) {
67 this.components.url.value = window.localStorage['ioRootUrl'];
68 }
69 //
66 this.testConnection(); 70 this.testConnection();
67 if (this.application.ninja.coreIoApi.cloudAvailable()) { 71 if (this.application.ninja.coreIoApi.cloudAvailable()) {
68 this.closeDialog(); 72 this.closeDialog();
diff --git a/js/io/ui/file-picker/file-input-field.reel/file-input-field.css b/js/io/ui/file-picker/file-input-field.reel/file-input-field.css
new file mode 100755
index 00000000..91e412f8
--- /dev/null
+++ b/js/io/ui/file-picker/file-input-field.reel/file-input-field.css
@@ -0,0 +1,28 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7.fileInputField{
8 display:inline;
9}
10
11.fileInputField .newFileDirectory{
12 width:70%;
13 margin-left:5px;
14}
15
16
17.fileInputField .findDirectory{
18 display:inline;
19 width: 17px;
20 height:17px;
21 vertical-align: bottom;
22 background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%04%00%00%00%B5%FA7%EA%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%03%18iCCPPhotoshop%20ICC%20profile%00%00x%DAc%60%60%9E%E0%E8%E2%E4%CA%24%C0%C0PPTR%E4%1E%E4%18%19%11%19%A5%C0~%9E%81%8D%81%99%81%81%81%81%81!1%B9%B8%C01%20%C0%87%81%81%81!%2F%3F%2F%95%01%15020%7C%BB%C6%C0%C8%C0%C0%C0pY%D7%D1%C5%C9%95%814%C0%9A%5CPT%C2%C0%C0p%80%81%81%C1(%25%B58%99%81%81%E1%0B%03%03CzyIA%09%03%03c%0C%03%03%83HRvA%09%03%03c%01%03%03%83HvH%903%03%03c%0B%03%03%13OIjE%09%03%03%03%83s~AeQfzF%89%82%A1%A5%A5%A5%82cJ~R%AABpeqIjn%B1%82g%5Er~QA~QbIj%0A%03%03%03%D4%0E%06%06%06%06%5E%97%FC%12%05%F7%C4%CC%3C%05%23%03U%06*%83%88%C8(%05%08%0B%11%3E%081%04H.-*%83%07%25%03%83%00%83%02%83%01%83%03C%00C%22C%3D%C3%02%86%A3%0Co%18%C5%19%5D%18K%19W0%DEc%12c%0Ab%9A%C0t%81Y%989%92y!%F3%1B%16K%96%0E%96%5B%ACz%AC%AD%AC%F7%D8%2C%D9%A6%B1%7Dc%0Fg%DF%CD%A1%C4%D1%C5%F1%853%91%F3%02%97%23%D7%16nM%EE%05%3CR%3CSy%85x'%F1%09%F3M%E3%97%E1_%2C%A0%23%B0C%D0U%F0%8AP%AA%D0%0F%E1%5E%11%15%91%BD%A2%E1%A2_%C4%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DA%84%91MK%02a%14%85%9Fwf%98%60%C4%CA%24BL%A4%E8%CBV%FD%82V%B5%0A%8A%DAD%05%AD%DA%B5%C9%A0%96%EDBw%FD%82VQ%B8%0C%FFB%CB%3E(%8A%24%A8%C4%5C%18L%86%18%D6%E8%A8o%8B%99a%B0%85%9D%ED%3D%3C%F7%9C%7B%85%A4%BB4%00%81%3D%A1%EE%C9%10%9A%CCh%19%7F(%01%05%C0%9Al%A7%EBa%F3%EA%B3%D8%DA%7F%5ED%ED%40H%24_%C7%D5%F3%D84%B3%CCg%0F%CD%8B%B9%88g%91H%87P%1F%CC%5D%16%A3%18%D8%E9%9B%BA%26F1%10%1E%C0Y%A1%C8qT%0A%3Cl%D5Pr%06%C1%3F!%0B%D9%E1%ED%D3%B7%F2%FBr%5C%EC%98w%BA%86%8E%C0%AD'%24%20%86R%1BK%2BzS%D3%1A%F7%CD)%CB%3A98%BA%A6%ED%B4p%0CA%C6%06%A21%9Br%3C%9CJ%E9%01%EB%E5qw%F5%09%E9%1BT%FA%89%12BAYO%247%03%7D%8D%D2%CC%02%DFR%BA%19hQ%A1%81I%0F%F2%CC%AC%B4%93k%A5Wb%14%F8%F1%08n%1E%04%02%83%11%12%F4%92%E7V~x%04%FF.P%23O%93%08U%9A~%8B%CE%FF(%F4%60%D0%A2%26m%D7%D0M%CA%3Fs~%07%00f%81qU%9E%9B%ECi%00%00%00%00IEND%AEB%60%82");
23 background-size:17px 17px;
24 background-position: -2px -1px;
25 background-repeat: no-repeat;
26 padding-right: 12px;
27 cursor:pointer;
28}
diff --git a/js/io/ui/file-picker/file-input-field.reel/file-input-field.html b/js/io/ui/file-picker/file-input-field.reel/file-input-field.html
new file mode 100755
index 00000000..2fcaa075
--- /dev/null
+++ b/js/io/ui/file-picker/file-input-field.reel/file-input-field.html
@@ -0,0 +1,31 @@
1<!DOCTYPE HTML>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="file-input-field.css">
11 <script type="text/montage-serialization">
12 {
13 "owner":{
14 "module": "js/io/ui/file-picker/file-input-field.reel",
15 "name": "FileInputField",
16 "properties": {
17 "element": {"#": "fileInputField"},
18 "findDirectory": {"#": "findDirectory"},
19 "newFileDirectory": {"#": "newFileDirectory"}
20 }
21 }
22 }
23 </script>
24</head>
25<body>
26<div id="fileInputField" class="fileInputField">
27 <input type="search" id="newFileDirectory" class="nj-skinned newFileDirectory" />
28 <span id="findDirectory" class="findDirectory"></span>
29</div>
30</body>
31</html> \ No newline at end of file
diff --git a/js/io/ui/file-picker/file-input-field.reel/file-input-field.js b/js/io/ui/file-picker/file-input-field.reel/file-input-field.js
new file mode 100755
index 00000000..235be8ad
--- /dev/null
+++ b/js/io/ui/file-picker/file-input-field.reel/file-input-field.js
@@ -0,0 +1,120 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10var FileInputField = exports.FileInputField = Montage.create(Component, {
11
12 hasReel: {
13 value: true
14 },
15
16 willDraw: {
17 enumerable: false,
18 value: function() {}
19 },
20 draw: {
21 enumerable: false,
22 value: function() {}
23 },
24 didDraw: {
<