Fix regression: stay on the same page when a task is closed
This commit is contained in:
@@ -7,8 +7,9 @@ New features:
|
|||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
Bug fixes:
|
Regressions:
|
||||||
|
|
||||||
|
* Stay on the same page when a task is closed
|
||||||
|
|
||||||
Version 1.0.37 (Jan 14, 2017)
|
Version 1.0.37 (Jan 14, 2017)
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|||||||
@@ -52,11 +52,11 @@ class TaskStatusController extends BaseController
|
|||||||
$this->flash->failure($failure_message);
|
$this->flash->failure($failure_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
|
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
|
||||||
|
} else {
|
||||||
|
$this->response->html($this->template->render($template, array(
|
||||||
|
'task' => $task,
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->response->html($this->template->render($template, array(
|
|
||||||
'task' => $task,
|
|
||||||
)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
assets/js/app.min.js
vendored
4
assets/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@ KB.component('confirm-buttons', function (containerElement, options) {
|
|||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
KB.find('#modal-confirm-button').replace(buildButton());
|
KB.find('#modal-confirm-button').replace(buildButton());
|
||||||
window.location.href = options.url;
|
KB.http.get(options.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onCancel() {
|
function onCancel() {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ KB.http.request = function (method, url, headers, body) {
|
|||||||
|
|
||||||
function parseResponse(request) {
|
function parseResponse(request) {
|
||||||
var redirect = request.getResponseHeader('X-Ajax-Redirect');
|
var redirect = request.getResponseHeader('X-Ajax-Redirect');
|
||||||
|
var location = request.getResponseHeader('Location');
|
||||||
|
|
||||||
if (redirect === 'self') {
|
if (redirect === 'self') {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
@@ -11,6 +12,8 @@ KB.http.request = function (method, url, headers, body) {
|
|||||||
window.location = redirect.split('#')[0];
|
window.location = redirect.split('#')[0];
|
||||||
} else if (redirect) {
|
} else if (redirect) {
|
||||||
window.location = redirect;
|
window.location = redirect;
|
||||||
|
} else if (location) {
|
||||||
|
window.location = location;
|
||||||
} else if (request.getResponseHeader('Content-Type') === 'application/json') {
|
} else if (request.getResponseHeader('Content-Type') === 'application/json') {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(request.responseText);
|
return JSON.parse(request.responseText);
|
||||||
|
|||||||
Reference in New Issue
Block a user