This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/views/embedded-post.js.es6
2014-06-18 16:00:54 -04:00

23 lines
614 B
JavaScript

/**
This view handles rendering of post within another (such as a collapsed reply)
@class EmbeddedPostView
@extends Discourse.View
@namespace Discourse
@module Discourse
**/
export default Discourse.GroupedView.extend({
templateName: 'embedded_post',
classNames: ['reply'],
_startTracking: function() {
var post = this.get('content');
Discourse.ScreenTrack.current().track(this.get('elementId'), post.get('post_number'));
}.on('didInsertElement'),
_stopTracking: function() {
Discourse.ScreenTrack.current().stopTracking(this.get('elementId'));
}.on('willDestroyElement')
});