mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Switched to spaces
This commit is contained in:
@ -2,46 +2,46 @@ var App = App || {};
|
||||
App.Presenters = App.Presenters || {};
|
||||
|
||||
App.Presenters.HttpErrorPresenter = function(
|
||||
jQuery,
|
||||
promise,
|
||||
util,
|
||||
topNavigationPresenter) {
|
||||
jQuery,
|
||||
promise,
|
||||
util,
|
||||
topNavigationPresenter) {
|
||||
|
||||
var $el = jQuery('#content');
|
||||
var templates = {};
|
||||
var $el = jQuery('#content');
|
||||
var templates = {};
|
||||
|
||||
function init(params, loaded) {
|
||||
topNavigationPresenter.changeTitle('Error ' + params.error);
|
||||
function init(params, loaded) {
|
||||
topNavigationPresenter.changeTitle('Error ' + params.error);
|
||||
|
||||
if (params.error === 404) {
|
||||
promise.wait(util.promiseTemplate('404'))
|
||||
.then(function(template) {
|
||||
templates.errorPage = template;
|
||||
reinit(params, loaded);
|
||||
}).fail(function() {
|
||||
console.log(arguments);
|
||||
loaded();
|
||||
});
|
||||
} else {
|
||||
console.log('Not supported.');
|
||||
loaded();
|
||||
}
|
||||
}
|
||||
if (params.error === 404) {
|
||||
promise.wait(util.promiseTemplate('404'))
|
||||
.then(function(template) {
|
||||
templates.errorPage = template;
|
||||
reinit(params, loaded);
|
||||
}).fail(function() {
|
||||
console.log(arguments);
|
||||
loaded();
|
||||
});
|
||||
} else {
|
||||
console.log('Not supported.');
|
||||
loaded();
|
||||
}
|
||||
}
|
||||
|
||||
function reinit(params, loaded) {
|
||||
render();
|
||||
loaded();
|
||||
}
|
||||
function reinit(params, loaded) {
|
||||
render();
|
||||
loaded();
|
||||
}
|
||||
|
||||
function render() {
|
||||
$el.html(templates.errorPage());
|
||||
}
|
||||
function render() {
|
||||
$el.html(templates.errorPage());
|
||||
}
|
||||
|
||||
return {
|
||||
init: init,
|
||||
reinit: reinit,
|
||||
render: render,
|
||||
};
|
||||
return {
|
||||
init: init,
|
||||
reinit: reinit,
|
||||
render: render,
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user