This commit is contained in:
@@ -267,6 +267,9 @@ export default {
|
||||
// @return {string} A new string with the spliced substring.
|
||||
stringSplice: function(source, start, delCount, newSubStr) {
|
||||
if (source == null || source == "") {
|
||||
if (newSubStr) {
|
||||
return newSubStr;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
return (
|
||||
@@ -339,6 +342,10 @@ export default {
|
||||
);
|
||||
return "fa-file";
|
||||
}
|
||||
|
||||
if (!mimeType) {
|
||||
mimeType = "";
|
||||
}
|
||||
mimeType = mimeType.toLowerCase();
|
||||
|
||||
let iconFromExtension = extensions[extension];
|
||||
@@ -355,6 +362,15 @@ export default {
|
||||
// "gzutil:iconForFile -> No icon for file:" + fileName + " Mime:" + mimeType
|
||||
// );
|
||||
return "fa-file";
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// attempt to detect image extension name
|
||||
//
|
||||
isImageURI: function(uri) {
|
||||
if (!uri) {
|
||||
return false;
|
||||
}
|
||||
return this.iconForFile(uri, "") == "fa-file-image";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user