diff --git a/templates/web/prod/actions/Feedback/List-Share.html.twig b/templates/web/prod/actions/Feedback/List-Share.html.twig index 689cc07c6d..b72e5d9c91 100644 --- a/templates/web/prod/actions/Feedback/List-Share.html.twig +++ b/templates/web/prod/actions/Feedback/List-Share.html.twig @@ -3,20 +3,21 @@ {% else %}
-

{% trans 'About Roles : ' %}

+

{% trans 'About Roles : ' %}

- {% trans 'Admin can edit shares, modify content' %} + - {% trans 'Admin can edit shares, modify content' %}

- {% trans 'Editor can modify content' %} + - {% trans 'Editor can modify content' %}

- {% trans 'Access user have readonly access' %} + - {% trans 'Access user have readonly access' %}

-
+
- + +
@@ -27,11 +28,11 @@ - + {{ owner.getUser().get_display_name() }} - + {% if user.get_id() == owner.getUser(user).get_id() %} {% if owner.getRole() == constant('\\Entities\\UsrListOwner::ROLE_ADMIN') %} {% trans 'You are Admin' %} @@ -51,10 +52,12 @@ {% endif %} - - - - + + {% if user.get_id() != owner.getUser(user).get_id() %} + + + + {% endif %} @@ -85,6 +88,17 @@ return false; }); + + $('.deleter', $container).bind('click', function(){ + var owner = $(this).closest('.owner'); + var usr_id = owner.find('input[name="usr_id"]').val(); + + unShareWith(usr_id, function(data){ + owner.remove(); + }); + + return false; + }); function shareWith(usr_id, role) @@ -119,6 +133,38 @@ } }); } + + function unShareWith(usr_id, callback) + { + + $.ajax({ + type: 'POST', + url: '/prod/lists/list/{{ list.getId() }}/unshare/' + usr_id + '/', + dataType: 'json', + data : {}, + beforeSend:function(){ + }, + success: function(data){ + if(data.success) + { + humane.info(data.message); + callback(data); + } + else + { + humane.error(data.message); + } + $dialog.refresh(); + return; + }, + error: function(){ + return; + }, + timeout: function(){ + return; + } + }); + } $autocompleter.autocomplete({ minLength: 2, diff --git a/www/skins/prod/Push.css b/www/skins/prod/Push.css index ae86715216..a7646da8ab 100644 --- a/www/skins/prod/Push.css +++ b/www/skins/prod/Push.css @@ -364,4 +364,4 @@ margin: 0 5px 0 0; padding: 4px; width: 95%; -} \ No newline at end of file +}