diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-12-08 16:59:09 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-12-08 16:59:09 +0100 |
commit | fafac3b4128a0993b0de1c6e8ca3062bf1ccc14e (patch) | |
tree | 3b9a446e4c82bb8ba94c1cd0adec57c0042dae28 /web-ui/app/js/mail_list_actions/ui/archive_many_trigger.js | |
parent | 521bce7eff5cf921156efe74c91a0499ade43619 (diff) |
Revert "[#801] Merge branch 'signup'"
This reverts commit d10f607a4d40587510b0dc31b31fe4750bf4a3a3, reversing
changes made to c28abba2f5b1186c671ebef508d40ffaae6d5bc5.
Diffstat (limited to 'web-ui/app/js/mail_list_actions/ui/archive_many_trigger.js')
-rw-r--r-- | web-ui/app/js/mail_list_actions/ui/archive_many_trigger.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/web-ui/app/js/mail_list_actions/ui/archive_many_trigger.js b/web-ui/app/js/mail_list_actions/ui/archive_many_trigger.js new file mode 100644 index 00000000..b148cdce --- /dev/null +++ b/web-ui/app/js/mail_list_actions/ui/archive_many_trigger.js @@ -0,0 +1,29 @@ +define( + [ + 'flight/lib/component', + 'views/templates', + 'mixins/with_enable_disable_on_event', + 'page/events' + ], + + function(definecomponent, templates, withEnableDisableOnEvent, events) { + 'use strict'; + + return definecomponent(archiveManyTrigger, withEnableDisableOnEvent(events.ui.mails.hasMailsChecked)); + function archiveManyTrigger() { + + this.getMailsToArchive = function() { + this.trigger(document, events.ui.mail.wantChecked, this.$node); + }; + + this.archiveManyEmails = function(event, data) { + this.trigger(document, events.mail.archiveMany, data); + }; + + this.after('initialize', function () { + this.on('click', this.getMailsToArchive); + this.on(events.ui.mail.hereChecked, this.archiveManyEmails); + }); + } + } +); |