summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/filelist.js8
-rw-r--r--apps/files/tests/js/filelistSpec.js7
-rw-r--r--apps/files_sharing/tests/js/shareSpec.js2
3 files changed, 13 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 79ee355125d..a3fd605ff7e 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -710,6 +710,14 @@
path = this.getCurrentDirectory();
}
+ if (type === 'dir') {
+ // use default folder icon
+ icon = icon || OC.imagePath('core', 'filetypes/folder');
+ }
+ else {
+ icon = icon || OC.imagePath('core', 'filetypes/file');
+ }
+
// filename td
td = $('<td class="filename"></td>');
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index b12ac2f2517..316df0281e9 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -697,7 +697,7 @@ describe('OCA.Files.FileList tests', function() {
expect(fileList.findFileEl('One.txt').length).toEqual(1);
expect(OC.TestUtil.getImageUrl(fileList.findFileEl('One.txt').find('.thumbnail')))
- .toEqual(OC.imagePath('core', 'filetypes/file.svg'));
+ .toEqual(OC.imagePath('core', 'filetypes/text.svg'));
});
});
describe('Moving files', function() {
@@ -816,7 +816,7 @@ describe('OCA.Files.FileList tests', function() {
expect(notificationStub.getCall(0).args[0]).toEqual('Error while moving file');
expect(OC.TestUtil.getImageUrl(fileList.findFileEl('One.txt').find('.thumbnail')))
- .toEqual(OC.imagePath('core', 'filetypes/file.svg'));
+ .toEqual(OC.imagePath('core', 'filetypes/text.svg'));
});
});
describe('List rendering', function() {
@@ -1161,7 +1161,8 @@ describe('OCA.Files.FileList tests', function() {
var fileData = {
type: 'file',
name: 'test dir',
- icon: OC.webroot + '/core/img/filetypes/application-pdf.svg'
+ icon: OC.webroot + '/core/img/filetypes/application-pdf.svg',
+ mimetype: 'application/pdf'
};
var $tr = fileList.add(fileData);
var $imgDiv = $tr.find('td.filename .thumbnail');
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js
index 1bbf4ffca09..aa409285ca4 100644
--- a/apps/files_sharing/tests/js/shareSpec.js
+++ b/apps/files_sharing/tests/js/shareSpec.js
@@ -90,7 +90,7 @@ describe('OCA.Sharing.Util tests', function() {
type: 'dir',
name: 'One',
path: '/subdir',
- mimetype: 'text/plain',
+ mimetype: 'httpd/unix-directory',
size: 12,
permissions: OC.PERMISSION_ALL,
etag: 'abc'