From 5315e4961e3628a04d19440a3dceca9ecc2acb82 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 23 Jan 2017 21:05:59 -0500 Subject: Fix regression: stay on the same page when a task is closed --- assets/js/core/http.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'assets/js/core') 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); -- cgit v1.2.3