aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/save-as-dialog.reel/save-as-dialog.js
diff options
context:
space:
mode:
authorAnanya Sen2012-03-28 14:02:57 -0700
committerAnanya Sen2012-03-28 14:02:57 -0700
commit834086b91afc752745128a0c2be4730bf1c7858d (patch)
tree1dfff28493c115a52479d6ca52705f8a35ddc313 /js/io/ui/save-as-dialog.reel/save-as-dialog.js
parent4c2948447482fe57110e7fd674e362bbbd5814b6 (diff)
downloadninja-834086b91afc752745128a0c2be4730bf1c7858d.tar.gz
detect paste from context menu for new file and save as dialog
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com> Conflicts: js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui/save-as-dialog.reel/save-as-dialog.js')
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js10
1 files changed, 10 insertions, 0 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..2bc141f7 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);
@@ -98,6 +99,15 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
98 } 99 }
99 }, 100 },
100 101
102 handlePaste:{
103 value:function(evt){
104 var self=this;
105 setTimeout(function(){
106 self.handleNewFileNameOnkeyup(evt);
107 }, 1);
108 }
109 },
110
101 handleNewFileNameOnkeyup:{ 111 handleNewFileNameOnkeyup:{
102 value:function(evt){ 112 value:function(evt){
103 this.fileName = this.newFileName.value; 113 this.fileName = this.newFileName.value;