|
|
@ -1437,8 +1437,8 @@ if (typeof VMM == 'undefined') { |
|
|
|
media.type = "image"; |
|
|
|
media.type = "image"; |
|
|
|
media.id = d; |
|
|
|
media.id = d; |
|
|
|
success = true; |
|
|
|
success = true; |
|
|
|
|
|
|
|
} else if (VMM.FileExtention.googleDocType(d)) { |
|
|
|
} else if (d.match(/docs.google.com|.DOC|.DOCX|.XLS|.XLSX|.PPT|.PPTX|.PDF|.PAGES|.AI|.PSD|.TIFF|.DXF|.SVG|.EPS|.PS|.TTF|.XPS|.ZIP|.RAR/i)) { |
|
|
|
trace("GOOGLE DOC " + d); |
|
|
|
media.type = "googledoc"; |
|
|
|
media.type = "googledoc"; |
|
|
|
media.id = d; |
|
|
|
media.id = d; |
|
|
|
success = true; |
|
|
|
success = true; |
|
|
@ -1461,6 +1461,29 @@ if (typeof VMM == 'undefined') { |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//VMM.FileExtention.googleDocType(url);
|
|
|
|
|
|
|
|
VMM.FileExtention = { |
|
|
|
|
|
|
|
googleDocType: function(url) { |
|
|
|
|
|
|
|
var fileName = url; |
|
|
|
|
|
|
|
var fileExtension = ""; |
|
|
|
|
|
|
|
//fileExtension = fileName.substr(5);
|
|
|
|
|
|
|
|
fileExtension = fileName.substr(fileName.length - 5, 5); |
|
|
|
|
|
|
|
var validFileExtensions = ["DOC","DOCX","XLS","XLSX","PPT","PPTX","PDF","PAGES","AI","PSD","TIFF","DXF","SVG","EPS","PS","TTF","XPS","ZIP","RAR"]; |
|
|
|
|
|
|
|
var flag = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < validFileExtensions.length; i++) { |
|
|
|
|
|
|
|
trace("TEST " + fileExtension); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fileExtension.toLowerCase().match(validFileExtensions[i].toString().toLowerCase()) || fileName.match("docs.google.com") ) { |
|
|
|
|
|
|
|
flag = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return flag; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VMM.Keys = { |
|
|
|
VMM.Keys = { |
|
|
|
flickr: "6d6f59d8d30d79f4f402a7644d5073e3", |
|
|
|
flickr: "6d6f59d8d30d79f4f402a7644d5073e3", |
|
|
|