summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_list
diff options
context:
space:
mode:
authorAlexandre Pretto Nunes <anunes@thoughtworks.com>2015-01-15 15:04:48 -0200
committerAlexandre Pretto Nunes <anunes@thoughtworks.com>2015-01-15 15:10:07 -0200
commit43a783e10f0b89820fb8d1e5677b0fdbcf7e9b6e (patch)
treecb0de1b1f540ab670f78f3cc02f2e28ac7a6071f /web-ui/app/js/mail_list
parentee5ce9624a800bb85b05d3c73f4ca30c61443429 (diff)
#153 fix mail checking and unchecking on mail list
Diffstat (limited to 'web-ui/app/js/mail_list')
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/mail_item.js1
-rw-r--r--web-ui/app/js/mail_list/ui/mail_list.js10
2 files changed, 5 insertions, 6 deletions
diff --git a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js
index 94f08a9f..f7ae2f0c 100644
--- a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js
+++ b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js
@@ -36,7 +36,6 @@ define(
this.doSelect = function () {
this.$node.addClass('selected');
- this.checkCheckbox();
};
this.doUnselect = function () {
diff --git a/web-ui/app/js/mail_list/ui/mail_list.js b/web-ui/app/js/mail_list/ui/mail_list.js
index c2746c88..69327a57 100644
--- a/web-ui/app/js/mail_list/ui/mail_list.js
+++ b/web-ui/app/js/mail_list/ui/mail_list.js
@@ -121,15 +121,15 @@ define(
};
this.updateCheckAllCheckbox = function () {
- this.trigger(document, events.ui.mails.hasMailsChecked, {hasMailsChecked: _.keys(this.attr.checkedMails).length > 0});
+ this.trigger(document, events.ui.mails.hasMailsChecked, _.keys(this.attr.checkedMails).length > 0);
};
- this.addToSelectedMails = function (ev, data) {
+ this.addToCheckedMails = function (ev, data) {
this.attr.checkedMails[data.mail.ident] = data.mail;
this.updateCheckAllCheckbox();
};
- this.removeFromSelectedMails = function (ev, data) {
+ this.removeFromCheckedMails = function (ev, data) {
if (data.mails) {
_.each(data.mails, function (mail) {
delete this.attr.checkedMails[mail.ident];
@@ -169,8 +169,8 @@ define(
this.on(document, events.ui.mail.updateSelected, this.updateSelected);
this.on(document, events.ui.mail.wantChecked, this.respondWithCheckedMails);
- this.on(document, events.ui.mail.checked, this.addToSelectedMails);
- this.on(document, events.ui.mail.unchecked, this.removeFromSelectedMails);
+ this.on(document, events.ui.mail.checked, this.addToCheckedMails);
+ this.on(document, events.ui.mail.unchecked, this.removeFromCheckedMails);
this.openMailFromUrl = utils.once(function () {
if (this.shouldSelectEmailFromUrlMailIdent()) {