summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-22 12:31:54 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-22 12:32:07 -0400
commit885b8c481bed58a41b5f458decafa8bbfe1635c1 (patch)
tree3ebcf7cad00b92bcaa916a2f2f31ba9e8cf806fb /core/js
parent3debb6745815bb854c477d63090b7df03620ab20 (diff)
downloadnextcloud-server-885b8c481bed58a41b5f458decafa8bbfe1635c1.tar.gz
nextcloud-server-885b8c481bed58a41b5f458decafa8bbfe1635c1.zip
Check if files_sharing app is enabled, move file specific javascript to files_sharing app
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js61
1 files changed, 0 insertions, 61 deletions
diff --git a/core/js/share.js b/core/js/share.js
index c1d66ee9214..a552aa80830 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -275,67 +275,6 @@ $(document).ready(function() {
}
}
});
-
- if (typeof FileActions !== 'undefined') {
- OC.Share.loadIcons('file');
- FileActions.register('all', 'Share', FileActions.PERMISSION_SHARE, function(filename) {
- // Return the correct sharing icon
- if (scanFiles.scanning) { return; } // workaround to prevent additional http request block scanning feedback
- if ($('#dir').val() == '/') {
- var item = $('#dir').val() + filename;
- } else {
- var item = $('#dir').val() + '/' + filename;
- }
- // Check if status is in cache
- if (OC.Share.statuses[item] === true) {
- return OC.imagePath('core', 'actions/public');
- } else if (OC.Share.statuses[item] === false) {
- return OC.imagePath('core', 'actions/shared');
- } else {
- var last = '';
- var path = OC.Share.dirname(item);
- // Search for possible parent folders that are shared
- while (path != last) {
- if (OC.Share.statuses[path] === true) {
- return OC.imagePath('core', 'actions/public');
- } else if (OC.Share.statuses[path] === false) {
- return OC.imagePath('core', 'actions/shared');
- }
- last = path;
- path = OC.Share.dirname(path);
- }
- return OC.imagePath('core', 'actions/share');
- }
- }, function(filename) {
- if ($('#dir').val() == '/') {
- var item = $('#dir').val() + filename;
- } else {
- var item = $('#dir').val() + '/' + filename;
- }
- if ($('tr').filterAttr('data-file', filename).data('type') == 'dir') {
- var itemType = 'folder';
- var possiblePermissions = OC.Share.PERMISSION_CREATE | OC.Share.PERMISSION_UPDATE | OC.Share.PERMISSION_DELETE | OC.Share.PERMISSION_SHARE;
- } else {
- var itemType = 'file';
- var possiblePermissions = OC.Share.PERMISSION_UPDATE | OC.Share.PERMISSION_DELETE | OC.Share.PERMISSION_SHARE;
- }
- var appendTo = $('tr').filterAttr('data-file', filename).find('td.filename');
- // Check if drop down is already visible for a different file
- if (OC.Share.droppedDown) {
- if (item != $('#dropdown').data('item')) {
- OC.Share.hideDropDown(function () {
- $('tr').filterAttr('data-file', filename).addClass('mouseOver');
- OC.Share.showDropDown(itemType, item, appendTo, true, possiblePermissions);
- });
- } else {
- OC.Share.hideDropDown();
- }
- } else {
- $('tr').filterAttr('data-file',filename).addClass('mouseOver');
- OC.Share.showDropDown(itemType, item, appendTo, true, possiblePermissions);
- }
- });
- }
$(this).click(function(event) {
if (OC.Share.droppedDown && !($(event.target).hasClass('drop')) && $('#dropdown').has(event.target).length === 0) {