From 945565f4206367be53a2c612a2d078a6b539a343 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 19 Jun 2012 14:19:30 -0400 Subject: Move ajax and js files to core --- apps/files_sharing/js/share.js | 366 ----------------------------------------- 1 file changed, 366 deletions(-) delete mode 100644 apps/files_sharing/js/share.js (limited to 'apps') diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js deleted file mode 100644 index 9194d2240ab..00000000000 --- a/apps/files_sharing/js/share.js +++ /dev/null @@ -1,366 +0,0 @@ -OC.Share={ - icons:[], - itemUsers:[], - itemGroups:[], - itemPrivateLink:false, - usersAndGroups:[], - loadIcons:function() { - // Cache all icons for shared files - $.getJSON(OC.filePath('files_sharing', 'ajax', 'getstatuses.php'), function(result) { - if (result && result.status === 'success') { - $.each(result.data, function(item, hasPrivateLink) { - if (hasPrivateLink) { - OC.Share.icons[item] = OC.imagePath('core', 'actions/public'); - } else { - OC.Share.icons[item] = OC.imagePath('core', 'actions/shared'); - } - }); - } - }); - }, - loadItem:function(item) { - $.ajax({type: 'GET', url: OC.filePath('files_sharing', 'ajax', 'getitem.php'), data: { item: item }, async: false, success: function(result) { - if (result && result.status === 'success') { - var item = result.data; - OC.Share.itemUsers = item.users; - OC.Share.itemGroups = item.groups; - OC.Share.itemPrivateLink = item.privateLink; - } - }}); - }, - share:function(source, uid_shared_with, permissions, callback) { - $.post(OC.filePath('files_sharing', 'ajax', 'share.php'), { sources: source, uid_shared_with: uid_shared_with, permissions: permissions }, function(result) { - if (result && result.status === 'success') { - if (callback) { - callback(result.data); - } - } else { - OC.dialogs.alert(result.data.message, 'Error while sharing'); - } - }); - }, - unshare:function(source, uid_shared_with, callback) { - $.post(OC.filePath('files_sharing', 'ajax', 'unshare.php'), { source: source, uid_shared_with: uid_shared_with }, function(result) { - if (result && result.status === 'success') { - if (callback) { - callback(); - } - } else { - OC.dialogs.alert('Error', 'Error while unsharing'); - } - }); - }, - changePermissions:function(source, uid_shared_with, permissions) { - $.post(OC.filePath('files_sharing','ajax','setpermissions.php'), { source: source, uid_shared_with: uid_shared_with, permissions: permissions }, function(result) { - if (!result || result.status !== 'success') { - OC.dialogs.alert('Error', 'Error while changing permissions'); - } - }); - }, - showDropDown:function(item, appendTo) { - OC.Share.loadItem(item); - var html = '