mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +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({
|
||||
|
||||
@@ -86,14 +86,14 @@
|
||||
</li>
|
||||
<!-- END topics -->
|
||||
</ul>
|
||||
<!-- IF usePagination -->
|
||||
<!-- IF config.usePagination -->
|
||||
<div class="text-center">
|
||||
<ul class="pagination">
|
||||
<li class="previous pull-left"><a href="#"><i class="fa fa-chevron-left"></i> [[global:previouspage]]</a></li>
|
||||
<li class="next pull-right"><a href="#">[[global:nextpage]] <i class="fa fa-chevron-right"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF usePagination -->
|
||||
<!-- ENDIF config.usePagination -->
|
||||
</div>
|
||||
|
||||
<!-- IF topics.length -->
|
||||
|
||||
@@ -214,14 +214,14 @@
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
|
||||
<!-- IF usePagination -->
|
||||
<!-- IF config.usePagination -->
|
||||
<div class="text-center">
|
||||
<ul class="pagination">
|
||||
<li class="previous pull-left"><a href="#"><i class="fa fa-chevron-left"></i> [[global:previouspage]]</a></li>
|
||||
<li class="next pull-right"><a href="#">[[global:nextpage]] <i class="fa fa-chevron-right"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF usePagination -->
|
||||
<!-- ENDIF config.usePagination -->
|
||||
|
||||
<div id="move_thread_modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="Move Topic" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
|
||||
Reference in New Issue
Block a user