Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-05-06 01:09:32 +0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-05-06 01:10:07 +0400
commit565e02d061001524658b0ff0c722e4eac0b657ba (patch)
treeaf6e1c5bac59fd74c045858cd927589dd0dd8fdd /apps/files_sharing
parentd854e4a1447b5f18bdac24fcf0456cae0e5b2737 (diff)
Add back removed groups to the select form correctly
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/share.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 65118f5e85c..e9b46873d3a 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -161,11 +161,17 @@ OC.Share={
},
removeSharedWith:function(uid_shared_with) {
- $('#sharedWithList li[data-uid_shared_with="'+uid_shared_with+'"]').remove();
- if ($('#groupList li').length < 1) {
- $('#groups').hide();
+ var option;
+ if ($('#userList li[data-uid_shared_with="'+uid_shared_with+'"]').length > 0) {
+ $('#userList li[data-uid_shared_with="'+uid_shared_with+'"]').remove();
+ option = '<option value="'+uid_shared_with+'">'+uid_shared_with+'</option>';
+ } else if ($('#groupList li[data-uid_shared_with="'+uid_shared_with+'"]').length > 0) {
+ $('#groupList li[data-uid_shared_with="'+uid_shared_with+'"]').remove();
+ if ($('#groupList li').length < 1) {
+ $('#groups').hide();
+ }
+ option = '<option value="'+uid_shared_with+'(group)">'+uid_shared_with+' (group)</option>';
}
- var option = '<option value="'+uid_shared_with+'">'+uid_shared_with+'</option>';
$(option).appendTo('#share_with');
$('#share_with').trigger('liszt:updated');
},