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
2015-08-10 10:21:05 -04:00

16 lines
465 B
JavaScript

import ScreenTrack from 'discourse/lib/screen-track';
export default Discourse.GroupedView.extend({
templateName: 'embedded-post',
classNames: ['reply'],
_startTracking: function() {
const post = this.get('content');
ScreenTrack.current().track(this.get('elementId'), post.get('post_number'));
}.on('didInsertElement'),
_stopTracking: function() {
ScreenTrack.current().stopTracking(this.get('elementId'));
}.on('willDestroyElement')
});