aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/save-as-dialog.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/save-as-dialog.reel')
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.css100
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html86
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js196
3 files changed, 382 insertions, 0 deletions
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.css b/js/io/ui/save-as-dialog.reel/save-as-dialog.css
new file mode 100644
index 00000000..40434c25
--- /dev/null
+++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.css
@@ -0,0 +1,100 @@
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.saveAsDialog{
8 font-size:12px;
9 width:450px;
10 height:150px;
11 padding-left: 15px;
12 padding-right: 15px;
13 background-color:#313131;
14 color: #ffffff;
15}
16
17.saveAsDialog .title{
18 font-size:14px;
19 height:15px;
20 padding:5px;
21 text-align: center;
22 font-weight: bold;
23 color: #C1C1C1;
24}
25
26.saveAsDialog .locationSelection{
27 border: 1px groove #000000;
28 overflow: auto;
29 height:38%;
30 padding: 15px;
31 background-color:#5f5f5f;
32}
33
34.saveAsDialog .newFileName{
35 width:80%;
36 margin-left:5px;
37}
38
39.saveAsDialog .fileInputField .newFileDirectory{
40 width: 80%;
41}
42
43.saveAsDialog .nameText{
44 margin-right:10px;
45}
46
47.saveAsDialog .buttons{
48 float:right;
49 margin-top: 10px;
50}
51
52.saveAsDialog .filename{
53 margin-bottom: 10px;
54}
55
56.saveAsDialog .errorMsg{
57 float:left;
58 margin-top: 7px;
59}
60.saveAsDialog .errorMsg span{
61 color: #BF3B3B;
62}
63
64.saveAsDialog .fileInputField{
65 margin-left:3px;
66}
67
68.saveAsDialog .okButton{
69 margin-right:25px;
70 -webkit-box-align: center;
71 text-align: center;
72 cursor: default;
73 padding: 0px 6px 0px;
74 border:2px solid #d1d1d1;
75 background-color: #e1e1e1;
76 box-sizing: border-box;
77 border-radius:10px;
78 background-image: -webkit-linear-gradient(bottom, #e1e1e1 13%, #d1d1d1 58%, #e1e1e1 40%);
79 cursor:pointer;
80}
81
82.saveAsDialog .cancelButton{
83 -webkit-box-align: center;
84 text-align: center;
85 cursor: default;
86 padding: 0px 6px 0px;
87 border:2px solid #d1d1d1;
88 background-color: #e1e1e1;
89 box-sizing: border-box;
90 border-radius:10px;
91 background-image: -webkit-linear-gradient(bottom, #e1e1e1 13%, #d1d1d1 58%, #e1e1e1 40%);
92 cursor:pointer;
93}
94
95.saveAsDialog input[type="button"]:disabled{
96 background-color: #a1a1a1;
97 border:2px solid #a1a1a1;
98 background-image:none;
99 cursor:auto;
100} \ No newline at end of file
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.html b/js/io/ui/save-as-dialog.reel/save-as-dialog.html
new file mode 100644
index 00000000..968512f6
--- /dev/null
+++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.html
@@ -0,0 +1,86 @@
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="save-as-dialog.css">
11 <script type="text/montage-serialization">
12 {
13 "okButton": {
14 "module": "montage/ui/button.reel",
15 "name": "Button",
16 "properties": {
17 "element": {"#": "okButton"},
18 "identifier": "okButton"
19 },
20 "listeners": [
21 {
22 "type": "action",
23 "listener": {"@": "owner"}
24 }
25 ]
26 },
27
28 "cancelButton": {
29 "module": "montage/ui/button.reel",
30 "name": "Button",
31 "properties": {
32 "element": {"#": "cancelButton"},
33 "identifier": "cancelButton"
34 },
35 "listeners": [
36 {
37 "type": "action",
38 "listener": {"@": "owner"}
39 }
40 ]
41 },
42
43 "fileInputField":{
44 "module": "js/components/ui/FilePicker/file-input-field.reel",
45 "name": "FileInputField",
46 "properties": {
47 "element": {"#": "fileInputField"}
48 }
49 },
50
51 "owner":{
52 "module": "js/io/ui/new-file-dialog/new-file-location.reel",
53 "name": "SaveAsDialog",
54 "properties": {
55 "element": {"#": "saveAsDialog"},
56 "fileInputField": {"@": "fileInputField"},
57 "newFileName": {"#": "newFileName"},
58 "error":{"#": "error"},
59 "okButton":{"#": "okButton"}
60 }
61 }
62 }
63 </script>
64</head>
65<body>
66<div id="saveAsDialog" class="saveAsDialog">
67 <div class="title">Save As</div>
68 <div class="locationSelection">
69 <div class="filename">
70 <span class="nameText">Save As :</span>
71 <input id="newFileName" class="nj-skinned newFileName" type="search" value="" />
72 </div>
73 <div>
74 <span>Location :</span>
75 <div id="fileInputField"></div>
76 </div>
77 </div>
78 <div class="errorMsg"><span id="error" class="error"></span></div>
79 <div class="buttons">
80 <input id="cancelButton" type="button" value="CANCEL" class="cancelButton nj-skinned" />
81 <input id="okButton" disabled="true" type="button" value="OK" class="okButton nj-skinned" />
82 </div>
83
84</div>
85</body>
86</html> \ No newline at end of file
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.js b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
new file mode 100644
index 00000000..371aa9a7
--- /dev/null
+++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
@@ -0,0 +1,196 @@
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 nj= require("js/lib/NJUtils.js").NJUtils;
10
11var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
12
13 hasReel: {
14 value: true
15 },
16
17 fileName : {
18 enumerable: true,
19 writable: true,
20 value: ""
21 },
22
23 folderUri:{
24 enumerable: true,
25 writable: true,
26 value: ""
27 },
28
29 callback : {
30 enumerable: true,
31 writable: true,
32 value: null
33 },
34