mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
added app alert if template data cant be loaded
This commit is contained in:
@@ -124,7 +124,6 @@
|
||||
|
||||
var template_data = null;
|
||||
|
||||
(function () {
|
||||
var timestamp = new Date().getTime(); //debug
|
||||
|
||||
if (!templates[tpl_url]) {
|
||||
@@ -147,9 +146,6 @@
|
||||
parse_template();
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
(function () {
|
||||
jQuery.get(RELATIVE_PATH + '/api/' + api_url, function (data) {
|
||||
|
||||
if (!data) {
|
||||
@@ -160,11 +156,8 @@
|
||||
template_data = data;
|
||||
parse_template();
|
||||
}).fail(function (data) {
|
||||
template_data = {};
|
||||
parse_template();
|
||||
app.alertError("Can't load template data!");
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
function parse_template() {
|
||||
if (!templates[tpl_url] || !template_data) return;
|
||||
|
||||
Reference in New Issue
Block a user