summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web-ui/app/js/mail_view/ui/no_mails_available_pane.js4
-rw-r--r--web-ui/app/js/services/mail_service.js2
2 files changed, 4 insertions, 2 deletions
diff --git a/web-ui/app/js/mail_view/ui/no_mails_available_pane.js b/web-ui/app/js/mail_view/ui/no_mails_available_pane.js
index baa54fe3..7025dca6 100644
--- a/web-ui/app/js/mail_view/ui/no_mails_available_pane.js
+++ b/web-ui/app/js/mail_view/ui/no_mails_available_pane.js
@@ -34,9 +34,11 @@ define(
forSearch: ''
});
+ var mailsQueryMatch = /-?in:"[\w]+"|tag:"[\w]+"/g;
+
this.render = function() {
this.attr.tag = this.attr.tag.toUpperCase();
- this.attr.forSearch = this.attr.forSearch.toUpperCase();
+ this.attr.forSearch = this.attr.forSearch.replace(mailsQueryMatch, '').trim();
this.$node.html(templates.noMailsAvailable(this.attr));
};
diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js
index 3dae9df8..e655bb7e 100644
--- a/web-ui/app/js/services/mail_service.js
+++ b/web-ui/app/js/services/mail_service.js
@@ -222,7 +222,7 @@ define(
monitoredAjax(this, url, { dataType: 'json' })
.done(function (data) {
this.attr.numPages = Math.ceil(data.stats.total / this.attr.pageSize);
- this.trigger(document, events.mails.available, _.merge(_.merge({tag: this.attr.currentTag, forSearch: this.attr.lastQuery }), this.parseMails(data)));
+ this.trigger(document, events.mails.available, _.merge({tag: this.attr.currentTag, forSearch: this.attr.lastQuery }, this.parseMails(data)));
}.bind(this))
.fail(function () {
this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n('Could not fetch messages') });