aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/ui/new-file-dialog')
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js26
1 files changed, 18 insertions, 8 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
index 5adcc250..f63067b1 100644
--- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
@@ -297,10 +297,16 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
297 }else{ 297 }else{
298 if(this.error.innerHTML === ""){ 298 if(this.error.innerHTML === ""){
299 this.showError("! Project Template, Name and Directory should be valid."); 299 this.showError("! Project Template, Name and Directory should be valid.");
300 } 300 //disable ok
301 //disable ok 301 if(!this.okButton.hasAttribute("disabled")){
302 if(!this.okButton.hasAttribute("disabled")){ 302 this.okButton.setAttribute("disabled", "true");
303 this.okButton.setAttribute("disabled", "true"); 303 }
304 }else if(!this.selectedProjectType || !this.selectedTemplate){
305 this.showError("! Project Template should be selected.");
306 //disable ok
307 if(!this.okButton.hasAttribute("disabled")){
308 this.okButton.setAttribute("disabled", "true");
309 }
304 } 310 }
305 } 311 }
306 } 312 }
@@ -399,6 +405,10 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
399 if(uri !== ""){ 405 if(uri !== ""){
400 if(!status){ 406 if(!status){
401 this.showError("! Invalid directory."); 407 this.showError("! Invalid directory.");
408 //disable ok
409 if(!this.okButton.hasAttribute("disabled")){
410 this.okButton.setAttribute("disabled", "true");
411 }
402 } 412 }
403 } 413 }
404 return status; 414 return status;
@@ -410,6 +420,10 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
410 if(fileName !== ""){ 420 if(fileName !== ""){
411 if(!status){ 421 if(!status){
412 this.showError("! Invalid file name."); 422 this.showError("! Invalid file name.");
423 //disable ok
424 if(!this.okButton.hasAttribute("disabled")){
425 this.okButton.setAttribute("disabled", "true");
426 }
413 } 427 }
414 } 428 }
415 return status; 429 return status;
@@ -445,10 +459,6 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
445 value:function(errorString){ 459 value:function(errorString){
446 this.error.innerHTML = ""; 460 this.error.innerHTML = "";
447 this.error.innerHTML=errorString; 461 this.error.innerHTML=errorString;
448 //disable ok
449 if(!this.okButton.hasAttribute("disabled")){
450 this.okButton.setAttribute("disabled", "true");
451 }
452 } 462 }
453 }, 463 },
454 464