22 lines
No EOL
594 B
JavaScript
22 lines
No EOL
594 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.autoResize();
|
|
self.commentInput.focus(self.showCommentForm);
|
|
});
|
|
|
|
this.showCommentForm = function() {
|
|
self.commentFormElement.parent().removeClass("hidden");
|
|
self.commentFormElement.addClass("open");
|
|
};
|
|
};
|
|
|
|
Diaspora.Widgets.CommentForm = CommentForm;
|
|
})(); |