You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/07/19 21:03:55 UTC
[whimsy] branch master updated: Show modal response for exceptions
as well
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new c530a72 Show modal response for exceptions as well
c530a72 is described below
commit c530a72524b106733958ce87d6bc0af62f9c023b
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jul 19 22:03:51 2019 +0100
Show modal response for exceptions as well
---
www/roster/views/person/main.js.rb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/www/roster/views/person/main.js.rb b/www/roster/views/person/main.js.rb
index 1a53557..5304a88 100644
--- a/www/roster/views/person/main.js.rb
+++ b/www/roster/views/person/main.js.rb
@@ -378,7 +378,14 @@ class Person < Vue
},
error: ->(response) {
- alert response.statusText
+ json = response.responseJSON
+ if json.exception
+ @response_title = json.exception
+ @response = JSON.stringify(json, nil, 2)
+ jQuery('div.modal').modal('show')
+ else
+ alert response.statusText
+ end
},
complete: ->(response) do