1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #4017 from CHItA/ticket/14262

[ticket/14262] Move convertor to controller

* CHItA/ticket/14262:
  [ticket/14262] Add error handling and small CS fixes
  [ticket/14262] Remove converter template duplicate
  [ticket/14262] Fix stage navigation
  [ticket/14262] Move convertor to controller
This commit is contained in:
Tristan Darricau
2016-02-02 21:29:20 +01:00
16 changed files with 2944 additions and 3 deletions

View File

@@ -242,6 +242,22 @@
}
}
// Redirects user
function redirect(url, use_ajax) {
if (use_ajax) {
resetPolling();
var xhReq = createXhrObject();
xhReq.open('GET', url, true);
xhReq.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhReq.send();
startPolling(xhReq);
} else {
window.location.href = url;
}
}
/**
* Parse messages from the response object
*
@@ -308,6 +324,10 @@
if (responseObject.hasOwnProperty('refresh')) {
refreshRequested = true;
}
if (responseObject.hasOwnProperty('redirect')) {
redirect(responseObject.redirect.url, responseObject.redirect.use_ajax);
}
}
/**