diff options
author | Eric Guzman | 2012-04-04 11:36:22 -0700 |
---|---|---|
committer | Eric Guzman | 2012-04-04 11:36:22 -0700 |
commit | af52148777d554dc6e55a736574b82e4916f1fea (patch) | |
tree | 39705d138b489d2e90722238c850320fd6b6a8e9 /js/io/ui/save-as-dialog.reel | |
parent | b7ca1821ad43403a2a54361ffc6a0cdf9cba0e59 (diff) | |
parent | a11ef2eed7049835c8bdfa50a2b893632c46eaa0 (diff) | |
download | ninja-af52148777d554dc6e55a736574b82e4916f1fea.tar.gz |
Merge branch 'refs/heads/master' into PresetsPI
Conflicts:
js/controllers/presets-controller.js
Diffstat (limited to 'js/io/ui/save-as-dialog.reel')
-rw-r--r-- | js/io/ui/save-as-dialog.reel/save-as-dialog.js | 13 |
1 files changed, 11 insertions, 2 deletions
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 d59d5be1..c5ed8d33 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 | |||
@@ -55,6 +55,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
55 | this.fileInputField.newFileDirectory.value = this.folderUri; | 55 | this.fileInputField.newFileDirectory.value = this.folderUri; |
56 | 56 | ||
57 | this.newFileName.addEventListener("keyup", function(evt){self.handleNewFileNameOnkeyup(evt);}, false); | 57 | this.newFileName.addEventListener("keyup", function(evt){self.handleNewFileNameOnkeyup(evt);}, false); |
58 | this.newFileName.addEventListener("paste", this, false); | ||
58 | this.eventManager.addEventListener("newFileDirectorySet", function(evt){self.handleNewFileDirectorySet(evt);}, false); | 59 | this.eventManager.addEventListener("newFileDirectorySet", function(evt){self.handleNewFileDirectorySet(evt);}, false); |
59 | 60 | ||
60 | this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false); | 61 | this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false); |
@@ -84,8 +85,8 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
84 | 85 | ||
85 | handleNewFileDirectorySet:{ | 86 | handleNewFileDirectorySet:{ |
86 | value:function(evt){ | 87 | value:function(evt){ |
87 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ | 88 | if(evt.keyCode === 13){ |
88 | this.handleOkButtonAction(evt); | 89 | if(!this.okButton.hasAttribute("disabled")) this.handleOkButtonAction(evt); |
89 | }else if(evt.keyCode === 27){ | 90 | }else if(evt.keyCode === 27){ |
90 | this.handleCancelButtonAction(evt); | 91 | this.handleCancelButtonAction(evt); |
91 | } | 92 | } |
@@ -98,6 +99,14 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
98 | } | 99 | } |
99 | }, | 100 | }, |
100 | 101 | ||
102 | handlePaste:{ | ||
103 | value:function(evt){ | ||
104 | evt.preventDefault(); | ||
105 | evt.target.value = evt.clipboardData.getData("Text"); | ||
106 | this.handleNewFileNameOnkeyup(evt); | ||
107 | } | ||
108 | }, | ||
109 | |||
101 | handleNewFileNameOnkeyup:{ | 110 | handleNewFileNameOnkeyup:{ |
102 | value:function(evt){ | 111 | value:function(evt){ |
103 | this.fileName = this.newFileName.value; | 112 | this.fileName = this.newFileName.value; |