TRIVIAL: Change some variables to `self`
This commit is contained in:
parent
90a1cb5bec
commit
e276045112
|
@ -29,9 +29,9 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
||||||
|
|
||||||
// If the cooked content changed, add the quote controls
|
// If the cooked content changed, add the quote controls
|
||||||
cookedChanged: function() {
|
cookedChanged: function() {
|
||||||
var postView = this;
|
var self = this;
|
||||||
Em.run.schedule('afterRender', function() {
|
Em.run.schedule('afterRender', function() {
|
||||||
postView.insertQuoteControls();
|
self.insertQuoteControls();
|
||||||
});
|
});
|
||||||
}.observes('post.cooked'),
|
}.observes('post.cooked'),
|
||||||
|
|
||||||
|
@ -120,13 +120,13 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
||||||
// Show how many times links have been clicked on
|
// Show how many times links have been clicked on
|
||||||
showLinkCounts: function() {
|
showLinkCounts: function() {
|
||||||
|
|
||||||
var postView = this;
|
var self = this,
|
||||||
var link_counts = this.get('post.link_counts');
|
link_counts = this.get('post.link_counts');
|
||||||
|
|
||||||
if (link_counts) {
|
if (link_counts) {
|
||||||
_.each(link_counts, function(lc) {
|
_.each(link_counts, function(lc) {
|
||||||
if (lc.clicks > 0) {
|
if (lc.clicks > 0) {
|
||||||
postView.$(".cooked a[href]").each(function() {
|
self.$(".cooked a[href]").each(function() {
|
||||||
var link = $(this);
|
var link = $(this);
|
||||||
if (link.attr('href') === lc.url) {
|
if (link.attr('href') === lc.url) {
|
||||||
// don't display badge counts on category badge
|
// don't display badge counts on category badge
|
||||||
|
|
Loading…
Reference in New Issue