NIFI-777:

- Ensuring the account request form is shown.
This commit is contained in:
Matt Gilman 2015-07-20 09:46:58 -04:00
parent eee5a22f0d
commit a19390cdec
1 changed files with 10 additions and 6 deletions

View File

@ -184,6 +184,16 @@ nf.Common = {
* @argument {string} error The error
*/
handleAjaxError: function (xhr, status, error) {
// show the account registration page if necessary
if (xhr.status === 401 && $('#registration-pane').length) {
// show the registration pane
$('#registration-pane').show();
// close the canvas
nf.Common.closeCanvas();
return;
}
// if an error occurs while the splash screen is visible close the canvas show the error message
if ($('#splash').is(':visible')) {
$('#message-title').text('An unexpected error has occurred');
@ -207,12 +217,6 @@ nf.Common = {
dialogContent: nf.Common.escapeHtml(xhr.responseText),
overlayBackground: false
});
} else if (xhr.status === 401 && $('#registration-pane').length) {
// show the registration pane
$('#registration-pane').show();
// close the canvas
nf.Common.closeCanvas();
} else {
if (xhr.status < 99 || xhr.status === 12007 || xhr.status === 12029) {
var content = 'Please ensure the application is running and check the logs for any errors.';