From effec78faacc4def3cd1f1f7fbedf79eaeb824f5 Mon Sep 17 00:00:00 2001 From: Patrick Maia Date: Wed, 1 Oct 2014 18:46:58 -0300 Subject: #53 - does not show modal on when all tags are removed. Now its allowed to do so. --- web-ui/app/js/mail_view/ui/mail_view.js | 25 ++----------------------- web-ui/app/templates/mails/full_view.hbs | 14 -------------- 2 files changed, 2 insertions(+), 37 deletions(-) (limited to 'web-ui/app') 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; diff --git a/web-ui/app/templates/mails/full_view.hbs b/web-ui/app/templates/mails/full_view.hbs index c674291c..b28e8086 100644 --- a/web-ui/app/templates/mails/full_view.hbs +++ b/web-ui/app/templates/mails/full_view.hbs @@ -63,20 +63,6 @@ -
-

{{t 'You are trying to delete the last tag on this message.'}}

- -

{{t 'What would you like to do?'}}

- - - × - {{t 'Trash:'}} {{t 'we will keep this message for 30 days, then delete it forever.'}} - - - {{t 'Archive:'}} {{t 'we will remove all the tags, but keep it in your account in case you need it.'}} - -
-
{{#each body }}

{{ this }}

-- cgit v1.2.3