http://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153
24 lines
536 B
JavaScript
24 lines
536 B
JavaScript
(function() {
|
|
|
|
window.Discourse.ParentView = Discourse.EmbeddedPostView.extend({
|
|
previousPost: true,
|
|
/* Nice animation for when the replies appear
|
|
*/
|
|
|
|
didInsertElement: function() {
|
|
var $parentPost;
|
|
this._super();
|
|
$parentPost = this.get('postView').jQuery('section.parent-post');
|
|
/* Animate unless we're on a touch device
|
|
*/
|
|
|
|
if (Discourse.get('touch')) {
|
|
return $parentPost.show();
|
|
} else {
|
|
return $parentPost.slideDown();
|
|
}
|
|
}
|
|
});
|
|
|
|
}).call(this);
|