diaspora/public/javascripts/widgets/comment-form.js

23 lines
No EOL
529 B
JavaScript

(function() {
var CommentForm = function() {
var self = this;
this.subscribe("widget/ready", function(evt, commentFormElement) {
$.extend({
commentFormElement: commentFormElement
});
self.commentFormElement.submit(self.submitComment);
});
this.submitComment = function(evt) {
evt.preventDefault();
$.post(self.commentFormElement.attr("action"), self.commentFormElement.serialize(), function() {
});
}
};
Diaspora.Widgets.CommentForm = CommentForm;
})();