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;
|
var template_data = null;
|
||||||
|
|
||||||
(function () {
|
|
||||||
var timestamp = new Date().getTime(); //debug
|
var timestamp = new Date().getTime(); //debug
|
||||||
|
|
||||||
if (!templates[tpl_url]) {
|
if (!templates[tpl_url]) {
|
||||||
@@ -147,9 +146,6 @@
|
|||||||
parse_template();
|
parse_template();
|
||||||
}
|
}
|
||||||
|
|
||||||
}());
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
jQuery.get(RELATIVE_PATH + '/api/' + api_url, function (data) {
|
jQuery.get(RELATIVE_PATH + '/api/' + api_url, function (data) {
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -160,11 +156,8 @@
|
|||||||
template_data = data;
|
template_data = data;
|
||||||
parse_template();
|
parse_template();
|
||||||
}).fail(function (data) {
|
}).fail(function (data) {
|
||||||
template_data = {};
|
app.alertError("Can't load template data!");
|
||||||
parse_template();
|
|
||||||
});
|
});
|
||||||
}());
|
|
||||||
|
|
||||||
|
|
||||||
function parse_template() {
|
function parse_template() {
|
||||||
if (!templates[tpl_url] || !template_data) return;
|
if (!templates[tpl_url] || !template_data) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user