From 5e8ef331904d09bc02da101de807b7f7f2ceae65 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 3 Jul 2012 14:00:09 -0400 Subject: Clean up in the dropdown for unsharing --- core/js/share.js | 96 +++++++++++++++----------------------------------------- 1 file changed, 26 insertions(+), 70 deletions(-) (limited to 'core/js/share.js') diff --git a/core/js/share.js b/core/js/share.js index bcad906262a..685932f6730 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -25,7 +25,7 @@ OC.Share={ }, loadItem:function(itemType, item) { var data = ''; - $.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'share.php'), data: { fetch: 'getItemShared', itemType: itemType, item: item }, async: false, success: function(result) { + $.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'share.php'), data: { fetch: 'getItem', itemType: itemType, item: item }, async: false, success: function(result) { if (result && result.status === 'success') { data = result.data; } else { @@ -45,8 +45,8 @@ OC.Share={ } }); }, - unshare:function(itemType, shareType, shareWith, callback) { - $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'unshare', itemType: itemType, shareType: shareType, shareWith: shareWith }, function(result) { + unshare:function(itemType, item, shareType, shareWith, callback) { + $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'unshare', itemType: itemType, item: item, shareType: shareType, shareWith: shareWith }, function(result) { if (result && result.status === 'success') { if (callback) { callback(); @@ -67,15 +67,8 @@ OC.Share={ var html = '