Commit 4b300a63 authored by asseldonk's avatar asseldonk
Browse files

filebrowser: handle icons for tar.gz and precompiled fortran files

parent 8640274a
......@@ -113,7 +113,7 @@ var FileBaseView = Class.extend({
var availableIcons = ["bmp", "c", "cc", "conf", "cpp", "csh", "css", "eps", "f", "f03",
"f90", "f95", "F", "F03", "F90", "F95", "gif", "h", "html", "ico", "ini", "jade",
"jpeg", "jpg", "js", "less", "lnk", "log", "mako", "pdf", "png", "ps", "pxlio",
"py", "pyc", "rar", "raw", "root", "sh", "svg", "tar", "targz", "tex", "tif",
"py", "pyc", "rar", "raw", "root", "sh", "svg", "tar", "tar.gz", "tex", "tif",
"tiff", "txt", "xml", "yaml", "yml", "zip"
];
// return null;
......@@ -126,12 +126,23 @@ var FileBaseView = Class.extend({
} else {
// to do: fortran and targz
var extension = (self.FileBase.helper.strExtension(name) || "").toLowerCase();
var extensionCapital = (self.FileBase.helper.strExtension(name) || "");
console.log(extensionCapital);
if (availableIcons.indexOf(extension) >= 0) {
src = iconPrefix + extension.toLowerCase();
src = iconPrefix + extension;
// take correct icon for precompiled fortran files
var fortranPreCompiled = ["F", "F03", "F90", "F95"];
if (fortranPreCompiled.indexOf(extensionCapital) >= 0) {
src = iconPrefix + extensionCapital;
}
} else {
src = iconPrefix + "default-alt";
}
}
// take correct icon for targz
if (extension == "gz") {
src = iconPrefix + "targz";
}
return src;
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment