diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-09 16:53:02 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-09 16:53:02 -0400 |
| commit | 50046f0197c5ef3d997dd06e95f3dcd008a654f6 (patch) | |
| tree | 13199487b196a463e1fbff787405eb85905f1b25 /public/assets/javascripts | |
| parent | 1165ef5440e643252635aeea73a14cba0bb2e461 (diff) | |
edits
Diffstat (limited to 'public/assets/javascripts')
| -rw-r--r-- | public/assets/javascripts/vendor/ModalFormView.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/public/assets/javascripts/vendor/ModalFormView.js b/public/assets/javascripts/vendor/ModalFormView.js index 3ef7810..3cc2691 100644 --- a/public/assets/javascripts/vendor/ModalFormView.js +++ b/public/assets/javascripts/vendor/ModalFormView.js @@ -24,18 +24,21 @@ var ModalFormView = ModalView.extend({ showErrors: function(errors){ if (errors && errors.length) { - this.$errors.show(); + this.$errorList.empty(); for (var i in errors) { this.$errorList.append('<div>' + errors[i] + '</div>'); } + this.$errors.css("opacity", 1.0); + setTimeout($.proxy(function(){ + this.$errors.show().css("opacity", 1.0); + }, this), 200) } }, submit: function(e){ e.preventDefault() - this.$errors.hide(); - this.$errorList.empty(); + this.$errors.hide().css("opacity", 0.0); if (this.validate) { var errors = this.validate() @@ -74,7 +77,6 @@ var ModalFormView = ModalView.extend({ }); request.done($.proxy(function (response) { if (response.error) { - this.$errors.show(); var errors = [] for (var key in response.error.errors) { errors.push(response.error.errors[key].message); |
