diff options
author | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-12-19 15:34:38 -0200 |
---|---|---|
committer | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-12-19 15:34:53 -0200 |
commit | 7f6613813a4238382fe177dad81287b026598545 (patch) | |
tree | 61f45bd3151a3d69a171ed804623c0c1f62411d7 /web-ui | |
parent | 4cfb69848e0a65c6282bfdcbc76dd5008ed9adba (diff) |
Don't clear selected mail when opening a tag
Diffstat (limited to 'web-ui')
-rw-r--r-- | web-ui/app/js/mail_list/ui/mail_list.js | 14 | ||||
-rw-r--r-- | web-ui/app/js/tags/ui/tag.js | 1 | ||||
-rw-r--r-- | web-ui/test/spec/tags/ui/tag.spec.js | 2 |
3 files changed, 0 insertions, 17 deletions
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 dc1402ed..da79f20b 100644 --- a/web-ui/app/js/mail_list/ui/mail_list.js +++ b/web-ui/app/js/mail_list/ui/mail_list.js @@ -112,22 +112,8 @@ define( this.updateSelected = function (ev, data) { if (data.ident !== this.attr.currentMailIdent) { - this.uncheckCurrentMail(); this.attr.currentMailIdent = data.ident; } - this.checkCurrentMail(); - }; - - this.checkCurrentMail = function () { - $('#mail-' + this.attr.currentMailIdent + ' input:checkbox') - .attr('checked', true) - .trigger('change'); - }; - - this.uncheckCurrentMail = function () { - $('#mail-' + this.attr.currentMailIdent + ' input:checkbox') - .attr('checked', false) - .trigger('change'); }; this.cleanSelected = function () { diff --git a/web-ui/app/js/tags/ui/tag.js b/web-ui/app/js/tags/ui/tag.js index 2cf45764..a77155a7 100644 --- a/web-ui/app/js/tags/ui/tag.js +++ b/web-ui/app/js/tags/ui/tag.js @@ -80,7 +80,6 @@ define( this.doSelect = function (data) { this.attr.selected = true; this.$node.addClass('selected'); - this.trigger(document, events.ui.mails.cleanSelected); this.trigger(document, events.ui.tag.selected, data); }; diff --git a/web-ui/test/spec/tags/ui/tag.spec.js b/web-ui/test/spec/tags/ui/tag.spec.js index 1f76ebe3..3bc0c7fc 100644 --- a/web-ui/test/spec/tags/ui/tag.spec.js +++ b/web-ui/test/spec/tags/ui/tag.spec.js @@ -20,14 +20,12 @@ describeComponent('tags/ui/tag', function () { it('selects the tag on click', function () { var tagSelectEvent = spyOnEvent(document, Pixelated.events.ui.tag.select); - var cleanSelectedEvent = spyOnEvent(document, Pixelated.events.ui.mails.cleanSelected); this.component.$node.click(); expect(this.component.attr.selected).toBeTruthy(); expect(this.$node.attr('class')).toMatch('selected'); expect(tagSelectEvent).toHaveBeenTriggeredOnAndWith(document, { tag: 'inbox' }); - expect(cleanSelectedEvent).toHaveBeenTriggeredOn(document); }); it('should remove selected class when selecting a different tag', function () { |