aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-04-04 19:21:01 -0700
committerAnanya Sen2012-04-04 19:21:01 -0700
commit5de25f936c9dce08f1d24824ae1946a07e7b708d (patch)
treec2deb7cf0ac076832b76860ef1fdf1df1f1655d5 /js/io/ui/new-file-dialog/new-file-location.reel
parent17ca01f54591187f5c0812c0fd2cb7260afa9639 (diff)
downloadninja-5de25f936c9dce08f1d24824ae1946a07e7b708d.tar.gz
- disable ok when text box is cleared using backspace and cross, for file name and directory location, in New file and save as dialog
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
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