mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
closes #1067
This commit is contained in:
@@ -15,6 +15,9 @@ var socket,
|
||||
url: RELATIVE_PATH + '/api/config',
|
||||
success: function (data) {
|
||||
config = data;
|
||||
|
||||
exposeConfigToTemplates();
|
||||
|
||||
if(socket) {
|
||||
socket.disconnect();
|
||||
setTimeout(function() {
|
||||
@@ -591,13 +594,17 @@ var socket,
|
||||
});
|
||||
|
||||
createHeaderTooltips();
|
||||
|
||||
templates.setGlobal('relative_path', RELATIVE_PATH);
|
||||
templates.setGlobal('usePagination', config.usePagination);
|
||||
templates.setGlobal('topicsPerPage', config.topicsPerPage);
|
||||
templates.setGlobal('postsPerPage', config.postsPerPage);
|
||||
});
|
||||
|
||||
function exposeConfigToTemplates() {
|
||||
$(document).ready(function() {
|
||||
templates.setGlobal('relative_path', RELATIVE_PATH);
|
||||
for(var key in config) {
|
||||
templates.setGlobal('config.' + key, config[key]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createHeaderTooltips() {
|
||||
$('#header-menu li i[title]').each(function() {
|
||||
$(this).parents('a').tooltip({
|
||||
|
||||
Reference in New Issue
Block a user