From 1317b7c03dbbd98165ef29b50aa26bb1dd283cba Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Wed, 23 Oct 2013 18:39:37 +0200 Subject: pass the name of the item source from the browser to the server - no need to get the data via complicated db queries --- core/js/share.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'core/js') diff --git a/core/js/share.js b/core/js/share.js index 281cccaaef8..352ad4d4ca8 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -136,8 +136,17 @@ OC.Share={ return data; }, - share:function(itemType, itemSource, shareType, shareWith, permissions, callback) { - $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'share', itemType: itemType, itemSource: itemSource, shareType: shareType, shareWith: shareWith, permissions: permissions }, function(result) { + share:function(itemType, itemSource, shareType, shareWith, permissions, itemSourceName, callback) { + $.post(OC.filePath('core', 'ajax', 'share.php'), + { + action: 'share', + itemType: itemType, + itemSource: itemSource, + shareType: shareType, + shareWith: shareWith, + permissions: permissions, + itemSourceName: itemSourceName + }, function (result) { if (result && result.status === 'success') { if (callback) { callback(result.data); @@ -170,9 +179,9 @@ OC.Share={ } }); }, - showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions) { + showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) { var data = OC.Share.loadItem(itemType, itemSource); - var html = '