aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-03-22 10:42:05 -0700
committerAnanya Sen2012-03-22 10:42:05 -0700
commit85bf9f937fa2ec46e42f791fc6815f7c2f5446ea (patch)
tree640145a22eb6328146b80dd6369c233546f54602 /js
parent15bd1a15459df5c831c97ee7bf225af47d812385 (diff)
downloadninja-85bf9f937fa2ec46e42f791fc6815f7c2f5446ea.tar.gz
file picker - added size unit
new file - don't disable OK is file exists Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/ui/icon-list-basic/icon.reel/icon.js2
-rwxr-xr-xjs/components/ui/tree-basic/treeItem.reel/treeItem.js2
-rw-r--r--js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js2
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js26
4 files changed, 21 insertions, 11 deletions
diff --git a/js/components/ui/icon-list-basic/icon.reel/icon.js b/js/components/ui/icon-list-basic/icon.reel/icon.js
index 1ef6e277..7d36bc59 100755
--- a/js/components/ui/icon-list-basic/icon.reel/icon.js
+++ b/js/components/ui/icon-list-basic/icon.reel/icon.js
@@ -86,7 +86,7 @@ var Icon = exports.Icon = Montage.create(Component, {
86 this.metadata = "Name: "+this.icondata.name; 86 this.metadata = "Name: "+this.icondata.name;
87 } 87 }
88 this.metadata = this.metadata + "<br />" + "Type: "+this.icondata.type; 88 this.metadata = this.metadata + "<br />" + "Type: "+this.icondata.type;
89 if(this.icondata.size){this.metadata = this.metadata + "<br />" + "Size: "+this.icondata.size;} 89 if(this.icondata.size){this.metadata = this.metadata + "<br />" + "Size: "+this.icondata.size+ " bytes";}
90 if(this.icondata.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.icondata.creationDate);} 90 if(this.icondata.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.icondata.creationDate);}
91 if(this.icondata.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.icondata.modifiedDate);} 91 if(this.icondata.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.icondata.modifiedDate);}
92 92
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.js b/js/components/ui/tree-basic/treeItem.reel/treeItem.js
index 13e278e9..e9e5c1fb 100755
--- a/js/components/ui/tree-basic/treeItem.reel/treeItem.js
+++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.js
@@ -118,7 +118,7 @@ exports.TreeItem = Montage.create(Component, {
118 this.metadata = "Name: "+this.treeItemData.name; 118 this.metadata = "Name: "+this.treeItemData.name;
119 } 119 }
120 this.metadata = this.metadata + "<br />" + "Type: "+this.treeItemData.type; 120 this.metadata = this.metadata + "<br />" + "Type: "+this.treeItemData.type;
121 if(this.treeItemData.size){this.metadata = this.metadata + "<br />" + "Size: "+this.treeItemData.size;} 121 if(this.treeItemData.size){this.metadata = this.metadata + "<br />" + "Size: "+this.treeItemData.size+ " bytes";}
122 if(this.treeItemData.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.treeItemData.creationDate);} 122 if(this.treeItemData.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.treeItemData.creationDate);}
123 if(this.treeItemData.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);} 123 if(this.treeItemData.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);}
124 124
diff --git a/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js b/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js
index e31fa29d..3cf6fc5a 100644
--- a/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js
+++ b/js/io/ui/file-picker/picker-navigator.reel/picker-navigator.js
@@ -500,7 +500,7 @@ var PickerNavigator = exports.PickerNavigator = Montage.create(Component, {
500 metadata = "Name: "+data.name; 500 metadata = "Name: "+data.name;
501 } 501 }
502 metadata = metadata + "<br />" + "Type: "+data.type; 502 metadata = metadata + "<br />" + "Type: "+data.type;
503 if(data.size){metadata = metadata + "<br />" + "Size: "+data.size;} 503 if(data.size){metadata = metadata + "<br />" + "Size: "+data.size+" bytes";}
504 if(data.creationDate){metadata = metadata + "<br />" + "Creation date: "+ this.formatTimestamp(data.creationDate);} 504 if(data.creationDate){metadata = metadata + "<br />" + "Creation date: "+ this.formatTimestamp(data.creationDate);}
505 if(data.modifiedDate){metadata = metadata + "<br />" + "Modified date: "+ this.formatTimestamp(data.modifiedDate);} 505 if(data.modifiedDate){metadata = metadata + "<br />" + "Modified date: "+ this.formatTimestamp(data.modifiedDate);}
506 } 506 }
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