summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_list
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@thoughtworks.com>2014-10-07 15:01:42 +0200
committerBruno Wagner <bwagner@thoughtworks.com>2014-10-07 15:01:54 +0200
commit6299531f4c8f7daa1b4afab45d0439f635b03982 (patch)
tree92b2876e732731e5219e50ef7719c72ec2cb478a /web-ui/app/js/mail_list
parent88abefd3e62fb65a08dde62a7d7e4ce1fa22f563 (diff)
Fixed jshint errors
Diffstat (limited to 'web-ui/app/js/mail_list')
-rw-r--r--web-ui/app/js/mail_list/ui/mail_item_factory.js7
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js2
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/sent_item.js4
3 files changed, 7 insertions, 6 deletions
diff --git a/web-ui/app/js/mail_list/ui/mail_item_factory.js b/web-ui/app/js/mail_list/ui/mail_item_factory.js
index d7b10e9b..e922a642 100644
--- a/web-ui/app/js/mail_list/ui/mail_item_factory.js
+++ b/web-ui/app/js/mail_list/ui/mail_item_factory.js
@@ -14,6 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
*/
+/* global _ */
'use strict';
define(
@@ -50,12 +51,12 @@ define(
var detectMailType = function(mail) {
if(_.include(mail.tags, 'drafts')) {
- return MAIL_ITEM_TYPE['drafts'];
+ return MAIL_ITEM_TYPE.drafts;
} else if(_.include(mail.tags, 'sent')) {
- return MAIL_ITEM_TYPE['sent'];
+ return MAIL_ITEM_TYPE.sent;
} else {
return GenericMailItem;
- };
+ }
};
return {
diff --git a/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js
index 631f1a32..3d426447 100644
--- a/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js
+++ b/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js
@@ -88,7 +88,7 @@ define(
var mailItemHtml = templates.mails.single(this.attr);
this.$node.html(mailItemHtml);
this.$node.addClass(this.attr.statuses);
- this.attr.selected && this.select();
+ if(this.attr.selected) { this.select(); }
this.on(this.$node.find('a'), 'click', this.triggerOpenMail);
};
diff --git a/web-ui/app/js/mail_list/ui/mail_items/sent_item.js b/web-ui/app/js/mail_list/ui/mail_items/sent_item.js
index 702e14b6..eeaa845f 100644
--- a/web-ui/app/js/mail_list/ui/mail_items/sent_item.js
+++ b/web-ui/app/js/mail_list/ui/mail_items/sent_item.js
@@ -31,7 +31,7 @@ define(
function sentItem() {
function isOpeningOnANewTab(ev) {
- return ev.metaKey || ev.ctrlKey || ev.which == 2;
+ return ev.metaKey || ev.ctrlKey || ev.which === 2;
}
this.triggerOpenMail = function (ev) {
@@ -55,7 +55,7 @@ define(
var mailItemHtml = templates.mails.sent(this.attr);
this.$node.html(mailItemHtml);
this.$node.addClass(this.attr.statuses);
- this.attr.selected && this.select();
+ if(this.attr.selected) { this.select(); }
this.on(this.$node.find('a'), 'click', this.triggerOpenMail);
};