diff --git a/api/js/etemplate/etemplate2.js b/api/js/etemplate/etemplate2.js index 179c8e5db3..f0659927b1 100644 --- a/api/js/etemplate/etemplate2.js +++ b/api/js/etemplate/etemplate2.js @@ -666,13 +666,21 @@ etemplate2.prototype.autocomplete_fixer = function () * Submit form via ajax * * @param {(et2_button|string)} button button widget or string with id - * @param {boolean} async true: do an asynchronious submit, default is synchronious + * @param {boolean|string} async true: do an asynchronious submit, string: spinner message (please wait...) + * default is asynchronoush with message * @param {boolean} no_validation - Do not do individual widget validation, just submit their current values * @param {et2_widget|undefined} _container container to submit, default whole template * @return {boolean} true if submit was send, false if eg. validation stoped submit */ etemplate2.prototype.submit = function(button, async, no_validation, _container) { + var api = this.widgetContainer.egw(); + + if (typeof async == 'undefined' || typeof async == 'string') + { + api.loading_prompt('et2_submit_spinner', true, api.lang(typeof async == 'string' ? async : 'Please wait...')); + async = true; + } if(typeof no_validation == 'undefined') { no_validation = false; @@ -751,8 +759,10 @@ etemplate2.prototype.submit = function(button, async, no_validation, _container) // unbind our session-destroy handler, as we are submitting this.unbind_unload(); - var api = this.widgetContainer.egw(); - var request = api.json(this.menuaction, [this.etemplate_exec_id, values, no_validation], null, this, async); + + var request = api.json(this.menuaction, [this.etemplate_exec_id, values, no_validation], function(){ + api.loading_prompt('et2_submit_spinner', false); + }, this, async); request.sendRequest(); } else @@ -995,7 +1005,7 @@ etemplate2.prototype.print = function() this.widgetContainer.iterateOver(function(_widget) { // Skip widgets from a different etemplate (home) if(_widget.getInstanceManager() != this) return; - + // Skip hidden widgets if(jQuery(_widget.getDOMNode()).filter(':visible').length === 0) return; diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 20cfcdc680..8fbc2b403f 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -504,6 +504,7 @@ class mail_compose { try { + $GLOBALS['egw']->session->commit_session(); $success = $this->send($_content); if ($success==false) { diff --git a/mail/js/app.js b/mail/js/app.js index 0bf6a93796..cca6661249 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -5321,7 +5321,7 @@ app.classes.mail = AppJS.extend( }); return false; } - this.et2._inst.submit(); + this.et2._inst.submit(null, 'Please wait while sending your mail'); }, /** diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index 701cb03085..f8f32519a3 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -393,6 +393,7 @@ please enter password mail de Bitte geben Sie ein Passwort ein please select a address mail de Bitte wählen Sie eine Adresse please select the number of days to wait between responses mail de Bitte wählen wie viele Tage zwischen den Antworten gewartet werden soll. please supply the message to send with auto-responses mail de Bitte geben Sie eine Nachricht ein, die mit der automatischen Antwort gesendet werden soll +please wait while sending your mail mail de Bitte warten, Ihre Mail wird gesendet post mail de versenden prevent managing filters mail de Zugriff auf Filterregeln deaktivieren prevent managing folders mail de Zugriff auf die Ordnerverwaltung deaktivieren diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index b7f0cce0cd..6e53a9b34f 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -393,6 +393,7 @@ please enter password mail en Please enter password please select a address mail en Please select a address please select the number of days to wait between responses mail en Please select the number of days to wait between responses please supply the message to send with auto-responses mail en Please supply the message to send with auto-responses +please wait while sending your mail mail en Please wait while sending your mail post mail en post prevent managing filters mail en Prevent managing filters prevent managing folders mail en Prevent managing folders