aboutsummaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-13 09:00:43 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-13 09:00:43 +0100
commit29e1c3a898a66b0b005d230a836a0275e462071c (patch)
tree7b7849a1ba70af81f885b56bd49da429ff0fa824 /core/js
parentefb495b09f220410defbbbd786ccddab4de609fd (diff)
parenta89aad05c00607e8bf2e84ff12852cef0c245b4a (diff)
downloadnextcloud-server-29e1c3a898a66b0b005d230a836a0275e462071c.tar.gz
nextcloud-server-29e1c3a898a66b0b005d230a836a0275e462071c.zip
Merge pull request #12795 from owncloud/files-layoutchanges
Move file thumbnail element into the label tag
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js6
-rw-r--r--core/js/tests/specs/shareSpec.js4
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);
}