diff options
author | kondou <kondou@ts.unde.re> | 2013-08-18 00:38:52 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-18 00:38:52 +0200 |
commit | edd92e4c09151238a89816186914f9382293ab9b (patch) | |
tree | e25d87cecf45ff2c2189198e5369f7754e01873a /core/js/share.js | |
parent | 1348330c7d75d2b60d845a43be57dedc6199ea1a (diff) | |
parent | 12f4494de02457d51004ca6a82c1b2160189819f (diff) | |
download | nextcloud-server-edd92e4c09151238a89816186914f9382293ab9b.tar.gz nextcloud-server-edd92e4c09151238a89816186914f9382293ab9b.zip |
Merge branch 'master' into fix_jslint_kondou
Conflicts:
apps/files/js/file-upload.js
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/js/share.js b/core/js/share.js index b220e4a1eb6..27c16f38b92 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')) { @@ -256,8 +256,8 @@ OC.Share={ var shareType = selected.item.value.shareType; var shareWith = selected.item.value.shareWith; $(this).val(shareWith); - // Default permissions are Read and Share - var permissions = OC.PERMISSION_READ | OC.PERMISSION_SHARE; + // Default permissions are Edit (CRUD) and Share + var permissions = OC.PERMISSION_ALL; OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() { OC.Share.addShareWith(shareType, shareWith, selected.item.label, permissions, possiblePermissions); $('#shareWith').val(''); |