*/
_notification: null,
+ /**
+ * true, if a request to save the message is pending
+ * @var boolean
+ */
+ _pendingSave: false,
+
/**
* action proxy
* @var WCF.Action.Proxy
init: function(supportExtendedForm, quoteManager) {
this._container = $('#messageQuickReply');
this._messageField = $('#text');
+ this._pendingSave = false;
if (!this._container || !this._messageField) {
return;
}
* Saves message.
*/
_save: function() {
+ if (this._pendingSave) {
+ return;
+ }
+
var $message = '';
if ($.browser.mobile) {
$innerError.remove();
}
+ this._pendingSave = true;
+
this._proxy.setOption('data', {
actionName: 'quickReply',
className: this._getClassName(),
* Prepares jump to extended message add form.
*/
_prepareExtended: function() {
+ this._pendingSave = true;
+
// mark quotes for removal
if (this._quoteManager !== null) {
this._quoteManager.markQuotesForRemoval();
if (this._quoteManager !== null) {
this._quoteManager.countQuotes();
}
+
+ this._pendingSave = false;
}
},
* Reverts quick reply on failure to preserve entered message.
*/
_failure: function(data) {
+ this._pendingSave = false;
this._revertQuickReply(false);
if (data === null || data.returnValues === undefined || data.returnValues.errorType === undefined) {