aboutsummaryrefslogtreecommitdiff
path: root/js/io/system
diff options
context:
space:
mode:
authorAnanya Sen2012-02-02 17:45:22 -0800
committerAnanya Sen2012-02-02 17:45:22 -0800
commit6890662caba94598675679f40dbb725301c93e98 (patch)
treed1e3ded939e41a2b484a4c98b48e3b3976a71c63 /js/io/system
parent476a25e8a662270dfe5b37c560e4235f02b146e4 (diff)
downloadninja-6890662caba94598675679f40dbb725301c93e98.tar.gz
integrated new file dialog with the template descriptor.json and document-controller.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/system')
-rwxr-xr-xjs/io/system/coreioapi.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index f0ca568f..e448d981 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -1009,7 +1009,7 @@ exports.CoreIoApi = Montage.create(Component, {
1009 * check if the file exists 1009 * check if the file exists
1010 */ 1010 */
1011 checkFileExists:{ 1011 checkFileExists:{
1012 value: function(fileUri, folderUri, fileType){ 1012 value: function(fileName, folderUri, fileType){
1013 var uri = "", response=null, status=true; 1013 var uri = "", response=null, status=true;
1014 1014
1015 //prepare absolute uri 1015 //prepare absolute uri
@@ -1017,9 +1017,11 @@ exports.CoreIoApi = Montage.create(Component, {
1017 folderUri = folderUri + "/"; 1017 folderUri = folderUri + "/";
1018 } 1018 }
1019 1019
1020 //todo:add file extension check if fileType present 1020 if(!!fileType && (fileName.lastIndexOf(fileType) !== (fileName.length - fileType.length))){
1021 fileName = fileName+fileType;
1022 }
1021 1023
1022 uri = ""+folderUri+fileUri; 1024 uri = ""+folderUri+fileName;
1023 1025
1024 response = this.fileExists({"uri":uri}); 1026 response = this.fileExists({"uri":uri});
1025 if(!!response && response.success && (response.status === 204)){ 1027 if(!!response && response.success && (response.status === 204)){