fixed a bug in template parsing

v1.18.x
Baris Usakli 12 years ago
parent 253e11d55b
commit 4a7cd664fd

@ -81,9 +81,9 @@ var ajaxify = {};
callback(); callback();
} }
app.process_page();
jQuery('#content, #footer').stop(true, true).fadeIn(200, function () { jQuery('#content, #footer').stop(true, true).fadeIn(200, function () {
app.process_page();
if (window.location.hash) if (window.location.hash)
hash = window.location.hash; hash = window.location.hash;
if (hash) if (hash)

@ -182,30 +182,30 @@
translator.translate(templates[tpl_url].parse(template_data), function (translatedTemplate) { translator.translate(templates[tpl_url].parse(template_data), function (translatedTemplate) {
document.getElementById('content').innerHTML = translatedTemplate; document.getElementById('content').innerHTML = translatedTemplate;
});
jQuery('#content [template-variable]').each(function (index, element) { jQuery('#content [template-variable]').each(function (index, element) {
var value = null; var value = null;
switch (element.getAttribute('template-type')) { switch (element.getAttribute('template-type')) {
case 'boolean': case 'boolean':
value = (element.value === 'true' || element.value === '1') ? true : false; value = (element.value === 'true' || element.value === '1') ? true : false;
break; break;
case 'int': // Intentional fall-through case 'int': // Intentional fall-through
case 'integer': case 'integer':
value = parseInt(element.value); value = parseInt(element.value);
break; break;
default: default:
value = element.value; value = element.value;
break; break;
} }
templates.set(element.getAttribute('template-variable'), value); templates.set(element.getAttribute('template-variable'), value);
}); });
if (callback) { if (callback) {
callback(true); callback(true);
} }
});
} }
} }

@ -112,7 +112,7 @@
} }
.recent-replies { .recent-replies {
overflow-y: auto; overflow-y: hidden;
overflow-x: hidden; overflow-x: hidden;
ul { ul {
@ -126,7 +126,6 @@
li { li {
clear: both; clear: both;
line-height: 17px; line-height: 17px;
margin-bottom: 1em;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;

Loading…
Cancel
Save