From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- .../new-file-location.reel/new-file-location.js | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) mode change 100644 => 100755 js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js (limited to 'js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js') diff --git a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js b/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js old mode 100644 new mode 100755 index 4c90d1a1..805b44a4 --- a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js +++ b/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js @@ -10,6 +10,16 @@ var newFileWorkflowControllerModule = require("js/io/workflow/newFileDialog/new- var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { + templateHeight:{ + enumerable: true, + value:"25 px" + }, + + templateWidth:{ + enumerable: true, + value:"25 px" + }, + willDraw: { enumerable: false, value: function() {} @@ -22,7 +32,25 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { didDraw: { enumerable: false, - value: function() {} + value: function() { + var that=this; + + this.fileInputField.selectDirectory = true; + + this.newFileName.addEventListener("blur", function(evt){that.handleNewFileNameOnblur(evt);}, false); + } + + }, + + handleNewFileNameOnblur:{ + value:function(evt){ + if(this.newFileName.value !== ""){ + var newFileNameSetEvent = document.createEvent("Events"); + newFileNameSetEvent.initEvent("newFileNameSet", false, false); + newFileNameSetEvent.newFileName = this.newFileName.value; + this.eventManager.dispatchEvent(newFileNameSetEvent); + } + } } }); \ No newline at end of file -- cgit v1.2.3