mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
fixed a bug in template parsing
This commit is contained in:
@@ -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);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (callback) {
|
||||||
|
callback(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
templates.set(element.getAttribute('template-variable'), value);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (callback) {
|
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user