diaspora/public/javascripts/widgets/comment-form.js
Dan Hansen 545611fffa green?
2011-08-21 20:45:51 -05:00

20 lines
No EOL
494 B
JavaScript

(function() {
var CommentForm = function() {
var self = this;
this.subscribe("widget/ready", function(evt, commentFormElement) {
$.extend(self, {
commentFormElement: commentFormElement,
commentInput: commentFormElement.find("textarea")
});
self.commentInput.focus(self.showCommentForm);
});
this.showCommentForm = function() {
self.commentFormElement.addClass("open");
};
};
Diaspora.Widgets.CommentForm = CommentForm;
})();