diff --git a/app.js b/app.js index 374c198bf9..395416adf6 100644 --- a/app.js +++ b/app.js @@ -55,7 +55,7 @@ winston.info(''); - if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('upgrade') && fs.existsSync(__dirname + '/config.json')) { + if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('install') && !nconf.get('upgrade') && fs.existsSync(__dirname + '/config.json')) { // Load server-side configs nconf.file({ file: __dirname + '/config.json' @@ -127,7 +127,7 @@ } }); }); - } else if (nconf.get('setup') || !fs.existsSync(__dirname + '/config.json')) { + } else if (nconf.get('setup') || nconf.get('install') || !fs.existsSync(__dirname + '/config.json')) { // New install, ask setup questions if (nconf.get('setup')) { winston.info('NodeBB Setup Triggered via Command Line'); diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index d3581e947e..64c55691e2 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -88,7 +88,7 @@ var ajaxify = {}; translator.load(tpl_url); - jQuery('#footer, #content').fadeOut(100); + jQuery('#footer, #content').addClass('ajaxifying'); templates.flush(); templates.load_template(function () { @@ -105,17 +105,17 @@ var ajaxify = {}; app.processPage(); - jQuery('#content, #footer').stop(true, true).fadeIn(200, function () { - if (window.location.hash) { - hash = window.location.hash; - } + jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying'); - if (hash) { - require(['forum/topic'], function(topic) { - topic.scrollToPost(hash.substr(1)); - }); - } - }); + if (window.location.hash) { + hash = window.location.hash; + } + + if (hash) { + require(['forum/topic'], function(topic) { + topic.scrollToPost(hash.substr(1)); + }); + } utils.refreshTitle(url); diff --git a/public/src/templates.js b/public/src/templates.js index 1be825e469..44083d1589 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -248,9 +248,12 @@ if (self.blocks && block !== undefined) self.blocks[block] = data[0]; + var begin = new RegExp("(\r\n)*(\r\n)*", "g"), + end = new RegExp("(\r\n)*(\r\n)*", "g"), + data = data[0] - .replace("", "") - .replace("", ""); + .replace(begin, "") + .replace(end, ""); return data; }