v1.18.x
barisusakli 9 years ago
parent aa45db53f9
commit f7540a7edc

@ -120,5 +120,6 @@
"upload": "Upload",
"allowed-file-types": "Allowed file types are %1",
"unsaved-changes": "You have unsaved changes. Are you sure you wish to navigate away?"
"unsaved-changes": "You have unsaved changes. Are you sure you wish to navigate away?",
"reconnecting-message": "Looks like your connection to %1 was lost, please wait while we try to reconnect."
}

@ -375,7 +375,8 @@ $(document).ready(function() {
app.load();
$('[data-template]').each(function() {
templates.cache[$(this).attr('data-template')] = $(this).html();
templates.cache[$(this).attr('data-template')] = $('<div/>').html($(this).html()).text();
$(this).parent().remove();
});
});

@ -48,9 +48,11 @@ app.isConnected = false;
if (reconnecting) {
var reconnectEl = $('#reconnect');
var reconnectAlert = $('#reconnect-alert');
reconnectEl.tooltip('destroy');
reconnectEl.html('<i class="fa fa-check"></i>');
reconnectAlert.fadeOut(500);
reconnecting = false;
reJoinCurrentRoom();
@ -102,12 +104,14 @@ app.isConnected = false;
function onReconnecting() {
reconnecting = true;
var reconnectEl = $('#reconnect');
var reconnectAlert = $('#reconnect-alert');
if (!reconnectEl.hasClass('active')) {
reconnectEl.html('<i class="fa fa-spinner fa-spin"></i>');
reconnectAlert.fadeIn(500).removeClass('hide');
}
reconnectEl.addClass('active').removeClass("hide").tooltip({
reconnectEl.addClass('active').removeClass('hide').tooltip({
placement: 'bottom'
});
}

@ -2,6 +2,7 @@
var async = require('async');
var nconf = require('nconf');
var validator = require('validator');
var db = require('../database');
var user = require('../user');
@ -27,7 +28,10 @@ module.exports = function(app, middleware) {
controllers.api.getConfig(req, res, next);
},
footer: function(next) {
app.render('footer', {loggedIn: (req.user ? parseInt(req.user.uid, 10) !== 0 : false)}, next);
app.render('footer', {
loggedIn: !!req.uid,
title: validator.escape(meta.config.title || meta.config.browserTitle || 'NodeBB')
}, next);
},
plugins: function(next) {
plugins.fireHook('filter:middleware.buildHeader', {req: req, locals: res.locals}, next);

@ -2,8 +2,7 @@
<div class="alert alert-danger">
<strong>[[global:500.title]]</strong>
<p>[[global:500.message]]</p>
<p>{path}</p>
<!-- IF error --><p>{error}</p><!-- ENDIF error -->
<p>&#123;path&#125;</p>
&#x3C;!-- IF error --&#x3E;<p>&#123;error&#125;</p>&#x3C;!-- ENDIF error --&#x3E;
</div>
</script>
Loading…
Cancel
Save