diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/share.js | 6 | ||||
-rw-r--r-- | core/js/tests/specs/shareSpec.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/js/share.js b/core/js/share.js index 80a2d7d169e..bcb604feaa3 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -131,7 +131,7 @@ OC.Share={ } for(i = 0; i < files.length; i++) { if ($(files[i]).closest('tr').data('type') === 'dir') { - $(files[i]).css('background-image', 'url('+shareFolder+')'); + $(files[i]).find('.thumbnail').css('background-image', 'url('+shareFolder+')'); } } } @@ -238,10 +238,10 @@ OC.Share={ else { shareFolderIcon = OC.imagePath('core', 'filetypes/folder-shared'); } - $tr.children('.filename').css('background-image', 'url(' + shareFolderIcon + ')'); + $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')'); } else if (type === 'dir') { shareFolderIcon = OC.imagePath('core', 'filetypes/folder'); - $tr.children('.filename').css('background-image', 'url(' + shareFolderIcon + ')'); + $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')'); } // update share action text / icon if (hasShares || owner) { diff --git a/core/js/tests/specs/shareSpec.js b/core/js/tests/specs/shareSpec.js index f714b41dda6..4859ba782d2 100644 --- a/core/js/tests/specs/shareSpec.js +++ b/core/js/tests/specs/shareSpec.js @@ -509,7 +509,7 @@ describe('OC.Share tests', function() { beforeEach(function() { tipsyStub = sinon.stub($.fn, 'tipsy'); - $file = $('<tr><td class="filename">File name</td></tr>'); + $file = $('<tr><td class="filename"><div class="thumbnail"></div><span class="name">File name</span></td></tr>'); $file.find('.filename').append( '<span class="fileactions">' + '<a href="#" class="action action-share" data-action="Share">' + @@ -581,7 +581,7 @@ describe('OC.Share tests', function() { describe('displaying the folder icon', function() { function checkIcon(expectedImage) { - var imageUrl = OC.TestUtil.getImageUrl($file.find('.filename')); + var imageUrl = OC.TestUtil.getImageUrl($file.find('.filename .thumbnail')); expectedIcon = OC.imagePath('core', expectedImage); expect(imageUrl).toEqual(expectedIcon); } |