diff options
Diffstat (limited to 'web-ui/app/js')
-rw-r--r-- | web-ui/app/js/mail_view/ui/send_button.js | 3 | ||||
-rw-r--r-- | web-ui/app/js/user_alerts/ui/user_alerts.js | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/web-ui/app/js/mail_view/ui/send_button.js b/web-ui/app/js/mail_view/ui/send_button.js index f31f893a..034f472c 100644 --- a/web-ui/app/js/mail_view/ui/send_button.js +++ b/web-ui/app/js/mail_view/ui/send_button.js @@ -91,7 +91,8 @@ define([ this.disableButton(); this.$node.text(viewHelper.i18n.t('sending-mail')); - this.trigger(document, events.ui.userAlerts.displayMessage, {message: viewHelper.i18n.t('sending-mail'), class: 'success'}); + this.trigger(document, events.ui.userAlerts.displayMessage, + {message: viewHelper.i18n.t('sending-mail'), class: 'success', dismissTimeout: 60000}); this.attr.sendingInProgress = true; diff --git a/web-ui/app/js/user_alerts/ui/user_alerts.js b/web-ui/app/js/user_alerts/ui/user_alerts.js index e944a7a5..bef3efcd 100644 --- a/web-ui/app/js/user_alerts/ui/user_alerts.js +++ b/web-ui/app/js/user_alerts/ui/user_alerts.js @@ -29,21 +29,22 @@ define( function userAlerts() { this.defaultAttrs({ - dismissTimeout: 3000 + dismissTimeout: 4000 }); this.render = function(message) { + clearTimeout(this.attr.timeout); this.$node.html(templates.userAlerts.message(message)); this.show(); - setTimeout(this.hide.bind(this), this.attr.dismissTimeout); + this.attr.timeout = setTimeout(this.hide.bind(this), message.dismissTimeout || this.attr.dismissTimeout); }; - this.displayMessage = function(ev, data) { this.render({ message: { content: data.message, - class: 'message-panel__growl--' + (data.class || 'success') + class: 'message-panel__growl--' + (data.class || 'success'), + dismissTimeout: data.dismissTimeout } }); }; @@ -54,4 +55,3 @@ define( } } ); - |