From 6299531f4c8f7daa1b4afab45d0439f635b03982 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Tue, 7 Oct 2014 15:01:42 +0200 Subject: Fixed jshint errors --- web-ui/app/js/tags/ui/tag.js | 5 +++-- web-ui/app/js/tags/ui/tag_base.js | 1 + web-ui/app/js/tags/ui/tag_shortcut.js | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'web-ui/app/js/tags/ui') diff --git a/web-ui/app/js/tags/ui/tag.js b/web-ui/app/js/tags/ui/tag.js index 031a1cba..c2b7f588 100644 --- a/web-ui/app/js/tags/ui/tag.js +++ b/web-ui/app/js/tags/ui/tag.js @@ -42,7 +42,7 @@ define( this.viewFor = function (tag, template) { return template({ - tagName: tag.default ? i18n("tags." + tag.name) : tag.name, + tagName: tag.default ? i18n('tags.' + tag.name) : tag.name, ident: tag.ident, count: this.badgeType(tag) === 'total' ? tag.counts.total : (tag.counts.total - tag.counts.read), displayBadge: this.displayBadge(tag), @@ -64,7 +64,8 @@ define( }; this.selectTag = function (ev, data) { - data.tag === this.attr.tag.name ? this.doSelect(data) : this.doUnselect(); + if(data.tag === this.attr.tag.name) { this.doSelect(data); } + else { this.doUnselect(); } }; this.doUnselect = function () { diff --git a/web-ui/app/js/tags/ui/tag_base.js b/web-ui/app/js/tags/ui/tag_base.js index eaf8a3d5..9b2a06a9 100644 --- a/web-ui/app/js/tags/ui/tag_base.js +++ b/web-ui/app/js/tags/ui/tag_base.js @@ -15,6 +15,7 @@ * along with Pixelated. If not, see . */ define(['views/i18n', 'page/events'], function(i18n, events) { + 'use strict'; function tagBase() { var ALWAYS_HIDE_BADGE_FOR = ['sent', 'trash', 'all']; diff --git a/web-ui/app/js/tags/ui/tag_shortcut.js b/web-ui/app/js/tags/ui/tag_shortcut.js index 9ec03eae..5710592e 100644 --- a/web-ui/app/js/tags/ui/tag_shortcut.js +++ b/web-ui/app/js/tags/ui/tag_shortcut.js @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see . */ +'use strict'; define( [ 'flight/lib/component', @@ -63,7 +64,8 @@ define( }; this.selectTag = function (ev, data) { - data.tag === this.attr.linkTo.name ? this.doSelect() : this.doUnselect(); + if(data.tag === this.attr.linkTo.name) { this.doSelect(); } + else { this.doUnselect(); } }; this.doUnselect = function () { -- cgit v1.2.3