diff options
author | Pushkar Joshi | 2012-05-31 17:16:21 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-05-31 17:16:21 -0700 |
commit | 8915a7109d918a2e69b0999ebaa2deb84811fef8 (patch) | |
tree | 19a8af74c58c9ea261f0842f36efdab959be3256 /js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | |
parent | eea0a556e44c2b60d3aaf6e46d2432d3e6303812 (diff) | |
parent | 06b609df1ff7833592faddbd8d7abb5b9f15a74d (diff) | |
download | ninja-8915a7109d918a2e69b0999ebaa2deb84811fef8.tar.gz |
Merge branch 'pentool' into brushtool
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js')
-rw-r--r-- | js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | 11 |
1 files changed, 8 insertions, 3 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 1a26c99c..ebe2df61 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 | |||
@@ -249,7 +249,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
249 | 249 | ||
250 | handleOkButtonAction:{ | 250 | handleOkButtonAction:{ |
251 | value: function(evt){ | 251 | value: function(evt){ |
252 | var selectedProjectTypeID = this.selectedProjectType.uri, | 252 | var templateData, |
253 | selectedProjectTypeID = this.selectedProjectType.uri, | ||
253 | templateID = this.selectedTemplate.uri, | 254 | templateID = this.selectedTemplate.uri, |
254 | projectName = this.newFileLocation.newFileName.value, | 255 | projectName = this.newFileLocation.newFileName.value, |
255 | projectDirectory = this.newFileLocation.fileInputField.newFileDirectory.value, | 256 | projectDirectory = this.newFileLocation.fileInputField.newFileDirectory.value, |
@@ -264,7 +265,10 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
264 | "projectDirectory="+projectDirectory+"\n"+ | 265 | "projectDirectory="+projectDirectory+"\n"+ |
265 | "projectWidth="+projectWidth+"\n"+ | 266 | "projectWidth="+projectWidth+"\n"+ |
266 | "projectHeight="+projectHeight; | 267 | "projectHeight="+projectHeight; |
267 | 268 | //////////////////////////////////////////////////////////////////// | |
269 | //Template data must be passed during file creation (lots of confusion data here, should be cleaned up…) | ||
270 | templateData = {id: templateID, name: this.newFileModel.projectTypeData[selectedProjectTypeID].name, type: this.newFileModel.projectTypeData[selectedProjectTypeID].type}; | ||
271 | //////////////////////////////////////////////////////////////////// | ||
268 | 272 | ||
269 | if(/[^/\\]$/g.test(projectDirectory)){ | 273 | if(/[^/\\]$/g.test(projectDirectory)){ |
270 | projectDirectory = projectDirectory + "/"; | 274 | projectDirectory = projectDirectory + "/"; |
@@ -285,7 +289,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
285 | if(!!this.newFileModel.callback){//inform document-controller if save successful | 289 | if(!!this.newFileModel.callback){//inform document-controller if save successful |
286 | this.newFileModel.callback({"fileTemplateUri":selectedProjectTypeID, | 290 | this.newFileModel.callback({"fileTemplateUri":selectedProjectTypeID, |
287 | "newFilePath":newFilePath, | 291 | "newFilePath":newFilePath, |
288 | "fileExtension":fileExtension});//document-controller api | 292 | "fileExtension":fileExtension, |
293 | "template":templateData});//document-controller api | ||
289 | }else{ | 294 | }else{ |
290 | //send selection event | 295 | //send selection event |
291 | var newFileSelectionEvent = document.createEvent("Events"); | 296 | var newFileSelectionEvent = document.createEvent("Events"); |