diff --git a/public/language/en/global.json b/public/language/en/global.json index f1615549d3..00576a18be 100644 --- a/public/language/en/global.json +++ b/public/language/en/global.json @@ -6,6 +6,8 @@ "403.message": "You seem to have stumbled upon a page that you do not have access to. Perhaps you should try logging in?", "404.title": "Not Found", "404.message": "You seem to have stumbled upon a page that does not exist. Return to the home page.", + "500.title": "Internal error.", + "500.message": "Ooops! Looks like something went wrong!", "logout": "Logout", "logout.title": "You are now logged out.", "logout.message": "You have successfully logged out of NodeBB", diff --git a/public/src/forum/favourites.js b/public/src/forum/favourites.js index 20b77b4d41..e23572e1b2 100644 --- a/public/src/forum/favourites.js +++ b/public/src/forum/favourites.js @@ -3,10 +3,6 @@ define(['forum/accountheader'], function(header) { AccountHeader.init = function() { header.init(); - - $('.user-favourite-posts .topic-row').on('click', function() { - ajaxify.go($(this).attr('topic-url')); - }); }; return AccountHeader; diff --git a/public/src/templates.js b/public/src/templates.js index d185b7c16e..6772f998b7 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -172,7 +172,7 @@ } else if (data && data.status === 403) { return ajaxify.go('403'); } else { - app.alertError("Can't load template data!"); + app.alertError(data.responseJSON.error); } }); @@ -319,18 +319,18 @@ if (conditionalBlock[1]) { // there is an else statement - if (!value) { - template = template.replace(matches[i], conditionalBlock[1]); + if (!value) { + template = template.replace(matches[i], conditionalBlock[1]); } else { - template = template.replace(matches[i], conditionalBlock[0]); + template = template.replace(matches[i], conditionalBlock[0]); } } else { - // regular if statement + // regular if statement if (!value) { template = template.replace(matches[i], ''); } } - } + } } } @@ -341,7 +341,7 @@ checkConditional('@first', blockInfo.iterator === 0); checkConditional('@last', blockInfo.iterator === blockInfo.total); } - + template = replace(namespace + d, data[d], template); } } diff --git a/public/templates/500.tpl b/public/templates/500.tpl new file mode 100644 index 0000000000..e3c110a50d --- /dev/null +++ b/public/templates/500.tpl @@ -0,0 +1,5 @@ +
[[global:500.message]]
+{errorMessage}
+