diff options
author | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-10-01 18:46:58 -0300 |
---|---|---|
committer | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-10-01 18:47:55 -0300 |
commit | effec78faacc4def3cd1f1f7fbedf79eaeb824f5 (patch) | |
tree | 8aca439ff1a7110578346e54d4aa30e16a9c8261 /web-ui/app/js | |
parent | 1b936ef4deb233c97035e845b044954355da8d33 (diff) |
#53 - does not show modal on when all tags are removed. Now its allowed to do so.
Diffstat (limited to 'web-ui/app/js')
-rw-r--r-- | web-ui/app/js/mail_view/ui/mail_view.js | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js index c0d1fa53..f8fb9318 100644 --- a/web-ui/app/js/mail_view/ui/mail_view.js +++ b/web-ui/app/js/mail_view/ui/mail_view.js @@ -43,10 +43,8 @@ define( newTagInput: '#new-tag-input', newTagButton: '#new-tag-button', addNew: '.add-new', - deleteModal: '#delete-modal', trashButton: '#trash-button', archiveButton: '#archive-button', - closeModalButton: '.close-reveal-modal', closeMailButton: '.close-mail-button' }); @@ -91,8 +89,6 @@ define( this.on(this.select('newTagInput'), 'keydown', this.handleKeyDown); this.on(this.select('newTagInput'), 'blur', this.addTagLoseFocus); this.on(this.select('trashButton'), 'click', this.moveToTrash); - this.on(this.select('archiveButton'), 'click', this.archiveIt); - this.on(this.select('closeModalButton'), 'click', this.closeModal); this.on(this.select('closeMailButton'), 'click', this.openNoMessageSelectedPane); mailActions.attachTo('#mail-actions', data); @@ -175,31 +171,14 @@ define( this.removeTag = function (tag) { var filteredTags = _.without(this.attr.mail.tags, tag); - if (_.isEmpty(filteredTags)){ - this.displayMail({}, { mail: this.attr.mail }); - this.select('deleteModal').foundation('reveal', 'open'); - } else { - this.updateTags(this.attr.mail, filteredTags); - this.trigger(document, events.dispatchers.tags.refreshTagList); - } + this.updateTags(this.attr.mail, filteredTags); + this.trigger(document, events.dispatchers.tags.refreshTagList); }; this.moveToTrash = function(){ - this.closeModal(); this.trigger(document, events.ui.mail.delete, { mail: this.attr.mail }); }; - this.archiveIt = function() { - this.updateTags(this.attr.mail, []); - this.closeModal(); - this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.get('Your message was archive it!') }); - this.openNoMessageSelectedPane(); - }; - - this.closeModal = function() { - $('#delete-modal').foundation('reveal', 'close'); - }; - this.tagsUpdated = function(ev, data) { data = data || {}; this.attr.mail.tags = data.tags; |