diff options
author | Ananya Sen | 2012-05-31 10:13:40 -0700 |
---|---|---|
committer | Ananya Sen | 2012-05-31 10:13:40 -0700 |
commit | 286457b4f23974277274ba388afd283e8aa085cb (patch) | |
tree | c21bf791e7c4f572d12f97987ea6b89e74da67fe /js/io/ui | |
parent | 4d9b481c58090e8f1fc7b0e9d73a81b0f49cccc8 (diff) | |
parent | d49c909cff7f0c5e5d0b127ad84a2fefc6677dc6 (diff) | |
download | ninja-286457b4f23974277274ba388afd283e8aa085cb.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Conflicts:
js/controllers/styles-controller.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui')
4 files changed, 11 insertions, 6 deletions
diff --git a/js/io/ui/file-picker/file-input-field.reel/file-input-field.js b/js/io/ui/file-picker/file-input-field.reel/file-input-field.js index 9e77759f..a5fab11c 100755 --- a/js/io/ui/file-picker/file-input-field.reel/file-input-field.js +++ b/js/io/ui/file-picker/file-input-field.reel/file-input-field.js | |||
@@ -16,7 +16,7 @@ var FileInputField = exports.FileInputField = Montage.create(Component, { | |||
16 | this.findDirectory.identifier = "findDirectory"; | 16 | this.findDirectory.identifier = "findDirectory"; |
17 | this.findDirectory.addEventListener("click", this, false); | 17 | this.findDirectory.addEventListener("click", this, false); |
18 | this.eventManager.addEventListener("pickerSelectionsDone", this.handleFileInputPickerSelectionsDone, false); | 18 | this.eventManager.addEventListener("pickerSelectionsDone", this.handleFileInputPickerSelectionsDone, false); |
19 | this.addEventListener("change@newFileDirectory.value", this.handleNewFileDirectoryChange, false); | 19 | this.addPropertyChangeListener("newFileDirectory.value", this.handleNewFileDirectoryChange, false); |
20 | this.newFileDirectory.element.addEventListener("keyup", this, false); | 20 | this.newFileDirectory.element.addEventListener("keyup", this, false); |
21 | } | 21 | } |
22 | }, | 22 | }, |
diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js index 3ac38d02..e8a699cc 100755 --- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | |||
@@ -22,7 +22,7 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { | |||
22 | value: function() { | 22 | value: function() { |
23 | this.fileInputField.selectDirectory = true; | 23 | this.fileInputField.selectDirectory = true; |
24 | 24 | ||
25 | this.addEventListener("change@newFileName.value", this.newFileNameChange, false); | 25 | this.addPropertyChangeListener("newFileName.value", this.newFileNameChange, false); |
26 | this.newFileName.element.addEventListener("keyup", this, false); | 26 | this.newFileName.element.addEventListener("keyup", this, false); |
27 | this.newFileName.element.focus(); | 27 | this.newFileName.element.focus(); |
28 | this.newFileName.element.select(); | 28 | this.newFileName.element.select(); |
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"); |
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 index e2f50ff5..a27d9d13 100644 --- a/js/io/ui/save-as-dialog.reel/save-as-dialog.js +++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js | |||
@@ -57,7 +57,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
57 | this.fileInputField.selectDirectory = true; | 57 | this.fileInputField.selectDirectory = true; |
58 | this.fileInputField.pickerName = "saveAsDirectoryPicker"; | 58 | this.fileInputField.pickerName = "saveAsDirectoryPicker"; |
59 | 59 | ||
60 | this.addEventListener("change@newFileName.value", this.handleNewFileNameChange, false); | 60 | this.addPropertyChangeListener("newFileName.value", this.handleNewFileNameChange, false); |
61 | this.newFileName.element.addEventListener("keyup", this, false); | 61 | this.newFileName.element.addEventListener("keyup", this, false); |
62 | this.eventManager.addEventListener("newFileDirectorySet", function(evt){self.handleNewFileDirectorySet(evt);}, false); | 62 | this.eventManager.addEventListener("newFileDirectorySet", function(evt){self.handleNewFileDirectorySet(evt);}, false); |
63 | this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false); | 63 | this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false); |