aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/new-file-dialog')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css7
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html10
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css4
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html32
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js74
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-controller.js37
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-model.js101
7 files changed, 105 insertions, 160 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css
index 7f11c225..092ca626 100755
--- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css
@@ -5,7 +5,7 @@
5 </copyright> */ 5 </copyright> */
6 6
7.newfileLocation .newFileName{ 7.newfileLocation .newFileName{
8 width:70%; 8 width:65%;
9 margin-left:5px; 9 margin-left:5px;
10} 10}
11 11
@@ -49,7 +49,7 @@
49} 49}
50 50
51.newfileLocation .nameText{ 51.newfileLocation .nameText{
52 margin-right:31px; 52 margin-right:28px;
53} 53}
54 54
55.newfileLocation .hottextunit{ 55.newfileLocation .hottextunit{
@@ -57,3 +57,6 @@
57 display: inline; 57 display: inline;
58} 58}
59 59
60.newfileLocation .fileExtension{
61 color:#d7d7d7;
62}
diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html
index d7fbc235..8c0327eb 100755
--- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html
@@ -76,14 +76,18 @@
76 <div class="template"></div> 76 <div class="template"></div>
77 </div> 77 </div>
78 <div class="locationSelection"> 78 <div class="locationSelection">
79 <div><span class="nameText">NAME:</span><input id="newFileName" class="nj-skinned newFileName" type="search" value="" /></div> 79 <div>
80 <span class="nameText">NAME:</span>
81 <input id="newFileName" class="nj-skinned newFileName" type="search" value="" />
82 <span class="fileExtension"></span>
83 </div>
80 <div> 84 <div>
81 <span>DIRECTORY:</span> 85 <span>DIRECTORY:</span>
82 <div id="fileInputField"></div> 86 <div id="fileInputField"></div>
83 </div> 87 </div>
84 <br /> 88 <br />
85 <div><span>WIDTH:</span><span class="templatePx" id="templateWidth"></span></div> 89 <div style="display:none;"><span>WIDTH:</span><span class="templatePx" id="templateWidth"></span></div>
86 <div><span>HEIGHT:</span><span class="templatePx" id="templateHeight"></span></div> 90 <div style="display:none;"><span>HEIGHT:</span><span class="templatePx" id="templateHeight"></span></div>
87 </div> 91 </div>
88</div> 92</div>
89</body> 93</body>
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css
index 7ef6d2ce..95ce01f9 100755
--- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css
@@ -153,4 +153,8 @@
153 border:2px solid #a1a1a1; 153 border:2px solid #a1a1a1;
154 background-image:none; 154 background-image:none;
155 cursor:auto; 155 cursor:auto;
156}
157
158.newfile .atree ul{
159 -webkit-padding-start: 10px;
156} \ No newline at end of file 160} \ No newline at end of file
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html
index eb4a8045..58bbed30 100755
--- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html
@@ -10,36 +10,6 @@
10 <link rel="stylesheet" type="text/css" href="new-file-options-navigator.css"> 10 <link rel="stylesheet" type="text/css" href="new-file-options-navigator.css">
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 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 "newFileLocation":{ 13 "newFileLocation":{
44 "module": "js/io/ui/new-file-dialog/new-file-location.reel", 14 "module": "js/io/ui/new-file-dialog/new-file-location.reel",
45 "name": "NewFileLocation", 15 "name": "NewFileLocation",
@@ -70,7 +40,7 @@
70<div id="newfile" class="newfile"> 40<div id="newfile" class="newfile">
71 <div class="title">Create New File</div> 41 <div class="title">Create New File</div>
72 <div class="container left-nav"> 42 <div class="container left-nav">
73 <div class="projectTypeHeader"><span>File Type</span></div> 43 <div class="projectTypeHeader"><span>Choose Type</span></div>
74 <div id="projectTypeTree" class="projectTypeTree"></div> 44 <div id="projectTypeTree" class="projectTypeTree"></div>
75 </div> 45 </div>
76 <div class="container right-nav"> 46 <div class="container right-nav">
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
index 3a2e3e96..2f148621 100644
--- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
@@ -9,7 +9,6 @@ var Montage = require("montage/core/core").Montage,
9 iconsListModule = require("js/components/ui/icon-list-basic/iconsList.reel"), 9 iconsListModule = require("js/components/ui/icon-list-basic/iconsList.reel"),
10 treeModule = require("js/components/ui/tree-basic/tree.reel"), 10 treeModule = require("js/components/ui/tree-basic/tree.reel"),
11 newFileLocationSelectionModule = require("js/io/ui/new-file-dialog/new-file-workflow-controller"); 11 newFileLocationSelectionModule = require("js/io/ui/new-file-dialog/new-file-workflow-controller");
12 //nj= ("js/lib/NJUtils.js").NJUtils;
13 12
14var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(Component, { 13var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(Component, {
15 14
@@ -82,6 +81,9 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
82 this.eventManager.addEventListener("newFileDirectorySet", function(evt){that.handleNewFileDirectorySet(evt);}, false); 81 this.eventManager.addEventListener("newFileDirectorySet", function(evt){that.handleNewFileDirectorySet(evt);}, false);
83 this.eventManager.addEventListener("newFileNameSet", function(evt){that.handleNewFileNameSet(evt);}, false); 82 this.eventManager.addEventListener("newFileNameSet", function(evt){that.handleNewFileNameSet(evt);}, false);
84 83
84 this.okButton.addEventListener("click", function(evt){that.handleOkButtonAction(evt);}, false);
85 this.cancelButton.addEventListener("click", function(evt){that.handleCancelButtonAction(evt);}, false);
86
85 if(!!this.newFileModel.defaultProjectType){ 87 if(!!this.newFileModel.defaultProjectType){
86 var templates = this.newFileModel.prepareContents(this.newFileModel.defaultProjectType); 88 var templates = this.newFileModel.prepareContents(this.newFileModel.defaultProjectType);
87 this.templateList = iconsListModule.IconsList.create(); 89 this.templateList = iconsListModule.IconsList.create();
@@ -92,6 +94,14 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
92 94
93 this.selectedProjectType = {"uri":this.newFileModel.defaultProjectType, "element":null}; 95 this.selectedProjectType = {"uri":this.newFileModel.defaultProjectType, "element":null};
94 } 96 }
97
98 //update file Extension
99 if(!!this.newFileModel.projectTypeData[this.newFileModel.defaultProjectType].fileExtension){
100 var fileExtensionEl = this.element.querySelector(".fileExtension");
101 if(!!fileExtensionEl){
102 fileExtensionEl.innerHTML = ""+this.newFileModel.projectTypeData[this.newFileModel.defaultProjectType].fileExtension;
103 }
104 }
95 } 105 }
96 106
97 }, 107 },
@@ -128,7 +138,15 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
128 138
129 //clear current template selection 139 //clear current template selection
130 if((!!this.selectedTemplate) && (this.selectedTemplate.element.classList.contains("selected"))){ 140 if((!!this.selectedTemplate) && (this.selectedTemplate.element.classList.contains("selected"))){
131 this.selectedTemplate.element.classList.remove("selected"); 141 this.selectedTemplate.element.classList.remove("selected");
142 }
143
144