added app alert if template data cant be loaded

v1.18.x
Baris Usakli 12 years ago
parent 9f67282a79
commit 4207792ffd

@ -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;

Loading…
Cancel
Save