@@ -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
+}
|