enabling dragging and dropping between aspects on aspect manage. removed ability to remove a contact from aspects#manage after removing from a single aspect. fixed notification popup z-index.

This commit is contained in:
danielvincent 2010-12-02 17:36:46 -08:00
parent 2fbf2ddd6f
commit 6c05d01177
3 changed files with 4 additions and 13 deletions

View file

@ -6,7 +6,7 @@
var AspectEdit = {
initialize: function() {
$("ul .person.request").draggable({
$("ul .person").draggable({
revert: true,
start: AspectEdit.startDrag,
drag: AspectEdit.duringDrag,
@ -148,17 +148,7 @@ var AspectEdit = {
});
}
} else {
if (confirm("Also remove this person from all aspects?")) {
var person_id = $(this).closest("li.person").attr('data-guid');
$.ajax({
type: "DELETE",
url: "/people/" + person_id,
success: function() {
$(".person[data-guid='"+ person_id +"']").fadeOut(200);
}
});
} else {
if (confirm("Remove this person from aspect?")) {
AspectEdit.deletePersonFromAspect(person);
}
}

View file

@ -1530,6 +1530,7 @@ h3 span.current_gs_step
:color #22C910
#notification
:z-index 10
:display none
:position fixed
:bottom 21px

View file

@ -27,7 +27,7 @@ describe("AspectEdit", function() {
drag: AspectEdit.duringDrag,
stop: AspectEdit.stopDrag
});
expect($.fn.draggable.mostRecentCall.object.selector).toEqual("ul .person.request");
expect($.fn.draggable.mostRecentCall.object.selector).toEqual("ul .person");
});
it("calls droppable on .aspect ul.dropzone", function() {
spyOn($.fn, "droppable");