From 9068cf5c52c589c9228cca7d2ebb1ecec9129a0d Mon Sep 17 00:00:00 2001 From: Jefferson Stachelski Date: Fri, 23 Oct 2015 18:21:17 -0200 Subject: Issue #493 - changed how trigger the edit recipients Changed from double click to a single one and now using the pointer cursor to be more intuitive --- web-ui/app/js/mail_view/ui/recipients/recipient.js | 12 ++++++------ web-ui/app/scss/_mixins.scss | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/mail_view/ui/recipients/recipient.js b/web-ui/app/js/mail_view/ui/recipients/recipient.js index f3db5d4e..2985a9ab 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipient.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipient.js @@ -77,30 +77,30 @@ define( }; this.discoverEncryption = function () { - this.$node.addClass('discorver-encryption'); + this.$node.addClass('discover-encryption'); var p = $.getJSON('/keys?search=' + this.attr.address).promise(); p.done(function () { this.$node.find('.recipient-value').addClass('encrypted'); - this.$node.removeClass('discorver-encryption'); + this.$node.removeClass('discover-encryption'); }.bind(this)); p.fail(function () { this.$node.find('.recipient-value').addClass('not-encrypted'); - this.$node.removeClass('discorver-encryption'); + this.$node.removeClass('discover-encryption'); }.bind(this)); }; this.editRecipient = function(evt) { - var mailAddr = this.$node.children('input[type=hidden]').val(); + var mailAddr = this.$node.find('input[type=hidden]').val(); // TODO: refactor the code bellow $('#recipients-to-area').find('input.tt-input').val(mailAddr); $('#recipients-to-area').find('input.tt-input').focus(); - // this.triger(document, events.ui.recipients:inputFieldHasCharacters); this.destroy(); + // TODO: fix the bug when edit recipient and click out of the input }; this.after('initialize', function () { this.recipientDelActions(); - this.on('dblclick', this.editRecipient); + this.on('click', this.editRecipient); if (this.attr.invalidAddress){ this.sinalizeInvalid(); } else { diff --git a/web-ui/app/scss/_mixins.scss b/web-ui/app/scss/_mixins.scss index fe52ce1c..45b3ee2e 100644 --- a/web-ui/app/scss/_mixins.scss +++ b/web-ui/app/scss/_mixins.scss @@ -235,6 +235,7 @@ & span { margin: 0px; padding: 0px; + cursor: pointer; } margin: 3px; padding: 5px; -- cgit v1.2.3