aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui')
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.html66
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js144
-rwxr-xr-xjs/io/ui/cloudpopup.reel/config.rb9
-rw-r--r--js/io/ui/cloudpopup.reel/css/cloudpopup.css144
-rwxr-xr-xjs/io/ui/cloudpopup.reel/css/cloudpopup.scss148
-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.css68
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html94
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js56
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css188
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html62
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js442
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-controller.js139
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-model.js49
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.css111
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html57
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js232
24 files changed, 4215 insertions, 0 deletions
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.html b/js/io/ui/cloudpopup.reel/cloudpopup.html
new file mode 100755
index 00000000..e58041ec
--- /dev/null
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.html
@@ -0,0 +1,66 @@
1<!DOCTYPE html>
2
3<!-- <copyright>
4 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
5 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
6 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
7 </copyright> -->
8
9<html lang="en">
10 <head>
11
12 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
13
14 <link rel="stylesheet" type="text/css" href="css/cloudpopup.css">
15
16 <script type="text/montage-serialization">
17 {
18 "owner": {
19 "module": "js/io/ui/cloudpopup.reel",
20 "name": "cloudpopup",
21 "properties": {
22 "element": {"#": "cloud_popup"}
23 }
24 }
25 }
26 </script>
27
28 </head>
29
30 <body>
31
32 <div id="cloud_popup" class="cloud_popup">
33 <div class="content">
34
35 <h3>Cloud Service Dialog</h3>
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>
38
39 <label for="cloud_url">Cloud Server URL:</label><input type="text" id="cloud_url" class="cloud_url" value="" />
40
41 <button class="btn_test nj-skinned">Test</button>
42
43 <label>Status:</label><div class="status">&nbsp;</div>
44
45 <button class="btn_cancel nj-skinned">Cancel</button>
46
47 <button class="btn_ok nj-skinned">Ok</button>
48
49 <section>
50
51 <h4>Install Ninja Cloud App</h4>
52
53 <p>The Local Cloud App is required to run Ninja. Please download and unzip the file. Start the Local Cloud and copy/paste the server URL into the field above. Click the ‘Test’ button to verify the connection.</p>
54
55 <div class="cloud_icon"></div>
56
57 <button class="btn_download nj-skinned">Download</button>
58
59 </section>
60
61 </div>
62 </div>
63
64 </body>
65
66</html> \ No newline at end of file
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js
new file mode 100755
index 00000000..d2e82662
--- /dev/null
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.js
@@ -0,0 +1,144 @@
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
7////////////////////////////////////////////////////////////////////////
8//
9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component;
11////////////////////////////////////////////////////////////////////////
12//
13exports.CloudPopup = Montage.create(Component, {
14 ////////////////////////////////////////////////////////////////////
15 //
16 hasTemplate: {
17 value: true
18 },
19 ////////////////////////////////////////////////////////////////////
20 //
21 _os: {
22 value: null
23 },
24 ////////////////////////////////////////////////////////////////////
25 //
26 components: {
27 enumerable: false,
28 value: {test_btn: null, ok_btn: null, cancel_btn: null, download_btn: null, status: null, url: null}
29 },
30 ////////////////////////////////////////////////////////////////////
31 //
32 prepareForDraw: {
33 enumerable: false,
34 value: function () {
35 //
36 this.components.test_btn = this.element.getElementsByClassName('btn_test nj-skinned')[0];
37 this.components.ok_btn = this.element.getElementsByClassName('btn_ok nj-skinned')[0];
38 this.components.cancel_btn = this.element.getElementsByClassName('btn_cancel nj-skinned')[0];
39 this.components.status = this.element.getElementsByClassName('status')[0];
40 this.components.url = this.element.getElementsByClassName('cloud_url')[0];
41 this.components.download_btn = this.element.getElementsByClassName('btn_download nj-skinned')[0];
42 }
43 },
44 ////////////////////////////////////////////////////////////////////
45 //
46 willDraw: {
47 enumerable: false,
48 value: function() {
49 //
50 if (navigator.appVersion.indexOf("Win")!=-1) {
51 this._os = 'windows';
52 } else if (navigator.appVersion.indexOf("Mac")!=-1) {
53 this._os = 'mac';
54 } else {
55 //Alternate message for no OS detected (probably Linux)
56 this.element.getElementsByTagName('section')[0].style.display = 'none';
57 }
58 }
59 },
60 ////////////////////////////////////////////////////////////////////
61 //
62 draw: {
63 enumerable: false,
64 value: function() {
65 //
66 if (window.localStorage['ioRootUrl']) {
67 this.components.url.value = window.localStorage['ioRootUrl'];
68 }
69 //
70 this.testConnection();
71 if (this.application.ninja.coreIoApi.cloudAvailable()) {
72 this.closeDialog();
73 }
74 }
75 },
76 ////////////////////////////////////////////////////////////////////
77 //
78 didDraw: {
79 enumerable: false,
80 value: function() {
81 //
82 this.components.download_btn.addEventListener('click', this.downloadCloudApp.bind(this), false);
83 //
84 this.components.test_btn.addEventListener('click', this.testConnection.bind(this), false);
85 //
86 this.components.ok_btn.addEventListener('click', this.closeDialog.bind(this), false);
87 this.components.cancel_btn.addEventListener('click', this.cancelDialog.bind(this), false);
88 }
89 },
90 ////////////////////////////////////////////////////////////////////
91 //
92 downloadCloudApp: {
93 enumerable: false,
94 value: function() {
95 if(this._os === 'mac') {
96 location.href = '/ninja_localcloud_for_mac.zip';
97 } else if (this._os === 'windows') {
98 location.href = '/ninja_localcloud_for_windows.zip';
99 } else {
100 alert('Your operating system is not supported by the Ninja Local Cloud App.');
101 }
102 }
103 },
104 ////////////////////////////////////////////////////////////////////
105 //
106 testConnection: {
107 enumerable: false,
108 value: function() {
109 //
110 this.application.ninja.coreIoApi.rootUrl = this.components.url.value;
111 //
112 if (this.application.ninja.coreIoApi.cloudAvailable()) {
113 this.components.status.style.color = '#77FF00';
114 this.components.status.innerHTML = 'Connected to '+this.application.ninja.coreIoApi.cloudData.name;
115 } else {
116 this.components.status.style.color = '#FF3A3A';
117 this.components.status.innerHTML = 'Disconnected';
118 }