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 | |
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')
-rw-r--r-- | web-ui/app/js/mail_view/ui/mail_view.js | 25 | ||||
-rw-r--r-- | web-ui/app/templates/mails/full_view.hbs | 14 |
2 files changed, 2 insertions, 37 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; 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 @@ </div> </header> - <div id="delete-modal" class="reveal-modal" data-reveal> - <p class="lead">{{t 'You are trying to delete the last tag on this message.'}}</p> - - <p>{{t 'What would you like to do?'}}</p> - <button id="trash-button">{{t 'Trash message'}}</button> - <button id="archive-button">{{t 'Archive it'}}</button> - <span class="close-reveal-modal">×</span> - <small><strong>{{t 'Trash:'}}</strong> {{t 'we will keep this message for 30 days, then delete it forever.'}} - </small> - <small> - <strong>{{t 'Archive:'}}</strong> {{t 'we will remove all the tags, but keep it in your account in case you need it.'}} - </small> - </div> - <div class="bodyArea column large-12"> {{#each body }} <p>{{ this }}</p> |