aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui
diff options
context:
space:
mode:
authorAnanya Sen2012-02-01 12:00:04 -0800
committerAnanya Sen2012-02-01 12:00:04 -0800
commitcac299b27fcd9e317a391236502f513f215e8d2d (patch)
treefc2fb9e341b04694ef7966d84b26e7707ee53f1b /js/io/ui
parent553fce7721cacfd13b6013fdcdd0243c90083b5e (diff)
parentd74910a897f2db920f6f67d922532d245074c8f7 (diff)
downloadninja-cac299b27fcd9e317a391236502f513f215e8d2d.tar.gz
Merge branch 'FileIO' of github.com:joseeight/ninja-internal into FileIO
Diffstat (limited to 'js/io/ui')
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.html54
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js98
-rwxr-xr-xjs/io/ui/cloudpopup.reel/config.rb9
-rw-r--r--js/io/ui/cloudpopup.reel/css/cloudpopup.css99
-rwxr-xr-xjs/io/ui/cloudpopup.reel/css/cloudpopup.scss103
5 files changed, 363 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..fa4533d7
--- /dev/null
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.html
@@ -0,0 +1,54 @@
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>Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas.</p>
38
39 <label for="cloud_url">Cloud Server URL:</label><input type="text" id="cloud_url" class="cloud_url" value="http://localhost:16380" />
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 </div>
50 </div>
51
52 </body>
53
54</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..e8558179
--- /dev/null
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.js
@@ -0,0 +1,98 @@
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 components: {
22 enumerable: false,
23 value: {test_btn: null, ok_btn: null, cancel_btn: null, status: null, url: null}
24 },
25 ////////////////////////////////////////////////////////////////////
26 //
27 prepareForDraw: {
28 enumerable: false,
29 value: function () {
30 //
31 this.components.test_btn = this.element.getElementsByClassName('btn_test nj-skinned')[0];
32 this.components.ok_btn = this.element.getElementsByClassName('btn_ok nj-skinned')[0];
33 this.components.cancel_btn = this.element.getElementsByClassName('btn_cancel nj-skinned')[0];
34 this.components.status = this.element.getElementsByClassName('status')[0];
35 this.components.url = this.element.getElementsByClassName('cloud_url')[0];
36 }
37 },
38 ////////////////////////////////////////////////////////////////////
39 //
40 willDraw: {
41 enumerable: false,
42 value: function() {
43 //
44
45 }
46 },
47 ////////////////////////////////////////////////////////////////////
48 //
49 draw: {
50 enumerable: false,
51 value: function() {
52 //
53 this.testConnection();
54 }
55 },
56 ////////////////////////////////////////////////////////////////////
57 //
58 didDraw: {
59 enumerable: false,
60 value: function() {
61 //
62 this.components.test_btn.addEventListener('click', this.testConnection.bind(this), false);
63 //
64 this.components.ok_btn.addEventListener('click', this.closeDialog.bind(this), false);
65 this.components.cancel_btn.addEventListener('click', this.closeDialog.bind(this), false);
66 }
67 },
68 ////////////////////////////////////////////////////////////////////
69 //this.application.ninja.coreIoApi.hideCloudDialog
70 testConnection: {
71 enumerable: false,
72 value: function() {
73 //
74 this.application.ninja.coreIoApi.rootUrl = this.components.url.value;
75 //
76 if (this.application.ninja.coreIoApi.cloudAvailable()) {
77 this.components.status.style.color = '#77FF00';
78 this.components.status.innerHTML = 'Connected to '+this.application.ninja.coreIoApi.cloudData.name;
79 } else {
80 this.components.status.style.color = '#FF3A3A';
81 this.components.status.innerHTML = 'Disconnected';
82 }
83 }
84 },
85 ////////////////////////////////////////////////////////////////////
86 //
87 closeDialog: {
88 enumerable: false,
89 value: function() {
90 //
91 this.application.ninja.coreIoApi.hideCloudDialog();
92 }
93 }
94 ////////////////////////////////////////////////////////////////////
95 ////////////////////////////////////////////////////////////////////
96});
97////////////////////////////////////////////////////////////////////////
98//////////////////////////////////////////////////////////////////////// \ No newline at end of file
diff --git a/js/io/ui/cloudpopup.reel/config.rb b/js/io/ui/cloudpopup.reel/config.rb
new file mode 100755
index 00000000..9b55af19
--- /dev/null
+++ b/js/io/ui/cloudpopup.reel/config.rb
@@ -0,0 +1,9 @@
1# Require any additional compass plugins here.
2# Set this to the root of your project when deployed:
3http_path = "/"
4css_dir = "css"
5sass_dir = "css"
6images_dir = "img"
7javascripts_dir = "../"
8# To enable relative paths to assets via compass helper functions. Uncomment:
9# relative_assets = true
diff --git a/js/io/ui/cloudpopup.reel/css/cloudpopup.css b/js/io/ui/cloudpopup.reel/css/cloudpopup.css
new file mode 100644
index 00000000..eac18083
--- /dev/null
+++ b/js/io/ui/cloudpopup.reel/css/cloudpopup.css
@@ -0,0 +1,99 @@
1@charset "UTF-8";
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/* line 12, cloudpopup.scss */
8.cloud_popup {
9 font-size: 12px;
10 text-shadow: 1px 1px 1px #000;
11 font-family: 'Droid Sans', sans-serif;
12}
13
14/* line 19, cloudpopup.scss */
15.cloud_popup .content {
16 width: 360px;
17}
18
19/* line 24, cloudpopup.scss */
20.cloud_popup .content h3 {
21 text-transform: uppercase;
22 font-weight: normal;
23 font-size: 14px;
24 text-shadow: 1px 1px 1px #000;
25 font-family: 'Droid Sans', sans-serif;
26 display: block;
27 float: left;
28 clear: both;
29 margin: 4px 0px 8px 0px;
30 padding: 0px;
31 width: 100%;
32 text-align: center;
33}
34
35/* line 40, cloudpopup.scss */
36.cloud_popup .content p {
37 text-shadow: 1px 1px 1px #222;
38 margin: 0px 0px 12px 0px;
39 text-align: justify;
40 color: #EEE;
41}
42
43/* line 48, cloudpopup.scss */
44.cloud_popup .content .btn_test {
45 float: right;
46 clear: right;
47 margin: 0px 0px 0px 8px;
48 width: 60px;
49}
50