diff options
author | Jon Reid | 2012-04-10 14:52:23 -0700 |
---|---|---|
committer | Jon Reid | 2012-04-10 14:52:23 -0700 |
commit | c19987997758cf47ac9b93a2a767a0e2a9072745 (patch) | |
tree | eb68491c5d04a5cf5ab75bedf2d6bbed3c7a3603 /js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | |
parent | 03a3b32b9b0fd2dc8e4b54bfd5282fd1f8fb6ed6 (diff) | |
parent | 422b14fc60be84c116115f2e71e3499e232f3f05 (diff) | |
download | ninja-c19987997758cf47ac9b93a2a767a0e2a9072745.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js')
-rwxr-xr-x | js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | 32 |
1 files changed, 16 insertions, 16 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 3582f1a5..3ac38d02 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,23 +22,28 @@ 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.newFileName.addEventListener("keyup", this, false); | 25 | this.addEventListener("change@newFileName.value", this.newFileNameChange, false); |
26 | this.newFileName.addEventListener("paste", this, false); | 26 | this.newFileName.element.addEventListener("keyup", this, false); |
27 | this.newFileName.addEventListener("search", this, false); | 27 | this.newFileName.element.focus(); |
28 | this.newFileName.focus(); | 28 | this.newFileName.element.select(); |
29 | this.newFileName.select(); | ||
30 | } | 29 | } |
31 | }, | 30 | }, |
32 | 31 | ||
33 | handlePaste:{ | 32 | handleKeyup:{ |
34 | value:function(evt){ | 33 | value: function(evt){ |
35 | evt.preventDefault(); | 34 | if(evt.keyCode === 13){ |
36 | evt.target.value = evt.clipboardData.getData("Text"); | 35 | var enterKeyupEvent = document.createEvent("Events"); |
37 | this.handleKeyup(evt); | 36 | enterKeyupEvent.initEvent("enterKey", false, false); |
37 | this.eventManager.dispatchEvent(enterKeyupEvent); | ||
38 | }else if(evt.keyCode === 27){ | ||
39 | var escKeyupEvent = document.createEvent("Events"); | ||
40 | escKeyupEvent.initEvent("escKey", false, false); | ||
41 | this.eventManager.dispatchEvent(escKeyupEvent); | ||
42 | } | ||
38 | } | 43 | } |
39 | }, | 44 | }, |
40 | 45 | ||
41 | handleKeyup:{ | 46 | newFileNameChange:{ |
42 | value:function(evt){ | 47 | value:function(evt){ |
43 | var newFileNameSetEvent = document.createEvent("Events"); | 48 | var newFileNameSetEvent = document.createEvent("Events"); |
44 | newFileNameSetEvent.initEvent("newFileNameSet", false, false); | 49 | newFileNameSetEvent.initEvent("newFileNameSet", false, false); |
@@ -46,10 +51,5 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { | |||
46 | newFileNameSetEvent.keyCode = evt.keyCode; | 51 | newFileNameSetEvent.keyCode = evt.keyCode; |
47 | this.eventManager.dispatchEvent(newFileNameSetEvent); | 52 | this.eventManager.dispatchEvent(newFileNameSetEvent); |
48 | } | 53 | } |
49 | }, | ||
50 | handleSearch:{ | ||
51 | value:function(evt){ | ||
52 | this.handleKeyup(evt); | ||
53 | } | ||
54 | } | 54 | } |
55 | }); \ No newline at end of file | 55 | }); \ No newline at end of file |