From 0054416786d2b40f4a67d354226269a89fd97491 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 12 Apr 2013 18:04:35 +1000 Subject: [PATCH] keep jshint happy :) need to reconfigure my vim jshint ... --- app/assets/javascripts/discourse/models/action_summary.js | 2 +- app/assets/javascripts/discourse/models/post.js | 2 +- app/assets/javascripts/discourse/views/modal/flag_view.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/models/action_summary.js b/app/assets/javascripts/discourse/models/action_summary.js index ac89f2bd4ee..d945ab43379 100644 --- a/app/assets/javascripts/discourse/models/action_summary.js +++ b/app/assets/javascripts/discourse/models/action_summary.js @@ -43,7 +43,7 @@ Discourse.ActionSummary = Discourse.Model.extend({ this.set('acted', true); this.set('count', this.get('count') + 1); this.set('can_act', false); - this.set('can_undo', action != 'notify_moderators' && action != 'notify_user'); + this.set('can_undo', action !== 'notify_moderators' && action !== 'notify_user'); // Add ourselves to the users who liked it if present if (this.present('users')) { diff --git a/app/assets/javascripts/discourse/models/post.js b/app/assets/javascripts/discourse/models/post.js index e2e57d0d494..90eeb8e080f 100644 --- a/app/assets/javascripts/discourse/models/post.js +++ b/app/assets/javascripts/discourse/models/post.js @@ -112,7 +112,7 @@ Discourse.Post = Discourse.Model.extend({ flagsAvailable: (function() { var _this = this; - flags = Discourse.get('site.flagTypes').filter(function(item) { + var flags = Discourse.get('site.flagTypes').filter(function(item) { return _this.get("actionByName." + (item.get('name_key')) + ".can_act"); }); return flags; diff --git a/app/assets/javascripts/discourse/views/modal/flag_view.js b/app/assets/javascripts/discourse/views/modal/flag_view.js index 04be821e39b..064308dcf87 100644 --- a/app/assets/javascripts/discourse/views/modal/flag_view.js +++ b/app/assets/javascripts/discourse/views/modal/flag_view.js @@ -47,7 +47,7 @@ Discourse.FlagView = Discourse.ModalBodyView.extend({ var action = this.get('selected'); var postAction = this.get('post.actionByName.' + (action.get('name_key'))); - actionType = Discourse.get('site').postActionTypeById(this.get('postActionTypeId')); + var actionType = Discourse.get('site').postActionTypeById(this.get('postActionTypeId')); if (postAction) { postAction.act({ message: action.get('message')