diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index b8fe6e904..c9ec73951 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -3,7 +3,7 @@
= javascript_include_tag 'group-edit.js'
- content_for :left_pane do
- %h1{:id => 'group_title'}
+ %h1
Requests
%li.requests
@@ -14,6 +14,17 @@
.name
= request.person.real_name
+ %h1
+ Ignore/Remove
+
+ %li.remove
+ %ul
+ - for request in @remote_requests
+ %li.person{:id => request.person.id, :request_id => request.id}
+ = image_tag(request.person.profile.image_url(:thumb_small)) unless request.person.profile.image_url.nil?
+ .name
+ = request.person.real_name
+
%h1{:id => 'group_title'}
Relations
diff --git a/public/javascripts/group-edit.js b/public/javascripts/group-edit.js
index e5c995bed..fa23cf566 100644
--- a/public/javascripts/group-edit.js
+++ b/public/javascripts/group-edit.js
@@ -13,7 +13,8 @@ $(function() {
$("li .person").draggable({
revert: true
});
-
+
+
$(".group ul").droppable({
drop: function(event, ui) {
if (ui.draggable[0].getAttribute('request_id') != null){
@@ -38,6 +39,21 @@ $(function() {
$(this).closest("ul").append(ui.draggable);
}
});
+
+ $(".remove ul").droppable({
+ drop: function(event, ui) {
+ if (ui.draggable[0].getAttribute('request_id') != null){
+ $.ajax({
+ type: "DELETE",
+ url: "/requests/" + ui.draggable[0].getAttribute('request_id') ,
+ data: {"accept" : false }
+ });
+ alert("Removed Request, proably want an undo countdown.")
+ ui.draggable[0].fadeOut("slow")
+ }
+
+ }
+ });
});
$(".group h3").live( 'click', function() {
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index 5cf70a6bd..3f2e841a9 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -772,7 +772,8 @@ h1.big_text
.group,
-.requests
+.requests,
+.remove
:list
:style none