diff --git a/install/web.js b/install/web.js index 4ccce7efdb..8beadbf673 100644 --- a/install/web.js +++ b/install/web.js @@ -9,7 +9,8 @@ var winston = require('winston'), async = require('async'), uglify = require('uglify-js'), nconf = require('nconf'), - app = express(); + app = express(), + server; var web = {}, scripts = [ @@ -39,7 +40,7 @@ web.install = function(port) { function launchExpress(port) { - var server = app.listen(port, function() { + server = app.listen(port, function() { var host = server.address().address; winston.info('Web installer listening on http://%s:%s', host, port); }); @@ -48,6 +49,7 @@ function launchExpress(port) { function setupRoutes() { app.get('/', welcome); app.post('/', install); + app.post('/launch', launch); } function welcome(req, res) { @@ -92,6 +94,10 @@ function install(req, res) { }); } +function launch(req, res) { + +} + function compileLess(callback) { if ((nconf.get('from-file') || '').indexOf('less') !== -1) { winston.info('LESS compilation skipped'); diff --git a/public/src/installer/install.js b/public/src/installer/install.js index 7739f228ed..876d6bb4d3 100644 --- a/public/src/installer/install.js +++ b/public/src/installer/install.js @@ -25,6 +25,13 @@ $('document').ready(function() { $('form').submit(validateAll); activate('database', $('[name="database"]')); + + if ($('#database-error').length) { + $('[name="database"]').parents('.input-row').addClass('error'); + $('html, body').animate({ + scrollTop: ($('#database-error').offset().top + 100) + 'px' + }, 400); + } } function validateAll(ev) { diff --git a/src/views/install/index.tpl b/src/views/install/index.tpl index 3fbff54144..4866745126 100644 --- a/src/views/install/index.tpl +++ b/src/views/install/index.tpl @@ -84,6 +84,10 @@ + + + +

Configure your database

@@ -98,6 +102,7 @@
+
There was an error connecting to your database. Please try again.
@@ -107,6 +112,15 @@ + +
+

+

Congratulations! Your NodeBB has been set-up.

+ + +

+
+