aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js56
1 files changed, 56 insertions, 0 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
new file mode 100755
index 00000000..7da13dfc
--- /dev/null
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
@@ -0,0 +1,56 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9var newFileWorkflowControllerModule = require("js/io/ui/new-file-dialog/new-file-workflow-controller");
10
11var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
12
13 templateHeight:{
14 enumerable: true,
15 value:"25 px"
16 },
17
18 templateWidth:{
19 enumerable: true,
20 value:"25 px"
21 },
22
23 willDraw: {
24 enumerable: false,
25 value: function() {}
26 },
27
28 draw: {
29 enumerable: false,
30 value: function() {}
31 },
32
33 didDraw: {
34 enumerable: false,
35 value: function() {
36 var that=this;
37
38 this.fileInputField.selectDirectory = true;
39
40 this.newFileName.addEventListener("blur", function(evt){that.handleNewFileNameOnblur(evt);}, false);
41 }
42
43 },
44
45 handleNewFileNameOnblur:{
46 value:function(evt){
47 if(this.newFileName.value !== ""){
48 var newFileNameSetEvent = document.createEvent("Events");
49 newFileNameSetEvent.initEvent("newFileNameSet", false, false);
50 newFileNameSetEvent.newFileName = this.newFileName.value;
51 this.eventManager.dispatchEvent(newFileNameSetEvent);
52 }
53 }
54 }
55
56}); \ No newline at end of file