Skip to content
Snippets Groups Projects
Commit 1aa2f663 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Make getMimeIcon use OC.MimeType.getIconUrl

parent 2b86ba43
No related branches found
No related tags found
No related merge requests found
......@@ -163,18 +163,14 @@
return OC.filePath('files', 'ajax', action + '.php') + q;
},
/**
* Fetch the icon url for the mimetype
* @param {string} mime The mimetype
* @param {Files~mimeicon} ready Function to call when mimetype is retrieved
* @deprecated use OC.MimeType.getIconUrl(mime)
*/
getMimeIcon: function(mime, ready) {
if (Files.getMimeIcon.cache[mime]) {
ready(Files.getMimeIcon.cache[mime]);
} else {
$.get( OC.filePath('files','ajax','mimeicon.php'), {mime: mime}, function(path) {
if(OC.Util.hasSVGSupport()){
path = path.substr(0, path.length-4) + '.svg';
}
Files.getMimeIcon.cache[mime]=path;
ready(Files.getMimeIcon.cache[mime]);
});
}
ready(OC.MimeType.getIconUrl(mime));
},
/**
......@@ -211,7 +207,6 @@
* Initialize the files view
*/
initialize: function() {
Files.getMimeIcon.cache = {};
Files.bindKeyboardShortcuts(document, $);
// TODO: move file list related code (upload) to OCA.Files.FileList
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment