summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-09-12 12:01:36 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:27 +0200
commit5fad379bf1ba0bc6502055ba92869663b36c9a84 (patch)
tree0e3d5292f257e207f7c50e68dacd7144068429b3 /apps/files_sharing/js
parent258a2e2696c0c2a1e784fe27cbd8ca9a4dc8b8ca (diff)
downloadnextcloud-server-5fad379bf1ba0bc6502055ba92869663b36c9a84.tar.gz
nextcloud-server-5fad379bf1ba0bc6502055ba92869663b36c9a84.zip
remove obsolete file action
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/share.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index a4ae7fad899..c3d567fec86 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -32,7 +32,6 @@
if (fileList.id === 'trashbin' || fileList.id === 'files.public') {
return;
}
- var fileActions = fileList.fileActions;
var oldCreateRow = fileList._createRow;
fileList._createRow = function(fileData) {
var tr = oldCreateRow.apply(this, arguments);
@@ -97,60 +96,6 @@
}
});
- fileActions.registerAction({
- name: 'Share',
- displayName: '',
- mime: 'all',
- permissions: OC.PERMISSION_SHARE,
- icon: OC.imagePath('core', 'actions/share'),
- type: OCA.Files.FileActions.TYPE_INLINE,
- actionHandler: function(filename, context) {
- var $tr = context.$file;
- var itemType = 'file';
- if ($tr.data('type') === 'dir') {
- itemType = 'folder';
- }
- var possiblePermissions = $tr.data('share-permissions');
- if (_.isUndefined(possiblePermissions)) {
- possiblePermissions = $tr.data('permissions');
- }
-
- var appendTo = $tr.find('td.filename');
- // Check if drop down is already visible for a different file
- if (OC.Share.droppedDown) {
- if ($tr.attr('data-id') !== $('#dropdown').attr('data-item-source')) {
- OC.Share.hideDropDown(function () {
- $tr.addClass('mouseOver');
- OC.Share.showDropDown(itemType, $tr.data('id'), appendTo, true, possiblePermissions, filename);
- });
- } else {
- OC.Share.hideDropDown();
- }
- } else {
- $tr.addClass('mouseOver');
- OC.Share.showDropDown(itemType, $tr.data('id'), appendTo, true, possiblePermissions, filename);
- }
- $('#dropdown').on('sharesChanged', function(ev) {
- // files app current cannot show recipients on load, so we don't update the
- // icon when changed for consistency
- if (context.fileList.$el.closest('#app-content-files').length) {
- return;
- }
- var recipients = _.pluck(ev.shares[OC.Share.SHARE_TYPE_USER], 'share_with_displayname');
- var groupRecipients = _.pluck(ev.shares[OC.Share.SHARE_TYPE_GROUP], 'share_with_displayname');
- recipients = recipients.concat(groupRecipients);
- // note: we only update the data attribute because updateIcon()
- // is called automatically after this event
- if (recipients.length) {
- $tr.attr('data-share-recipients', OCA.Sharing.Util.formatRecipients(recipients));
- }
- else {
- $tr.removeAttr('data-share-recipients');
- }
- });
- }
- });
-
fileList.registerTabView(new OCA.Sharing.ShareTabView('shareTabView'));
},