summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-08-08 13:50:04 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-08-08 13:50:04 +0200
commitff67f115d403d13dedf77457c539963f50a80eec (patch)
tree1b406eb56e1355b672c4d6f8a6d962e6042a64d7 /core
parent057d7aa108f9b24c12b97f5f78008eb17a6d3bee (diff)
downloadnextcloud-server-ff67f115d403d13dedf77457c539963f50a80eec.tar.gz
nextcloud-server-ff67f115d403d13dedf77457c539963f50a80eec.zip
fix #2711 using a custom event, also use css selectors over filterAttr
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/js/share.js b/core/js/share.js
index b4b5159b0b5..b0d38c45cb8 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -22,9 +22,9 @@ OC.Share={
if (itemType != 'file' && itemType != 'folder') {
$('a.share[data-item="'+item+'"]').css('background', 'url('+image+') no-repeat center');
} else {
- var file = $('tr').filterAttr('data-id', item);
+ var file = $('tr[data-id="'+item+'"]');
if (file.length > 0) {
- var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
+ var action = $(file).find('.fileactions .action[data-action="Share"]');
var img = action.find('img').attr('src', image);
action.addClass('permanent');
action.html(' '+t('core', 'Shared')).prepend(img);
@@ -36,7 +36,7 @@ OC.Share={
// Search for possible parent folders that are shared
while (path != last) {
if (path == data['path']) {
- var actions = $('.fileactions .action').filterAttr('data-action', 'Share');
+ var actions = $('.fileactions .action[data-action="Share"]');
$.each(actions, function(index, action) {
var img = $(action).find('img');
if (img.attr('src') != OC.imagePath('core', 'actions/public')) {