aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/save-as-dialog.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-09 11:18:32 -0800
committerJose Antonio Marquez2012-02-09 11:18:32 -0800
commitd7e198f5a95011679fa2c536780edbdc533a4893 (patch)
treecf0f7b844d466cb7af96f4779ebee505b02bcda2 /js/io/ui/save-as-dialog.reel
parentea6ec16e91740211a517db72f56108a033a521fe (diff)
parentc9d0cb73698066247c6267bba8fa446a979565fb (diff)
downloadninja-d7e198f5a95011679fa2c536780edbdc533a4893.tar.gz
Merge branch 'refs/heads/AnanyaFileIO' into FileIO
Conflicts: js/io/system/fileio.js js/mediators/io-mediator.js
Diffstat (limited to 'js/io/ui/save-as-dialog.reel')
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.js b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
index d1f1c26b..4546e124 100644
--- a/js/io/ui/save-as-dialog.reel/save-as-dialog.js
+++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
@@ -54,7 +54,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
54 this.newFileName.value = this.fileName; 54 this.newFileName.value = this.fileName;
55 this.fileInputField.newFileDirectory.value = this.folderUri; 55 this.fileInputField.newFileDirectory.value = this.folderUri;
56 56
57 this.newFileName.addEventListener("blur", function(evt){self.handleNewFileNameOnblur(evt);}, false); 57 this.newFileName.addEventListener("keyup", function(evt){self.handleNewFileNameOnkeyup(evt);}, false);
58 this.eventManager.addEventListener("newFileDirectorySet", function(evt){self.handleNewFileDirectorySet(evt);}, false); 58 this.eventManager.addEventListener("newFileDirectorySet", function(evt){self.handleNewFileDirectorySet(evt);}, false);
59 59
60 this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false); 60 this.okButton.addEventListener("click", function(evt){self.handleOkButtonAction(evt);}, false);
@@ -68,18 +68,18 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
68 value:function(evt){ 68 value:function(evt){
69 if(!!evt._event.newFileDirectory){ 69 if(!!evt._event.newFileDirectory){
70 this.folderUri = evt._event.newFileDirectory; 70 this.folderUri = evt._event.newFileDirectory;
71 if(this.folderUri !== ""){ 71 if(this.isValidUri(this.folderUri)){
72 this.enableOk(); 72 this.enableOk();
73 } 73 }
74 } 74 }
75 } 75 }
76 }, 76 },
77 77
78 handleNewFileNameOnblur:{ 78 handleNewFileNameOnkeyup:{
79 value:function(evt){ 79 value:function(evt){
80 this.fileName = this.newFileName.value; 80 this.fileName = this.newFileName.value;
81 if(this.fileName !== ""){ 81 if(this.fileName !== ""){
82 if(this.fileName !== ""){ 82 if(this.isValidFileName(this.fileName)){
83 this.enableOk(); 83 this.enableOk();
84 } 84 }
85 } 85 }
@@ -165,7 +165,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
165 }, 165 },
166 isValidFileName:{ 166 isValidFileName:{
167 value: function(fileName){ 167 value: function(fileName){
168 var status = this.isValidFileName(fileName); 168 var status = this.validateFileName(fileName);
169 if(fileName !== ""){ 169 if(fileName !== ""){
170 if(!status){ 170 if(!status){
171 this.showError("! Invalid file name."); 171 this.showError("! Invalid file name.");
@@ -198,7 +198,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
198 /*** 198 /***
199 * file name validation 199 * file name validation
200 */ 200 */
201 isValidFileName:{ 201 validateFileName:{
202 value: function(fileName){ 202 value: function(fileName){
203 var status = false; 203 var status = false;
204 if(fileName !== ""){ 204 if(fileName !== ""){