our spec would complain about the data of the ajax request not being there, move it into the callback instead

This commit is contained in:
Dan Hansen 2011-01-22 12:40:20 -06:00
parent 8619a2035c
commit b209fd0c2c

View file

@ -71,7 +71,8 @@ var AspectEdit = {
}
},
success: function(data) {
AspectEdit.onMovePersonSuccess(person, dropzone, data);
AspectEdit.onMovePersonSuccess(person, dropzone);
View.flashes.render($.parseJSON(data));
}
});
}
@ -85,8 +86,7 @@ var AspectEdit = {
person.removeAttr('data-person_id');
},
onMovePersonSuccess: function(person, dropzone, data) {
View.flashes.render(data);
onMovePersonSuccess: function(person, dropzone) {
person.attr('data-aspect_id', dropzone.attr('data-aspect_id'));
},