Remove manual mimetype checking.

This commit is contained in:
kondou 2013-04-08 22:57:46 +02:00
parent 275badaf76
commit 9c53f35d9a
1 changed files with 1 additions and 5 deletions

View File

@ -328,12 +328,8 @@ var OCdialogs = {
fillTreeList: function(request, dialog_id) {
var template = '<option value="*COUNT*">*NAME*</option>';
var paths = '<option value="0">' + escapeHTML($(dialog_id).data('path')) + '</option>';
var count = 1;
$.each(request.data, function(index, file) {
if (file.mimetype === "httpd/unix-directory") {
paths += template.replace('*COUNT*', count).replace('*NAME*', escapeHTML(file.name));
count++;
}
paths += template.replace('*COUNT*', index).replace('*NAME*', escapeHTML(file.name));
});
$(dialog_id + ' #dirtree').html(paths);