minor cleanups.

v1.18.x
Aziz Khoury 11 years ago
parent 230b4a0952
commit 0e0f66ba9e

@ -24,7 +24,7 @@ var socket,
reconnecting = false;
// Rejoin room that was left when we disconnected
var url_parts = document.location.pathname.slice(RELATIVE_PATH.length).split('/').slice(1);
var url_parts = window.location.pathname.slice(RELATIVE_PATH.length).split('/').slice(1);
var room;
switch(url_parts[0]) {
@ -513,7 +513,9 @@ var socket,
$('document').ready(function () {
var url = window.location.pathname.slice(1),
search = window.location.search,
tpl_url = ajaxify.getTemplateMapping(url);
hash = window.location.hash,
tpl_url = ajaxify.getTemplateMapping(url),
$window = $(window);
url = url.replace(/\/$/, "");
@ -521,7 +523,7 @@ var socket,
url = url.slice(RELATIVE_PATH.length);
}
$(window).trigger('action:ajaxify.start', {
$window.trigger('action:ajaxify.start', {
url: url
});
@ -533,11 +535,11 @@ var socket,
$('#logout-link').on('click', app.logout);
$(window).blur(function(){
$window.blur(function(){
app.isFocused = false;
});
$(window).focus(function(){
$window.focus(function(){
app.isFocused = true;
app.alternatingTitle('');
});
@ -550,21 +552,20 @@ var socket,
ajaxify.widgets.render(tpl_url, url);
if (window.history && window.history.replaceState) {
var hash = window.location.hash ? window.location.hash : '';
window.history.replaceState({
url: url + search + hash
}, url, RELATIVE_PATH + '/' + url + search + hash);
}
ajaxify.loadScript(tpl_url, function() {
$(window).trigger('action:ajaxify.end', {
$window.trigger('action:ajaxify.end', {
url: url
});
});
});
};
showWelcomeMessage = location.href.indexOf('loggedin') !== -1;
showWelcomeMessage = window.location.href.indexOf('loggedin') !== -1;
app.loadConfig();
app.alternatingTitle('');

@ -207,7 +207,6 @@ Controllers.register = function(req, res, next) {
data.minimumPasswordLength = meta.config.minimumPasswordLength;
data.termsOfUse = meta.config.termsOfUse;
data.captcha = null;
plugins.fireHook('filter:register.build', req, res, data, function(err, data) {
if (err && process.env === 'development') {
winston.warn(JSON.stringify(err));

Loading…
Cancel
Save