aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js19
1 files changed, 11 insertions, 8 deletions
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 02579676..3582f1a5 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
@@ -24,6 +24,7 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
24 24
25 this.newFileName.addEventListener("keyup", this, false); 25 this.newFileName.addEventListener("keyup", this, false);
26 this.newFileName.addEventListener("paste", this, false); 26 this.newFileName.addEventListener("paste", this, false);
27 this.newFileName.addEventListener("search", this, false);
27 this.newFileName.focus(); 28 this.newFileName.focus();
28 this.newFileName.select(); 29 this.newFileName.select();
29 } 30 }
@@ -39,14 +40,16 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
39 40
40 handleKeyup:{ 41 handleKeyup:{
41 value:function(evt){ 42 value:function(evt){
42 if(this.newFileName.value !== "") { 43 var newFileNameSetEvent = document.createEvent("Events");
43 var newFileNameSetEvent = document.createEvent("Events"); 44 newFileNameSetEvent.initEvent("newFileNameSet", false, false);
44 newFileNameSetEvent.initEvent("newFileNameSet", false, false); 45 newFileNameSetEvent.newFileName = this.newFileName.value;
45 newFileNameSetEvent.newFileName = this.newFileName.value; 46 newFileNameSetEvent.keyCode = evt.keyCode;
46 newFileNameSetEvent.keyCode = evt.keyCode; 47 this.eventManager.dispatchEvent(newFileNameSetEvent);
47 this.eventManager.dispatchEvent(newFileNameSetEvent); 48 }
48 } 49 },
50 handleSearch:{
51 value:function(evt){
52 this.handleKeyup(evt);
49 } 53 }
50 } 54 }
51
52}); \ No newline at end of file 55}); \ No newline at end of file