summaryrefslogtreecommitdiff
path: root/assets/js/core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-23 21:05:59 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-23 21:05:59 -0500
commit5315e4961e3628a04d19440a3dceca9ecc2acb82 (patch)
tree2bbe1edc644ecb881dfe955b96b1da4b51aa26c3 /assets/js/core
parent10d96bfd668f445249190c52bedb2eb0e7e9410d (diff)
Fix regression: stay on the same page when a task is closed
Diffstat (limited to 'assets/js/core')
-rw-r--r--assets/js/core/http.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/assets/js/core/http.js b/assets/js/core/http.js
index 21200a0f..745435cc 100644
--- a/assets/js/core/http.js
+++ b/assets/js/core/http.js
@@ -4,6 +4,7 @@ KB.http.request = function (method, url, headers, body) {
function parseResponse(request) {
var redirect = request.getResponseHeader('X-Ajax-Redirect');
+ var location = request.getResponseHeader('Location');
if (redirect === 'self') {
window.location.reload();
@@ -11,6 +12,8 @@ KB.http.request = function (method, url, headers, body) {
window.location = redirect.split('#')[0];
} else if (redirect) {
window.location = redirect;
+ } else if (location) {
+ window.location = location;
} else if (request.getResponseHeader('Content-Type') === 'application/json') {
try {
return JSON.parse(request.responseText);