assets/js/romo/form.js in romo-0.1.0 vs assets/js/romo/form.js in romo-0.2.0

- old
+ new

@@ -66,12 +66,12 @@ this.doSubmit(); } } RomoForm.prototype.doSubmit = function() { - this.elem.trigger('form:beforeSubmit', [this]); this.indicatorElems.trigger('indicator:triggerStart'); + this.elem.trigger('form:beforeSubmit', [this]); if (this.elem.attr('method').toUpperCase() === 'GET') { this._doGetSubmit(); } else { this._doNonGetSubmit(); @@ -79,10 +79,11 @@ } RomoForm.prototype.onSubmitSuccess = function(data, status, xhr) { this.elem.trigger('form:clearMsgs'); this.elem.trigger('form:submitSuccess', [data, this]); + this.elem.trigger('form:submitComplete', [this]); } RomoForm.prototype.onSubmitError = function(xhr, errorType, error) { this.elem.trigger('form:clearMsgs'); @@ -90,9 +91,10 @@ this.elem.trigger('form:submitInvalidMsgs', [$.parseJSON(xhr.responseText), xhr, this]); } else { this.elem.trigger('form:submitXhrError', [xhr, this]); } this.elem.trigger('form:submitError', [xhr, this]); + this.elem.trigger('form:submitComplete', [this]); this.indicatorElems.trigger('indicator:triggerStop'); } RomoForm.prototype._doGetSubmit = function() { var data = this._getSerializeObj();