aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-13 21:21:11 -0800
committerJose Antonio Marquez2012-02-13 21:21:11 -0800
commit64f54ffcebf09c570972b91ea5fdb7fe7654e622 (patch)
treeda23792067fa2b1e08dea90996f69a1a695b1bcc /js/io/ui
parentf3865671aa75277f6eb35c417408dee9e665589a (diff)
parent50a40c4e21b9a4d53d6d1fb739d838c0319ab09b (diff)
downloadninja-64f54ffcebf09c570972b91ea5fdb7fe7654e622.tar.gz
Merge branch 'refs/heads/AnanyaFileIO' into FileIO
Diffstat (limited to 'js/io/ui')
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js9
1 files changed, 9 insertions, 0 deletions
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 848e0cb8..f5ab0027 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
@@ -88,6 +88,9 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
88 var templates = this.newFileModel.prepareContents(this.newFileModel.defaultProjectType); 88 var templates = this.newFileModel.prepareContents(this.newFileModel.defaultProjectType);
89 this.templateList = iconsListModule.IconsList.create(); 89 this.templateList = iconsListModule.IconsList.create();
90 this.templateList.iconsViewDataObject = templates; 90 this.templateList.iconsViewDataObject = templates;
91 if(templates.length >0){
92 this.templateList.selected = templates[0].uri;
93 }
91 this.templateList.element = this.templateIcons; 94 this.templateList.element = this.templateIcons;
92 this.templateList.needsDraw = true; 95 this.templateList.needsDraw = true;
93 96
@@ -161,9 +164,15 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
161 var templates = this.newFileModel.prepareContents(evt.uri); 164 var templates = this.newFileModel.prepareContents(evt.uri);
162 if(this.templatesContainer.querySelectorAll(".list").length > 0){ 165 if(this.templatesContainer.querySelectorAll(".list").length > 0){
163 this.templateList.iconsViewDataObject = templates; 166 this.templateList.iconsViewDataObject = templates;
167 if(templates.length >0){
168 this.templateList.selected = templates[0].uri;
169 }
164 }else{ 170 }else{
165 this.templateList = iconsListModule.IconsList.create(); 171 this.templateList = iconsListModule.IconsList.create();
166 this.templateList.iconsViewDataObject = templates; 172 this.templateList.iconsViewDataObject = templates;
173 if(templates.length >0){
174 this.templateList.selected = templates[0].uri;
175 }
167 this.templateList.element = this.templateIcons; 176 this.templateList.element = this.templateIcons;
168 this.templateList.needsDraw = true; 177 this.templateList.needsDraw = true;
169 } 178 }