diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..69fad35 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "bower_components" +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e717f5e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index 0eeb35d..234d64a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ -node_modules -bower_components -version.json -dist -release - +node_modules/ +bower_components/ +.sass-cache/ +.tmp/ +dist/ diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..2683e48 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,35 @@ +{ + "node": true, + "esnext": true, + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "indent": 2, + "latedef": true, + "newcap": true, + "noarg": true, + "quotmark": "single", + "regexp": true, + "undef": true, + "unused": true, + "strict": true, + "trailing": true, + "smarttabs": true, + "white": true, + "validthis": true, + "globals": { + "angular": false, + // Angular Mocks + "inject": false, + // JASMINE + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "expect": false + } +} diff --git a/.yo-rc.json b/.yo-rc.json new file mode 100644 index 0000000..b97ecbe --- /dev/null +++ b/.yo-rc.json @@ -0,0 +1,82 @@ +{ + "generator-gulp-angular": { + "props": { + "paths": { + "src": "src", + "dist": "dist", + "e2e": "e2e", + "tmp": ".tmp" + }, + "angularVersion": "~1.2.27", + "angularModules": [ + { + "name": "angular-animate", + "module": "ngAnimate" + }, + { + "name": "angular-cookies", + "module": "ngCookies" + }, + { + "name": "angular-touch", + "module": "ngTouch" + }, + { + "name": "angular-sanitize", + "module": "ngSanitize" + } + ], + "jQuery": { + "name": "jquery", + "version": "~2.1.1" + }, + "resource": { + "name": null, + "version": null, + "module": null + }, + "router": { + "name": "angular-ui-router", + "version": "~0.2.13", + "module": "ui.router" + }, + "ui": { + "key": "none", + "name": null, + "version": null, + "module": null + }, + "cssPreprocessor": { + "key": "node-sass", + "extension": "scss", + "module": "gulp-sass", + "version": "~1.1.0" + }, + "jsPreprocessor": { + "key": "none", + "extension": "js", + "srcExtension": "js", + "module": null, + "version": null + }, + "htmlPreprocessor": { + "key": "jade", + "extension": "jade", + "module": "jade", + "version": "~1.8.1" + }, + "bootstrapComponents": { + "name": null, + "version": null, + "key": null, + "module": null + }, + "foundationComponents": { + "name": null, + "version": null, + "key": null, + "module": null + } + } + } +} \ No newline at end of file diff --git a/DROPDOWNS b/DROPDOWNS new file mode 100644 index 0000000..e69de29 diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 1a40db8..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,160 +0,0 @@ -Configuration = require('./app/helpers/Configuration'); - -module.exports = function (grunt) { - grunt.initConfig({ - jshint: { - files: ['app/**/*.js', 'web/**/*.js'] - }, - jscs: { - main: ['app/**/*.js', 'web/**/*.js'] - }, - requirejs: { - compile: { - options: { - baseUrl: "web", - name: "../bower_components/almond/almond", - include: [ 'main' ], - optimize: 'none', - out: "dist/app.js" - } - } - }, - - jadeUsemin: { - vendor: { - options: { - tasks: { - js: ['concat'] - } - }, - files: [{ - src: 'app/views/index-development.jade' - }] - } - }, - vows: { - all: { - options: { - color: true, - isolate: true - }, - src: [ 'specs/**/*.tests.js' ] - } - }, - mongodb_fixtures: { - dev: { - options: { - connection: Configuration.get('tests.mongodbUrl') - }, - files: { - src: ['fixtures'] - } - } - }, - ngtemplates: { - app: { - cwd: 'web', - src: [ 'partials/**/*.html' ], - dest: 'dist/app.js', - options: { - append: true, - prefix: '/', - htmlmin: { - collapseBooleanAttributes: false, - collapseWhitespace: true, - removeAttributeQuotes: true, - removeEmptyAttributes: false, - removeRedundantAttributes: false, - removeScriptTypeAttributes: true, - removeStyleLinkTypeAttributes: true - }, - bootstrap: function(module, script) { - return 'window.addTemplatesToCache = function ($templateCache) { ' + script + ' };'; - } - } - } - }, - uglify: { - options: { - mangle: false - }, - app: { - files: { - 'dist/app.min.js': [ 'dist/app.js' ] - } - } - }, - less: { - production: { - options: { - cleancss: true - }, - files: { - "dist/resources/stylesheets/styles.css": "web/resources/stylesheets/styles.less" - } - } - }, - copy: { - dist: { - files: [ - { expand: true, cwd: 'web/resources', src: [ '**' ], dest: 'dist/resources' }, - { expand: true, cwd: 'web/languages', src: [ '**' ], dest: 'dist/languages' }, - { - expand: true, - cwd: 'bower_components/jquery-ui/themes/smoothness', - src: [ '**' ], - dest: 'dist/resources/jquery-ui' - } - ] - }, - release: { - files: [ - { - expand: true, - src: [ - 'app/**', - 'dist/**', - 'node_modules/**', - 'README.md', - 'configurationSchema.js', - 'app.js', - 'config.js', - 'package.json' - ], - dest: 'release' - } - ] - } - - } - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-requirejs'); - grunt.loadNpmTasks('grunt-angular-templates'); - grunt.loadNpmTasks('grunt-jscs-checker'); - grunt.loadNpmTasks('grunt-vows'); - grunt.loadNpmTasks('grunt-jade-usemin'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-contrib-copy'); - - - grunt.loadTasks('./tasks'); - - grunt.registerTask('codestyling', [ 'jshint', 'jscs' ]); - grunt.registerTask('testing', [ 'run_server', 'load_fixture_images', 'vows' ]); - grunt.registerTask('build', [ - 'jadeUsemin:vendor', - 'requirejs:compile', - 'ngtemplates:app', - 'uglify:app', - 'less:production', - 'copy:dist' - ]); - grunt.registerTask('release', [ - 'build', - 'copy:release' - ]); -}; diff --git a/app.js b/app.js index e62767c..2e42287 100644 --- a/app.js +++ b/app.js @@ -31,7 +31,11 @@ var exportCntr = require('./app/controllers/web/export'), validationsCntr = require('./app/controllers/web/validations'), monthlyReportCntr = require('./app/controllers/web/monthlyReport'), + adminPageCntr = require('./app/controllers/web/adminPage'), getStartedCntr = require('./app/controllers/web/getStarted'), + customLogoCntr = require('./app/controllers/web/customLogos'), + + enketoCntr = require('./app/controllers/web/enketo'), manifestCntr = require('./app/controllers/web/manifest'), @@ -79,12 +83,12 @@ if (process.platform === 'win32') { exports.run = function (mongoUrl, port, callback) { + app = express(); app.enable('trust proxy'); - require('./app/services/Auth'); - app.set('views', __dirname + '/app/views'); + app.set('views', __dirname); app.set('view engine', 'jade'); app.set('controllers', __dirname + '/app/controllers/web'); if (app.settings.env === 'production') { @@ -115,12 +119,18 @@ exports.run = function (mongoUrl, port, callback) { app.use(express.json()); app.use(multipart()); app.use(methodOverride()); + if (app.settings.env === 'development') { - app.use(express.static(__dirname + '/web')); + app.use(express.static(__dirname + '/.tmp')); + app.use('/src', express.static(__dirname + '/src')); + app.use('/.tmp', express.static(__dirname + '/.tmp')); app.use('/bower_components', express.static(__dirname + '/bower_components')); - } else { + } + + if (app.settings.env === 'production') { app.use(express.static(__dirname + '/dist')); } + app.use(app.router); app.use(ErrorHandler); app.use(getStartedCntr.error404); @@ -141,6 +151,7 @@ exports.run = function (mongoUrl, port, callback) { app.get('/checkAuthorization', checkAuthorizationCntr.checkAuthorization); app.get('/autocomplete/company', autocompleteCntr.getCompanies); app.get('/autocomplete/industry', autocompleteCntr.getIndustries); + app.get('/autocomplete/user', autocompleteCntr.getUsers); app.post('/signup', loginCntr.signup); @@ -167,6 +178,9 @@ exports.run = function (mongoUrl, port, callback) { app.get('/monthlyReport', passport.authenticate('basic', { session: false }), monthlyReportCntr.getReportPage); app.post('/monthlyReport', passport.authenticate('basic', { session: false }), monthlyReportCntr.sendReport); + app.get('/adminPage', passport.authenticate('basic', { session: false }),adminPageCntr.getAdminPage); + app.post('/adminPage/deleteUser', passport.authenticate('basic', { session: false }), adminPageCntr.deleteUser); + app.post('/forgotPassword', passwordResetCntr.forgotPassword); app.post('/resetPassword/:token', passwordResetCntr.resetPassword); @@ -181,22 +195,49 @@ exports.run = function (mongoUrl, port, callback) { app.get('/home', getStartedCntr.home); + app.get('/enketoSurveyUrl/:survey', ACLService.checkPermission, enketoCntr.getEnketoSurveyUrl); + app.get('/enketo/:userId/formList', enketoCntr.formList); + app.get('/enketo/:userId/:survey', enketoCntr.form); + app.post('/enketo/:userId/submission', enketoCntr.submission); + + app.post('/public/makeSurveyPublic/:survey', enketoCntr.makeSurveyPublic); + app.get('/public/getPublicLink/:survey', enketoCntr.getPublicLink); + app.get('/public/:survey', enketoCntr.getPublicSurvey); + + app.get('/customlogos/:survey', customLogoCntr.getLogo); + app.get('/', function (req, res) { + console.log('------------------req.user ', req.user); if (req.method === 'HEAD') { res.send(); } else { if (req.user) { - res.render('index-' + app.settings.env, { - title: Configuration.get('general.siteName'), - version: version - }); + + if (app.settings.env === 'production') { + app.get('/mdgcache.manifest', manifestCntr.getManifest); + + res.render('dist/index', { + title: Configuration.get('general.siteName'), + version: version, + manifest: 'mdgcache.manifest' + }); + } else { + app.get('/mdgcache-dev.manifest', manifestCntr.getManifest); + + res.render('.tmp/serve/index', { + title: Configuration.get('general.siteName'), + version: version, + manifest: 'mdgcache-dev.manifest' + }); + } + } else { + console.log(('redirect').yellow); res.redirect('/home'); } } }); - app.get('/mdgcache.manifest', manifestCntr.getManifest); if (Configuration.get('general.protocolType') === 'https') { httpsOptions.pfx = fs.readFileSync(Configuration.get('general.httpspfx')); diff --git a/app/controllers/mobile/locale.js b/app/controllers/mobile/locale.js index aa4ae51..24c90bb 100644 --- a/app/controllers/mobile/locale.js +++ b/app/controllers/mobile/locale.js @@ -22,4 +22,4 @@ exports.getLocale = function (req, res, next) { exports.languageList = function (req, res, next) { var languages = Configuration.get('languages.supported_languages_mobile'); res.send(languages); -}; \ No newline at end of file +}; diff --git a/app/controllers/web/adminPage.js b/app/controllers/web/adminPage.js new file mode 100644 index 0000000..1b17fd3 --- /dev/null +++ b/app/controllers/web/adminPage.js @@ -0,0 +1,47 @@ +var + User = require('../../models/User'), + + Configuration = require('../../helpers/Configuration'), + ExportService = require('../../services/Export'); + +exports.getAdminPage = function (req, res, next) { + res.render('app/views/adminPage', { + title: Configuration.get('general.siteName') + }); +}; + +exports.deleteUser = function (req, res, next) { + var + userId = req.body.user, + options = {}; + + options._id = userId; + options.deleted = false; + + User.findOne(options).exec(function (err, user) { + if (err) { + next({ status: 500, body: err }); + return; + } + + if (!user) { + res.send(204); + return; + } + + user.deleted = true; + user.username = 'DELETED_USER_' + user.username; + user.password = 'DELETED_USER'; + user.email = 'DELETED_USER_' + user.email; + user._owner = undefined; + + user.save(function (err, user) { + if (err) { + next({ status: 500, body: err }); + return; + } + + res.send(204); + }); + }); +}; diff --git a/app/controllers/web/autocomplete.js b/app/controllers/web/autocomplete.js index 6354c9d..c6883b2 100644 --- a/app/controllers/web/autocomplete.js +++ b/app/controllers/web/autocomplete.js @@ -39,3 +39,22 @@ exports.getIndustries = function (req, res, next) { res.send(industries); }); }; + +exports.getUsers = function (req, res, next) { + var + term = req.param('term'), + termReggexp = new RegExp('.*' + term + '.*', 'i'); + + User.find({$or : [ + {username: { $regex: termReggexp }}, + {firstName: { $regex: termReggexp }}, + {lastName: { $regex: termReggexp }}, + {email: { $regex: termReggexp }} ], deleted: false}, function (err, users) { + if (err) { + next({ status: 500, body: err }); + return; + } + + res.send(users); + }); +}; diff --git a/app/controllers/web/customLogos.js b/app/controllers/web/customLogos.js new file mode 100644 index 0000000..fa6e5d0 --- /dev/null +++ b/app/controllers/web/customLogos.js @@ -0,0 +1,30 @@ +var + Survey = require('../../models/Survey'), + ImagesService = require('../../services/Images'); + +exports.getLogo = function (req, res, next) { + var + owner = req.user.owner.toString(), + surveyId = req.params.survey; + + Survey.findOne({ _id: surveyId, _owner: owner }).exec(function (err, survey) { + if (err) { + next({status: 500, body: err}); + return; + } + + if (!survey) { + res(); + return; + } + + ImagesService.getImage(survey.customLogo, function (readstream) { + if (!readstream) { + res(); + return; + } + + readstream.pipe(res); + }); + }); +}; diff --git a/app/controllers/web/enketo.js b/app/controllers/web/enketo.js new file mode 100644 index 0000000..2ba02c5 --- /dev/null +++ b/app/controllers/web/enketo.js @@ -0,0 +1,313 @@ +var + _ = require('underscore'), + moment = require('moment'), + request = require('request'), + fs = require('fs'), + generatePassword = require('password-generator'), + + Survey = require('../../models/Survey'), + Result = require('../../models/Result'), + User = require('../../models/User'), + + JXON = require('../../helpers/JXON'), + + Configuration = require('../../helpers/Configuration'), + + SurveyParserService = require('../../services/SurveyParser'), + ResultsParserService = require('../../services/ResultsParser'), + ResultsService = require('../../services/Results'), + SurveyService = require('../../services/Survey'), + ImagesService = require('../../services/Images'); + +function parseJXONTree (jxonTree) { + return new ResultsParserService.ResultsParser(jxonTree); +} + +exports.getPublicLink = function (req, res, next) { + var + owner = req.user.owner.toString(), + surveyId = req.params.survey; + + Survey.findOne({ _id: surveyId, _owner: owner }).exec(function (err, survey) { + if (err) { + next({ status: 500, body: err }); + return; + } + + if (survey.publicExpire && survey.publicExpire > new Date()) { + res.send(200, { + expire: survey.publicExpire, + customMessage: survey.customMessage, + customLogoLink: survey.customLogo ? req.protocol + '://' + req.get('host') + '/customlogos/' + survey._id : null, + publicUrl: req.protocol + '://' + req.get('host') + '/public/' + survey._id + }); + } else { + res.send(204); + } + }); +}; + +exports.makeSurveyPublic = function (req, res, next) { + var + owner = req.user.owner.toString(), + surveyId = req.params.survey, + surveyPublicExpire = req.body.expire, + customMessage = req.body.customMessage; + + Survey.findOne({ _id: surveyId, _owner: owner }).exec(function (err, survey) { + if (err) { + next({ status: 500, body: err }); + return; + } + + if (!survey) { + next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'unknown' } }); + return; + } + + survey.publicExpire = surveyPublicExpire ? moment(surveyPublicExpire, 'DD/MM/YYYY').toDate() : null; + survey.published = true; + + if (req.files && req.files.logo) { + var logoId = surveyId + '_' + generatePassword(10, false); + + fs.readFile(req.files.logo.path, function (err, data) { + if (err) { + callback(err, null); + return; + } + + ImagesService.saveImage(data, logoId); + fs.unlink(req.files.logo.path); + }); + + survey.customLogo = logoId; + } + + survey.customMessage = customMessage; + + survey.increment(); + + survey.save(function (err, survey) { + if (err) { + next({ status: 400, body: err }); + return; + } + + res.send(200, { + expire: survey.publicExpire, + customMessage: survey.customMessage, + publicUrl: req.protocol + '://' + req.get('host') + '/public/' + survey._id + }); + }); + }); +}; + +exports.getPublicSurvey = function (req, res, next) { + var user; + var survey = req.params.survey; + + Survey.findOne({ _id: survey }).exec(function (err, survey) { + if (err) { + next({ status: 500, body: err }); + return; + } + + if (!survey) { + next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'unknown' } }); + return; + } + + if (!survey.publicExpire && survey.publicExpire < new Date()) { + res.next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'expired' } }); + } + + user = req.user ? req.user._id : survey._owner.id; + + request + .post(config.enketo.server, { form :{ + server_url: req.protocol + '://' + req.get('host') + '/enketo/' + user, + form_id: survey + }}, + function(err, response, body) { + res.redirect(JSON.parse(body).url); + }) + .auth(Configuration.get('enketo.token'), Configuration.get('enketo.token'), false); + }); +}; + +exports.getEnketoSurveyUrl = function (req, res, next) { + var + user = req.user._id, + survey = req.params.survey; + + request + .post(config.enketo.server, {form :{ + server_url: req.protocol + '://' + req.get('host') + '/enketo/' + user, + form_id: survey + }}, + function(err, response, body) { + if (err) { + next({ status: 500, body: err }); + return; + } + + res.send(JSON.parse(body).url); + }) + .auth(Configuration.get('enketo.token'), Configuration.get('enketo.token'), false); +}; + +exports.formList = function (req, res, next) { + var + userId = req.params.userId, + jxonTree; + + User.findById(userId, '_owner').exec(function (err, user) { + if (err) { + next({ status: 500, body: err }); + return; + } + + if (!user) { + next({status: 400, body: {name: 'ValidatorError', path: 'user', type: 'unknown'}}); + return; + } + + Survey.find({ _owner: user.owner, $or: [{ deleted: false }, { deleted: { $exists: false } }] }, function (err, surveys) { + if (err) { + next({ status: 500, body: err }); + return; + } + + jxonTree = SurveyParserService.SurveysToJxonTree(surveys, req.protocol + '://' + req.get('host') + '/enketo/' + userId); + + res.setHeader('Content-type', 'text/xml'); + res.send(JXON.serialize(jxonTree)); + }); + }); +}; + +exports.form = function (req, res, next) { + var + userId = req.params.userId, + survey = req.params.survey, + jxonTree; + + User.findById(userId, '_owner').exec(function (err, user) { + if (err) { + next({status: 500, body: err}); + return; + } + + if (!user) { + next({status: 400, body: {name: 'ValidatorError', path: 'user', type: 'unknown'}}); + return; + } + + Survey + .findOne({ _id: survey, _owner: user.owner, $or: [{ deleted: false }, { deleted: { $exists: false } }] }) + .exec(function (err, survey) { + if (err) { + next({status: 500, body: err}); + return; + } + + if (!survey) { + next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'unknown' } }); + return; + } + + if (!survey.published) { + next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'unpublished' } }); + return; + } + + jxonTree = SurveyParserService.SurveyToJxonTree(SurveyService.composeSurveyData(survey, true)); + + res.setHeader('Content-disposition', 'attachment; filename="survey_' + survey._id.toString() + '.xml"'); + res.setHeader('Content-type', 'text/xml'); + res.send(JXON.serialize(jxonTree)); + } + ); + }); +}; + +exports.submission = function (req, res, next) { + var + userId = req.params.userId, + results = new Result(); + + if (!req.files || !req.files.xml_submission_file) { + next({ status: 400, body: { name: 'ValidatorError', path: 'filename', type: 'required' }}); + return; + } + + function callback(err, resultData) { + if (req.files && req.files.xml_submission_file) { + fs.unlink(req.files.xml_submission_file.path); + } + + if (err) { + console.log('error on parsing xml survey data', err); + + next({status: 500, body: err}); + return; + } + + resultData = parseJXONTree(resultData); + + User.findById(userId, '_owner').exec(function (err, user) { + if (err) { + next({status: 500, body: err}); + return; + } + + if (!user) { + next({status: 400, body: {name: 'ValidatorError', path: 'user', type: 'unknown'}}); + return; + } + + Survey + .findOne({ _id: resultData.survey, _owner: user.owner, $or: [{ deleted: false }, { deleted: { $exists: false } }] }) + .exec(function (err, survey) { + if (err) { + next({ status: 500, body: err }); + return; + } + + if (!survey) { + next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'unknown' } }); + return; + } + + if (!survey.published) { + next({ status: 400, body: { name: 'ValidatorError', path: 'survey', type: 'unpublished' } }); + return; + } + + results._owner = user.owner; + results._user = user._id; + + resultsData.instanceID = resultsData.instanceID || 'web form response'; + + results = ResultsService.composeResults(results, resultData, survey, function (results) { + results.save(function (err, results) { + if (err) { + next({ status: 400, body: err }); + return; + } + + survey.resultsCount = survey.resultsCount + 1; + survey.save(); + + res.send(201, { id: results._id }); + }); + }); + }); + }); + } + + if (req.files && req.files.xml_submission_file) { + JXON.readFile(req.files.xml_submission_file.path, JXON.WITHOUT_VALIDATION, callback); + } +}; diff --git a/app/controllers/web/export.js b/app/controllers/web/export.js index 777db2c..4a100f2 100644 --- a/app/controllers/web/export.js +++ b/app/controllers/web/export.js @@ -5,6 +5,7 @@ var JXON = require('../../helpers/JXON'), ExportService = require('../../services/Export'), + SurveyService = require('../../services/Survey'), Survey = require('../../models/Survey'), Result = require('../../models/Result'); @@ -34,15 +35,19 @@ exports.export = function (req, res, next) { return; } + survey = SurveyService.sortSurveyQuestions(survey); + _.each(survey._categories, function (category) { _.each(category._questions, function (question) { - if (/cascade/.test(question.type) && questions[questions.length - 1].type === question.type) { + if (/cascade/.test(question.type) && questions[questions.length - 1] && questions[questions.length - 1].type === question.type) { questions[questions.length-1].items = questions[questions.length-1].items.concat(question.items); + questions[questions.length-1].id.push(question.id); return; } questions.push({ label: question.label, + id: [question.id], type: question.type, items: question.items }); diff --git a/app/controllers/web/getStarted.js b/app/controllers/web/getStarted.js index c072536..d0415b2 100644 --- a/app/controllers/web/getStarted.js +++ b/app/controllers/web/getStarted.js @@ -15,7 +15,7 @@ exports.home = function (req, res, next) { } } - res.render('getStarted/jade/' + lang + '/home', { + res.render('app/views/getStarted/jade/' + lang + '/home', { title: Configuration.get('general.siteName'), countries: Configuration.get('general.countries'), language: lang, @@ -42,7 +42,7 @@ exports.error404 = function (req, res, next) { } } - res.render('getStarted/jade/' + lang + '/error404', { + res.render('app/views/getStarted/jade/' + lang + '/error404', { title: Configuration.get('general.siteName') }); }; diff --git a/app/controllers/web/groups.js b/app/controllers/web/groups.js index 6878804..57db5af 100644 --- a/app/controllers/web/groups.js +++ b/app/controllers/web/groups.js @@ -58,7 +58,8 @@ module.exports = { async.map(groups, function (group, cb) { - User.find({ _group: group._id }, 'username email phone permission firstName lastName name').exec(function (err, users) { + User.find({ _group: group._id, deleted: false }, 'username email phone permission firstName lastName name') + .exec(function (err, users) { if (err) { cb(err); return; @@ -105,7 +106,7 @@ module.exports = { group = group.toObject(); - User.find({ _group: group._id }, 'username email phone permission firstName lastName name').exec(function (err, users) { + User.find({ _group: group._id, deleted: false }, 'username email phone permission firstName lastName name').exec(function (err, users) { if (err) { next({ status: 500, body: err }); return; diff --git a/app/controllers/web/login.js b/app/controllers/web/login.js index 7a560a9..3610680 100644 --- a/app/controllers/web/login.js +++ b/app/controllers/web/login.js @@ -37,7 +37,7 @@ exports.activate = function (req, res, next) { return; } - res.redirect('/#/login'); + res.redirect('/home#/login'); }); }; diff --git a/app/controllers/web/monthlyReport.js b/app/controllers/web/monthlyReport.js index fe6d690..5c2dba6 100644 --- a/app/controllers/web/monthlyReport.js +++ b/app/controllers/web/monthlyReport.js @@ -15,7 +15,7 @@ exports.getReportPage = function (req, res, next) { years.push(initYear + i); } - res.render('monthlyReport', { + res.render('app/views/monthlyReport', { title: Configuration.get('general.siteName'), years: years, months: months @@ -32,7 +32,7 @@ exports.sendReport = function (req, res, next) { date = moment(year + '-' + month, "YYYY MMMM").add(1, 'months').startOf('month'); ExportService.exportUserRegistrations(email, date); - res.render('sentMonthlyReport', { + res.render('app/views/sentMonthlyReport', { title: Configuration.get('general.siteName'), email: email }); diff --git a/app/controllers/web/passwordReset.js b/app/controllers/web/passwordReset.js index 9b0ae78..2b80d97 100644 --- a/app/controllers/web/passwordReset.js +++ b/app/controllers/web/passwordReset.js @@ -61,7 +61,7 @@ exports.resetPassword = function (req, res, next) { } if (!user) { - res.redirect('/#/resetPasswordError'); + res.redirect('/home#/resetPasswordError'); return; } diff --git a/app/controllers/web/results.js b/app/controllers/web/results.js index c9fcbfa..1404f25 100644 --- a/app/controllers/web/results.js +++ b/app/controllers/web/results.js @@ -3,6 +3,7 @@ var ACLService = require('../../services/ACL'), ResultsService = require('../../services/Results'), + SurveyService = require('../../services/Survey'), Survey = require('../../models/Survey'), Result = require('../../models/Result'); @@ -51,6 +52,8 @@ module.exports = { return; } + survey = SurveyService.sortSurveyQuestions(survey); + Result .findOne({ _owner: owner, _survey: survey, _id: result }, 'count instanceID title timeCreated geostamp _user _categoryResults') .populate('_user', 'firstName lastName') diff --git a/app/helpers/ErrorsHumanizer.js b/app/helpers/ErrorsHumanizer.js index 239d8c2..ed49f98 100644 --- a/app/helpers/ErrorsHumanizer.js +++ b/app/helpers/ErrorsHumanizer.js @@ -23,7 +23,8 @@ var unknown: 'Unknown entity', invalidVersion: 'Entity info has been already updated.', published: 'Can not edit the published survey', - unpublished: 'Can not post results for unpublished survey' + unpublished: 'Can not post results for unpublished survey', + expired: 'This link is invalid or has expired' }, permissionError = 'You do not have permission to perform given operation'; diff --git a/web/resources/stylesheets/404.css b/app/resources/404.css similarity index 87% rename from web/resources/stylesheets/404.css rename to app/resources/404.css index 75b1f2b..b596c88 100644 --- a/web/resources/stylesheets/404.css +++ b/app/resources/404.css @@ -12,7 +12,7 @@ body { } .content .logo { font-size: 36px; - background: #c4d1e6 url(../icons/big-logo.png) no-repeat; + background: #c4d1e6 url('../assets/images/big-logo.png') no-repeat; background-size: 30%; background-position: center; } diff --git a/app/resources/adminPage.css b/app/resources/adminPage.css new file mode 100644 index 0000000..057e15c --- /dev/null +++ b/app/resources/adminPage.css @@ -0,0 +1,64 @@ +.error { + display: none; + color: red; + margin: 30px 0 0 40px; +} + +.success { + display: none; + color: #7fba00; + margin: 30px 0 0 40px; +} + +.results li { + list-style: none; + display: block; + height: 30px; + line-height: 30px; + padding: 0 10px 0 10px; + width: 100%; + font-size: 16px; +} + +.results li:nth-child(odd) { + background: #DFDFDF; +} + +.results li.active { + background: #aaaaaa; +} + +.results { + width: 422px; + max-height: 400px; + overflow-y: scroll; + overflow-x: hidden; + position: absolute; + margin-top: 35px; + padding: 0px; + border: 1px solid #DFDFDF; +} + +.user { + height: 30px; + width: 400px; + line-height: 30px; + padding: 0 10px 0 10px; + outline: none; + display: inline-block; + float: left; + font-size: 16px; +} + +.btn-delete-user { + display: inline-block; + border: 0; + margin-left: 20px; + width: 100px; + height: 33px; + text-align: center; + color: #fff; + font-size: 18px; + background-color: #7fba00; + outline: none; +} diff --git a/app/resources/adminPage.js b/app/resources/adminPage.js new file mode 100644 index 0000000..e2a39fb --- /dev/null +++ b/app/resources/adminPage.js @@ -0,0 +1,184 @@ +(function () { + function removeRes() { + var body = document.querySelector('body'); + + [].forEach.call(document.querySelectorAll('.results'), function (el) { + body.removeChild(el); + }); + } + + function setAutocomlete(el) { + var activeIndex = -1; + var results = []; + var body = document.querySelector('body'); + + el.addEventListener('focus', function (evt) { + setTimeout(function(){ + hideError(); + hideSuccessMsg(); + }, 500); + }, true); + + el.addEventListener('blur', function (evt) { + setTimeout(function(){ + removeRes(); + }, 500); + }, true); + + el.addEventListener('keyup', function (evt) { + var keyCode = evt.which || evt.keyCode; + + if (keyCode === 38) { + activeIndex = activeIndex === 0 ? results.length - 1 : --activeIndex; + renderActiveResult(activeIndex); + return; + } + + if (keyCode === 40) { + activeIndex = activeIndex === results.length - 1 ? 0 : ++activeIndex; + renderActiveResult(activeIndex); + return; + } + + if (keyCode === 13) { + el.value = results[activeIndex].username + (results[activeIndex].email ? ' / ' + results[activeIndex].email : ''); + el.setAttribute('userid', results[activeIndex]._id); + body.removeChild(document.querySelector('.results')); + return; + } + + removeRes(); + activeIndex = -1; + + if (evt.target.value.trim() != '') { + var xmlhttp = new XMLHttpRequest(); + + evt.target.setAttribute('userid', ''); + + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4 ) { + results = JSON.parse(xmlhttp.response); + + if (xmlhttp.status == 200 && results.length) { + var + ul = document.createElement('ul'), + pos = evt.target.getBoundingClientRect(); + + ul.className = 'results'; + + for (var i = 0; i < results.length; i++) { + var li = document.createElement('li'); + + li.innerText = results[i].username + (results[i].email ? ' / ' + results[i].email : ''); + li.id = results[i]._id; + ul.appendChild(li) + } + + body.appendChild(ul); + ul.style.top = pos.top + 'px'; + ul.style.left = pos.left + 'px'; + [].forEach.call(ul.children, function (el) { + el.addEventListener("click", function (e) { + evt.target.value = el.innerText; + evt.target.setAttribute('userid', el.id); + body.removeChild(ul); + }); + }); + } + } + }; + + xmlhttp.open("GET", "/autocomplete/user" + "?term=" + evt.target.value.trim(), true); + xmlhttp.send(); + } + }, true); + } + + function ifUserSelected (userEl) { + return userEl.getAttribute('userid') && userEl.getAttribute('userid') !== '' ? true : false; + } + + + function renderActiveResult (activeIndex) { + var results = document.querySelectorAll('ul.results li'); + var activeResult = document.querySelector('ul.results .active'); + + if (results.length !== 0) { + results[activeIndex].classList.add('active'); + } + + if (activeResult) { + activeResult.classList.remove('active'); + } + } + + function showSuccessMsg (msg) { + var + successEl = document.querySelector('div.success'), + usernameEl = document.querySelector('div.success .username'); + + usernameEl.innerHTML = msg; + successEl.style.display = 'block'; + } + + function hideSuccessMsg () { + var + successEl = document.querySelector('div.success'), + usernameEl = document.querySelector('div.success .username'); + + usernameEl.innerHTML = ''; + successEl.style.display = 'none'; + } + + function showError () { + var div = document.querySelector('div.error'); + div.style.display = 'block'; + } + + function hideError () { + var div = document.querySelector('div.error'); + div.style.display = 'none'; + } + + function deleteUser (userEl) { + var xmlhttp = new XMLHttpRequest(); + + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4 && xmlhttp.status == 204) { + showSuccessMsg(userEl.value); + userEl.value = ''; + userEl.setAttribute('userid', ''); + } + }; + + xmlhttp.open('POST', '/adminPage/deleteUser', true); + xmlhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); + xmlhttp.send(JSON.stringify({ user: userEl.getAttribute('userid') })); + } + + function tryToDeleteUser () { + var userEl = document.querySelector('input.user'); + + if (!ifUserSelected(userEl)) { + showError(); + return; + } + + var confirmUserDelete = window.confirm('Are you sure you want to delete user "' + userEl.value + '"?' + + '\n\rPlease note that this operation can not be undone.'); + + if (confirmUserDelete) { + deleteUser(userEl); + } + } + + window.onload = function() { + setAutocomlete(document.querySelector('input.user')); + + document.querySelector('.btn-delete-user').addEventListener('click', function (event) { + tryToDeleteUser(); + }); + }; +})(); + + diff --git a/app/resources/home.css b/app/resources/home.css new file mode 100644 index 0000000..904f4f8 --- /dev/null +++ b/app/resources/home.css @@ -0,0 +1,890 @@ + +@font-face{ + font-family: 'Segoe UI'; + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.eot'); + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.eot?#iefix') format('embedded-opentype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.woff') format('woff'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.ttf') format('truetype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.svg#web') format('svg'); + font-weight: bold; + font-style: normal; +} + +@font-face{ + font-family: 'Segoe UI'; + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.eot'); + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.eot?#iefix') format('embedded-opentype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.woff') format('woff'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.ttf') format('truetype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.svg#web') format('svg'); + font-weight: normal; + font-style: normal; +} + +@font-face{ + font-family: 'Segoe UI'; + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.eot'); + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.eot?#iefix') format('embedded-opentype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.woff') format('woff'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.ttf') format('truetype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.svg#web') format('svg'); + font-weight: lighter; + font-style: normal; +} + + +html { + height: 100%; +} + +body { + margin: 0; + font-family: Segoe UI; +} + + +.hidden { + display: none; +} + +.b-page { + width: 100%; + height: 100%; + margin: 0; + font-family: SegoeUI, Arial, sans-serif; + font-size: 12px; + position: relative; +} + +.b-page__head-line { + height: 6px; + width: 100%; +} + +.b-line-bit { + width: 25%; + height: 100%; + display: inline-block; + float: left; +} + +.b-line-bit--red { + background-color: #B32E09; +} + +.b-line-bit--green { + background-color: #598200; +} + +.b-line-bit--blue { + background-color: #007CB7; +} + +.b-line-bit--yellow { + background-color: #FFB900; +} + +.b-head { + width: 100%; +} + +.b-page__line { + margin: 0 auto; + width: 100%; + position: relative; +} + +.b-page__header { + height: 60px; + color: #4d4d4d; + background-color: #f2f2f2; + font-size: 18px; + text-decoration: none; + width: 100%; + display: table; + position: relative; +} + +.b-head-logo { + vertical-align: middle; + display: table-cell; + padding-left: 36px; +} + +.b-logo__title, a { + text-decoration: none; + color: #4d4d4d; + line-height: 40px; +} + +.b-logo__img { + width: 40px; + height: 40px; + float: left; + margin-right: 10px; +} + +.b-menu { + display: table-cell; + vertical-align: middle; +} + +.b-menu-nav { + display: table; + width: 100%; +} + +.b-menu-nav a { + text-decoration: none; + color: #4d4d4d; + display: table-cell; + vertical-align: middle; + text-align: center; + height: 60px; + transition: all 0.2s ease-in-out; +} + +.b-menu-nav a:hover { + color: #007CB7; +} + +.b-menu-nav a.active { + background-color: #007CB7; + color: white; +} + +.b-menu-nav a.active:hover { + color: white; +} + +.b-link_menu { + text-decoration: none; + color: #4d4d4d; +} + +.b-account-menu { + display: table-cell; + padding-right: 36px; + text-align: right; + vertical-align: middle; + position: relative; +} + +.b-account-menu__locale { + display: inline-block; + margin-right: 20px; + position: relative; +} + +.b-account-menu__locale + .dropdown { + opacity: 0; + position: absolute; + padding: 10px 0; + background-color: #fff; + z-index: 2; + font-family: SegoeUI, Arial, sans-serif; + font-size: 16px; + width: 150px; + top: 30px; + border: 1px solid rgba(166, 166, 166, 0.5); + border-radius: 5px; + right: 18%; +} + +.b-account-menu__locale + .dropdown li { + display: block; + color: #000; + line-height: 20px; + padding: 0 5px; + font-family: SegoeUI, Arial, sans-serif; +} + +.b-account-menu__locale + .dropdown li a { + display: block; +} + +.b-account-menu__locale + .dropdown li:hover { + background: #f2f2f2; +} + +.b-account-menu__locale + .dropdown:after { + content: ""; + width: 0; + height: 0; + position: absolute; + bottom: 100%; + margin-left: 5px; + border-width: 0 6px 6px 6px; + border-style: solid; + border-color: #fff transparent; + left: 20px; +} + +.b-account-menu:focus + .dropdown, +.b-account-menu__locale + .dropdown.open { + opacity: 1; +} + +.b-account-menu__locale:after { + top: 20px; + margin-left: 0; + content: ''; + position: absolute; + width: 0; + height: 0; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid transparent; + border-top: 5px solid #4d4d4d; +} + +.b-account-menu__user { + display: inline-block; + float: right; +} + +.b-account-menu .wrap-dd-menu .dropdown { + left: initial; +} + +.b-account-menu .wrap-dd-menu .dropdown:after { + right: 20px; +} + +.b-account-menu .fa { + font-size: 16px; +} + +.b-link_account-menu { + text-decoration: none; + color: #4d4d4d; +} + +.b-page__footer { + width: 100%; + height: 54px; + margin-top: -54px; + background-color: #666666; + display: table; +} + +.b-page__footer__box { + margin: 0 auto; + display: table-cell; + vertical-align: middle; + text-align: center; +} + +.b-page__footer__box__item { + display: inline-block; + list-style: none; + margin: 0 24px; +} + +.b-page__footer__box__item__link { + color: #fff; + font-weight: normal; + text-decoration: none; + margin: 0 6px; + font-size: 18px; +} + +.b-page__footer__box__item__link:hover { + color: #08b1ff; +} + +.b-content-header { + background-color: #f2f2f2; + padding: 30px 36px; +} + +.b-content-header__title { + color: #B32E09; + margin: 0; + font-size: 54px; + font-weight: normal; +} + +.b-content-header__text { + color: #4d4d4d; + font-size: 24px; + margin: 0; +} + +.b-content-header__text__link { + color: #007CB7; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; +} + +.b-content-header__text__link:hover { + color: #08b1ff; +} + +.b-content { + margin: 36px; + padding-bottom: 72px; + overflow: hidden; +} + +.b-content--line { + border-bottom: 1px solid #b2b2b2; +} + +.b-content-title { + margin-top: 0; + font-size: 36px; + color: #B32E09; +} + +.b-content__paragraph { + margin-top: 0; + font-size: 18px; + font-weight: lighter; + color: #4d4d4d; +} + +.b-content__paragraph__link { + color: #007CB7; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; +} + +.b-content__paragraph__link:hover { + color: #08b1ff; +} + +.b-content__paragraph--item { + margin: 0; +} + +.b-content--main { + display: table; +} + +.b-content--main__article { + vertical-align: top; + display: table-cell; + padding-right: 84px; +} + +.b-content--main__article__indent { + margin-top: 0; + color: #4d4d4d; + font-size: 18px; +} + +.b-content--main__image { + display: table-cell; +} + +.b-content__col-left { + width: 50%; + float: left; +} + +.b-content__col-left--video { + height: 390px; + width: 100%; + +} + +/* Custom outline for YouTube navigation buttons */ + +.ytp-button:focus { + box-shadow: inset 0 0 0 4px #007CB7 !important; +} + +.b-content__col-right { + width: 50%; + float: right; +} + +.b-content__col-right__study-article { + padding: 0 36px; +} + +.b-content__col-right__study-article--text { + margin: 0; + color: #4d4d4d; + font-size: 18px; + font-weight: lighter; +} + +.b-content__col-right__item { + margin-left: 36px; +} + +.b-content__col-left__item, +.b-content__col-right__item { + display: table; + margin-bottom: 30px; +} + +.b-content__col-left__item__picture, +.b-content__col-right__item__picture { + display: table-cell; + border: 2px solid #b2b2b2; + width: 180px; + height: 180px; +} + +.b-content__col-left__item__picture--img, +.b-content__col-right__item__picture--img { + width: 100%; + height: 100%; +} + +.b-content__col-left__item__caption, +.b-content__col-right__item__caption { + vertical-align: middle; + display: table-cell; + width: 400px; +} + +.b-content__col-left__item__caption__number, +.b-content__col-right__item__caption__number { + margin: 0 24px; + float: left; + color: white; + width: 36px; + height: 36px; + border-radius: 50%; + background-color: #B32E09; + font-size: 24px; + line-height: 36px; + display: inline-block; + text-align: center; + font-weight: bold; +} + +.b-content__col-left__item__caption__text, +.b-content__col-right__item__caption__text { + font-size: 18px; + margin: 0 24px; +} + +.b-content__col-left__item__caption__text--blue, +.b-content__col-right__item__caption__text--blue { + color: #007CB7; + font-size: 18px; +} + +.b-content__col-left__item__caption__title, +.b-content__col-right__item__caption__title { + color: #4d4d4d; + margin: 0 0 0 24px; + font-size: 24px; + font-weight: bold; +} + +.b-content__col-left__item__title, +.b-content__col-right__item__title { + font-size: 24px; + color: #4d4d4d; +} + +.b-content__col-left__item__title-number, +.b-content__col-right__item__title-number { + color: white; + width: 36px; + height: 36px; + border-radius: 50%; + background-color: #B32E09; + font-size: 24px; + line-height: 36px; + display: inline-block; + text-align: center; + font-weight: bold; + margin-right: 6px; +} + +.b-content__col-left__item__icon--img, +.b-content__col-right__item__icon--img { + width: 72px; +} + +.b-content__col-left__item--benefits, +.b-content__col-right__item--benefits { + margin-bottom: 90px; +} + +.b-content__col-left__item__photo, +.b-content__col-right__item__photo { + width: 100%; +} + +.b-content__col-left__item__photo-caption, +.b-content__col-right__item__photo-caption { + margin: 24px 0; + color: #B32E09; + font-style: italic; + font-size: 18px; + font-weight: lighter; +} + +.b-content__col-left__item__photo-location, +.b-content__col-right__item__photo-location { + color: #666666; + font-size: 18px; + font-weight: lighter; +} + +.b-content__col-ternary { + width: 33.33333%; + position: relative; +} + +.b-content__col-ternary__col-ternary__item { + padding-right: 20px; +} + +.b-content--acknowledge-list { + margin-top: 36px; +} + +.b-content--acknowledge-list__link { + color: #007CB7; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; + line-height: 24px; + display: block; + font-size: 18px; +} + +.b-content--acknowledge-list__link:hover { + color: #08b1ff; +} + +.e-form__label { + display: block; + font-size: 18px; + color: #4d4d4d; + margin-top: 12px; +} + +.e-form__field { + border: 0; + width: 336px; + height: 42px; + font-size: 18px; + padding: 0 12px; + color: #4d4d4d; + background-color: #f2f2f2; + margin: 12px 0; + display: block; +} + +.e-form__button { + display: block; + border: 0; + margin: 36px 0 24px 0; + width: 360px; + height: 42px; + text-align: center; + color: #fff; + font-size: 18px; + background-color: #598200; +} + +.e-form__button--offset { + margin-left: 396px; +} + +.e-form .error { + width: 360px; + height: 0; + position: relative; + display: none; +} + +.e-form .error > span { + width: calc(100% - 24px); + padding: 12px; + min-height: 40px; + background: rgba(194, 0, 0, 0.8); + color: white; + font-size: 12px; + position: absolute; + left: 0; +} + +.e-form .error > span:after { + bottom: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} + +.e-form .error > span:after { + border-bottom-color: rgba(194, 0, 0, 0.8); + border-width: 6px; + margin-left: -6px; +} + +.e-form .e-select { + display: inline-block; + width: 360px; + height: 42px; + position: relative; + /* for Webkit's CSS-only solution */ + /* Select arrow styling */ +} + +.e-form .e-select__label { + width: 100%; + height: 100%; + position: relative; + display: inline-block; +} + +.e-form .e-select__box { + height: 100%; + width: 100%; + border-radius: 0; + display: inline-block; + border: none; + padding: 4px 3px 3px 5px; + margin: 0; + font: inherit; + font-size: 18px; + color: #666666; + /* remove focus ring from Webkit */ + background: #f2f2f2; + line-height: initial; + -webkit-appearance: none; + /* remove the strong OSX influence from Webkit */ +} + +.e-form .e-select__box.ng-dirty.ng-invalid { + color: #B32E09; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + .e-form .e-select__box { + padding-right: 30px; + } +} + +.e-form .e-select__label:after { + font-family: FontAwesome; + content: "\f0d7"; + position: absolute; + top: 0; + right: 0; + bottom: 0; + font-size: 18px; + line-height: 42px; + padding: 0 10px; + background: transparent; + color: #4d4d4d; + pointer-events: none; +} + +.e-form .e-select .no-pointer-events .custom-select:after { + content: none; +} + +.b-form-row { + width: 100%; +} + +.b-form-row__col { + display: inline-block; + width: auto; + padding-right: 36px; +} + +.b-step { + display: table; +} + +.b-step__left { + display: table-cell; + border: 2px solid #b2b2b2; +} + +.b-step__left__image { + width: 300px; + height: 300px; +} + +.b-step__right { + padding-left: 36px; + display: table-cell; + vertical-align: top; +} + +.b-step__right__title { + font-size: 24px; + color: #4d4d4d; + font-weight: bold; +} + +.b-step__right__title__count { + color: #B32E09; + margin-right: 6px; +} + +.b-step__right__paragraph { + font-size: 18px; + font-weight: lighter; + color: #4d4d4d; +} + +.b-step__right__paragraph__link { + color: #007CB7; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; +} + +.b-step__right__paragraph__link:hover { + color: #08b1ff; +} + +.b-success-registration { + width: 460px; + height: 266px; +} + +.b-success-registration__btn { + width: 100%; + background: transparent; + border: none; + font-size: 24px; + outline: none; +} + +.b-success-registration__btn--icon { + color: #598200; + cursor: pointer; +} + +.b-forgot-pass { + width: 460px; + height: 440px; +} + +.b-reset-pass { + height: 320px; + width: 440px; +} + +.b-reset-pass-error { + width: 440px; + height: 172px; +} + +.b-modal-window { + position: fixed; + top: 0; + right: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.65); + z-index: 2000; +} + +.b-modal-window__main-block { + background-color: #ffffff; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; +} + +.b-modal-window__main-block__header { + color: #4d4d4d; + font-size: 18px; + padding: 24px 36px; + background-color: #f2f2f2; + text-transform: capitalize; + text-align: center; +} + +.b-modal-window__main-block__header--title { + display: inline-block; + font-size: 18px; + margin: 0; +} + +.b-modal-window__main-block__header--icon-close { + font-size: 20px; + float: right; + cursor: pointer; + color: #000000; +} + +.b-modal-window__main-block__header--icon-close:hover { + color: #666666; +} + +.b-modal-window__main-block__body { + padding: 24px 36px; + font-size: 16px; + font-family: Segoe UI; + font-weight: 100; +} + +.b-modal-window__main-block__body__button { + background: none; + border: none; + font-size: 18px; + cursor: pointer; +} + +.b-modal-window__main-block__body__button:hover { + color: #4d4d4d; +} + +.b-modal-window__main-block__body__button--icon { + color: #598200; +} + +.b-modal-window .b-sync { + width: 300px; + height: 200px; +} + +.results { + position: absolute; + width: 336px; + margin-top: 35px; + margin-left: 4px; + background-color: #FFF; + list-style: none; + padding: 2px; + outline: none; + border-radius: 4px; + z-index: 10; + border: 1px solid #AAA; + height: 200px; + overflow-y: scroll; + overflow-x: hidden; +} + +.hide-text { + height: 1px; + width: 1px; + position: absolute; + overflow: hidden; + top: -10px; +} + +.screnreder-ignore { + speak: none; +} diff --git a/web/index.js b/app/resources/home.js similarity index 81% rename from web/index.js rename to app/resources/home.js index f224f4a..322f6b6 100644 --- a/web/index.js +++ b/app/resources/home.js @@ -1,7 +1,7 @@ (function () { var $$ = document.querySelectorAll.bind(document), $ = document.getElementById.bind(document); - + var validators = { uniqeUsrName: function () { var xmlhttp = new XMLHttpRequest(), @@ -13,7 +13,7 @@ status = true; } } - } + }; xmlhttp.open("post", "validate/undefined", false); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); xmlhttp.send('field=username&value=' + encodeURIComponent(this.value.trim())); @@ -36,7 +36,7 @@ return /^\d+$/.test(this.value); } }; - + function validate(input) { var rules = input.dataset.validation; if (!rules) { return; } @@ -77,7 +77,7 @@ if (input._validationErrors.length) { errBlock.style.display = "block"; } else { - errBlock.style.display = "none"; + errBlock.style.display = "none"; } return input._validationErrors; } @@ -101,7 +101,7 @@ }); } - function setAutocomplete(el) { + function setAutocomlete(el) { el.addEventListener('keyup', function (evt) { if (evt.target.value.trim() != '') { var xmlhttp = new XMLHttpRequest(), @@ -117,8 +117,9 @@ for (var i = 0; i < results.length; i++) { var li = document.createElement('li'); li.innerText = results[i]; - ul.appendChild(li); + ul.appendChild(li) } + body.appendChild(ul); ul.style.top = pos.top + 'px'; ul.style.left = pos.left + 'px'; @@ -131,8 +132,8 @@ }) } } - } - + }; + xmlhttp.open("GET", "/autocomplete/" + evt.target.name + "?term=" + evt.target.value.trim(), true); xmlhttp.send(); } @@ -144,7 +145,7 @@ setTimeout(function(){ removeRes(); validate(evt.target); - }, 500) + }, 500); }, true); document.querySelector('#register form').addEventListener('submit', function (evt) { evt.preventDefault(); @@ -159,31 +160,34 @@ if (xmlhttp.readyState == 4 ) { if(xmlhttp.status == 204) { document.querySelector('#register form').reset(); - var modal = document.querySelector('.success-registration'); - modal.className = modal.className.replace('hidden', ''); - } + /* var modal = document.querySelector('.success-registration'); + modal.className = modal.className.replace('hidden', '');*/ + location.hash = '#/successRegistration'; + + } } - } + }; xmlhttp.open("post", "/signup", true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); xmlhttp.send(Object.keys(data).reduce(function (a,k) { if (k == 'password') { data[k] = btoa(data[k]); } a.push(k+'='+encodeURIComponent(data[k])); - return a + return a; },[]).join('&')); } - + }); - document.querySelector('.success-registration input').addEventListener('click', function (evt) { - closeModal(); + document.querySelector('.b-success-registration button').addEventListener('click', function (evt) { + location.hash = '#/login'; + closeModal(); }, true); - setAutocomplete(document.querySelector('#register form input[placeholder="Company"]')); - setAutocomplete(document.querySelector('#register form input[placeholder="Industry"]')); + setAutocomlete(document.querySelector('#register form input[name="company"]')); + setAutocomlete(document.querySelector('#register form input[name="industry"]')); } function closeModal () { document.querySelector('#register form').reset(); - location.hash = '/#/login'; + location.hash = '#/login'; document.querySelector('.success-registration').className += ' hidden'; document.querySelector('#mainMenu a[href="#/login"]').click(); } @@ -209,7 +213,7 @@ msg.style.display = 'block'; } } - } + }; xmlhttp.open("post", "/forgotPassword", true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); xmlhttp.send(encodeURIComponent('email') + '=' + encodeURIComponent(evt.target.email.value.trim()) + '&' + encodeURIComponent('username') + '=' + encodeURIComponent(evt.target.username.value.trim())); @@ -232,10 +236,10 @@ if (xmlhttp.readyState == 4 ) { if(xmlhttp.status == 200 || xmlhttp.status == 204) { evt.target.reset(); - window.document.location.href = '/#/login'; + window.document.location.href = '#/login'; } } - } + }; xmlhttp.open("post", '/resetPassword/' + window._token, false); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); xmlhttp.send(encodeURIComponent('password') + '=' + encodeURIComponent(btoa(evt.target.password.value.trim()))); @@ -250,8 +254,10 @@ err.innerHTML = ''; err.style.display = 'none'; }, true); + form.addEventListener('submit', function (evt) { evt.preventDefault(); + if (evt.target.password.value.length !== 0 && evt.target.username.value.length !== 0) { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { @@ -262,7 +268,7 @@ showLoginErr(JSON.parse(xmlhttp.response).message); } } - } + }; xmlhttp.open("post", "/login", true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); xmlhttp.send(encodeURIComponent('password') + '=' + encodeURIComponent(btoa(evt.target.password.value.trim())) + '&' + encodeURIComponent('username') + '=' + encodeURIComponent(evt.target.username.value.trim())); @@ -271,17 +277,17 @@ } }); } - + function showArticle() { var articles = $$("article"), id = window.location.hash.substr(2), - active = document.querySelector('#mainMenu a.active'), - link = document.querySelector("a[href='" + window.location.hash + "']"); + active = document.querySelector('.b-menu a.active'), + link = document.querySelector("a.b-menu-nav__link[href='" + window.location.hash + "']"); if (active) { - active.className = ''; + active.className = 'b-menu-nav__link'; } if (link) { - link.className = 'active'; + link.className = 'b-menu-nav__link active'; } id = id || 'home'; if (id == 'surveys') { @@ -326,25 +332,52 @@ } function toggleDropdown(e){ - var dropdown = document.querySelector('#mainMenu a.language-select ul.dropdown'); - if (!dropdown.className.match(/(?:^|\s)open(?!\S)/)) { - dropdown.className += ' open'; + var dropdown = document.querySelector('.b-account-menu a.language-select + ul.dropdown'); + + if (!dropdown.className.match(/(?:^|\s)open(?!\S)/)) { + showDropdown(e) } else { - dropdown.className = 'dropdown'; + hideDropdown(e) } } - window.addEventListener("load", showArticle); + function showDropdown(e) { + var dropdown = document.querySelector('.b-account-menu a.language-select + ul.dropdown'); + dropdown.className = 'dropdown open'; + e.preventDefault(); + } + + function hideDropdown(e) { + var dropdown = document.querySelector('.b-account-menu a.language-select + ul.dropdown'); + dropdown.className = 'dropdown'; + } + + window.addEventListener('load', showArticle); window.addEventListener('hashchange', showArticle); window.onload = function(){ - document.querySelector('#mainMenu a.language-select').addEventListener("click", toggleDropdown); - [].forEach.call(document.querySelectorAll('#mainMenu a.language-select li'), function (el){ - el.addEventListener("click", function (e){ + document.querySelector('body').addEventListener('click', function(e) { + e.stopPropagation(); + + if ((e.target.className !== 'dropdown') && (e.target.className !== 'language-select b-account-menu__locale')) { + hideDropdown(e); + } + }); + document.querySelector('.b-account-menu .dropdown li:last-of-type a').addEventListener('blur', hideDropdown); + document.querySelector('.b-account-menu a.language-select').addEventListener('mousedown', toggleDropdown); + document.querySelector('.b-account-menu a.language-select').addEventListener('focus', toggleDropdown); + document.querySelector('.b-account-menu a.language-select').addEventListener('blur', hideDropdown); + + + [].forEach.call(document.querySelectorAll('.b-account-menu ul.dropdown li a'), function (el){ + el.addEventListener('focus', showDropdown); + el.addEventListener('click', function (e){ var target = e.target ? e.target : window.event.srcElement; + e.preventDefault(); document.cookie = 'NG_TRANSLATE_LANG_KEY=%22' + target.attributes.value.value + '%22'; location.reload(); }); }); + register(); remindPass(); resetPassword(); diff --git a/app/schemas/Question.js b/app/schemas/Question.js index ba21279..1f6f8ce 100644 --- a/app/schemas/Question.js +++ b/app/schemas/Question.js @@ -1,3 +1,4 @@ + var mongoose = require('mongoose'), Schema; diff --git a/app/schemas/Survey.js b/app/schemas/Survey.js index aa7de41..cca61c9 100644 --- a/app/schemas/Survey.js +++ b/app/schemas/Survey.js @@ -43,6 +43,15 @@ Schema = new mongoose.Schema({ type: Boolean, required: true, default: false + }, + publicExpire: { + type: Date + }, + customLogo: { + type: String + }, + customMessage: { + type: String } }, { toObject: { virtuals: true } @@ -57,7 +66,8 @@ Schema.pre('save', function (next) { me.published = false; } - if (me.published && me.isModified('resultsCount') && !me.isModified('title') && !me.isModified('_categories')) { + if (me.published && (me.isModified('resultsCount') || me.isModified('publicExpire') || me.isModified('customLogo') || me.isModified('customMessage') || me.isModified('__v')) + && !me.isModified('title') && !me.isModified('_categories')) { next(); return; diff --git a/app/schemas/User.js b/app/schemas/User.js index 7bedf2e..d34ce6f 100644 --- a/app/schemas/User.js +++ b/app/schemas/User.js @@ -36,7 +36,7 @@ Schema = new mongoose.Schema({ set: toLower }, phone: { - type: Number, + type: String, required: true, set: setPhone }, @@ -204,7 +204,7 @@ Schema.path('company').validate(function (company) { function setPhone (phone) { if (UserService.checkPhoneNumberFormat(phone)) { - return parseInt(phone.replace(new RegExp("[^0-9]", 'g'), ''), 10); + return phone.replace(new RegExp("[^0-9]", 'g'), ''); } return phone; diff --git a/app/services/ACL.js b/app/services/ACL.js index b6eb51c..1a2307f 100644 --- a/app/services/ACL.js +++ b/app/services/ACL.js @@ -66,6 +66,9 @@ exports.configure = configure = { }, userPermission: { show: 'operator' + }, + enketoSurveyUrl: { + show: 'fieldWorker' } }; diff --git a/app/services/Export.js b/app/services/Export.js index 2903813..cb383ef 100644 --- a/app/services/Export.js +++ b/app/services/Export.js @@ -170,7 +170,7 @@ exports.getResultsData = function (questions, results) { images = [], res = '', body = '', - questionIndex; + questionResult; _.each(questions, function (question) { header = header + question.label + '|'; @@ -179,44 +179,49 @@ exports.getResultsData = function (questions, results) { _.each(results, function (result) { body = body + getResultMetaData(result); - questionIndex = -1; + _.each(questions, function (question) { + questionResult = {}; - _.each(result._categoryResults, function (category) { - _.each(category._questionResults, function (questionResult) { + _.find(result._categoryResults, function (c) { + return _.find(c._questionResults, function (q) { + if (question.id.indexOf(q.id) !== -1) { + questionResult = q; + return true; + } + }); + }); - questionIndex = questionIndex + 1; - res = questionResult.result; + res = questionResult.result; - if (questionResult.result === undefined) { - res = ''; - } else if ( - questions[questionIndex].type === 'binary' || - questions[questionIndex].type === 'binary#image' - ) { - res = 'photos/' + result._id + '/' + questionResult.result; + if (questionResult.result === undefined) { + res = ''; + } else if ( + questions.type === 'binary' || + questions.type === 'binary#image' + ) { + res = 'photos/' + result._id + '/' + questionResult.result; - images.push({ - file: res, - filename: questionResult.result - }); - } else if (questions[questionIndex].type === 'date') { - res = moment(questionResult.result).format('YYYY-MM-DD'); - } else if (questions[questionIndex].type === 'time') { - res = /(\d{2}:\d{2})/.exec(questionResult.result)[1]; - } else if ( - questions[questionIndex].type === 'select' || - questions[questionIndex].type === 'select1' || - /cascade/.test(questions[questionIndex].type ) - ) { - res = _.map(res.trim().split(/ +/), function (value) { - return '"' + _.find(questions[questionIndex].items, function (item) { + images.push({ + file: res, + filename: questionResult.result + }); + } else if (questions.type === 'date') { + res = moment(questionResult.result).format('YYYY-MM-DD'); + } else if (questions.type === 'time') { + res = /(\d{2}:\d{2})/.exec(questionResult.result)[1]; + } else if ( + questions.type === 'select' || + questions.type === 'select1' || + /cascade/.test(questions.type ) + ) { + res = _.map(res.trim().split(/ +/), function (value) { + return '"' + _.find(questions.items, function (item) { return item.value == value; }).text + '"'; - }); - } + }); + } - body = body + res + '|'; - }); + body = body + res + '|'; }); }); @@ -237,9 +242,12 @@ exports.exportUserRegistrations = function (email, requestedDate) { filename = 'MDG_monthly_report_' + date.subtract('months', 1).format('MM_YYYY') + '.xlsx', workbook = excelBuilder.createWorkbook('./', filename); - User.findOne({}).sort({ timeCreated: 1 }).exec(function (err, user) { + User.findOne({}).sort({ timeCreated: -1 }).exec(function (err, user) { oldest = moment(user.timeCreated).startOf('month'); + console.log('user', user); + console.log('oldest', oldest); + while (date >= oldest) { months.push({ start: moment(date.startOf('month')).toDate(), diff --git a/app/services/Images.js b/app/services/Images.js index d00b5e1..789b780 100644 --- a/app/services/Images.js +++ b/app/services/Images.js @@ -4,13 +4,15 @@ var streamBuffers = require("stream-buffers"), grid = require('gridfs-stream'); -exports.saveImage = function (fileData, fileName) { +exports.saveImage = function (fileData, fileName, ifBuffer) { var - buf = new Buffer(fileData, 'base64'), + buf, gridfs, readstream, writestream; + buf = ifBuffer ? fileData : new Buffer(fileData, 'base64'); + gridfs = grid(mongoose.connection.db, mongoose.mongo); writestream = gridfs.createWriteStream({ diff --git a/app/services/Mail.js b/app/services/Mail.js index c56d130..74acae1 100644 --- a/app/services/Mail.js +++ b/app/services/Mail.js @@ -91,7 +91,7 @@ function getOptionsForForgotUsernameEmail (params, fileName, subject) { html = compiledJade({ users: params.users, - link: params.url + '/#/forgotPassword' + link: params.url + '/home#/forgotPassword' }); return { @@ -110,7 +110,7 @@ function getOptionsForResetPasswordEmail (params, fileName, subject) { html = compiledJade({ username: params.user.username, - link: params.url + '/#/resetPassword/' + params.user.resetPasswordToken + link: params.url + '/home#/resetPassword/' + params.user.resetPasswordToken }); return { diff --git a/app/services/Results.js b/app/services/Results.js index 17084d1..9606c73 100644 --- a/app/services/Results.js +++ b/app/services/Results.js @@ -79,7 +79,7 @@ function getCategoryResults (resultsData, survey, resultId) { } exports.composeResults = function (results, resultsData, survey, cb) { - Result.find({ _survey: survey._id, instanceID: resultsData.instanceID }) + Result.find({ _survey: survey._id, instanceID: resultsData.instanceID || 'No name' }) .sort('count') .exec(function (err, sameTitleResults) { results._survey = survey._id; @@ -205,18 +205,20 @@ function checkRelevant (relevantValue, results) { exports.gatherCategoryResults = function (result, survey) { var results = [], - surveyCategory = {}, + categoryResult = {}, category = {}, - surveyQuestion = {}, + questionResult = {}, question = {}, index; - _.each(result._categoryResults, function (categoryResult, categoryIndex) { + _.each(survey._categories, function (surveyCategory) { category = { _questionResults: [] }; - surveyCategory = survey._categories[categoryIndex]; + categoryResult = _.find(result._categoryResults, function (c) { + return c.id === surveyCategory.id; + }); if (surveyCategory.relevant && !checkRelevant(surveyCategory.relevant, result)) { return; @@ -225,12 +227,12 @@ exports.gatherCategoryResults = function (result, survey) { category.title = surveyCategory.title; category.id = categoryResult.id; - _.each(categoryResult._questionResults, function (questionResult, questionIndex) { + _.each(surveyCategory._questions, function (surveyQuestion) { question = {}; - surveyQuestion = _.find(surveyCategory._questions, function (question) { - return question.id == questionResult.id; - }); + questionResult = _.find(categoryResult._questionResults, function (q) { + return q.id == surveyQuestion.id; + }) || {}; if (Configuration.get('general.questionsTypes').indexOf(surveyQuestion.type) == -1 && !/cascade/.test(surveyQuestion.type)) { return; diff --git a/app/services/Subscription.js b/app/services/Subscription.js index eb4d0a0..6db1d04 100644 --- a/app/services/Subscription.js +++ b/app/services/Subscription.js @@ -34,7 +34,7 @@ exports.sendSubscriptionEmail = function () { _.each(subscription._survey._categories, function (category) { _.each(category._questions, function (question) { - if (/cascade/.test(question.type) && questions[questions.length - 1].type === question.type) { + if (/cascade/.test(question.type) && questions[questions.length - 1] && questions[questions.length - 1].type === question.type) { questions[questions.length-1].items = questions[questions.length-1].items.concat(question.items); return; } diff --git a/app/services/Survey.js b/app/services/Survey.js index 16b3a35..1d8a5f9 100644 --- a/app/services/Survey.js +++ b/app/services/Survey.js @@ -73,6 +73,42 @@ function getCategories (surveyData) { }); } +function transformRelevantForEnketo (relevantValue) { + if (!relevantValue) { + return; + } + + var + relevant = '', + xpath = '', + value, + match, + conditionRegexp = new RegExp("\\. (>=|<=|<|>|=) ([\\d-]+( and)?)(|$|\\))", 'g'), + relevantRegexp = new RegExp("(/data/.+/.+)='(.+)'"); + + xpath = relevantValue.match(relevantRegexp)[1]; + value = relevantValue.match(relevantRegexp)[2]; + + if (value.match(/\(.+?\)/)) { + _.each(value.split(') ('), function (option, index) { + conditionRegexp.lastIndex = 0; + + relevant += index !== 0 ? ' or' : ''; + + while ((match = conditionRegexp.exec(option)) !== null) { + relevant += ' int(' + xpath + ')' + match[1] + match[2]; + } + }); + } else { + _.each(value.split(' '), function (value, index) { + relevant += index !== 0 ? ' or ' : ''; + relevant += 'selected(' + xpath + ", '" + value + "')"; + }); + } + + return relevant; +} + exports.composeSurvey = function (survey, surveyData) { survey.title = surveyData.title; survey._categories = getCategories(surveyData); @@ -80,7 +116,7 @@ exports.composeSurvey = function (survey, surveyData) { return survey; }; -exports.composeSurveyData = function (survey) { +exports.composeSurveyData = function (survey, enketo) { var surveyData = { title: survey.title, instance: { @@ -112,7 +148,7 @@ exports.composeSurveyData = function (survey) { if (surveyCategory.relevant !== undefined) { surveyData.__binds["/data/" + surveyCategory.id] = { type: "group", - relevant: surveyCategory.relevant + relevant: enketo ? transformRelevantForEnketo(surveyCategory.relevant) : surveyCategory.relevant }; group.ref = "/data/" + surveyCategory.id; @@ -134,7 +170,7 @@ exports.composeSurveyData = function (survey) { surveyData.__binds["/data/" + surveyCategory.id + "/" + surveyQuestion.id] = { type: surveyQuestion.type, - relevant: surveyQuestion.relevant, + relevant: enketo ? transformRelevantForEnketo(surveyQuestion.relevant) : surveyQuestion.relevant, constraint: surveyQuestion.constraint, required: surveyQuestion.required }; @@ -155,7 +191,7 @@ exports.composeSurveyData = function (survey) { group.inputs.push({ type: surveyQuestion.type, required: surveyQuestion.required, - relevant: surveyQuestion.relevant, + relevant: enketo ? transformRelevantForEnketo(surveyQuestion.relevant) : surveyQuestion.relevant, constraint: surveyQuestion.constraint, mediatype: surveyQuestion.mediatype, label: "/data/" + surveyCategory.id + "/" + surveyQuestion.id + ":label", @@ -165,7 +201,6 @@ exports.composeSurveyData = function (survey) { items: items, id: surveyQuestion.id }); - }); surveyData.instance.categories.push(category); @@ -174,3 +209,27 @@ exports.composeSurveyData = function (survey) { return surveyData; }; + +exports.sortSurveyQuestions = function (survey) { + _.each(survey._categories, function (c) { + var questions = []; + + _.each(c._questions, function (q) { + if (/cascade/.test(q.type)) { + if (q.type === 'cascade1') { + questions.push(q); + questions = questions.concat(_.filter(c._questions, function (item) { + return item.parentid === q.id; + })); + } + } else { + questions.push(q); + } + }); + + c._questions = questions; + + }); + + return survey; +}; diff --git a/app/services/SurveyParser.js b/app/services/SurveyParser.js index 30b5a45..a3b8a7c 100644 --- a/app/services/SurveyParser.js +++ b/app/services/SurveyParser.js @@ -203,6 +203,59 @@ function Survey (jxonTree) { } } +exports.SurveysToJxonTree = function (surveys, url) { + var res = { + attrs: { + xmlns: "http://openrosa.org/xforms/xformsList" + }, + tagName: 'xforms', + value: null, + items: getItems() + }; + + function getItems () { + return surveys.map(function (survey) { + return { + tagName: 'xform', + value: null, + attrs: {}, + items: getItem(survey) + }; + }); + } + + function getItem (survey) { + return [ + { + tagName: 'formID', + attrs: {}, + items: [], + value: survey._id + }, + { + tagName: 'name', + attrs: {}, + items: [], + value: survey.title + }, + { + tagName: 'downloadUrl', + attrs: {}, + items: [], + value: url + '/' + survey._id + }, + { + tagName: 'hash', + attrs: {}, + items: [], + value: survey._id + } + ] + } + + return res; +}; + exports.SurveyToJxonTree = function (me) { var res = { diff --git a/app/services/User.js b/app/services/User.js index 8d7cda5..8b10700 100644 --- a/app/services/User.js +++ b/app/services/User.js @@ -6,6 +6,7 @@ exports.checkPhoneNumberFormat = function (phone) { if (!phoneRe.test(phone)) { return false; } + }; exports.checkPhoneNumberLength = function (phone) { diff --git a/app/views/adminPage.jade b/app/views/adminPage.jade new file mode 100644 index 0000000..306c6cd --- /dev/null +++ b/app/views/adminPage.jade @@ -0,0 +1,25 @@ +doctype html +html + head + title= title + meta(charset='utf-8') + meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') + meta(name='viewport', content='initial-scale=1.0') + script(src='adminPage.js') + link(rel='stylesheet' href='styles/adminPage.css') + + body + h1 ADMIN PAGE + + div.content + + p Input username or email to delete user + + input(type="text", class="user", placeholder="Username or email...", autocomplete="off", required) + + input(type="button", class="btn-delete-user", value="Delete") + + div.error Please, choose the user form the dropdown list! + div.success + span.username + span was successfully removed. diff --git a/app/views/emails/en/forgotUsernameEmail.jade b/app/views/emails/en/forgotUsernameEmail.jade index 2eace16..ac786cb 100644 --- a/app/views/emails/en/forgotUsernameEmail.jade +++ b/app/views/emails/en/forgotUsernameEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body p All usernames related to this email are provided below: diff --git a/app/views/emails/en/passwordChangedEmail.jade b/app/views/emails/en/passwordChangedEmail.jade index a4ffaed..4435472 100644 --- a/app/views/emails/en/passwordChangedEmail.jade +++ b/app/views/emails/en/passwordChangedEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body p The password for #{username} has been successfully changed #{date} at #{time}. diff --git a/app/views/emails/en/registrationEmail.jade b/app/views/emails/en/registrationEmail.jade index c9a12a1..5bde8e0 100644 --- a/app/views/emails/en/registrationEmail.jade +++ b/app/views/emails/en/registrationEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body h1 Hello #{name}! diff --git a/app/views/emails/en/resetPasswordEmail.jade b/app/views/emails/en/resetPasswordEmail.jade index 570e18c..9a3a16a 100644 --- a/app/views/emails/en/resetPasswordEmail.jade +++ b/app/views/emails/en/resetPasswordEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body p You've received this email because you want to reset password for   diff --git a/app/views/emails/en/subscriptionEmail.jade b/app/views/emails/en/subscriptionEmail.jade index 7f3e9fd..ee89f20 100644 --- a/app/views/emails/en/subscriptionEmail.jade +++ b/app/views/emails/en/subscriptionEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body h1 Hello! diff --git a/app/views/emails/reportEmail.jade b/app/views/emails/reportEmail.jade index 08ae936..ac53e25 100644 --- a/app/views/emails/reportEmail.jade +++ b/app/views/emails/reportEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body h1 MDG user report diff --git a/app/views/emails/ru/forgotUsernameEmail.jade b/app/views/emails/ru/forgotUsernameEmail.jade index abd264c..ac0d119 100644 --- a/app/views/emails/ru/forgotUsernameEmail.jade +++ b/app/views/emails/ru/forgotUsernameEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body p Все username, связанные с данной почтой, приведены ниже: diff --git a/app/views/emails/ru/passwordChangedEmail.jade b/app/views/emails/ru/passwordChangedEmail.jade index caad0ae..e6d1b8b 100644 --- a/app/views/emails/ru/passwordChangedEmail.jade +++ b/app/views/emails/ru/passwordChangedEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body p Пароль для пользователя #{username} успешно изменен #{date} в #{time}. diff --git a/app/views/emails/ru/registrationEmail.jade b/app/views/emails/ru/registrationEmail.jade index 5e17c3c..9222cd3 100644 --- a/app/views/emails/ru/registrationEmail.jade +++ b/app/views/emails/ru/registrationEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body h1 Добрый день, #{name}! diff --git a/app/views/emails/ru/resetPasswordEmail.jade b/app/views/emails/ru/resetPasswordEmail.jade index 8d0827c..9590307 100644 --- a/app/views/emails/ru/resetPasswordEmail.jade +++ b/app/views/emails/ru/resetPasswordEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body p Вы получили данное письмо, поскольку вы или кто-то другой запросил смену пароля для пользователя   diff --git a/app/views/emails/ru/subscriptionEmail.jade b/app/views/emails/ru/subscriptionEmail.jade index 4b381b4..dbea6db 100644 --- a/app/views/emails/ru/subscriptionEmail.jade +++ b/app/views/emails/ru/subscriptionEmail.jade @@ -1,4 +1,4 @@ -!!! transitional +doctype html transitional head body h1 Добрый день! diff --git a/app/views/getStarted/jade/en/error404.jade b/app/views/getStarted/jade/en/error404.jade index 43dd92b..c753292 100644 --- a/app/views/getStarted/jade/en/error404.jade +++ b/app/views/getStarted/jade/en/error404.jade @@ -1,4 +1,4 @@ -!!! +doctype html html head title= title @@ -6,7 +6,7 @@ html meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') meta(name='viewport', content='initial-scale=1.0') - link(rel="stylesheet" type="text/css" href="/resources/stylesheets/404.css") + link(rel="stylesheet" type="text/css" href="/styles/404.css") body div(class="content") diff --git a/app/views/getStarted/jade/en/home.jade b/app/views/getStarted/jade/en/home.jade index 1ca225a..79fdd10 100644 --- a/app/views/getStarted/jade/en/home.jade +++ b/app/views/getStarted/jade/en/home.jade @@ -1,695 +1,906 @@ -!!! 5 -html +doctype html +html(lang='en') head title= title - include ../../../../../web/index.js - include ../../../../../web/resources/stylesheets/style.css + script(src='home.js') + link(rel='stylesheet' href='styles/home.css') + link(rel='stylesheet' href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ) meta(charset='utf-8') body - header#mainMenu - nav - a(href='#') - img(src='../resources/icons/lolgo-30px.png') - h1 - | MICROSOFT - b  DATA GATHERING - ul - li - a(href='#/getStarted') Get Started - li - a(href='#/useCases') Use Cases - li - a(href='#/openSource') Open Source - li - a(href='#/support') Support - li - a.language-select #{language}  - ul.dropdown - each lang in languages - li(value=lang.value) #{lang.text} - a(href='#/login') Login - | / - a(href='#/register') Register - article#home.hidden - section.headDescrip - div - | Microsoft Data Gathering offers organizations a fast, - br - | accurate, cost effective and - br - | user-friendly way to collect data using mobile devices. - section.contentDescrip - div - .col-left - p - | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central location, - | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the ability - | to make crucial decisions. - p - | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from - | the field. The more time-critical the need for data and the more remote the location, the more organizations - | can benefit from a mobile phone based solution. - p - | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, including - | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. - p - | Because mobile devices can transmit data even from remote locations, the information collected can be available - | for analysis in near-real time. - .col-right - img(src='../resources/images/collage.jpg') - section#instruction - div - h2 HOW IT WORKS - ul - .col-left - li - a(href='#/getStarted#step1') - img(src='../resources/images/howitworks_1.png') - span 1 - span + .g-page-wrapper + .b-page__head-line + .b-line-bit.b-line-bit--red + .b-line-bit.b-line-bit--green + .b-line-bit.b-line-bit--blue + .b-line-bit.b-line-bit--yellow + div + header.b-page__header + .b-head-logo + a.b-logo__title(href='#/home') + img.b-logo__img(src='assets/images/logo-30px.png' + alt='Microsoft Data Gathering') + span Microsoft Data Gathering + .b-menu + nav.b-menu-nav + a.b-menu-nav__link(href='#/getStarted') + | Get Started + a.b-menu-nav__link(href='#/useCases') + | Use Cases + a.b-menu-nav__link(href='#/openSource') + | Open Source + a.b-menu-nav__link(href='#/support') + | Support + .b-account-menu + a.language-select.b-account-menu__locale(href='#') #{language}  + ul.dropdown + each lang in languages + li: a.b-account-menu__language(href='#' value=lang.value title=lang.title lang=lang.value) + span.hide-text #{lang.title} + span.screnreder-ignore(role='presentation' aria-hidden='true') #{lang.text} + .b-account-menu__user + a(title='Login to Microsoft Data Gathering' href='#/login') Login + | / + a(title='Register to Microsoft Data Gathering' href='#/register') Register + article#home.hidden + .b-content-header + h1.b-content-header__title + | Microsoft Data Gathering + p.b-content-header__text + | Offers organizations a fast, accurate, cost effective and + br + | user-friendly way to collect data using mobile devices. + .b-page__line + .b-content.b-content--line.b-content--main + .b-content--main__article + p.b-content--main__article__indent + | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central + | location, + | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the + | ability + | to make crucial decisions. + p.b-content--main__article__indent + | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from + | the field. The more time-critical the need for data and the more remote the location, the more organizations + | can benefit from a mobile phone based solution. + p.b-content--main__article__indent + | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, + | including + | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. + p.b-content--main__article__indent + | Because mobile devices can transmit data even from remote locations, the information collected can be available + | for analysis in near-real time. + .b-content-main__image + img(src='../assets/images/collage.jpg' + alt='Pictures of MDG in use') + .b-page__line + .b-content.b-content--line + h2.b-content-title + | How It Works + .b-content__col-left + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_1.png' + alt='First step of how MDG works. Create a questionnaire') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 1 + span.b-content__col-left__item__caption__text--blue | Create a questionnaire on br | the survey editor - li - a(href='#/getStarted#step2') - img(src='../resources/images/howitworks_2.png') - span 2 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_2.png' + alt='Second step of how MDG works. Publish the data for data collectors.') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 2 + span.b-content__col-left__item__caption__text--blue | Publish the data for data br | collectors - li - a(href='#/getStarted#step3') - img(src='../resources/images/howitworks_3.png') - span 3 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_3.png' + alt='Third step of how MDG works. Fill in the questionnaire on the device') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 3 + span.b-content__col-left__item__caption__text--blue | Fill in the questionnaire on br - | your mobile device - .col-right - li - a(href='#/getStarted#step4') - img(src='../resources/images/howitworks_4.png') - span 4 - span + | your mobile device + .b-content__col-right + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_4.png' + alt='Fourth step of how MDG works. Send your data to the server') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 4 + span.b-content__col-right__item__caption__text--blue | Send your data to the br - | server over the mobile - br - | network - li - a(href='#/getStarted#step5') - img(src='../resources/images/howitworks_5.png') - span 5 - span + | server over the mobile network + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_5.png' + alt='Fifth step of how MDG works. View, map or export your data') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 5 + span.b-content__col-right__item__caption__text--blue | View, map, and export br | your data - section.videoBlock - div - p - i - | This video is about the use of Microsoft Data Gathering to - b.bold combat dengue fever - | in Amazonas State, Brazil. - iframe.video(src='//www.youtube.com/embed/kP1v9Snz6HA') - section#benefits - div - h2 BENEFITS - ul - .col-left - li - img(src='../resources/icons/speed.png') - h3 Speed - | Compared to using paper forms, mobile solutions cut down delays - | caused by transportation and manual digitalization of collected - | data. - li - img(src='../resources/icons/cost-efficiency.png') - h3 Cost efficiency - | Transportation and logistics costs are reduced, as are the needs - | for manual data entry and cleaning. There is also a cost of - | inaction saved with the ability to make critical decisions and - | react rapidly. - .col-right - li - img(src='../resources/icons/accuracy.png') - h3 Accuracy - | Data entry occurs at the point of collection, without needing to - | transcribe hand-written information. This lowers the frequency of - | transcription and data entry errors. - li - img(src='../resources/icons/usability.png') - h3 Usability - | Mobile phones are small, easy to carry, have battery longevity, - | and enable the capture of rich data such as GPS location tags - | and images. - section#awards - div - .col-left - h2 AWARDS - ul - li - b 2012 - | : Microsoft Data Gathering was a Featured Project of the - br - | Month for July in the Developer Community Blog. - li - b 2011 - | : Microsoft Data Gathering won the Justmeans Social - br - | Innovation Award in the category "Philanthropy: Most Strategic - br - | Use of Philanthropic Funds". - li - | The Justmeans international awards program is considered one of - | the top honours in the field of sustainability, giving recognition to - | companies implementing groundbreaking strategies and programs - | that drive social and environmental innovation. - .col-right - h2 ACKNOWLEDGEMENTS - p - | We would like to extend our thanks to these organizations, which - br - | have been instrumental in getting Microsoft Data Gathering to - br - | where it is today. - ul.markedList - li - a(href='http://www.indt.org/?lang=en') Nokia Technology Institute - li - a(href='http://www.uonbi.ac.ke/') University of Nairobi - li - a(href='http://cmri.shu.edu/') The Center for Mobile Research and Innovation - li - a(href='http://www.ayalafoundation.org/') The Ayala Foundation - ul#footer - li - a(href='http://www.nokia.com/global/privacy/privacy/policy/privacy-policy/') Privacy Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/cookie/cookie-policy/') Cookie Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/service-terms/nokia-service-terms/') Service Policy - li - a(href="https://github.com/nokiadatagathering") Code - article#getStarted.hidden - section - div - h1 GET STARTED - p + .b-page__line + .b-content.b-content--line + h2.b-content-title#benefits + a(name='benefits') Benefits + .b-content__col-left + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits1.png' + alt='Compared to using paper forms, mobile solutions cut down delays') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Speed + p.b-content__col-left__item__caption__text + | Compared to using paper forms, mobile solutions cut down delays + | caused by transportation and manual digitalization of collected + | data. + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits2.png' + alt='Transportation and logistics costs are reduced') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Cost efficiency + p.b-content__col-left__item__caption__text + | Transportation and logistics costs are reduced, as are the needs + | for manual data entry and cleaning. There is also a cost of + | inaction saved with the ability to make critical decisions and + | react rapidly. + | data. + .b-content__col-right + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits3.png' + alt='Data entry occurs at the point of collection') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Accuracy + p.b-content__col-right__item__caption__text + | Data entry occurs at the point of collection, without needing to + | transcribe hand-written information. This lowers the frequency of + | transcription and data entry errors. + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits4.png' + alt='Mobile devices are easy to carry') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Usability + p.b-content__col-right__item__caption__text + | Mobile phones are small, easy to carry, have battery longevity, + | and enable the capture of rich data such as GPS location tags + | and images. + .b-page__line + .b-content.b-content-line + .b-content__col-left + h2.b-content-title Awards + p.b-content__paragraph + strong 2012 + | Microsoft Data Gathering was a Featured Project of the + br + | Month for July in the Developer Community Blog. + p.b-content__paragraph + strong 2011 + | Microsoft Data Gathering won the Justmeans Social + br + | Innovation Award in the category "Philanthropy: Most Strategic + br + | Use of Philanthropic Funds". + p.b-content__paragraph + | The Justmeans international awards program is considered one of + br + | the top honours in the field of sustainability, giving recognition to + br + | companies implementing groundbreaking strategies and programs + br + | that drive social and environmental innovation. + br + .b-content__col-right + .b-content__col-right__item + h2.b-content-title Acknowledgements + p.b-content__paragraph + | We would like to extend our thanks to these organizations, which + br + | have been instrumental in getting Microsoft Data Gathering to + br + | where it is today. + .b-content--acknowledge-list + a.b-content--acknowledge-list__link(href='http://www.indt.org/?lang=en', target='_blank') Nokia Technology Institute + a.b-content--acknowledge-list__link(href='http://www.uonbi.ac.ke/', target='_blank') University of Nairobi + a.b-content--acknowledge-list__link(href='http://cmri.shu.edu/', target='_blank') The Center for Mobile Research and Innovation + a.b-content--acknowledge-list__link(href='http://www.ayalafoundation.org/', target='_blank') The Ayala Foundation + + article#getStarted.hidden + .b-content-header + h1.b-content-header__title + | Get Started + p.b-content-header__text | If you have your own server and wish to migrate your data - | to this release of MDG the tool to do that is available - a(href="http://github.com/nokiadatagathering/ndg-migration") here - ul - li(data-step='step1') - img(src='../resources/images/getstarted_step1.png') - h2 Step 1: Register to the Microsoft Data Gathering Playground Server - p - | The first thing you need to do is to fill in the user registration form and create - | an account on the Microsoft Data Gathering playground server. You can do this by - | clicking - a(href='#/register') register on the homepage - | . - li(data-step='step2') - img(src='../resources/images/getstarted_step2.png') - h2 Step 2: Create a survey - p - | After you've confirmed your account and logged in to the server, you can start - | writing your own questionnaire using the survey editor. You can choose different - | question types, set default answers or limits and even use skip logic to write your - | questionnaire. - li(data-step='step3') - img(src='../resources/images/getstarted_step3.png') - h2 Step 3: Download the Microsoft Data Gathering mobile application - p - | Download and install one of the Microsoft Data Gathering mobile applications. - p - i - | Please note that until the branding change is completed please use the server https://nokiadatagathering.net in the app settings. - | Apps marked as 'New!' have been updated to use the https://microsoftdatagathering.net server and those marked as 'To be updated' still - | default to https://nokiadatagathering.net - p - | Download the - a(href="http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848") Windows Phone app - |. - img(src="../resources/icons/1-new.png") - em New! - br - | Download the - a(href="https://nokiadatagathering.net/ndg-ota/client/ndg.jad") Java app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - br - | Download the - a(href="http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42") Windows Tablet app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - li(data-step='step4') - img(src='../resources/images/getstarted_step4.png') - h2 Step 4: Add users and make your survey available to them - p - | You can publish your questionnaire to your field data collectors by adding them to - | your main account in the Users section, organizing them into groups and giving - | them different access permissions. You can make your questionnaire available to - | as many users as you like. You can also send SMS notifications to your user groups. - li(data-step='step5') - img(src='../resources/images/getstarted_step5.png') - h2 Step 5: Fill in the survey and send your results on your mobile device - p - | Open the Microsoft Data Gathering app you downloaded onto your mobile device - | in Step 3, and login with your user credentials. The surveys that were made available - | to you in Step 4 will be listed on the app. Just open the survey you want and create a new - | result by entering the requested data in the blank fields. - p - | You can send your results back to the server immediately, or save them on the - | phone to send later. - li(data-step='step6') - img(src='../resources/images/getstarted_step6.png') - h2 Step 6: View and export your results - p - | Go back to your Playground Server account and take a look at all the results you've received. - | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export - | your data in XLS or KML formats for further data analysis. - article#useCases.hidden - section - div - h1 USE CASES - ul - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Uganda - FAO - img(src='../resources/images/usecase_1.jpg') - .col-left - p - | As part of a regional initiative to reduce risk - | of drought in Eastern Africa with Early Warning Systems, - | the Food and Agriculture Organization of the United Nations - | (FAO) in Uganda is collecting geo-spatial and qualitative - | data about community animal health workers and providers - | of veterinary services and shops, among the rural pastoral - | communities of the Karamoja region. - p - | The move from paper-based questionnaires to Microsoft Data Gathering - | has allowed more efficient operations by reducing the time to produce - | Drought Bulletins by 50%. - p - | Furthermore, the project has enhanced participation of the community - | and the local government, and is supporting the capacity of the - | Department of Meteorology in issuing monthly weather updates - | for Karamoja. - p - | FAO's efforts were recognized by the World Bank in recent study - | on mobile applications for the agriculture and forestry sector, - | published in December 2013. - .col-right - blockquote + br + | to this release of MDG the tool to do that is available + a.b-content-header__text__link(href='http://github.com/nokiadatagathering/ndg-migration', target='_blank') here + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step1.png' + alt='Register to the Microsoft Data Gathering Playground Server') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 1 + | Register to the Microsoft Data Gathering Playground Server + p.b-step__right__paragraph + | The first thing you need to do is to fill in the user registration form and create + br + | an account on the Microsoft Data Gathering playground server. You can do this by + br + | clicking + a.b-step__right__paragraph__link(title='Register' href='#/register') register on the homepage + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step2.png' + alt='Create a survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 2 + | Create a survey + p.b-step__right__paragraph + | After you've confirmed your account and logged in to the server, you can start + br + | writing your own questionnaire using the survey editor. You can choose different + br + | question types, set default answers or limits and even use skip logic to write your + br + | questionnaire. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step3.png' + alt='Download the MDG mobile application') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 3 + | Download the Microsoft Data Gathering mobile application + p.b-step__right__paragraph + | Download and install one of the Microsoft Data Gathering mobile applications. + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848', target='_blank') + | Windows Phone app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='https://nokiadatagathering.net/ndg-ota/client/ndg.jad', target='_blank') + | Java app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42', target='_blank') + | Windows Tablet app + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step4.png' + alt='Add users') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 4 + | Add users and make your survey available to them + p.b-step__right__paragraph + | You can publish your questionnaire to your field data collectors by adding them to + br + | your main account in the Users section, organizing them into groups and giving + br + | them different access permissions. You can make your questionnaire available to + br + | as many users as you like. You can also send SMS notifications to your user groups. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step5.png' + alt='Fill in the survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 5 + | Fill in the survey and send your results on your mobile device + p.b-step__right__paragraph + | Open the Microsoft Data Gathering app you downloaded onto your mobile device + br + | in Step 3, and login with your user credentials. The surveys that were made available + br + | to you in Step 4 will be listed on the app. Just open the survey you want and create a new + br + | result by entering the requested data in the blank fields. + p.b-step__right__paragraph + | You can send your results back to the server immediately, or save them on the + | phone to send later. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step6.png' + alt='View and Export') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 6 + | View and export your results + p.b-step__right__paragraph + | Go back to your Playground Server account and take a look at all the results you've received. + br + | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export + br + | your data in XLS or KML formats for further data analysis. + + + article#useCases.hidden + .b-content-header + h1.b-content-header__title + | Use Cases + p.b-content-header__text + | A Real Solution to Real Problems + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Reducing the risk to drought in vulnerable communities + br + | in Uganda - FAO + .b-content__col-left + p.b-content__paragraph + | As part of a regional initiative to reduce risk + | of drought in Eastern Africa with Early Warning Systems, + | the Food and Agriculture Organization of the United Nations + | (FAO) in Uganda is collecting geo-spatial and qualitative + | data about community animal health workers and providers + | of veterinary services and shops, among the rural pastoral + | communities of the Karamoja region. + p.b-content__paragraph + | The move from paper-based questionnaires to Microsoft Data Gathering + | has allowed more efficient operations by reducing the time to produce + | Drought Bulletins by 50%. + p.b-content__paragraph + | Furthermore, the project has enhanced participation of the community + | and the local government, and is supporting the capacity of the + | Department of Meteorology in issuing monthly weather updates + | for Karamoja. + p.b-content__paragraph + | FAO's efforts were recognized by the World Bank in recent study + | on mobile applications for the agriculture and forestry sector, + | published in December 2013. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_1.jpg' + alt='FAO in Eastern Africa') + blockquote.b-content__col-right__item__photo-caption | "We strive to improve the humanitarian situation by increasing | the coping capacities of populations vulnerable to recurrent | drought hazards and their effects through the provision of | multi-sectorial assistance in the Horn of Africa. | Microsoft Data Gathering is one of the most convenient | and cost-effective tools for collecting data from remote areas." - p - b Bernard 0. Mwesigwa - | , - | Programme Officer, M&E/Data Management, FAO Uganda - li - h2.nptlHeader Giving children the right to an identity in Kenya - Plan - img(src='../resources/images/usecase_2.jpg') - .col-left - p - | An official identity is the foundation for child rights, - | child protection and later child's ticket to services such as - | secondary schooling. Official identity is obtained by parents - | through birth registration. - p - | Today only five out of ten children in Kenya are registered. - p - | Poor accessibility to offices and officers, slow processing - | of both birth notifications and certificates, and costs involved - | together with a lack of incentives for parents to register their - | children contribute to the current situation. - p - | Plan together with the Ministry of Foreign Affairs in Finland is - | running a universal birth registration project in the Kwale district - | using Microsoft Data Gathering that has resulted in dramatically increased - | registration rates (from 30 to 68%). - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Bernard O. Mwesigwa, + br + | Programme Officer, M&E/Data Management, FAO Uganda + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Giving children the right to an identity in Kenya - Plan + .b-content__col-left + p.b-content__paragraph + | An official identity is the foundation for child rights, + | child protection and later child's ticket to services such as + | secondary schooling. Official identity is obtained by parents + | through birth registration. + p.b-content__paragraph + | Today only five out of ten children in Kenya are registered. + p.b-content__paragraph + | Poor accessibility to offices and officers, slow processing + | of both birth notifications and certificates, and costs involved + | together with a lack of incentives for parents to register their + | children contribute to the current situation. + p.b-content__paragraph + | Plan together with the Ministry of Foreign Affairs in Finland is + | running a universal birth registration project in the Kwale district + | using Microsoft Data Gathering that has resulted in dramatically increased + | registration rates (from 30 to 68%). + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_2.jpg' + alt='Plan in Kenya') + blockquote.b-content__col-right__item__photo-caption | "The use of ICTs including mobile technology has great potential to support | communities and governments in civil registration. Right to citizenship and | identity are fundamental prerequisites in development." - p - b Mika Välitalo - | , Manager - ICT for Development, Plan Finland - li - h2.nptlHeader - | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation - img(src='../resources/images/usecase_3.jpg') - .col-left - p - | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage - | Microsoft Data Gathering to help fight the spread of dengue fever - | and increase the effectiveness of treatment. - p - | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of - | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a - b.bold 93% cut - | in the number of cases. - p - | Microsoft Data Gathering helped the health workers to do their jobs, by making their - | reports both faster and more accurate. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Mika Välitalo, + br + | Manager - ICT for Development, Plan Finland + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation + .b-content__col-left + p.b-content__paragraph + | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage + | Microsoft Data Gathering to help fight the spread of dengue fever + | and increase the effectiveness of treatment. + p.b-content__paragraph + | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of + | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a + bold 93% cut + | in the number of cases. + p.b-content__paragraph + | Microsoft Data Gathering helped the health workers to do their jobs, by making their + | reports both faster and more accurate. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_3.jpg' + alt='Malaria in Amazonas') + blockquote.b-content__col-right__item__photo-caption | "Microsofts technology will help us to more rapidly identify and investigate the results | and symptoms of the surveyed population. The transmission of data immediately after | the interviews improves agility, increases public safety and avoids manual filling-in of forms." - p - b Agnaldo Costa - | , State Health Secretary of Amazonas State - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Kenya - FAO - img(src='../resources/images/usecase_4.jpg') - .col-left - p - | Accurate, timely and geo-tagged data on water points and sources is - | an important basis to reduce the impact of drought among vulnerable communities - | living in recurrent drought Food Agriculture Organization (FAO) is working along - | with their NGO partners in Greater Horn of Africa to alleviate the risk - | to drought among pastoralist communities. - p - | Microsoft Data Gathering is bringing mobile technology to water point surveys, - | reducing the amount of effort, time and cost to collect the information and - | enabling proper and timely preparedness activities. - p - | To date information from over 500 points has been collected - and more into come. - | The collected information is also published in Disaster Risk Reduction website - | for public good. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Agnaldo Costa, + br + | State Health Secretary of Amazonas State + .b-page__line + .b-content + h2.b-content-title + | Reducing the risk to drought in vulnerable communities in Kenya - FAO + .b-content__col-left + p.b-content__paragraph + | Accurate, timely and geo-tagged data on water points and sources is + | an important basis to reduce the impact of drought among vulnerable communities + | living in recurrent drought Food Agriculture Organization (FAO) is working along + | with their NGO partners in Greater Horn of Africa to alleviate the risk + | to drought among pastoralist communities. + p.b-content__paragraph + | Microsoft Data Gathering is bringing mobile technology to water point surveys, + | reducing the amount of effort, time and cost to collect the information and + | enabling proper and timely preparedness activities. + p.b-content__paragraph + | To date information from over 500 points has been collected - and more into come. + | The collected information is also published in Disaster Risk Reduction website + | for public good. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_4.jpg' + alt='Vulnerable communities in Kenya') + blockquote.b-content__col-right__item__photo-caption | "A huge burden is put on organizations, especially small scale NG05, | to collect, capture and process data timely for response and planning with | no supported technology tools. Microsoft Data Gathering provides a simple and | effective field solution with a centralized data administration system." - p - b Phillip Fong - | , Regional Data and Information Coordinator, FAO - article#openSource.hidden - section - div - h1 OPEN SOURCE - h2.nptlHeader Microsoft Data Gathering is an Open Source solution - .col-left - p - | We launched the open source version of Microsoft Data Gathering on 30 July 2010, - | making the source code available to anyone for download, deployment and development. - | There are no licensing costs for using the software, the code base is public, - | and development occurs in a collaborative and community-driven manner. - p - | The open source model also empowers universities and local developers to participate - | in creating tools and services on top of the core solution, helping to build local capacity. - | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of - | technology adoption. - p - | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, - | a family of permissive free software licenses, imposing minimal restrictions on the redistribution - | of covered software. - .col-right - p - | You can read the BSD license terms - a(href='http://opensource.org/licenses/BSD-2-Clause') here - | . - p - | The Microsoft Data Gathering Playground Server and the Java client - | are both licensed under the GNU Lesser General Public License, - a(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html') LGPL - | which allows developers and companies to use and integrate the software into - | their own (even proprietary) software without being required to release the source - | code of their own software-parts. - p - | Microsoft Data Gathering complies with Open Rosa standards for data collection. - p - | The Microsoft Data Gathering source code and documentation repository is at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - section - div - h1 GET INVOLVED - p - | Here's how you can be a part of the Microsoft Data Gathering - | developer and user community: - ul.markedList - li - a(href='https://github.com/nokiadatagathering') Get the source code - | and develop - | Microsoft Data Gathering - li - | Become a Microsoft Data Gathering service partner - li - | Help us plan future software releases - li - | Translate the Microsoft Data Gathering application into your language - article#support.hidden - section - div - h1 SUPPORT - p How to get support: - ul.markedList - li - a(href='/docs') Read the Microsoft Data Gathering user guide and documentation - li - | Access the - a(href='https://github.com/nokiadatagathering') Microsoft Data Gathering code repository - li - | Send an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - h1 FREQUENTLY ASKED QUESTIONS - ul.questionList - .col-left - li - h2.blueHeader 1) What are the benefits of mobile data collection? - p + p.b-content__col-right__item__photo-location + | Phillip Fong, + br + | Regional Data and Information Coordinator, FAO + article#openSource.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Open Source + p.b-content-header__text + | Microsoft Data Gathering is an Open Source solution + .b-page__line + .b-content + .b-content__col-left + p.b-content__paragraph + | We launched the open source version of Microsoft Data Gathering on 30 July 2010, + | making the source code available to anyone for download, deployment and development. + | There are no licensing costs for using the software, the code base is public, + | and development occurs in a collaborative and community-driven manner. + p.b-content__paragraph + | The open source model also empowers universities and local developers to participate + | in creating tools and services on top of the core solution, helping to build local capacity. + | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of + | technology adoption. + p.b-content__paragraph + | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, + | a family of permissive free software licenses, imposing minimal restrictions on the redistribution + | of covered software. + .b-content__col-right + .b-content__col-right__item + p.b-content__paragraph + | You can read the BSD license terms + a.b-content__paragraph__link(href='http://opensource.org/licenses/BSD-2-Clause', target='_blank') here + | . + p.b-content__paragraph + | The Microsoft Data Gathering Playground Server and the Java client + | are both licensed under the GNU Lesser General Public License, + a.b-content__paragraph__link(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html', target='_blank') LGPL + | which allows developers and companies to use and integrate the software into + | their own (even proprietary) software without being required to release the source + | code of their own software-parts. + p.b-content__paragraph + | Microsoft Data Gathering complies with Open Rosa standards for data collection. + p.b-content__paragraph + | The Microsoft Data Gathering source code and documentation repository is at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') https://github.com/nokiadatagathering + | . + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | Get Involved + p.b-content__paragraph + | Here's how you can be a part of the Microsoft Data Gathering + | developer and user community: + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') Get the source code + | and develop + | Microsoft Data Gathering + p.b-content__paragraph.b-content__paragraph--item + | Become a Microsoft Data Gathering service partner + p.b-content__paragraph.b-content__paragraph--item + | Help us plan future software releases + p.b-content__paragraph.b-content__paragraph--item + | Translate the Microsoft Data Gathering application into your language + + article#support.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Support + p.b-content-header__text + | Microsoft Data Gathering support page + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | How to get support + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='/docs') + | Read the Microsoft Data Gathering user guide and + | documentation + p.b-content__paragraph.b-content__paragraph--item + | Access the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering',, target='_blank') + | Microsoft Data Gathering code repository + p.b-content__paragraph.b-content__paragraph--item + | Send an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com') + | mdgspprt@microsoft.com + .b-page__line + .b-content + h2.b-content-title + | Frequently Asked Questions + .b-content__col-left + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 1 + | What are the benefits of mobile data collection? + p.b-content__paragraph | The key benefits of mobile data collection are speed, - | accuracy, cost efficiency and usability. Please see the - a(href='#/home') benefits section on the homepage + | accuracy, cost efficiency and usability. Please see the + a.b-content__paragraph__link(href='#') benefits section on the homepage | for more on benefits. - li - h2.blueHeader 2) How is Microsoft Data Gathering used in the field? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 2 + | How is Microsoft Data Gathering used in the field? + p.b-content__paragraph | When time is of the essence, rapidly available, accurate information | is critical for sound decision-making in any kind of organization. - p + p.b-content__paragraph | For example: In Brazil, the Amazonas State Health Department and | the Health Vigilance Foundation have used Microsoft Data Gathering | to monitor and control the spread of dengue fever. - p + p.b-content__paragraph | In East Africa, the Food and Agriculture Organization has conducted | water and livestock surveys to reduce the risk of vulnerable | communities to drought. - p + p.b-content__paragraph | In Kenya, Plan Finland has worked with the Kenyan government | to register births using Microsoft Data Gathering. - p - | For more on use cases, please see the - a(href='#') use cases page - | . - li - h2.blueHeader 3) Does it cost anything to use Microsoft Data Gathering? - p - | Nokia Data Gathering is an open source solution so there are no licensing fees - | or charges for using the software. For more on open source, please see the - a(href='#/openSource') open source page - | . - p + p.b-content__paragraph + | For more on use cases, please see the + a.b-content__paragraph__link(href='#/useCases') use cases page + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 3 + | Does it cost anything to use Microsoft Data Gathering? + p.b-content__paragraph + | Microsoft Data Gathering is an open source solution so there are no licensing fees + | or charges for using the software. For more on open source, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + p.b-content__paragraph | Of course, there are costs associated with the hardware | (mobile phones, servers, SIM cards) necessary for using - | Nokia Data Gathering, as well as the implementation of a data collection project. + | Microsoft Data Gathering, as well as the implementation of a data collection project. | These costs must be scoped and borne by the organization using the solution. - li - h2.blueHeader 4) What are the license terms for Microsoft Data Gathering? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 4 + | What are the license terms for Microsoft Data Gathering? + p.b-content__paragraph | The Microsoft Data Gathering Windows Phone client is licensed under the open source | Berkeley Software Distribution (BSD) License family. The Microsoft | Data Gathering Playground Server and the Java client are both licensed under | the GNU Lesser General Public License (ILGPL).Microsoft Data Gathering complies with | the standards of the OpenROSA Consortium on mobile data collection. - p - | For more on our licenses, please see the - a(href='#/openSource') open source page - | . - .col-right - li - h2.blueHeader 5) Which devices are compatible with Microsoft Data Gathering? - p + p.b-content__paragraph + | For more on our licenses, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + .b-content__col-right + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 5 + | Which devices are compatible with Microsoft Data Gathering? + p.b-content__paragraph | The Windows Phone version of the Microsft Data Gathering mobile client is | a Silverlight application for Windows Phone 7 and a Cordova/Sensa Touch application for | Windows Phone 8. The Windows Tablet version runs on Windows RT devices. The Java application runs | on Symbian and Nokia OS devices. - p + p.b-content__paragraph | If you have a specific query about device compatibility, please let - | us know by sending an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - li - h2.blueHeader 6) Where can I find the Microsoft Data Gathering source code? - p - | You can get the source code at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - li - h2.blueHeader 7) How can I host my own server data? - p + | us know by sending an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com' ) mdgspprt@microsoft.com + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 6 + | Where can I find the Microsoft Data Gathering source code? + p.b-content__paragraph + | You can get the source code at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 7 + | How can I host my own server data? + p.b-content__paragraph | The instructions for setting up and hosting your own - | server are contained in the - a(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README - | . - li - h2.blueHeader 8) What are the previous versions of Microsoft Data Gathering? - p - | Please see our - a(href='#') release archive - | . for more information on previous releases of - | Microsoft Data Gathering. - li - h2.blueHeader 9) Can students work on Microsoft Data Gathering? + | server are contained in the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 8 + | What are the previous versions of Microsoft Data Gathering? + p.b-content__paragraph + | Please see our + a.b-content__paragraph__link(href='#') release archive + | for more information on previous releases of + | Microsoft Data Gathering.. + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 9 + | Can students work on Microsoft Data Gathering? + p.b-content__paragraph + | Yes. Please see the description of our + a.b-content__paragraph__link(href='#') University Collaboration Program + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 10 + | Can I translate the Microsoft Data Gathering mobile client into my language? + p.b-content__paragraph + | Yes. Please get in touch with us at + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com', target='_blank') mdgspprt@microsoft.com + | and work with us to provide a translation of + | the software in your language. We will then push this out + | and make the language version available to all users. + + article#login.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Login + p.b-content-header__text + | Log in to the server below + .b-page__line + .b-content + form.e-form + label.e-form__label(for='login_username') Username + input.e-form__field#login_username(type="text", name="username", placeholder="Enter your username...", tabindex="0") + label.e-form__label(for='login_password') Password + input.e-form__field#login_password(type="password", name="password", placeholder="Enter your password...") + .error + button.e-form__button(type="submit" title='Login') Login + p.b-content__paragraph + a.b-content__paragraph__link(href="#/forgotPassword") Forgot your password? + p.b-content__paragraph + | Don’t have an account? + a.b-content__paragraph__link(title='Register' href="#/register") Register here + + article#register.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Register + p.b-content-header__text + | Create an account below + .b-page__line + .b-content + form.e-form(action='signup', method='POST', autocomplete="off") + .b-form-row + .b-form-row__col + label.e-form__label(for='firstName') First Name + input.e-form__field#firstName(type="text", name="firstName", data-validation='len(2, 60);', placeholder="Enter your First Name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label(for='lastName') Last name + input.e-form__field#lastName(type="text", name="lastName", data-validation='len(2, 60);', placeholder="Enter your Last name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", data-validation='len(5,13);isAlpha;uniqeUsrName;', placeholder="Enter your Username...") + .error + span(data-validation-msg='uniqeUsrName') + | This username is already used. + span(data-validation-msg='len') + | This field must have at least 5 and cannot be longer than 13 characters. + span(data-validation-msg='isAlpha') + | Nickname can contain only numbers, periods and Latin letters. + .b-form-row__col + label.e-form__label(for='email') Email + input.e-form__field#email(type="email", name="email", data-validation='isEmail;', placeholder="Enter your Email...") + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + .b-form-row + .b-form-row__col + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", data-validation='len(8,20);', placeholder="Enter your Password...") + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + .b-form-row__col + label.e-form__label(for='confirmpass') Confirm Password + input.e-form__field#confirmpass(type="password", name="confirmpass", data-validation='isMatch(password)', placeholder="Confirm your Password...") + .error + span(data-validation-msg='isMatch') + | Passwords do not match + .b-form-row + .b-form-row__col + label.e-form__label(for='phone') Phone Number + input.e-form__field#phone(type="text", name="phone", data-validation='len(10,15);isNumber;', placeholder="Enter your Phone Number...") + .error + span(data-validation-msg='len') + | This field must have at least 10 and cannot be longer than 15 characters. + span(data-validation-msg='isNumber') + | This is not a valid phone number. + .b-form-row__col + label.e-form__label(for='company') Company + input.e-form__field#company(type="text", name="company", data-validation='len(2, 60);', placeholder="Enter your Company...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='industry') Industry + input.e-form__field#industry(type="text", name="industry", data-validation='len(2, 60);', placeholder="Enter your industry...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label Country + .e-select + label.e-select__label(for='country') + select.e-select__box#country(placeholder='Country', name='country', data-validation='len(1);') + option(value='') Country + each country in countries + option(value=country) #{country} + .error + span(data-validation-msg='len') + | This field cannot be blank. + + button.e-form__button.e-form__button--offset(type="submit") Create Account + + article#forgotPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-forgot-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | FORGOT YOUR PASSWORD? + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(title='Login' href='#/login') + .b-modal-window__main-block__body + .msg.hidden + p If you have entered a valid email, please check it for further instructions. + form.e-form(method='POST') p - | Yes. Please see the description of our - a(href='#') University Collaboration Program - | . - li - h2.blueHeader 10) Can I translate the Microsoft Data Gathering mobile client into my language? + | Please enter your username and email to reset your password. p - | Yes. Please get in touch with us at - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | and work with us to provide a translation of - | the software in your language. We will then push this out - | and make the language version available to all users. - article#login.hidden - section - div - h1 LOGIN - form - label.col-left - input(type='text', name='username', placeholder='Enter your username...') - label.col-right - input(type='password', name='password', placeholder='Enter your password...') - .error - a(href='#/forgotPassword') Forgot your password? - button(type='submit') Login - article#register.hidden - section - div - h1 REGISTER - form(action='signup', met='post', autocomplete="off") - label.col-left - input(type='text', placeholder='First name', name='firstName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - input(type='text', placeholder='Last name', name='lastName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 characters. - label.col-left - input(type='text', placeholder='Username', name='username', data-validation='len(5,13);isAlpha;uniqeUsrName;') - .error - span(data-validation-msg='uniqeUsrName') - | This username is already used. - span(data-validation-msg='len') - | This field must have at least 5 and cannot be longer than 13 characters. - span(data-validation-msg='isAlpha') - | Nickname can contain only numbers, periods and Latin letters. - label.col-right - input(type='text', placeholder='Email', name='email', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - label.col-left - input(type='password', placeholder='Password', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm password', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - label.col-left - input(type='text', placeholder='Phone number', name='phone', data-validation='len(10,15);isNumber;') - .error - span(data-validation-msg='len') - | This field must have at least 10 and cannot be longer than 15 characters. - span(data-validation-msg='isNumber') - | This is not a valid phone number. - label.col-right - input(type='text', placeholder='Company', name='company', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-left - input(type='text', placeholder='Industry', name='industry', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - select(placeholder='Country', name='country', data-validation='len(1);') - option(value='') Country - each country in countries - option(value=country) #{country} - .error - span(data-validation-msg='len') - | This field cannot be blank. - button(type='submit') Create Account - article#forgotPassword.hidden - section - div - h1 FORGOT YOUR PASSWORD? - .msg.hidden - p If you have entered a valid email, please check it for further instructions. - form - p - | Please enter your username and email to reset your password. - p - | If you forgot your username, please enter your email - | only and we will send all usernames related to this email. - label.col-left - input(type='text', name='username', placeholder='Username...') - label.col-right - input(type='text', name='email', placeholder='Email...', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - button(type='submit') Proceed - article#resetPassword.hidden - section - div - h1 RESET PASSWORD - form - label.col-left - input(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - button(type='submit') Apply - article#resetPasswordError.hidden - section - div - h1 RESET PASSWORD - .msg - p Password reset token is invalid or has expired. - - .modal.success-registration.hidden - .overlay - .window - .window-body - div You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder - input(type="button" value="OK") + | If you forgot your username, please enter your email + | only and we will send all usernames related to this email. + label.e-form__label(for='username_forgot-pass') + Username + input.e-form__field#username_forgot-pass(type='text', name='username', placeholder='Username...' label='Username') + label.e-form__label(for='email_forgot-pass') + Password + input.e-form__field#email_forgot-pass(type='text', name='email', placeholder='Email...', data-validation='isEmail;') + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + button.e-form__button(type='submit') Proceed + article#resetPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(title='Login' href='#/login') + .b-modal-window__main-block__body + form.e-form(method='POST', autocomplete="off") + label.e-form__label(for='password_reset-pass') + input.e-form__field#password_reset-pass(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + label.e-form__label(for='confirmpass_reset-pass') + input.e-form__field#confirmpass_reset-pass(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') + .error + span(data-validation-msg='isMatch') + | Passwords do not match + button.e-form__button(type='submit') Apply + article#resetPasswordError.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass-error + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(title='Reset password' href='#/resetPassword') + .b-modal-window__main-block__body + .modal.success-registration.hidden + .msg + p Password reset token is invalid or has expired. + + article#successRegistration.hidden + .b-modal-window + .b-modal-window__main-block.b-success-registration + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | Successfully Registration + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(title='Register' href="#/register") + .b-modal-window__main-block__body + .modal.success-registration + .msg + p You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder + button.b-success-registration__btn(type="button") + a(href='#/login') + span.fa.fa-check.b-success-registration__btn--icon + span() OK + .b-page__footer + ul.b-page__footer__box + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/policy/privacy-policy/') + | Privacy Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/cookie/cookie-policy/') + | Cookie Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/service-terms/service-terms/') + | Service Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='https://github.com/nokiadatagathering') + | Code diff --git a/app/views/getStarted/jade/ru/error404.jade b/app/views/getStarted/jade/ru/error404.jade index 0f2e74a..6d80ba9 100644 --- a/app/views/getStarted/jade/ru/error404.jade +++ b/app/views/getStarted/jade/ru/error404.jade @@ -1,4 +1,4 @@ -!!! +doctype html html head title= title @@ -6,7 +6,7 @@ html meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') meta(name='viewport', content='initial-scale=1.0') - link(rel="stylesheet" type="text/css" href="/resources/stylesheets/404.css") + link(rel="stylesheet" type="text/css" href="/styles/404.css") body div(class="content") diff --git a/app/views/getStarted/jade/ru/home.jade b/app/views/getStarted/jade/ru/home.jade index a17a108..fc3782c 100644 --- a/app/views/getStarted/jade/ru/home.jade +++ b/app/views/getStarted/jade/ru/home.jade @@ -1,695 +1,904 @@ -!!! 5 +doctype html html head title= title - include ../../../../../web/index.js - include ../../../../../web/resources/stylesheets/style.css + script(src='home.js') + link(rel='stylesheet' href='styles/home.css') + link(rel='stylesheet' href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ) meta(charset='utf-8') body - header#mainMenu - nav - a(href='#') - img(src='../resources/icons/lolgo-30px.png') - h1 - | MICROSOFT - b  DATA GATHERING - ul - li - a(href='#/getStarted') Старт - li - a(href='#/useCases') Прецеденты - li - a(href='#/openSource') Open Source - li - a(href='#/support') Поддержка - li - a.language-select #{language}  - ul.dropdown - each lang in languages - li(value=lang.value) #{lang.text} - a(href='#/login') Логин - | / - a(href='#/register') Регистрация - article#home.hidden - section.headDescrip - div - | Microsoft Data Gathering offers organizations a fast, - br - | accurate, cost effective and - br - | user-friendly way to collect data using mobile devices. - section.contentDescrip - div - .col-left - p - | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central location, - | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the ability - | to make crucial decisions. - p - | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from - | the field. The more time-critical the need for data and the more remote the location, the more organizations - | can benefit from a mobile phone based solution. - p - | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, including - | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. - p - | Because mobile devices can transmit data even from remote locations, the information collected can be available - | for analysis in near-real time. - .col-right - img(src='../resources/images/collage.jpg') - section#instruction - div - h2 HOW IT WORKS - ul - .col-left - li - a(href='#/getStarted#step1') - img(src='../resources/images/howitworks_1.png') - span 1 - span + .g-page-wrapper + .b-page__head-line + .b-line-bit.b-line-bit--red + .b-line-bit.b-line-bit--green + .b-line-bit.b-line-bit--blue + .b-line-bit.b-line-bit--yellow + div + header.b-page__header + .b-head-logo + a.b-logo__title(href='#/home') + img.b-logo__img(src='assets/images/logo-30px.png' + alt='Microsoft Data Gathering Icon') + span Microsoft Data Gathering + .b-menu + nav.b-menu-nav + a.b-menu-nav__link(href='#/getStarted') + | Get Started + a.b-menu-nav__link(href='#/useCases') + | Use Cases + a.b-menu-nav__link(href='#/openSource') + | Open Source + a.b-menu-nav__link(href='#/support') + | Support + .b-account-menu + a.language-select.b-account-menu__locale(href='#') #{language}  + ul.dropdown + each lang in languages + li: a.b-account-menu__language(href='#' value=lang.value title=lang.title lang=lang.value) + span.hide-text #{lang.title} + span.screnreder-ignore(role='presentation' aria-hidden='true') #{lang.text} + .b-account-menu__user + a(href='#/login') Login + | / + a(href='#/register') Register + article#home.hidden + .b-content-header + h1.b-content-header__title + | Microsoft Data Gathering + p.b-content-header__text + | Offers organizations a fast, accurate, cost effective and + br + | user-friendly way to collect data using mobile devices. + .b-page__line + .b-content.b-content--line.b-content--main + .b-content--main__article + p.b-content--main__article__indent + | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central + | location, + | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the + | ability + | to make crucial decisions. + p.b-content--main__article__indent + | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from + | the field. The more time-critical the need for data and the more remote the location, the more organizations + | can benefit from a mobile phone based solution. + p.b-content--main__article__indent + | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, + | including + | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. + p.b-content--main__article__indent + | Because mobile devices can transmit data even from remote locations, the information collected can be available + | for analysis in near-real time. + .b-content-main__image + img(src='../assets/images/collage.jpg' + alt='Pictures of MDG in use') + .b-page__line + .b-content.b-content--line + h2.b-content-title + | How It Works + .b-content__col-left + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_1.png' + alt='First step of how MDG works. Create a questionnaire') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 1 + span.b-content__col-left__item__caption__text--blue | Create a questionnaire on br | the survey editor - li - a(href='#/getStarted#step2') - img(src='../resources/images/howitworks_2.png') - span 2 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_2.png' + alt='Second step of how MDG works. Publish the data for data collectors.') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 2 + span.b-content__col-left__item__caption__text--blue | Publish the data for data br | collectors - li - a(href='#/getStarted#step3') - img(src='../resources/images/howitworks_3.png') - span 3 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_3.png' + alt='Third step of how MDG works. Fill in the questionnaire on the device') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 3 + span.b-content__col-left__item__caption__text--blue | Fill in the questionnaire on br - | your mobile device - .col-right - li - a(href='#/getStarted#step4') - img(src='../resources/images/howitworks_4.png') - span 4 - span + | your mobile device + .b-content__col-right + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_4.png' + alt='Fourth step of how MDG works. Send your data to the server') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 4 + span.b-content__col-right__item__caption__text--blue | Send your data to the br - | server over the mobile - br - | network - li - a(href='#/getStarted#step5') - img(src='../resources/images/howitworks_5.png') - span 5 - span + | server over the mobile network + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_5.png' + alt='Fifth step of how MDG works. View, map or export your data') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 5 + span.b-content__col-right__item__caption__text--blue | View, map, and export br | your data - section.videoBlock - div - p - i - | This video is about the use of Microsoft Data Gathering to - b.bold combat dengue fever - | in Amazonas State, Brazil. - iframe.video(src='//www.youtube.com/embed/kP1v9Snz6HA') - section#benefits - div - h2 BENEFITS - ul - .col-left - li - img(src='../resources/icons/speed.png') - h3 Speed - | Compared to using paper forms, mobile solutions cut down delays - | caused by transportation and manual digitalization of collected - | data. - li - img(src='../resources/icons/cost-efficiency.png') - h3 Cost efficiency - | Transportation and logistics costs are reduced, as are the needs - | for manual data entry and cleaning. There is also a cost of - | inaction saved with the ability to make critical decisions and - | react rapidly. - .col-right - li - img(src='../resources/icons/accuracy.png') - h3 Accuracy - | Data entry occurs at the point of collection, without needing to - | transcribe hand-written information. This lowers the frequency of - | transcription and data entry errors. - li - img(src='../resources/icons/usability.png') - h3 Usability - | Mobile phones are small, easy to carry, have battery longevity, - | and enable the capture of rich data such as GPS location tags - | and images. - section#awards - div - .col-left - h2 AWARDS - ul - li - b 2012 - | : Microsoft Data Gathering was a Featured Project of the - br - | Month for July in the Developer Community Blog. - li - b 2011 - | : Microsoft Data Gathering won the Justmeans Social - br - | Innovation Award in the category "Philanthropy: Most Strategic - br - | Use of Philanthropic Funds". - li - | The Justmeans international awards program is considered one of - | the top honours in the field of sustainability, giving recognition to - | companies implementing groundbreaking strategies and programs - | that drive social and environmental innovation. - .col-right - h2 ACKNOWLEDGEMENTS - p - | We would like to extend our thanks to these organizations, which - br - | have been instrumental in getting Microsoft Data Gathering to - br - | where it is today. - ul.markedList - li - a(href='http://www.indt.org/?lang=en') Nokia Technology Institute - li - a(href='http://www.uonbi.ac.ke/') University of Nairobi - li - a(href='http://cmri.shu.edu/') The Center for Mobile Research and Innovation - li - a(href='http://www.ayalafoundation.org/') The Ayala Foundation - ul#footer - li - a(href='http://www.nokia.com/global/privacy/privacy/policy/privacy-policy/') Privacy Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/cookie/cookie-policy/') Cookie Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/service-terms/nokia-service-terms/') Service Policy - li - a(href="https://github.com/nokiadatagathering") Code - article#getStarted.hidden - section - div - h1 GET STARTED - p + .b-page__line + .b-content.b-content--line + h2.b-content-title#benefits + | Benefits + .b-content__col-left + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits1.png' + alt='Compared to using paper forms, mobile solutions cut down delays') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Speed + p.b-content__col-left__item__caption__text + | Compared to using paper forms, mobile solutions cut down delays + | caused by transportation and manual digitalization of collected + | data. + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits2.png' + alt='Transportation and logistics costs are reduced') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Cost efficiency + p.b-content__col-left__item__caption__text + | Transportation and logistics costs are reduced, as are the needs + | for manual data entry and cleaning. There is also a cost of + | inaction saved with the ability to make critical decisions and + | react rapidly. + | data. + .b-content__col-right + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits3.png' + alt='Data entry occurs at the point of collection') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Accuracy + p.b-content__col-right__item__caption__text + | Data entry occurs at the point of collection, without needing to + | transcribe hand-written information. This lowers the frequency of + | transcription and data entry errors. + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits4.png' + alt='Mobile devices are easy to carry') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Usability + p.b-content__col-right__item__caption__text + | Mobile phones are small, easy to carry, have battery longevity, + | and enable the capture of rich data such as GPS location tags + | and images. + .b-page__line + .b-content.b-content-line + .b-content__col-left + h2.b-content-title Awards + p.b-content__paragraph + b 2012 + | Microsoft Data Gathering was a Featured Project of the + br + | Month for July in the Developer Community Blog. + p.b-content__paragraph + b 2011 + | Microsoft Data Gathering won the Justmeans Social + br + | Innovation Award in the category "Philanthropy: Most Strategic + br + | Use of Philanthropic Funds". + p.b-content__paragraph + | The Justmeans international awards program is considered one of + br + | the top honours in the field of sustainability, giving recognition to + br + | companies implementing groundbreaking strategies and programs + br + | that drive social and environmental innovation. + br + .b-content__col-right + .b-content__col-right__item + h2.b-content-title Acknowledgements + p.b-content__paragraph + | We would like to extend our thanks to these organizations, which + br + | have been instrumental in getting Microsoft Data Gathering to + br + | where it is today. + .b-content--acknowledge-list + a.b-content--acknowledge-list__link(href='http://www.indt.org/?lang=en', target='_blank') Nokia Technology Institute + a.b-content--acknowledge-list__link(href='http://www.uonbi.ac.ke/', target='_blank') University of Nairobi + a.b-content--acknowledge-list__link(href='http://cmri.shu.edu/', target='_blank') The Center for Mobile Research and Innovation + a.b-content--acknowledge-list__link(href='http://www.ayalafoundation.org/', target='_blank') The Ayala Foundation + + article#getStarted.hidden + .b-content-header + h1.b-content-header__title + | Get Started + p.b-content-header__text | If you have your own server and wish to migrate your data - | to this release of MDG the tool to do that is available - a(href="http://github.com/nokiadatagathering/ndg-migration") here - ul - li(data-step='step1') - img(src='../resources/images/getstarted_step1.png') - h2 Step 1: Register to the Microsoft Data Gathering Playground Server - p - | The first thing you need to do is to fill in the user registration form and create - | an account on the Microsoft Data Gathering playground server. You can do this by - | clicking - a(href='#/register') register on the homepage - | . - li(data-step='step2') - img(src='../resources/images/getstarted_step2.png') - h2 Step 2: Create a survey - p - | After you've confirmed your account and logged in to the server, you can start - | writing your own questionnaire using the survey editor. You can choose different - | question types, set default answers or limits and even use skip logic to write your - | questionnaire. - li(data-step='step3') - img(src='../resources/images/getstarted_step3.png') - h2 Step 3: Download the Microsoft Data Gathering mobile application - p - | Download and install one of the Microsoft Data Gathering mobile applications. - p - i - | Please note that until the branding change is completed please use the server https://nokiadatagathering.net in the app settings. - | Apps marked as 'New!' have been updated to use the https://microsoftdatagathering.net server and those marked as 'To be updated' still - | default to https://nokiadatagathering.net - p - | Download the - a(href="http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848") Windows Phone app - |. - img(src="../resources/icons/1-new.png") - em New! - br - | Download the - a(href="https://nokiadatagathering.net/ndg-ota/client/ndg.jad") Java app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - br - | Download the - a(href="http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42") Windows Tablet app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - li(data-step='step4') - img(src='../resources/images/getstarted_step4.png') - h2 Step 4: Add users and make your survey available to them - p - | You can publish your questionnaire to your field data collectors by adding them to - | your main account in the Users section, organizing them into groups and giving - | them different access permissions. You can make your questionnaire available to - | as many users as you like. You can also send SMS notifications to your user groups. - li(data-step='step5') - img(src='../resources/images/getstarted_step5.png') - h2 Step 5: Fill in the survey and send your results on your mobile device - p - | Open the Microsoft Data Gathering app you downloaded onto your mobile device - | in Step 3, and login with your user credentials. The surveys that were made available - | to you in Step 4 will be listed on the app. Just open the survey you want and create a new - | result by entering the requested data in the blank fields. - p - | You can send your results back to the server immediately, or save them on the - | phone to send later. - li(data-step='step6') - img(src='../resources/images/getstarted_step6.png') - h2 Step 6: View and export your results - p - | Go back to your Playground Server account and take a look at all the results you've received. - | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export - | your data in XLS or KML formats for further data analysis. - article#useCases.hidden - section - div - h1 USE CASES - ul - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Uganda - FAO - img(src='../resources/images/usecase_1.jpg') - .col-left - p - | As part of a regional initiative to reduce risk - | of drought in Eastern Africa with Early Warning Systems, - | the Food and Agriculture Organization of the United Nations - | (FAO) in Uganda is collecting geo-spatial and qualitative - | data about community animal health workers and providers - | of veterinary services and shops, among the rural pastoral - | communities of the Karamoja region. - p - | The move from paper-based questionnaires to Microsoft Data Gathering - | has allowed more efficient operations by reducing the time to produce - | Drought Bulletins by 50%. - p - | Furthermore, the project has enhanced participation of the community - | and the local government, and is supporting the capacity of the - | Department of Meteorology in issuing monthly weather updates - | for Karamoja. - p - | FAO's efforts were recognized by the World Bank in recent study - | on mobile applications for the agriculture and forestry sector, - | published in December 2013. - .col-right - blockquote + br + | to this release of MDG the tool to do that is available + a.b-content-header__text__link(href='http://github.com/nokiadatagathering/ndg-migration', target='_blank') here + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step1.png' + alt='Register to the Microsoft Data Gathering Playground Server') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 1 + | Register to the Microsoft Data Gathering Playground Server + p.b-step__right__paragraph + | The first thing you need to do is to fill in the user registration form and create + br + | an account on the Microsoft Data Gathering playground server. You can do this by + br + | clicking + a.b-step__right__paragraph__link(href='#/register') register on the homepage + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step2.png' + alt='Create a survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 2 + | Create a survey + p.b-step__right__paragraph + | After you've confirmed your account and logged in to the server, you can start + br + | writing your own questionnaire using the survey editor. You can choose different + br + | question types, set default answers or limits and even use skip logic to write your + br + | questionnaire. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step3.png' + alt='Download the MDG mobile application') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 3 + | Download the Microsoft Data Gathering mobile application + p.b-step__right__paragraph + | Download and install one of the Microsoft Data Gathering mobile applications. + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848', target='_blank') + | Windows Phone app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='https://nokiadatagathering.net/ndg-ota/client/ndg.jad', target='_blank') + | Java app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42', target='_blank') + | Windows Tablet app + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step4.png' + alt='Add users') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 4 + | Add users and make your survey available to them + p.b-step__right__paragraph + | You can publish your questionnaire to your field data collectors by adding them to + br + | your main account in the Users section, organizing them into groups and giving + br + | them different access permissions. You can make your questionnaire available to + br + | as many users as you like. You can also send SMS notifications to your user groups. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step5.png' + alt='Fill in the survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 5 + | Fill in the survey and send your results on your mobile device + p.b-step__right__paragraph + | Open the Microsoft Data Gathering app you downloaded onto your mobile device + br + | in Step 3, and login with your user credentials. The surveys that were made available + br + | to you in Step 4 will be listed on the app. Just open the survey you want and create a new + br + | result by entering the requested data in the blank fields. + p.b-step__right__paragraph + | You can send your results back to the server immediately, or save them on the + | phone to send later. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step6.png' + alt='View and Export') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 6 + | View and export your results + p.b-step__right__paragraph + | Go back to your Playground Server account and take a look at all the results you've received. + br + | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export + br + | your data in XLS or KML formats for further data analysis. + + + article#useCases.hidden + .b-content-header + h1.b-content-header__title + | Use Cases + p.b-content-header__text + | A Real Solution to Real Problems + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Reducing the risk to drought in vulnerable communities + br + | in Uganda - FAO + .b-content__col-left + p.b-content__paragraph + | As part of a regional initiative to reduce risk + | of drought in Eastern Africa with Early Warning Systems, + | the Food and Agriculture Organization of the United Nations + | (FAO) in Uganda is collecting geo-spatial and qualitative + | data about community animal health workers and providers + | of veterinary services and shops, among the rural pastoral + | communities of the Karamoja region. + p.b-content__paragraph + | The move from paper-based questionnaires to Microsoft Data Gathering + | has allowed more efficient operations by reducing the time to produce + | Drought Bulletins by 50%. + p.b-content__paragraph + | Furthermore, the project has enhanced participation of the community + | and the local government, and is supporting the capacity of the + | Department of Meteorology in issuing monthly weather updates + | for Karamoja. + p.b-content__paragraph + | FAO's efforts were recognized by the World Bank in recent study + | on mobile applications for the agriculture and forestry sector, + | published in December 2013. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_1.jpg' + alt='FAO in Eastern Africa') + blockquote.b-content__col-right__item__photo-caption | "We strive to improve the humanitarian situation by increasing | the coping capacities of populations vulnerable to recurrent | drought hazards and their effects through the provision of | multi-sectorial assistance in the Horn of Africa. | Microsoft Data Gathering is one of the most convenient | and cost-effective tools for collecting data from remote areas." - p - b Bernard 0. Mwesigwa - | , - | Programme Officer, M&E/Data Management, FAO Uganda - li - h2.nptlHeader Giving children the right to an identity in Kenya - Plan - img(src='../resources/images/usecase_2.jpg') - .col-left - p - | An official identity is the foundation for child rights, - | child protection and later child's ticket to services such as - | secondary schooling. Official identity is obtained by parents - | through birth registration. - p - | Today only five out of ten children in Kenya are registered. - p - | Poor accessibility to offices and officers, slow processing - | of both birth notifications and certificates, and costs involved - | together with a lack of incentives for parents to register their - | children contribute to the current situation. - p - | Plan together with the Ministry of Foreign Affairs in Finland is - | running a universal birth registration project in the Kwale district - | using Microsoft Data Gathering that has resulted in dramatically increased - | registration rates (from 30 to 68%). - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Bernard O. Mwesigwa, + br + | Programme Officer, M&E/Data Management, FAO Uganda + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Giving children the right to an identity in Kenya - Plan + .b-content__col-left + p.b-content__paragraph + | An official identity is the foundation for child rights, + | child protection and later child's ticket to services such as + | secondary schooling. Official identity is obtained by parents + | through birth registration. + p.b-content__paragraph + | Today only five out of ten children in Kenya are registered. + p.b-content__paragraph + | Poor accessibility to offices and officers, slow processing + | of both birth notifications and certificates, and costs involved + | together with a lack of incentives for parents to register their + | children contribute to the current situation. + p.b-content__paragraph + | Plan together with the Ministry of Foreign Affairs in Finland is + | running a universal birth registration project in the Kwale district + | using Microsoft Data Gathering that has resulted in dramatically increased + | registration rates (from 30 to 68%). + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_2.jpg' + alt='Plan in Kenya') + blockquote.b-content__col-right__item__photo-caption | "The use of ICTs including mobile technology has great potential to support | communities and governments in civil registration. Right to citizenship and | identity are fundamental prerequisites in development." - p - b Mika Välitalo - | , Manager - ICT for Development, Plan Finland - li - h2.nptlHeader - | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation - img(src='../resources/images/usecase_3.jpg') - .col-left - p - | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage - | Microsoft Data Gathering to help fight the spread of dengue fever - | and increase the effectiveness of treatment. - p - | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of - | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a - b.bold 93% cut - | in the number of cases. - p - | Microsoft Data Gathering helped the health workers to do their jobs, by making their - | reports both faster and more accurate. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Mika Välitalo, + br + | Manager - ICT for Development, Plan Finland + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation + .b-content__col-left + p.b-content__paragraph + | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage + | Microsoft Data Gathering to help fight the spread of dengue fever + | and increase the effectiveness of treatment. + p.b-content__paragraph + | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of + | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a + bold 93% cut + | in the number of cases. + p.b-content__paragraph + | Microsoft Data Gathering helped the health workers to do their jobs, by making their + | reports both faster and more accurate. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_3.jpg' + alt='Malaria in Amazonas') + blockquote.b-content__col-right__item__photo-caption | "Microsofts technology will help us to more rapidly identify and investigate the results | and symptoms of the surveyed population. The transmission of data immediately after | the interviews improves agility, increases public safety and avoids manual filling-in of forms." - p - b Agnaldo Costa - | , State Health Secretary of Amazonas State - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Kenya - FAO - img(src='../resources/images/usecase_4.jpg') - .col-left - p - | Accurate, timely and geo-tagged data on water points and sources is - | an important basis to reduce the impact of drought among vulnerable communities - | living in recurrent drought Food Agriculture Organization (FAO) is working along - | with their NGO partners in Greater Horn of Africa to alleviate the risk - | to drought among pastoralist communities. - p - | Microsoft Data Gathering is bringing mobile technology to water point surveys, - | reducing the amount of effort, time and cost to collect the information and - | enabling proper and timely preparedness activities. - p - | To date information from over 500 points has been collected - and more into come. - | The collected information is also published in Disaster Risk Reduction website - | for public good. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Agnaldo Costa, + br + | State Health Secretary of Amazonas State + .b-page__line + .b-content + h2.b-content-title + | Reducing the risk to drought in vulnerable communities in Kenya - FAO + .b-content__col-left + p.b-content__paragraph + | Accurate, timely and geo-tagged data on water points and sources is + | an important basis to reduce the impact of drought among vulnerable communities + | living in recurrent drought Food Agriculture Organization (FAO) is working along + | with their NGO partners in Greater Horn of Africa to alleviate the risk + | to drought among pastoralist communities. + p.b-content__paragraph + | Microsoft Data Gathering is bringing mobile technology to water point surveys, + | reducing the amount of effort, time and cost to collect the information and + | enabling proper and timely preparedness activities. + p.b-content__paragraph + | To date information from over 500 points has been collected - and more into come. + | The collected information is also published in Disaster Risk Reduction website + | for public good. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_4.jpg' + alt='Vulnerable communities in Kenya') + blockquote.b-content__col-right__item__photo-caption | "A huge burden is put on organizations, especially small scale NG05, | to collect, capture and process data timely for response and planning with | no supported technology tools. Microsoft Data Gathering provides a simple and | effective field solution with a centralized data administration system." - p - b Phillip Fong - | , Regional Data and Information Coordinator, FAO - article#openSource.hidden - section - div - h1 OPEN SOURCE - h2.nptlHeader Microsoft Data Gathering is an Open Source solution - .col-left - p - | We launched the open source version of Microsoft Data Gathering on 30 July 2010, - | making the source code available to anyone for download, deployment and development. - | There are no licensing costs for using the software, the code base is public, - | and development occurs in a collaborative and community-driven manner. - p - | The open source model also empowers universities and local developers to participate - | in creating tools and services on top of the core solution, helping to build local capacity. - | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of - | technology adoption. - p - | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, - | a family of permissive free software licenses, imposing minimal restrictions on the redistribution - | of covered software. - .col-right - p - | You can read the BSD license terms - a(href='http://opensource.org/licenses/BSD-2-Clause') here - | . - p - | The Microsoft Data Gathering Playground Server and the Java client - | are both licensed under the GNU Lesser General Public License, - a(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html') LGPL - | which allows developers and companies to use and integrate the software into - | their own (even proprietary) software without being required to release the source - | code of their own software-parts. - p - | Microsoft Data Gathering complies with Open Rosa standards for data collection. - p - | The Microsoft Data Gathering source code and documentation repository is at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - section - div - h1 GET INVOLVED - p - | Here's how you can be a part of the Microsoft Data Gathering - | developer and user community: - ul.markedList - li - a(href='https://github.com/nokiadatagathering') Get the source code - | and develop - | Microsoft Data Gathering - li - | Become a Microsoft Data Gathering service partner - li - | Help us plan future software releases - li - | Translate the Microsoft Data Gathering application into your language - article#support.hidden - section - div - h1 SUPPORT - p How to get support: - ul.markedList - li - a(href='/docs') Read the Microsoft Data Gathering user guide and documentation - li - | Access the - a(href='https://github.com/nokiadatagathering') Microsoft Data Gathering code repository - li - | Send an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - h1 FREQUENTLY ASKED QUESTIONS - ul.questionList - .col-left - li - h2.blueHeader 1) What are the benefits of mobile data collection? - p + p.b-content__col-right__item__photo-location + | Phillip Fong, + br + | Regional Data and Information Coordinator, FAO + article#openSource.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Open Source + p.b-content-header__text + | Microsoft Data Gathering is an Open Source solution + .b-page__line + .b-content + .b-content__col-left + p.b-content__paragraph + | We launched the open source version of Microsoft Data Gathering on 30 July 2010, + | making the source code available to anyone for download, deployment and development. + | There are no licensing costs for using the software, the code base is public, + | and development occurs in a collaborative and community-driven manner. + p.b-content__paragraph + | The open source model also empowers universities and local developers to participate + | in creating tools and services on top of the core solution, helping to build local capacity. + | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of + | technology adoption. + p.b-content__paragraph + | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, + | a family of permissive free software licenses, imposing minimal restrictions on the redistribution + | of covered software. + .b-content__col-right + .b-content__col-right__item + p.b-content__paragraph + | You can read the BSD license terms + a.b-content__paragraph__link(href='http://opensource.org/licenses/BSD-2-Clause', target='_blank') here + | . + p.b-content__paragraph + | The Microsoft Data Gathering Playground Server and the Java client + | are both licensed under the GNU Lesser General Public License, + a.b-content__paragraph__link(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html', target='_blank') LGPL + | which allows developers and companies to use and integrate the software into + | their own (even proprietary) software without being required to release the source + | code of their own software-parts. + p.b-content__paragraph + | Microsoft Data Gathering complies with Open Rosa standards for data collection. + p.b-content__paragraph + | The Microsoft Data Gathering source code and documentation repository is at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') https://github.com/nokiadatagathering + | . + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | Get Involved + p.b-content__paragraph + | Here's how you can be a part of the Microsoft Data Gathering + | developer and user community: + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') Get the source code + | and develop + | Microsoft Data Gathering + p.b-content__paragraph.b-content__paragraph--item + | Become a Microsoft Data Gathering service partner + p.b-content__paragraph.b-content__paragraph--item + | Help us plan future software releases + p.b-content__paragraph.b-content__paragraph--item + | Translate the Microsoft Data Gathering application into your language + + article#support.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Support + p.b-content-header__text + | Microsoft Data Gathering support page + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | How to get support + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='/docs') + | Read the Microsoft Data Gathering user guide and + | documentation + p.b-content__paragraph.b-content__paragraph--item + | Access the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering',, target='_blank') + | Microsoft Data Gathering code repository + p.b-content__paragraph.b-content__paragraph--item + | Send an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com') + | mdgspprt@microsoft.com + .b-page__line + .b-content + h2.b-content-title + | Frequently Asked Questions + .b-content__col-left + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 1 + | What are the benefits of mobile data collection? + p.b-content__paragraph | The key benefits of mobile data collection are speed, - | accuracy, cost efficiency and usability. Please see the - a(href='#/home') benefits section on the homepage + | accuracy, cost efficiency and usability. Please see the + a.b-content__paragraph__link(href='#') benefits section on the homepage | for more on benefits. - li - h2.blueHeader 2) How is Microsoft Data Gathering used in the field? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 2 + | How is Microsoft Data Gathering used in the field? + p.b-content__paragraph | When time is of the essence, rapidly available, accurate information | is critical for sound decision-making in any kind of organization. - p + p.b-content__paragraph | For example: In Brazil, the Amazonas State Health Department and | the Health Vigilance Foundation have used Microsoft Data Gathering | to monitor and control the spread of dengue fever. - p + p.b-content__paragraph | In East Africa, the Food and Agriculture Organization has conducted | water and livestock surveys to reduce the risk of vulnerable | communities to drought. - p + p.b-content__paragraph | In Kenya, Plan Finland has worked with the Kenyan government | to register births using Microsoft Data Gathering. - p - | For more on use cases, please see the - a(href='#') use cases page - | . - li - h2.blueHeader 3) Does it cost anything to use Microsoft Data Gathering? - p - | Nokia Data Gathering is an open source solution so there are no licensing fees - | or charges for using the software. For more on open source, please see the - a(href='#/openSource') open source page - | . - p + p.b-content__paragraph + | For more on use cases, please see the + a.b-content__paragraph__link(href='#/useCases') use cases page + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 3 + | Does it cost anything to use Microsoft Data Gathering? + p.b-content__paragraph + | Microsoft Data Gathering is an open source solution so there are no licensing fees + | or charges for using the software. For more on open source, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + p.b-content__paragraph | Of course, there are costs associated with the hardware | (mobile phones, servers, SIM cards) necessary for using - | Nokia Data Gathering, as well as the implementation of a data collection project. + | Microsoft Data Gathering, as well as the implementation of a data collection project. | These costs must be scoped and borne by the organization using the solution. - li - h2.blueHeader 4) What are the license terms for Microsoft Data Gathering? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 4 + | What are the license terms for Microsoft Data Gathering? + p.b-content__paragraph | The Microsoft Data Gathering Windows Phone client is licensed under the open source | Berkeley Software Distribution (BSD) License family. The Microsoft | Data Gathering Playground Server and the Java client are both licensed under | the GNU Lesser General Public License (ILGPL).Microsoft Data Gathering complies with | the standards of the OpenROSA Consortium on mobile data collection. - p - | For more on our licenses, please see the - a(href='#/openSource') open source page - | . - .col-right - li - h2.blueHeader 5) Which devices are compatible with Microsoft Data Gathering? - p + p.b-content__paragraph + | For more on our licenses, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + .b-content__col-right + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 5 + | Which devices are compatible with Microsoft Data Gathering? + p.b-content__paragraph | The Windows Phone version of the Microsft Data Gathering mobile client is | a Silverlight application for Windows Phone 7 and a Cordova/Sensa Touch application for | Windows Phone 8. The Windows Tablet version runs on Windows RT devices. The Java application runs | on Symbian and Nokia OS devices. - p + p.b-content__paragraph | If you have a specific query about device compatibility, please let - | us know by sending an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - li - h2.blueHeader 6) Where can I find the Microsoft Data Gathering source code? - p - | You can get the source code at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - li - h2.blueHeader 7) How can I host my own server data? - p + | us know by sending an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com' ) mdgspprt@microsoft.com + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 6 + | Where can I find the Microsoft Data Gathering source code? + p.b-content__paragraph + | You can get the source code at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 7 + | How can I host my own server data? + p.b-content__paragraph | The instructions for setting up and hosting your own - | server are contained in the - a(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README - | . - li - h2.blueHeader 8) What are the previous versions of Microsoft Data Gathering? - p - | Please see our - a(href='#') release archive - | . for more information on previous releases of - | Microsoft Data Gathering. - li - h2.blueHeader 9) Can students work on Microsoft Data Gathering? + | server are contained in the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 8 + | What are the previous versions of Microsoft Data Gathering? + p.b-content__paragraph + | Please see our + a.b-content__paragraph__link(href='#') release archive + | for more information on previous releases of + | Microsoft Data Gathering.. + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 9 + | Can students work on Microsoft Data Gathering? + p.b-content__paragraph + | Yes. Please see the description of our + a.b-content__paragraph__link(href='#') University Collaboration Program + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 10 + | Can I translate the Microsoft Data Gathering mobile client into my language? + p.b-content__paragraph + | Yes. Please get in touch with us at + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com', target='_blank') mdgspprt@microsoft.com + | and work with us to provide a translation of + | the software in your language. We will then push this out + | and make the language version available to all users. + + article#login.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Login + p.b-content-header__text + | Log in to the server below + .b-page__line + .b-content + form.e-form + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", placeholder="Enter your username...", tabindex="0") + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", placeholder="Enter your password...") + .error + button.e-form__button(type="submit" title='Login') Login + p.b-content__paragraph + a.b-content__paragraph__link(href="#/forgotPassword") Forgot your password? + p.b-content__paragraph + | Don’t have an account? + a.b-content__paragraph__link(href="#/register") Register here + + article#register.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Register + p.b-content-header__text + | Create an account below + .b-page__line + .b-content + form.e-form(action='signup', method='POST', autocomplete="off") + .b-form-row + .b-form-row__col + label.e-form__label(for='firstName') First Name + input.e-form__field#firstName(type="text", name="firstName", data-validation='len(2, 60);', placeholder="Enter your First Name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label(for='lastName') Last name + input.e-form__field#lastName(type="text", name="lastName", data-validation='len(2, 60);', placeholder="Enter your Last name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", data-validation='len(5,13);isAlpha;uniqeUsrName;', placeholder="Enter your Username...") + .error + span(data-validation-msg='uniqeUsrName') + | This username is already used. + span(data-validation-msg='len') + | This field must have at least 5 and cannot be longer than 13 characters. + span(data-validation-msg='isAlpha') + | Nickname can contain only numbers, periods and Latin letters. + .b-form-row__col + label.e-form__label(for='email') Email + input.e-form__field#email(type="email", name="email", data-validation='isEmail;', placeholder="Enter your Email...") + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + .b-form-row + .b-form-row__col + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", data-validation='len(8,20);', placeholder="Enter your Password...") + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + .b-form-row__col + label.e-form__label(for='confirmpass') Confirm Password + input.e-form__field#confirmpass(type="password", name="confirmpass", data-validation='isMatch(password)', placeholder="Confirm your Password...") + .error + span(data-validation-msg='isMatch') + | Passwords do not match + .b-form-row + .b-form-row__col + label.e-form__label(for='phone') Phone Number + input.e-form__field#phone(type="text", name="phone", data-validation='len(10,15);isNumber;', placeholder="Enter your Phone Number...") + .error + span(data-validation-msg='len') + | This field must have at least 10 and cannot be longer than 15 characters. + span(data-validation-msg='isNumber') + | This is not a valid phone number. + .b-form-row__col + label.e-form__label(for='company') Company + input.e-form__field#company(type="text", name="company", data-validation='len(2, 60);', placeholder="Enter your Company...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='industry') Industry + input.e-form__field#industry(type="text", name="industry", data-validation='len(2, 60);', placeholder="Enter your industry...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label Country + .e-select + label.e-select__label(for='country') + select.e-select__box#country(placeholder='Country', name='country', data-validation='len(1);') + option(value='') Country + each country in countries + option(value=country) #{country} + .error + span(data-validation-msg='len') + | This field cannot be blank. + + button.e-form__button.e-form__button--offset(type="submit") Create Account + + article#forgotPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-forgot-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | FORGOT YOUR PASSWORD? + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/login') + .b-modal-window__main-block__body + .msg.hidden + p If you have entered a valid email, please check it for further instructions. + form.e-form(method='POST') p - | Yes. Please see the description of our - a(href='#') University Collaboration Program - | . - li - h2.blueHeader 10) Can I translate the Microsoft Data Gathering mobile client into my language? + | Please enter your username and email to reset your password. p - | Yes. Please get in touch with us at - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | and work with us to provide a translation of - | the software in your language. We will then push this out - | and make the language version available to all users. - article#login.hidden - section - div - h1 LOGIN - form - label.col-left - input(type='text', name='username', placeholder='Enter your username...') - label.col-right - input(type='password', name='password', placeholder='Enter your password...') - .error - a(href='#/forgotPassword') Forgot your password? - button(type='submit') Login - article#register.hidden - section - div - h1 REGISTER - form(action='signup', met='post', autocomplete="off") - label.col-left - input(type='text', placeholder='First name', name='firstName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - input(type='text', placeholder='Last name', name='lastName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 characters. - label.col-left - input(type='text', placeholder='Username', name='username', data-validation='len(5,13);isAlpha;uniqeUsrName;') - .error - span(data-validation-msg='uniqeUsrName') - | This username is already used. - span(data-validation-msg='len') - | This field must have at least 5 and cannot be longer than 13 characters. - span(data-validation-msg='isAlpha') - | Nickname can contain only numbers, periods and Latin letters. - label.col-right - input(type='text', placeholder='Email', name='email', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - label.col-left - input(type='password', placeholder='Password', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm password', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - label.col-left - input(type='text', placeholder='Phone number', name='phone', data-validation='len(10,15);isNumber;') - .error - span(data-validation-msg='len') - | This field must have at least 10 and cannot be longer than 15 characters. - span(data-validation-msg='isNumber') - | This is not a valid phone number. - label.col-right - input(type='text', placeholder='Company', name='company', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-left - input(type='text', placeholder='Industry', name='industry', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - select(placeholder='Country', name='country', data-validation='len(1);') - option(value='') Country - each country in countries - option(value=country) #{country} - .error - span(data-validation-msg='len') - | This field cannot be blank. - button(type='submit') Create Account - article#forgotPassword.hidden - section - div - h1 FORGOT YOUR PASSWORD? - .msg.hidden - p If you have entered a valid email, please check it for further instructions. - form - p - | Please enter your username and email to reset your password. - p - | If you forgot your username, please enter your email - | only and we will send all usernames related to this email. - label.col-left - input(type='text', name='username', placeholder='Username...') - label.col-right - input(type='text', name='email', placeholder='Email...', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - button(type='submit') Proceed - article#resetPassword.hidden - section - div - h1 RESET PASSWORD - form - label.col-left - input(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - button(type='submit') Apply - article#resetPasswordError.hidden - section - div - h1 RESET PASSWORD - .msg - p Password reset token is invalid or has expired. - - .modal.success-registration.hidden - .overlay - .window - .window-body - div You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder - input(type="button" value="OK") + | If you forgot your username, please enter your email + | only and we will send all usernames related to this email. + label.e-form__label(for='username_forgot-pass') + input.e-form__field#username_forgot-pass(type='text', name='username', placeholder='Username...') + label.e-form__label(for='email_forgot-pass') + input.e-form__field#email_forgot-pass(type='text', name='email', placeholder='Email...', data-validation='isEmail;') + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + button.e-form__button(type='submit') Proceed + article#resetPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/login') + .b-modal-window__main-block__body + form.e-form(method='POST', autocomplete="off") + label.e-form__label(for='password_reset-pass') + input.e-form__field#password_reset-pass(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + label.e-form__label(for='confirmpass_reset-pass') + input.e-form__field#confirmpass_reset-pass(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') + .error + span(data-validation-msg='isMatch') + | Passwords do not match + button.e-form__button(type='submit') Apply + article#resetPasswordError.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass-error + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/resetPassword') + .b-modal-window__main-block__body + .modal.success-registration.hidden + .msg + p Password reset token is invalid or has expired. + + article#successRegistration.hidden + .b-modal-window + .b-modal-window__main-block.b-success-registration + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | Successfully Registration + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href="#/register") + .b-modal-window__main-block__body + .modal.success-registration + .msg + p You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder + button.b-success-registration__btn(type="button") + a(href='#/login') + span.fa.fa-check.b-success-registration__btn--icon + span() OK + .b-page__footer + ul.b-page__footer__box + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/policy/privacy-policy/') + | Privacy Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/cookie/cookie-policy/') + | Cookie Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/service-terms/service-terms/') + | Service Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='https://github.com/nokiadatagathering') + | Code diff --git a/app/views/getStarted/jade/vi/error404.jade b/app/views/getStarted/jade/vi/error404.jade index 43dd92b..c753292 100644 --- a/app/views/getStarted/jade/vi/error404.jade +++ b/app/views/getStarted/jade/vi/error404.jade @@ -1,4 +1,4 @@ -!!! +doctype html html head title= title @@ -6,7 +6,7 @@ html meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') meta(name='viewport', content='initial-scale=1.0') - link(rel="stylesheet" type="text/css" href="/resources/stylesheets/404.css") + link(rel="stylesheet" type="text/css" href="/styles/404.css") body div(class="content") diff --git a/app/views/getStarted/jade/vi/home.jade b/app/views/getStarted/jade/vi/home.jade index 1ca225a..fc3782c 100644 --- a/app/views/getStarted/jade/vi/home.jade +++ b/app/views/getStarted/jade/vi/home.jade @@ -1,695 +1,904 @@ -!!! 5 +doctype html html head title= title - include ../../../../../web/index.js - include ../../../../../web/resources/stylesheets/style.css + script(src='home.js') + link(rel='stylesheet' href='styles/home.css') + link(rel='stylesheet' href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ) meta(charset='utf-8') body - header#mainMenu - nav - a(href='#') - img(src='../resources/icons/lolgo-30px.png') - h1 - | MICROSOFT - b  DATA GATHERING - ul - li - a(href='#/getStarted') Get Started - li - a(href='#/useCases') Use Cases - li - a(href='#/openSource') Open Source - li - a(href='#/support') Support - li - a.language-select #{language}  - ul.dropdown - each lang in languages - li(value=lang.value) #{lang.text} - a(href='#/login') Login - | / - a(href='#/register') Register - article#home.hidden - section.headDescrip - div - | Microsoft Data Gathering offers organizations a fast, - br - | accurate, cost effective and - br - | user-friendly way to collect data using mobile devices. - section.contentDescrip - div - .col-left - p - | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central location, - | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the ability - | to make crucial decisions. - p - | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from - | the field. The more time-critical the need for data and the more remote the location, the more organizations - | can benefit from a mobile phone based solution. - p - | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, including - | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. - p - | Because mobile devices can transmit data even from remote locations, the information collected can be available - | for analysis in near-real time. - .col-right - img(src='../resources/images/collage.jpg') - section#instruction - div - h2 HOW IT WORKS - ul - .col-left - li - a(href='#/getStarted#step1') - img(src='../resources/images/howitworks_1.png') - span 1 - span + .g-page-wrapper + .b-page__head-line + .b-line-bit.b-line-bit--red + .b-line-bit.b-line-bit--green + .b-line-bit.b-line-bit--blue + .b-line-bit.b-line-bit--yellow + div + header.b-page__header + .b-head-logo + a.b-logo__title(href='#/home') + img.b-logo__img(src='assets/images/logo-30px.png' + alt='Microsoft Data Gathering Icon') + span Microsoft Data Gathering + .b-menu + nav.b-menu-nav + a.b-menu-nav__link(href='#/getStarted') + | Get Started + a.b-menu-nav__link(href='#/useCases') + | Use Cases + a.b-menu-nav__link(href='#/openSource') + | Open Source + a.b-menu-nav__link(href='#/support') + | Support + .b-account-menu + a.language-select.b-account-menu__locale(href='#') #{language}  + ul.dropdown + each lang in languages + li: a.b-account-menu__language(href='#' value=lang.value title=lang.title lang=lang.value) + span.hide-text #{lang.title} + span.screnreder-ignore(role='presentation' aria-hidden='true') #{lang.text} + .b-account-menu__user + a(href='#/login') Login + | / + a(href='#/register') Register + article#home.hidden + .b-content-header + h1.b-content-header__title + | Microsoft Data Gathering + p.b-content-header__text + | Offers organizations a fast, accurate, cost effective and + br + | user-friendly way to collect data using mobile devices. + .b-page__line + .b-content.b-content--line.b-content--main + .b-content--main__article + p.b-content--main__article__indent + | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central + | location, + | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the + | ability + | to make crucial decisions. + p.b-content--main__article__indent + | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from + | the field. The more time-critical the need for data and the more remote the location, the more organizations + | can benefit from a mobile phone based solution. + p.b-content--main__article__indent + | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, + | including + | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. + p.b-content--main__article__indent + | Because mobile devices can transmit data even from remote locations, the information collected can be available + | for analysis in near-real time. + .b-content-main__image + img(src='../assets/images/collage.jpg' + alt='Pictures of MDG in use') + .b-page__line + .b-content.b-content--line + h2.b-content-title + | How It Works + .b-content__col-left + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_1.png' + alt='First step of how MDG works. Create a questionnaire') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 1 + span.b-content__col-left__item__caption__text--blue | Create a questionnaire on br | the survey editor - li - a(href='#/getStarted#step2') - img(src='../resources/images/howitworks_2.png') - span 2 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_2.png' + alt='Second step of how MDG works. Publish the data for data collectors.') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 2 + span.b-content__col-left__item__caption__text--blue | Publish the data for data br | collectors - li - a(href='#/getStarted#step3') - img(src='../resources/images/howitworks_3.png') - span 3 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_3.png' + alt='Third step of how MDG works. Fill in the questionnaire on the device') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 3 + span.b-content__col-left__item__caption__text--blue | Fill in the questionnaire on br - | your mobile device - .col-right - li - a(href='#/getStarted#step4') - img(src='../resources/images/howitworks_4.png') - span 4 - span + | your mobile device + .b-content__col-right + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_4.png' + alt='Fourth step of how MDG works. Send your data to the server') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 4 + span.b-content__col-right__item__caption__text--blue | Send your data to the br - | server over the mobile - br - | network - li - a(href='#/getStarted#step5') - img(src='../resources/images/howitworks_5.png') - span 5 - span + | server over the mobile network + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_5.png' + alt='Fifth step of how MDG works. View, map or export your data') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 5 + span.b-content__col-right__item__caption__text--blue | View, map, and export br | your data - section.videoBlock - div - p - i - | This video is about the use of Microsoft Data Gathering to - b.bold combat dengue fever - | in Amazonas State, Brazil. - iframe.video(src='//www.youtube.com/embed/kP1v9Snz6HA') - section#benefits - div - h2 BENEFITS - ul - .col-left - li - img(src='../resources/icons/speed.png') - h3 Speed - | Compared to using paper forms, mobile solutions cut down delays - | caused by transportation and manual digitalization of collected - | data. - li - img(src='../resources/icons/cost-efficiency.png') - h3 Cost efficiency - | Transportation and logistics costs are reduced, as are the needs - | for manual data entry and cleaning. There is also a cost of - | inaction saved with the ability to make critical decisions and - | react rapidly. - .col-right - li - img(src='../resources/icons/accuracy.png') - h3 Accuracy - | Data entry occurs at the point of collection, without needing to - | transcribe hand-written information. This lowers the frequency of - | transcription and data entry errors. - li - img(src='../resources/icons/usability.png') - h3 Usability - | Mobile phones are small, easy to carry, have battery longevity, - | and enable the capture of rich data such as GPS location tags - | and images. - section#awards - div - .col-left - h2 AWARDS - ul - li - b 2012 - | : Microsoft Data Gathering was a Featured Project of the - br - | Month for July in the Developer Community Blog. - li - b 2011 - | : Microsoft Data Gathering won the Justmeans Social - br - | Innovation Award in the category "Philanthropy: Most Strategic - br - | Use of Philanthropic Funds". - li - | The Justmeans international awards program is considered one of - | the top honours in the field of sustainability, giving recognition to - | companies implementing groundbreaking strategies and programs - | that drive social and environmental innovation. - .col-right - h2 ACKNOWLEDGEMENTS - p - | We would like to extend our thanks to these organizations, which - br - | have been instrumental in getting Microsoft Data Gathering to - br - | where it is today. - ul.markedList - li - a(href='http://www.indt.org/?lang=en') Nokia Technology Institute - li - a(href='http://www.uonbi.ac.ke/') University of Nairobi - li - a(href='http://cmri.shu.edu/') The Center for Mobile Research and Innovation - li - a(href='http://www.ayalafoundation.org/') The Ayala Foundation - ul#footer - li - a(href='http://www.nokia.com/global/privacy/privacy/policy/privacy-policy/') Privacy Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/cookie/cookie-policy/') Cookie Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/service-terms/nokia-service-terms/') Service Policy - li - a(href="https://github.com/nokiadatagathering") Code - article#getStarted.hidden - section - div - h1 GET STARTED - p + .b-page__line + .b-content.b-content--line + h2.b-content-title#benefits + | Benefits + .b-content__col-left + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits1.png' + alt='Compared to using paper forms, mobile solutions cut down delays') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Speed + p.b-content__col-left__item__caption__text + | Compared to using paper forms, mobile solutions cut down delays + | caused by transportation and manual digitalization of collected + | data. + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits2.png' + alt='Transportation and logistics costs are reduced') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Cost efficiency + p.b-content__col-left__item__caption__text + | Transportation and logistics costs are reduced, as are the needs + | for manual data entry and cleaning. There is also a cost of + | inaction saved with the ability to make critical decisions and + | react rapidly. + | data. + .b-content__col-right + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits3.png' + alt='Data entry occurs at the point of collection') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Accuracy + p.b-content__col-right__item__caption__text + | Data entry occurs at the point of collection, without needing to + | transcribe hand-written information. This lowers the frequency of + | transcription and data entry errors. + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits4.png' + alt='Mobile devices are easy to carry') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Usability + p.b-content__col-right__item__caption__text + | Mobile phones are small, easy to carry, have battery longevity, + | and enable the capture of rich data such as GPS location tags + | and images. + .b-page__line + .b-content.b-content-line + .b-content__col-left + h2.b-content-title Awards + p.b-content__paragraph + b 2012 + | Microsoft Data Gathering was a Featured Project of the + br + | Month for July in the Developer Community Blog. + p.b-content__paragraph + b 2011 + | Microsoft Data Gathering won the Justmeans Social + br + | Innovation Award in the category "Philanthropy: Most Strategic + br + | Use of Philanthropic Funds". + p.b-content__paragraph + | The Justmeans international awards program is considered one of + br + | the top honours in the field of sustainability, giving recognition to + br + | companies implementing groundbreaking strategies and programs + br + | that drive social and environmental innovation. + br + .b-content__col-right + .b-content__col-right__item + h2.b-content-title Acknowledgements + p.b-content__paragraph + | We would like to extend our thanks to these organizations, which + br + | have been instrumental in getting Microsoft Data Gathering to + br + | where it is today. + .b-content--acknowledge-list + a.b-content--acknowledge-list__link(href='http://www.indt.org/?lang=en', target='_blank') Nokia Technology Institute + a.b-content--acknowledge-list__link(href='http://www.uonbi.ac.ke/', target='_blank') University of Nairobi + a.b-content--acknowledge-list__link(href='http://cmri.shu.edu/', target='_blank') The Center for Mobile Research and Innovation + a.b-content--acknowledge-list__link(href='http://www.ayalafoundation.org/', target='_blank') The Ayala Foundation + + article#getStarted.hidden + .b-content-header + h1.b-content-header__title + | Get Started + p.b-content-header__text | If you have your own server and wish to migrate your data - | to this release of MDG the tool to do that is available - a(href="http://github.com/nokiadatagathering/ndg-migration") here - ul - li(data-step='step1') - img(src='../resources/images/getstarted_step1.png') - h2 Step 1: Register to the Microsoft Data Gathering Playground Server - p - | The first thing you need to do is to fill in the user registration form and create - | an account on the Microsoft Data Gathering playground server. You can do this by - | clicking - a(href='#/register') register on the homepage - | . - li(data-step='step2') - img(src='../resources/images/getstarted_step2.png') - h2 Step 2: Create a survey - p - | After you've confirmed your account and logged in to the server, you can start - | writing your own questionnaire using the survey editor. You can choose different - | question types, set default answers or limits and even use skip logic to write your - | questionnaire. - li(data-step='step3') - img(src='../resources/images/getstarted_step3.png') - h2 Step 3: Download the Microsoft Data Gathering mobile application - p - | Download and install one of the Microsoft Data Gathering mobile applications. - p - i - | Please note that until the branding change is completed please use the server https://nokiadatagathering.net in the app settings. - | Apps marked as 'New!' have been updated to use the https://microsoftdatagathering.net server and those marked as 'To be updated' still - | default to https://nokiadatagathering.net - p - | Download the - a(href="http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848") Windows Phone app - |. - img(src="../resources/icons/1-new.png") - em New! - br - | Download the - a(href="https://nokiadatagathering.net/ndg-ota/client/ndg.jad") Java app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - br - | Download the - a(href="http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42") Windows Tablet app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - li(data-step='step4') - img(src='../resources/images/getstarted_step4.png') - h2 Step 4: Add users and make your survey available to them - p - | You can publish your questionnaire to your field data collectors by adding them to - | your main account in the Users section, organizing them into groups and giving - | them different access permissions. You can make your questionnaire available to - | as many users as you like. You can also send SMS notifications to your user groups. - li(data-step='step5') - img(src='../resources/images/getstarted_step5.png') - h2 Step 5: Fill in the survey and send your results on your mobile device - p - | Open the Microsoft Data Gathering app you downloaded onto your mobile device - | in Step 3, and login with your user credentials. The surveys that were made available - | to you in Step 4 will be listed on the app. Just open the survey you want and create a new - | result by entering the requested data in the blank fields. - p - | You can send your results back to the server immediately, or save them on the - | phone to send later. - li(data-step='step6') - img(src='../resources/images/getstarted_step6.png') - h2 Step 6: View and export your results - p - | Go back to your Playground Server account and take a look at all the results you've received. - | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export - | your data in XLS or KML formats for further data analysis. - article#useCases.hidden - section - div - h1 USE CASES - ul - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Uganda - FAO - img(src='../resources/images/usecase_1.jpg') - .col-left - p - | As part of a regional initiative to reduce risk - | of drought in Eastern Africa with Early Warning Systems, - | the Food and Agriculture Organization of the United Nations - | (FAO) in Uganda is collecting geo-spatial and qualitative - | data about community animal health workers and providers - | of veterinary services and shops, among the rural pastoral - | communities of the Karamoja region. - p - | The move from paper-based questionnaires to Microsoft Data Gathering - | has allowed more efficient operations by reducing the time to produce - | Drought Bulletins by 50%. - p - | Furthermore, the project has enhanced participation of the community - | and the local government, and is supporting the capacity of the - | Department of Meteorology in issuing monthly weather updates - | for Karamoja. - p - | FAO's efforts were recognized by the World Bank in recent study - | on mobile applications for the agriculture and forestry sector, - | published in December 2013. - .col-right - blockquote + br + | to this release of MDG the tool to do that is available + a.b-content-header__text__link(href='http://github.com/nokiadatagathering/ndg-migration', target='_blank') here + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step1.png' + alt='Register to the Microsoft Data Gathering Playground Server') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 1 + | Register to the Microsoft Data Gathering Playground Server + p.b-step__right__paragraph + | The first thing you need to do is to fill in the user registration form and create + br + | an account on the Microsoft Data Gathering playground server. You can do this by + br + | clicking + a.b-step__right__paragraph__link(href='#/register') register on the homepage + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step2.png' + alt='Create a survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 2 + | Create a survey + p.b-step__right__paragraph + | After you've confirmed your account and logged in to the server, you can start + br + | writing your own questionnaire using the survey editor. You can choose different + br + | question types, set default answers or limits and even use skip logic to write your + br + | questionnaire. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step3.png' + alt='Download the MDG mobile application') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 3 + | Download the Microsoft Data Gathering mobile application + p.b-step__right__paragraph + | Download and install one of the Microsoft Data Gathering mobile applications. + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848', target='_blank') + | Windows Phone app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='https://nokiadatagathering.net/ndg-ota/client/ndg.jad', target='_blank') + | Java app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42', target='_blank') + | Windows Tablet app + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step4.png' + alt='Add users') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 4 + | Add users and make your survey available to them + p.b-step__right__paragraph + | You can publish your questionnaire to your field data collectors by adding them to + br + | your main account in the Users section, organizing them into groups and giving + br + | them different access permissions. You can make your questionnaire available to + br + | as many users as you like. You can also send SMS notifications to your user groups. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step5.png' + alt='Fill in the survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 5 + | Fill in the survey and send your results on your mobile device + p.b-step__right__paragraph + | Open the Microsoft Data Gathering app you downloaded onto your mobile device + br + | in Step 3, and login with your user credentials. The surveys that were made available + br + | to you in Step 4 will be listed on the app. Just open the survey you want and create a new + br + | result by entering the requested data in the blank fields. + p.b-step__right__paragraph + | You can send your results back to the server immediately, or save them on the + | phone to send later. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step6.png' + alt='View and Export') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 6 + | View and export your results + p.b-step__right__paragraph + | Go back to your Playground Server account and take a look at all the results you've received. + br + | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export + br + | your data in XLS or KML formats for further data analysis. + + + article#useCases.hidden + .b-content-header + h1.b-content-header__title + | Use Cases + p.b-content-header__text + | A Real Solution to Real Problems + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Reducing the risk to drought in vulnerable communities + br + | in Uganda - FAO + .b-content__col-left + p.b-content__paragraph + | As part of a regional initiative to reduce risk + | of drought in Eastern Africa with Early Warning Systems, + | the Food and Agriculture Organization of the United Nations + | (FAO) in Uganda is collecting geo-spatial and qualitative + | data about community animal health workers and providers + | of veterinary services and shops, among the rural pastoral + | communities of the Karamoja region. + p.b-content__paragraph + | The move from paper-based questionnaires to Microsoft Data Gathering + | has allowed more efficient operations by reducing the time to produce + | Drought Bulletins by 50%. + p.b-content__paragraph + | Furthermore, the project has enhanced participation of the community + | and the local government, and is supporting the capacity of the + | Department of Meteorology in issuing monthly weather updates + | for Karamoja. + p.b-content__paragraph + | FAO's efforts were recognized by the World Bank in recent study + | on mobile applications for the agriculture and forestry sector, + | published in December 2013. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_1.jpg' + alt='FAO in Eastern Africa') + blockquote.b-content__col-right__item__photo-caption | "We strive to improve the humanitarian situation by increasing | the coping capacities of populations vulnerable to recurrent | drought hazards and their effects through the provision of | multi-sectorial assistance in the Horn of Africa. | Microsoft Data Gathering is one of the most convenient | and cost-effective tools for collecting data from remote areas." - p - b Bernard 0. Mwesigwa - | , - | Programme Officer, M&E/Data Management, FAO Uganda - li - h2.nptlHeader Giving children the right to an identity in Kenya - Plan - img(src='../resources/images/usecase_2.jpg') - .col-left - p - | An official identity is the foundation for child rights, - | child protection and later child's ticket to services such as - | secondary schooling. Official identity is obtained by parents - | through birth registration. - p - | Today only five out of ten children in Kenya are registered. - p - | Poor accessibility to offices and officers, slow processing - | of both birth notifications and certificates, and costs involved - | together with a lack of incentives for parents to register their - | children contribute to the current situation. - p - | Plan together with the Ministry of Foreign Affairs in Finland is - | running a universal birth registration project in the Kwale district - | using Microsoft Data Gathering that has resulted in dramatically increased - | registration rates (from 30 to 68%). - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Bernard O. Mwesigwa, + br + | Programme Officer, M&E/Data Management, FAO Uganda + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Giving children the right to an identity in Kenya - Plan + .b-content__col-left + p.b-content__paragraph + | An official identity is the foundation for child rights, + | child protection and later child's ticket to services such as + | secondary schooling. Official identity is obtained by parents + | through birth registration. + p.b-content__paragraph + | Today only five out of ten children in Kenya are registered. + p.b-content__paragraph + | Poor accessibility to offices and officers, slow processing + | of both birth notifications and certificates, and costs involved + | together with a lack of incentives for parents to register their + | children contribute to the current situation. + p.b-content__paragraph + | Plan together with the Ministry of Foreign Affairs in Finland is + | running a universal birth registration project in the Kwale district + | using Microsoft Data Gathering that has resulted in dramatically increased + | registration rates (from 30 to 68%). + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_2.jpg' + alt='Plan in Kenya') + blockquote.b-content__col-right__item__photo-caption | "The use of ICTs including mobile technology has great potential to support | communities and governments in civil registration. Right to citizenship and | identity are fundamental prerequisites in development." - p - b Mika Välitalo - | , Manager - ICT for Development, Plan Finland - li - h2.nptlHeader - | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation - img(src='../resources/images/usecase_3.jpg') - .col-left - p - | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage - | Microsoft Data Gathering to help fight the spread of dengue fever - | and increase the effectiveness of treatment. - p - | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of - | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a - b.bold 93% cut - | in the number of cases. - p - | Microsoft Data Gathering helped the health workers to do their jobs, by making their - | reports both faster and more accurate. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Mika Välitalo, + br + | Manager - ICT for Development, Plan Finland + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation + .b-content__col-left + p.b-content__paragraph + | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage + | Microsoft Data Gathering to help fight the spread of dengue fever + | and increase the effectiveness of treatment. + p.b-content__paragraph + | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of + | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a + bold 93% cut + | in the number of cases. + p.b-content__paragraph + | Microsoft Data Gathering helped the health workers to do their jobs, by making their + | reports both faster and more accurate. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_3.jpg' + alt='Malaria in Amazonas') + blockquote.b-content__col-right__item__photo-caption | "Microsofts technology will help us to more rapidly identify and investigate the results | and symptoms of the surveyed population. The transmission of data immediately after | the interviews improves agility, increases public safety and avoids manual filling-in of forms." - p - b Agnaldo Costa - | , State Health Secretary of Amazonas State - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Kenya - FAO - img(src='../resources/images/usecase_4.jpg') - .col-left - p - | Accurate, timely and geo-tagged data on water points and sources is - | an important basis to reduce the impact of drought among vulnerable communities - | living in recurrent drought Food Agriculture Organization (FAO) is working along - | with their NGO partners in Greater Horn of Africa to alleviate the risk - | to drought among pastoralist communities. - p - | Microsoft Data Gathering is bringing mobile technology to water point surveys, - | reducing the amount of effort, time and cost to collect the information and - | enabling proper and timely preparedness activities. - p - | To date information from over 500 points has been collected - and more into come. - | The collected information is also published in Disaster Risk Reduction website - | for public good. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Agnaldo Costa, + br + | State Health Secretary of Amazonas State + .b-page__line + .b-content + h2.b-content-title + | Reducing the risk to drought in vulnerable communities in Kenya - FAO + .b-content__col-left + p.b-content__paragraph + | Accurate, timely and geo-tagged data on water points and sources is + | an important basis to reduce the impact of drought among vulnerable communities + | living in recurrent drought Food Agriculture Organization (FAO) is working along + | with their NGO partners in Greater Horn of Africa to alleviate the risk + | to drought among pastoralist communities. + p.b-content__paragraph + | Microsoft Data Gathering is bringing mobile technology to water point surveys, + | reducing the amount of effort, time and cost to collect the information and + | enabling proper and timely preparedness activities. + p.b-content__paragraph + | To date information from over 500 points has been collected - and more into come. + | The collected information is also published in Disaster Risk Reduction website + | for public good. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_4.jpg' + alt='Vulnerable communities in Kenya') + blockquote.b-content__col-right__item__photo-caption | "A huge burden is put on organizations, especially small scale NG05, | to collect, capture and process data timely for response and planning with | no supported technology tools. Microsoft Data Gathering provides a simple and | effective field solution with a centralized data administration system." - p - b Phillip Fong - | , Regional Data and Information Coordinator, FAO - article#openSource.hidden - section - div - h1 OPEN SOURCE - h2.nptlHeader Microsoft Data Gathering is an Open Source solution - .col-left - p - | We launched the open source version of Microsoft Data Gathering on 30 July 2010, - | making the source code available to anyone for download, deployment and development. - | There are no licensing costs for using the software, the code base is public, - | and development occurs in a collaborative and community-driven manner. - p - | The open source model also empowers universities and local developers to participate - | in creating tools and services on top of the core solution, helping to build local capacity. - | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of - | technology adoption. - p - | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, - | a family of permissive free software licenses, imposing minimal restrictions on the redistribution - | of covered software. - .col-right - p - | You can read the BSD license terms - a(href='http://opensource.org/licenses/BSD-2-Clause') here - | . - p - | The Microsoft Data Gathering Playground Server and the Java client - | are both licensed under the GNU Lesser General Public License, - a(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html') LGPL - | which allows developers and companies to use and integrate the software into - | their own (even proprietary) software without being required to release the source - | code of their own software-parts. - p - | Microsoft Data Gathering complies with Open Rosa standards for data collection. - p - | The Microsoft Data Gathering source code and documentation repository is at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - section - div - h1 GET INVOLVED - p - | Here's how you can be a part of the Microsoft Data Gathering - | developer and user community: - ul.markedList - li - a(href='https://github.com/nokiadatagathering') Get the source code - | and develop - | Microsoft Data Gathering - li - | Become a Microsoft Data Gathering service partner - li - | Help us plan future software releases - li - | Translate the Microsoft Data Gathering application into your language - article#support.hidden - section - div - h1 SUPPORT - p How to get support: - ul.markedList - li - a(href='/docs') Read the Microsoft Data Gathering user guide and documentation - li - | Access the - a(href='https://github.com/nokiadatagathering') Microsoft Data Gathering code repository - li - | Send an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - h1 FREQUENTLY ASKED QUESTIONS - ul.questionList - .col-left - li - h2.blueHeader 1) What are the benefits of mobile data collection? - p + p.b-content__col-right__item__photo-location + | Phillip Fong, + br + | Regional Data and Information Coordinator, FAO + article#openSource.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Open Source + p.b-content-header__text + | Microsoft Data Gathering is an Open Source solution + .b-page__line + .b-content + .b-content__col-left + p.b-content__paragraph + | We launched the open source version of Microsoft Data Gathering on 30 July 2010, + | making the source code available to anyone for download, deployment and development. + | There are no licensing costs for using the software, the code base is public, + | and development occurs in a collaborative and community-driven manner. + p.b-content__paragraph + | The open source model also empowers universities and local developers to participate + | in creating tools and services on top of the core solution, helping to build local capacity. + | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of + | technology adoption. + p.b-content__paragraph + | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, + | a family of permissive free software licenses, imposing minimal restrictions on the redistribution + | of covered software. + .b-content__col-right + .b-content__col-right__item + p.b-content__paragraph + | You can read the BSD license terms + a.b-content__paragraph__link(href='http://opensource.org/licenses/BSD-2-Clause', target='_blank') here + | . + p.b-content__paragraph + | The Microsoft Data Gathering Playground Server and the Java client + | are both licensed under the GNU Lesser General Public License, + a.b-content__paragraph__link(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html', target='_blank') LGPL + | which allows developers and companies to use and integrate the software into + | their own (even proprietary) software without being required to release the source + | code of their own software-parts. + p.b-content__paragraph + | Microsoft Data Gathering complies with Open Rosa standards for data collection. + p.b-content__paragraph + | The Microsoft Data Gathering source code and documentation repository is at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') https://github.com/nokiadatagathering + | . + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | Get Involved + p.b-content__paragraph + | Here's how you can be a part of the Microsoft Data Gathering + | developer and user community: + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') Get the source code + | and develop + | Microsoft Data Gathering + p.b-content__paragraph.b-content__paragraph--item + | Become a Microsoft Data Gathering service partner + p.b-content__paragraph.b-content__paragraph--item + | Help us plan future software releases + p.b-content__paragraph.b-content__paragraph--item + | Translate the Microsoft Data Gathering application into your language + + article#support.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Support + p.b-content-header__text + | Microsoft Data Gathering support page + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | How to get support + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='/docs') + | Read the Microsoft Data Gathering user guide and + | documentation + p.b-content__paragraph.b-content__paragraph--item + | Access the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering',, target='_blank') + | Microsoft Data Gathering code repository + p.b-content__paragraph.b-content__paragraph--item + | Send an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com') + | mdgspprt@microsoft.com + .b-page__line + .b-content + h2.b-content-title + | Frequently Asked Questions + .b-content__col-left + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 1 + | What are the benefits of mobile data collection? + p.b-content__paragraph | The key benefits of mobile data collection are speed, - | accuracy, cost efficiency and usability. Please see the - a(href='#/home') benefits section on the homepage + | accuracy, cost efficiency and usability. Please see the + a.b-content__paragraph__link(href='#') benefits section on the homepage | for more on benefits. - li - h2.blueHeader 2) How is Microsoft Data Gathering used in the field? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 2 + | How is Microsoft Data Gathering used in the field? + p.b-content__paragraph | When time is of the essence, rapidly available, accurate information | is critical for sound decision-making in any kind of organization. - p + p.b-content__paragraph | For example: In Brazil, the Amazonas State Health Department and | the Health Vigilance Foundation have used Microsoft Data Gathering | to monitor and control the spread of dengue fever. - p + p.b-content__paragraph | In East Africa, the Food and Agriculture Organization has conducted | water and livestock surveys to reduce the risk of vulnerable | communities to drought. - p + p.b-content__paragraph | In Kenya, Plan Finland has worked with the Kenyan government | to register births using Microsoft Data Gathering. - p - | For more on use cases, please see the - a(href='#') use cases page - | . - li - h2.blueHeader 3) Does it cost anything to use Microsoft Data Gathering? - p - | Nokia Data Gathering is an open source solution so there are no licensing fees - | or charges for using the software. For more on open source, please see the - a(href='#/openSource') open source page - | . - p + p.b-content__paragraph + | For more on use cases, please see the + a.b-content__paragraph__link(href='#/useCases') use cases page + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 3 + | Does it cost anything to use Microsoft Data Gathering? + p.b-content__paragraph + | Microsoft Data Gathering is an open source solution so there are no licensing fees + | or charges for using the software. For more on open source, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + p.b-content__paragraph | Of course, there are costs associated with the hardware | (mobile phones, servers, SIM cards) necessary for using - | Nokia Data Gathering, as well as the implementation of a data collection project. + | Microsoft Data Gathering, as well as the implementation of a data collection project. | These costs must be scoped and borne by the organization using the solution. - li - h2.blueHeader 4) What are the license terms for Microsoft Data Gathering? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 4 + | What are the license terms for Microsoft Data Gathering? + p.b-content__paragraph | The Microsoft Data Gathering Windows Phone client is licensed under the open source | Berkeley Software Distribution (BSD) License family. The Microsoft | Data Gathering Playground Server and the Java client are both licensed under | the GNU Lesser General Public License (ILGPL).Microsoft Data Gathering complies with | the standards of the OpenROSA Consortium on mobile data collection. - p - | For more on our licenses, please see the - a(href='#/openSource') open source page - | . - .col-right - li - h2.blueHeader 5) Which devices are compatible with Microsoft Data Gathering? - p + p.b-content__paragraph + | For more on our licenses, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + .b-content__col-right + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 5 + | Which devices are compatible with Microsoft Data Gathering? + p.b-content__paragraph | The Windows Phone version of the Microsft Data Gathering mobile client is | a Silverlight application for Windows Phone 7 and a Cordova/Sensa Touch application for | Windows Phone 8. The Windows Tablet version runs on Windows RT devices. The Java application runs | on Symbian and Nokia OS devices. - p + p.b-content__paragraph | If you have a specific query about device compatibility, please let - | us know by sending an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - li - h2.blueHeader 6) Where can I find the Microsoft Data Gathering source code? - p - | You can get the source code at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - li - h2.blueHeader 7) How can I host my own server data? - p + | us know by sending an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com' ) mdgspprt@microsoft.com + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 6 + | Where can I find the Microsoft Data Gathering source code? + p.b-content__paragraph + | You can get the source code at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 7 + | How can I host my own server data? + p.b-content__paragraph | The instructions for setting up and hosting your own - | server are contained in the - a(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README - | . - li - h2.blueHeader 8) What are the previous versions of Microsoft Data Gathering? - p - | Please see our - a(href='#') release archive - | . for more information on previous releases of - | Microsoft Data Gathering. - li - h2.blueHeader 9) Can students work on Microsoft Data Gathering? + | server are contained in the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 8 + | What are the previous versions of Microsoft Data Gathering? + p.b-content__paragraph + | Please see our + a.b-content__paragraph__link(href='#') release archive + | for more information on previous releases of + | Microsoft Data Gathering.. + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 9 + | Can students work on Microsoft Data Gathering? + p.b-content__paragraph + | Yes. Please see the description of our + a.b-content__paragraph__link(href='#') University Collaboration Program + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 10 + | Can I translate the Microsoft Data Gathering mobile client into my language? + p.b-content__paragraph + | Yes. Please get in touch with us at + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com', target='_blank') mdgspprt@microsoft.com + | and work with us to provide a translation of + | the software in your language. We will then push this out + | and make the language version available to all users. + + article#login.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Login + p.b-content-header__text + | Log in to the server below + .b-page__line + .b-content + form.e-form + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", placeholder="Enter your username...", tabindex="0") + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", placeholder="Enter your password...") + .error + button.e-form__button(type="submit" title='Login') Login + p.b-content__paragraph + a.b-content__paragraph__link(href="#/forgotPassword") Forgot your password? + p.b-content__paragraph + | Don’t have an account? + a.b-content__paragraph__link(href="#/register") Register here + + article#register.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Register + p.b-content-header__text + | Create an account below + .b-page__line + .b-content + form.e-form(action='signup', method='POST', autocomplete="off") + .b-form-row + .b-form-row__col + label.e-form__label(for='firstName') First Name + input.e-form__field#firstName(type="text", name="firstName", data-validation='len(2, 60);', placeholder="Enter your First Name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label(for='lastName') Last name + input.e-form__field#lastName(type="text", name="lastName", data-validation='len(2, 60);', placeholder="Enter your Last name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", data-validation='len(5,13);isAlpha;uniqeUsrName;', placeholder="Enter your Username...") + .error + span(data-validation-msg='uniqeUsrName') + | This username is already used. + span(data-validation-msg='len') + | This field must have at least 5 and cannot be longer than 13 characters. + span(data-validation-msg='isAlpha') + | Nickname can contain only numbers, periods and Latin letters. + .b-form-row__col + label.e-form__label(for='email') Email + input.e-form__field#email(type="email", name="email", data-validation='isEmail;', placeholder="Enter your Email...") + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + .b-form-row + .b-form-row__col + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", data-validation='len(8,20);', placeholder="Enter your Password...") + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + .b-form-row__col + label.e-form__label(for='confirmpass') Confirm Password + input.e-form__field#confirmpass(type="password", name="confirmpass", data-validation='isMatch(password)', placeholder="Confirm your Password...") + .error + span(data-validation-msg='isMatch') + | Passwords do not match + .b-form-row + .b-form-row__col + label.e-form__label(for='phone') Phone Number + input.e-form__field#phone(type="text", name="phone", data-validation='len(10,15);isNumber;', placeholder="Enter your Phone Number...") + .error + span(data-validation-msg='len') + | This field must have at least 10 and cannot be longer than 15 characters. + span(data-validation-msg='isNumber') + | This is not a valid phone number. + .b-form-row__col + label.e-form__label(for='company') Company + input.e-form__field#company(type="text", name="company", data-validation='len(2, 60);', placeholder="Enter your Company...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='industry') Industry + input.e-form__field#industry(type="text", name="industry", data-validation='len(2, 60);', placeholder="Enter your industry...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label Country + .e-select + label.e-select__label(for='country') + select.e-select__box#country(placeholder='Country', name='country', data-validation='len(1);') + option(value='') Country + each country in countries + option(value=country) #{country} + .error + span(data-validation-msg='len') + | This field cannot be blank. + + button.e-form__button.e-form__button--offset(type="submit") Create Account + + article#forgotPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-forgot-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | FORGOT YOUR PASSWORD? + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/login') + .b-modal-window__main-block__body + .msg.hidden + p If you have entered a valid email, please check it for further instructions. + form.e-form(method='POST') p - | Yes. Please see the description of our - a(href='#') University Collaboration Program - | . - li - h2.blueHeader 10) Can I translate the Microsoft Data Gathering mobile client into my language? + | Please enter your username and email to reset your password. p - | Yes. Please get in touch with us at - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | and work with us to provide a translation of - | the software in your language. We will then push this out - | and make the language version available to all users. - article#login.hidden - section - div - h1 LOGIN - form - label.col-left - input(type='text', name='username', placeholder='Enter your username...') - label.col-right - input(type='password', name='password', placeholder='Enter your password...') - .error - a(href='#/forgotPassword') Forgot your password? - button(type='submit') Login - article#register.hidden - section - div - h1 REGISTER - form(action='signup', met='post', autocomplete="off") - label.col-left - input(type='text', placeholder='First name', name='firstName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - input(type='text', placeholder='Last name', name='lastName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 characters. - label.col-left - input(type='text', placeholder='Username', name='username', data-validation='len(5,13);isAlpha;uniqeUsrName;') - .error - span(data-validation-msg='uniqeUsrName') - | This username is already used. - span(data-validation-msg='len') - | This field must have at least 5 and cannot be longer than 13 characters. - span(data-validation-msg='isAlpha') - | Nickname can contain only numbers, periods and Latin letters. - label.col-right - input(type='text', placeholder='Email', name='email', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - label.col-left - input(type='password', placeholder='Password', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm password', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - label.col-left - input(type='text', placeholder='Phone number', name='phone', data-validation='len(10,15);isNumber;') - .error - span(data-validation-msg='len') - | This field must have at least 10 and cannot be longer than 15 characters. - span(data-validation-msg='isNumber') - | This is not a valid phone number. - label.col-right - input(type='text', placeholder='Company', name='company', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-left - input(type='text', placeholder='Industry', name='industry', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - select(placeholder='Country', name='country', data-validation='len(1);') - option(value='') Country - each country in countries - option(value=country) #{country} - .error - span(data-validation-msg='len') - | This field cannot be blank. - button(type='submit') Create Account - article#forgotPassword.hidden - section - div - h1 FORGOT YOUR PASSWORD? - .msg.hidden - p If you have entered a valid email, please check it for further instructions. - form - p - | Please enter your username and email to reset your password. - p - | If you forgot your username, please enter your email - | only and we will send all usernames related to this email. - label.col-left - input(type='text', name='username', placeholder='Username...') - label.col-right - input(type='text', name='email', placeholder='Email...', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - button(type='submit') Proceed - article#resetPassword.hidden - section - div - h1 RESET PASSWORD - form - label.col-left - input(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - button(type='submit') Apply - article#resetPasswordError.hidden - section - div - h1 RESET PASSWORD - .msg - p Password reset token is invalid or has expired. - - .modal.success-registration.hidden - .overlay - .window - .window-body - div You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder - input(type="button" value="OK") + | If you forgot your username, please enter your email + | only and we will send all usernames related to this email. + label.e-form__label(for='username_forgot-pass') + input.e-form__field#username_forgot-pass(type='text', name='username', placeholder='Username...') + label.e-form__label(for='email_forgot-pass') + input.e-form__field#email_forgot-pass(type='text', name='email', placeholder='Email...', data-validation='isEmail;') + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + button.e-form__button(type='submit') Proceed + article#resetPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/login') + .b-modal-window__main-block__body + form.e-form(method='POST', autocomplete="off") + label.e-form__label(for='password_reset-pass') + input.e-form__field#password_reset-pass(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + label.e-form__label(for='confirmpass_reset-pass') + input.e-form__field#confirmpass_reset-pass(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') + .error + span(data-validation-msg='isMatch') + | Passwords do not match + button.e-form__button(type='submit') Apply + article#resetPasswordError.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass-error + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/resetPassword') + .b-modal-window__main-block__body + .modal.success-registration.hidden + .msg + p Password reset token is invalid or has expired. + + article#successRegistration.hidden + .b-modal-window + .b-modal-window__main-block.b-success-registration + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | Successfully Registration + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href="#/register") + .b-modal-window__main-block__body + .modal.success-registration + .msg + p You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder + button.b-success-registration__btn(type="button") + a(href='#/login') + span.fa.fa-check.b-success-registration__btn--icon + span() OK + .b-page__footer + ul.b-page__footer__box + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/policy/privacy-policy/') + | Privacy Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/cookie/cookie-policy/') + | Cookie Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/service-terms/service-terms/') + | Service Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='https://github.com/nokiadatagathering') + | Code diff --git a/app/views/getStarted/jade/zh/error404.jade b/app/views/getStarted/jade/zh/error404.jade index 43dd92b..c753292 100644 --- a/app/views/getStarted/jade/zh/error404.jade +++ b/app/views/getStarted/jade/zh/error404.jade @@ -1,4 +1,4 @@ -!!! +doctype html html head title= title @@ -6,7 +6,7 @@ html meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') meta(name='viewport', content='initial-scale=1.0') - link(rel="stylesheet" type="text/css" href="/resources/stylesheets/404.css") + link(rel="stylesheet" type="text/css" href="/styles/404.css") body div(class="content") diff --git a/app/views/getStarted/jade/zh/home.jade b/app/views/getStarted/jade/zh/home.jade index 1ca225a..fc3782c 100644 --- a/app/views/getStarted/jade/zh/home.jade +++ b/app/views/getStarted/jade/zh/home.jade @@ -1,695 +1,904 @@ -!!! 5 +doctype html html head title= title - include ../../../../../web/index.js - include ../../../../../web/resources/stylesheets/style.css + script(src='home.js') + link(rel='stylesheet' href='styles/home.css') + link(rel='stylesheet' href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ) meta(charset='utf-8') body - header#mainMenu - nav - a(href='#') - img(src='../resources/icons/lolgo-30px.png') - h1 - | MICROSOFT - b  DATA GATHERING - ul - li - a(href='#/getStarted') Get Started - li - a(href='#/useCases') Use Cases - li - a(href='#/openSource') Open Source - li - a(href='#/support') Support - li - a.language-select #{language}  - ul.dropdown - each lang in languages - li(value=lang.value) #{lang.text} - a(href='#/login') Login - | / - a(href='#/register') Register - article#home.hidden - section.headDescrip - div - | Microsoft Data Gathering offers organizations a fast, - br - | accurate, cost effective and - br - | user-friendly way to collect data using mobile devices. - section.contentDescrip - div - .col-left - p - | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central location, - | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the ability - | to make crucial decisions. - p - | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from - | the field. The more time-critical the need for data and the more remote the location, the more organizations - | can benefit from a mobile phone based solution. - p - | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, including - | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. - p - | Because mobile devices can transmit data even from remote locations, the information collected can be available - | for analysis in near-real time. - .col-right - img(src='../resources/images/collage.jpg') - section#instruction - div - h2 HOW IT WORKS - ul - .col-left - li - a(href='#/getStarted#step1') - img(src='../resources/images/howitworks_1.png') - span 1 - span + .g-page-wrapper + .b-page__head-line + .b-line-bit.b-line-bit--red + .b-line-bit.b-line-bit--green + .b-line-bit.b-line-bit--blue + .b-line-bit.b-line-bit--yellow + div + header.b-page__header + .b-head-logo + a.b-logo__title(href='#/home') + img.b-logo__img(src='assets/images/logo-30px.png' + alt='Microsoft Data Gathering Icon') + span Microsoft Data Gathering + .b-menu + nav.b-menu-nav + a.b-menu-nav__link(href='#/getStarted') + | Get Started + a.b-menu-nav__link(href='#/useCases') + | Use Cases + a.b-menu-nav__link(href='#/openSource') + | Open Source + a.b-menu-nav__link(href='#/support') + | Support + .b-account-menu + a.language-select.b-account-menu__locale(href='#') #{language}  + ul.dropdown + each lang in languages + li: a.b-account-menu__language(href='#' value=lang.value title=lang.title lang=lang.value) + span.hide-text #{lang.title} + span.screnreder-ignore(role='presentation' aria-hidden='true') #{lang.text} + .b-account-menu__user + a(href='#/login') Login + | / + a(href='#/register') Register + article#home.hidden + .b-content-header + h1.b-content-header__title + | Microsoft Data Gathering + p.b-content-header__text + | Offers organizations a fast, accurate, cost effective and + br + | user-friendly way to collect data using mobile devices. + .b-page__line + .b-content.b-content--line.b-content--main + .b-content--main__article + p.b-content--main__article__indent + | Collecting field data the old-fashioned way, by filling in paper forms, transporting them, to a central + | location, + | and transcribing them, is slow and cumbersome. It delays the availability of information and can hamper the + | ability + | to make crucial decisions. + p.b-content--main__article__indent + | Data collection with a mobile device can dramatically improve the speed and quality of information obtained from + | the field. The more time-critical the need for data and the more remote the location, the more organizations + | can benefit from a mobile phone based solution. + p.b-content--main__article__indent + | Microsoft Data Gathering is a comprehensive solution that allows organizations to collect rich field data, + | including + | GPS location tags and images, using mobile phones and tablets instead of paper forms or laptops. + p.b-content--main__article__indent + | Because mobile devices can transmit data even from remote locations, the information collected can be available + | for analysis in near-real time. + .b-content-main__image + img(src='../assets/images/collage.jpg' + alt='Pictures of MDG in use') + .b-page__line + .b-content.b-content--line + h2.b-content-title + | How It Works + .b-content__col-left + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_1.png' + alt='First step of how MDG works. Create a questionnaire') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 1 + span.b-content__col-left__item__caption__text--blue | Create a questionnaire on br | the survey editor - li - a(href='#/getStarted#step2') - img(src='../resources/images/howitworks_2.png') - span 2 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_2.png' + alt='Second step of how MDG works. Publish the data for data collectors.') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 2 + span.b-content__col-left__item__caption__text--blue | Publish the data for data br | collectors - li - a(href='#/getStarted#step3') - img(src='../resources/images/howitworks_3.png') - span 3 - span + .b-content__col-left__item + .b-content__col-left__item__picture + img.b-content__col-left__item__picture--img(src='../assets/images/howitworks_3.png' + alt='Third step of how MDG works. Fill in the questionnaire on the device') + .b-content__col-left__item__caption + span.b-content__col-left__item__caption__number 3 + span.b-content__col-left__item__caption__text--blue | Fill in the questionnaire on br - | your mobile device - .col-right - li - a(href='#/getStarted#step4') - img(src='../resources/images/howitworks_4.png') - span 4 - span + | your mobile device + .b-content__col-right + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_4.png' + alt='Fourth step of how MDG works. Send your data to the server') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 4 + span.b-content__col-right__item__caption__text--blue | Send your data to the br - | server over the mobile - br - | network - li - a(href='#/getStarted#step5') - img(src='../resources/images/howitworks_5.png') - span 5 - span + | server over the mobile network + .b-content__col-right__item + .b-content__col-right__item__picture + img.b-content__col-right__item__picture--img(src='../assets/images/howitworks_5.png' + alt='Fifth step of how MDG works. View, map or export your data') + .b-content__col-right__item__caption + span.b-content__col-right__item__caption__number 5 + span.b-content__col-right__item__caption__text--blue | View, map, and export br | your data - section.videoBlock - div - p - i - | This video is about the use of Microsoft Data Gathering to - b.bold combat dengue fever - | in Amazonas State, Brazil. - iframe.video(src='//www.youtube.com/embed/kP1v9Snz6HA') - section#benefits - div - h2 BENEFITS - ul - .col-left - li - img(src='../resources/icons/speed.png') - h3 Speed - | Compared to using paper forms, mobile solutions cut down delays - | caused by transportation and manual digitalization of collected - | data. - li - img(src='../resources/icons/cost-efficiency.png') - h3 Cost efficiency - | Transportation and logistics costs are reduced, as are the needs - | for manual data entry and cleaning. There is also a cost of - | inaction saved with the ability to make critical decisions and - | react rapidly. - .col-right - li - img(src='../resources/icons/accuracy.png') - h3 Accuracy - | Data entry occurs at the point of collection, without needing to - | transcribe hand-written information. This lowers the frequency of - | transcription and data entry errors. - li - img(src='../resources/icons/usability.png') - h3 Usability - | Mobile phones are small, easy to carry, have battery longevity, - | and enable the capture of rich data such as GPS location tags - | and images. - section#awards - div - .col-left - h2 AWARDS - ul - li - b 2012 - | : Microsoft Data Gathering was a Featured Project of the - br - | Month for July in the Developer Community Blog. - li - b 2011 - | : Microsoft Data Gathering won the Justmeans Social - br - | Innovation Award in the category "Philanthropy: Most Strategic - br - | Use of Philanthropic Funds". - li - | The Justmeans international awards program is considered one of - | the top honours in the field of sustainability, giving recognition to - | companies implementing groundbreaking strategies and programs - | that drive social and environmental innovation. - .col-right - h2 ACKNOWLEDGEMENTS - p - | We would like to extend our thanks to these organizations, which - br - | have been instrumental in getting Microsoft Data Gathering to - br - | where it is today. - ul.markedList - li - a(href='http://www.indt.org/?lang=en') Nokia Technology Institute - li - a(href='http://www.uonbi.ac.ke/') University of Nairobi - li - a(href='http://cmri.shu.edu/') The Center for Mobile Research and Innovation - li - a(href='http://www.ayalafoundation.org/') The Ayala Foundation - ul#footer - li - a(href='http://www.nokia.com/global/privacy/privacy/policy/privacy-policy/') Privacy Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/cookie/cookie-policy/') Cookie Policy - li - a(href='http://www.nokia.com/global/privacy/privacy/service-terms/nokia-service-terms/') Service Policy - li - a(href="https://github.com/nokiadatagathering") Code - article#getStarted.hidden - section - div - h1 GET STARTED - p + .b-page__line + .b-content.b-content--line + h2.b-content-title#benefits + | Benefits + .b-content__col-left + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits1.png' + alt='Compared to using paper forms, mobile solutions cut down delays') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Speed + p.b-content__col-left__item__caption__text + | Compared to using paper forms, mobile solutions cut down delays + | caused by transportation and manual digitalization of collected + | data. + .b-content__col-left__item.b-content__col-left__item--benefits + .b-content__col-left__item__icon + img.b-content__col-left__item__icon--img(src='../assets/images/benefits2.png' + alt='Transportation and logistics costs are reduced') + .b-content__col-left__item__caption + h3.b-content__col-left__item__caption__title Cost efficiency + p.b-content__col-left__item__caption__text + | Transportation and logistics costs are reduced, as are the needs + | for manual data entry and cleaning. There is also a cost of + | inaction saved with the ability to make critical decisions and + | react rapidly. + | data. + .b-content__col-right + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits3.png' + alt='Data entry occurs at the point of collection') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Accuracy + p.b-content__col-right__item__caption__text + | Data entry occurs at the point of collection, without needing to + | transcribe hand-written information. This lowers the frequency of + | transcription and data entry errors. + .b-content__col-right__item.b-content__col-right__item--benefits + .b-content__col-right__item__icon + img.b-content__col-right__item__icon--img(src='../assets/images/benefits4.png' + alt='Mobile devices are easy to carry') + .b-content__col-right__item__caption + h3.b-content__col-right__item__caption__title Usability + p.b-content__col-right__item__caption__text + | Mobile phones are small, easy to carry, have battery longevity, + | and enable the capture of rich data such as GPS location tags + | and images. + .b-page__line + .b-content.b-content-line + .b-content__col-left + h2.b-content-title Awards + p.b-content__paragraph + b 2012 + | Microsoft Data Gathering was a Featured Project of the + br + | Month for July in the Developer Community Blog. + p.b-content__paragraph + b 2011 + | Microsoft Data Gathering won the Justmeans Social + br + | Innovation Award in the category "Philanthropy: Most Strategic + br + | Use of Philanthropic Funds". + p.b-content__paragraph + | The Justmeans international awards program is considered one of + br + | the top honours in the field of sustainability, giving recognition to + br + | companies implementing groundbreaking strategies and programs + br + | that drive social and environmental innovation. + br + .b-content__col-right + .b-content__col-right__item + h2.b-content-title Acknowledgements + p.b-content__paragraph + | We would like to extend our thanks to these organizations, which + br + | have been instrumental in getting Microsoft Data Gathering to + br + | where it is today. + .b-content--acknowledge-list + a.b-content--acknowledge-list__link(href='http://www.indt.org/?lang=en', target='_blank') Nokia Technology Institute + a.b-content--acknowledge-list__link(href='http://www.uonbi.ac.ke/', target='_blank') University of Nairobi + a.b-content--acknowledge-list__link(href='http://cmri.shu.edu/', target='_blank') The Center for Mobile Research and Innovation + a.b-content--acknowledge-list__link(href='http://www.ayalafoundation.org/', target='_blank') The Ayala Foundation + + article#getStarted.hidden + .b-content-header + h1.b-content-header__title + | Get Started + p.b-content-header__text | If you have your own server and wish to migrate your data - | to this release of MDG the tool to do that is available - a(href="http://github.com/nokiadatagathering/ndg-migration") here - ul - li(data-step='step1') - img(src='../resources/images/getstarted_step1.png') - h2 Step 1: Register to the Microsoft Data Gathering Playground Server - p - | The first thing you need to do is to fill in the user registration form and create - | an account on the Microsoft Data Gathering playground server. You can do this by - | clicking - a(href='#/register') register on the homepage - | . - li(data-step='step2') - img(src='../resources/images/getstarted_step2.png') - h2 Step 2: Create a survey - p - | After you've confirmed your account and logged in to the server, you can start - | writing your own questionnaire using the survey editor. You can choose different - | question types, set default answers or limits and even use skip logic to write your - | questionnaire. - li(data-step='step3') - img(src='../resources/images/getstarted_step3.png') - h2 Step 3: Download the Microsoft Data Gathering mobile application - p - | Download and install one of the Microsoft Data Gathering mobile applications. - p - i - | Please note that until the branding change is completed please use the server https://nokiadatagathering.net in the app settings. - | Apps marked as 'New!' have been updated to use the https://microsoftdatagathering.net server and those marked as 'To be updated' still - | default to https://nokiadatagathering.net - p - | Download the - a(href="http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848") Windows Phone app - |. - img(src="../resources/icons/1-new.png") - em New! - br - | Download the - a(href="https://nokiadatagathering.net/ndg-ota/client/ndg.jad") Java app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - br - | Download the - a(href="http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42") Windows Tablet app - |. - img(src="../resources/icons/1-to-be-updated.png") - em To be updated - li(data-step='step4') - img(src='../resources/images/getstarted_step4.png') - h2 Step 4: Add users and make your survey available to them - p - | You can publish your questionnaire to your field data collectors by adding them to - | your main account in the Users section, organizing them into groups and giving - | them different access permissions. You can make your questionnaire available to - | as many users as you like. You can also send SMS notifications to your user groups. - li(data-step='step5') - img(src='../resources/images/getstarted_step5.png') - h2 Step 5: Fill in the survey and send your results on your mobile device - p - | Open the Microsoft Data Gathering app you downloaded onto your mobile device - | in Step 3, and login with your user credentials. The surveys that were made available - | to you in Step 4 will be listed on the app. Just open the survey you want and create a new - | result by entering the requested data in the blank fields. - p - | You can send your results back to the server immediately, or save them on the - | phone to send later. - li(data-step='step6') - img(src='../resources/images/getstarted_step6.png') - h2 Step 6: View and export your results - p - | Go back to your Playground Server account and take a look at all the results you've received. - | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export - | your data in XLS or KML formats for further data analysis. - article#useCases.hidden - section - div - h1 USE CASES - ul - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Uganda - FAO - img(src='../resources/images/usecase_1.jpg') - .col-left - p - | As part of a regional initiative to reduce risk - | of drought in Eastern Africa with Early Warning Systems, - | the Food and Agriculture Organization of the United Nations - | (FAO) in Uganda is collecting geo-spatial and qualitative - | data about community animal health workers and providers - | of veterinary services and shops, among the rural pastoral - | communities of the Karamoja region. - p - | The move from paper-based questionnaires to Microsoft Data Gathering - | has allowed more efficient operations by reducing the time to produce - | Drought Bulletins by 50%. - p - | Furthermore, the project has enhanced participation of the community - | and the local government, and is supporting the capacity of the - | Department of Meteorology in issuing monthly weather updates - | for Karamoja. - p - | FAO's efforts were recognized by the World Bank in recent study - | on mobile applications for the agriculture and forestry sector, - | published in December 2013. - .col-right - blockquote + br + | to this release of MDG the tool to do that is available + a.b-content-header__text__link(href='http://github.com/nokiadatagathering/ndg-migration', target='_blank') here + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step1.png' + alt='Register to the Microsoft Data Gathering Playground Server') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 1 + | Register to the Microsoft Data Gathering Playground Server + p.b-step__right__paragraph + | The first thing you need to do is to fill in the user registration form and create + br + | an account on the Microsoft Data Gathering playground server. You can do this by + br + | clicking + a.b-step__right__paragraph__link(href='#/register') register on the homepage + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step2.png' + alt='Create a survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 2 + | Create a survey + p.b-step__right__paragraph + | After you've confirmed your account and logged in to the server, you can start + br + | writing your own questionnaire using the survey editor. You can choose different + br + | question types, set default answers or limits and even use skip logic to write your + br + | questionnaire. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step3.png' + alt='Download the MDG mobile application') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 3 + | Download the Microsoft Data Gathering mobile application + p.b-step__right__paragraph + | Download and install one of the Microsoft Data Gathering mobile applications. + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://www.windowsphone.com/en-us/store/app/nokia-data-gathering/a2bd7f51-6c7f-48d4-9fa7-12b35c550848', target='_blank') + | Windows Phone app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='https://nokiadatagathering.net/ndg-ota/client/ndg.jad', target='_blank') + | Java app + p.b-step__right__paragraph + | Download the + a.b-step__right__paragraph__link(href='http://apps.microsoft.com/windows/app/nokia-data-gathering/4780fc68-fc8b-4db4-8cf7-110fe07dac42', target='_blank') + | Windows Tablet app + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step4.png' + alt='Add users') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 4 + | Add users and make your survey available to them + p.b-step__right__paragraph + | You can publish your questionnaire to your field data collectors by adding them to + br + | your main account in the Users section, organizing them into groups and giving + br + | them different access permissions. You can make your questionnaire available to + br + | as many users as you like. You can also send SMS notifications to your user groups. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step5.png' + alt='Fill in the survey') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 5 + | Fill in the survey and send your results on your mobile device + p.b-step__right__paragraph + | Open the Microsoft Data Gathering app you downloaded onto your mobile device + br + | in Step 3, and login with your user credentials. The surveys that were made available + br + | to you in Step 4 will be listed on the app. Just open the survey you want and create a new + br + | result by entering the requested data in the blank fields. + p.b-step__right__paragraph + | You can send your results back to the server immediately, or save them on the + | phone to send later. + .b-page__line + .b-content + .b-step + .b-step__left + img.b-step__left__image(src='../assets/images/getstarted_step6.png' + alt='View and Export') + .b-step__right + h2.b-step__right__title + span.b-step__right__title__count Step 6 + | View and export your results + p.b-step__right__paragraph + | Go back to your Playground Server account and take a look at all the results you've received. + br + | You can map your geo-tagged data on Microsoft Maps, look at trends as simple graphs, or export + br + | your data in XLS or KML formats for further data analysis. + + + article#useCases.hidden + .b-content-header + h1.b-content-header__title + | Use Cases + p.b-content-header__text + | A Real Solution to Real Problems + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Reducing the risk to drought in vulnerable communities + br + | in Uganda - FAO + .b-content__col-left + p.b-content__paragraph + | As part of a regional initiative to reduce risk + | of drought in Eastern Africa with Early Warning Systems, + | the Food and Agriculture Organization of the United Nations + | (FAO) in Uganda is collecting geo-spatial and qualitative + | data about community animal health workers and providers + | of veterinary services and shops, among the rural pastoral + | communities of the Karamoja region. + p.b-content__paragraph + | The move from paper-based questionnaires to Microsoft Data Gathering + | has allowed more efficient operations by reducing the time to produce + | Drought Bulletins by 50%. + p.b-content__paragraph + | Furthermore, the project has enhanced participation of the community + | and the local government, and is supporting the capacity of the + | Department of Meteorology in issuing monthly weather updates + | for Karamoja. + p.b-content__paragraph + | FAO's efforts were recognized by the World Bank in recent study + | on mobile applications for the agriculture and forestry sector, + | published in December 2013. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_1.jpg' + alt='FAO in Eastern Africa') + blockquote.b-content__col-right__item__photo-caption | "We strive to improve the humanitarian situation by increasing | the coping capacities of populations vulnerable to recurrent | drought hazards and their effects through the provision of | multi-sectorial assistance in the Horn of Africa. | Microsoft Data Gathering is one of the most convenient | and cost-effective tools for collecting data from remote areas." - p - b Bernard 0. Mwesigwa - | , - | Programme Officer, M&E/Data Management, FAO Uganda - li - h2.nptlHeader Giving children the right to an identity in Kenya - Plan - img(src='../resources/images/usecase_2.jpg') - .col-left - p - | An official identity is the foundation for child rights, - | child protection and later child's ticket to services such as - | secondary schooling. Official identity is obtained by parents - | through birth registration. - p - | Today only five out of ten children in Kenya are registered. - p - | Poor accessibility to offices and officers, slow processing - | of both birth notifications and certificates, and costs involved - | together with a lack of incentives for parents to register their - | children contribute to the current situation. - p - | Plan together with the Ministry of Foreign Affairs in Finland is - | running a universal birth registration project in the Kwale district - | using Microsoft Data Gathering that has resulted in dramatically increased - | registration rates (from 30 to 68%). - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Bernard O. Mwesigwa, + br + | Programme Officer, M&E/Data Management, FAO Uganda + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Giving children the right to an identity in Kenya - Plan + .b-content__col-left + p.b-content__paragraph + | An official identity is the foundation for child rights, + | child protection and later child's ticket to services such as + | secondary schooling. Official identity is obtained by parents + | through birth registration. + p.b-content__paragraph + | Today only five out of ten children in Kenya are registered. + p.b-content__paragraph + | Poor accessibility to offices and officers, slow processing + | of both birth notifications and certificates, and costs involved + | together with a lack of incentives for parents to register their + | children contribute to the current situation. + p.b-content__paragraph + | Plan together with the Ministry of Foreign Affairs in Finland is + | running a universal birth registration project in the Kwale district + | using Microsoft Data Gathering that has resulted in dramatically increased + | registration rates (from 30 to 68%). + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_2.jpg' + alt='Plan in Kenya') + blockquote.b-content__col-right__item__photo-caption | "The use of ICTs including mobile technology has great potential to support | communities and governments in civil registration. Right to citizenship and | identity are fundamental prerequisites in development." - p - b Mika Välitalo - | , Manager - ICT for Development, Plan Finland - li - h2.nptlHeader - | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation - img(src='../resources/images/usecase_3.jpg') - .col-left - p - | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage - | Microsoft Data Gathering to help fight the spread of dengue fever - | and increase the effectiveness of treatment. - p - | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of - | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a - b.bold 93% cut - | in the number of cases. - p - | Microsoft Data Gathering helped the health workers to do their jobs, by making their - | reports both faster and more accurate. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Mika Välitalo, + br + | Manager - ICT for Development, Plan Finland + .b-page__line + .b-content.b-content--line + h2.b-content-title + | Controlling dengue fever - Amazonas State Health Department and Health Vigilance Foundation + .b-content__col-left + p.b-content__paragraph + | Amazonas State Health Department (SUSAM) and the Health Vigilance Foundation (FVS) leverage + | Microsoft Data Gathering to help fight the spread of dengue fever + | and increase the effectiveness of treatment. + p.b-content__paragraph + | During 2008,3S22 cases of the dengue were registered in Manaus. With the help of + | Microsoft Data Gathering, during 2009 the number of cases was reduced dramatically to just 245 - a + bold 93% cut + | in the number of cases. + p.b-content__paragraph + | Microsoft Data Gathering helped the health workers to do their jobs, by making their + | reports both faster and more accurate. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_3.jpg' + alt='Malaria in Amazonas') + blockquote.b-content__col-right__item__photo-caption | "Microsofts technology will help us to more rapidly identify and investigate the results | and symptoms of the surveyed population. The transmission of data immediately after | the interviews improves agility, increases public safety and avoids manual filling-in of forms." - p - b Agnaldo Costa - | , State Health Secretary of Amazonas State - li - h2.nptlHeader Reducing the risk to drought in vulnerable communities in Kenya - FAO - img(src='../resources/images/usecase_4.jpg') - .col-left - p - | Accurate, timely and geo-tagged data on water points and sources is - | an important basis to reduce the impact of drought among vulnerable communities - | living in recurrent drought Food Agriculture Organization (FAO) is working along - | with their NGO partners in Greater Horn of Africa to alleviate the risk - | to drought among pastoralist communities. - p - | Microsoft Data Gathering is bringing mobile technology to water point surveys, - | reducing the amount of effort, time and cost to collect the information and - | enabling proper and timely preparedness activities. - p - | To date information from over 500 points has been collected - and more into come. - | The collected information is also published in Disaster Risk Reduction website - | for public good. - .col-right - blockquote + p.b-content__col-right__item__photo-location + | Agnaldo Costa, + br + | State Health Secretary of Amazonas State + .b-page__line + .b-content + h2.b-content-title + | Reducing the risk to drought in vulnerable communities in Kenya - FAO + .b-content__col-left + p.b-content__paragraph + | Accurate, timely and geo-tagged data on water points and sources is + | an important basis to reduce the impact of drought among vulnerable communities + | living in recurrent drought Food Agriculture Organization (FAO) is working along + | with their NGO partners in Greater Horn of Africa to alleviate the risk + | to drought among pastoralist communities. + p.b-content__paragraph + | Microsoft Data Gathering is bringing mobile technology to water point surveys, + | reducing the amount of effort, time and cost to collect the information and + | enabling proper and timely preparedness activities. + p.b-content__paragraph + | To date information from over 500 points has been collected - and more into come. + | The collected information is also published in Disaster Risk Reduction website + | for public good. + .b-content__col-right + .b-content__col-right__item + img.b-content__col-right__item__photo(src='../assets/images/usecase_4.jpg' + alt='Vulnerable communities in Kenya') + blockquote.b-content__col-right__item__photo-caption | "A huge burden is put on organizations, especially small scale NG05, | to collect, capture and process data timely for response and planning with | no supported technology tools. Microsoft Data Gathering provides a simple and | effective field solution with a centralized data administration system." - p - b Phillip Fong - | , Regional Data and Information Coordinator, FAO - article#openSource.hidden - section - div - h1 OPEN SOURCE - h2.nptlHeader Microsoft Data Gathering is an Open Source solution - .col-left - p - | We launched the open source version of Microsoft Data Gathering on 30 July 2010, - | making the source code available to anyone for download, deployment and development. - | There are no licensing costs for using the software, the code base is public, - | and development occurs in a collaborative and community-driven manner. - p - | The open source model also empowers universities and local developers to participate - | in creating tools and services on top of the core solution, helping to build local capacity. - | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of - | technology adoption. - p - | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, - | a family of permissive free software licenses, imposing minimal restrictions on the redistribution - | of covered software. - .col-right - p - | You can read the BSD license terms - a(href='http://opensource.org/licenses/BSD-2-Clause') here - | . - p - | The Microsoft Data Gathering Playground Server and the Java client - | are both licensed under the GNU Lesser General Public License, - a(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html') LGPL - | which allows developers and companies to use and integrate the software into - | their own (even proprietary) software without being required to release the source - | code of their own software-parts. - p - | Microsoft Data Gathering complies with Open Rosa standards for data collection. - p - | The Microsoft Data Gathering source code and documentation repository is at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - section - div - h1 GET INVOLVED - p - | Here's how you can be a part of the Microsoft Data Gathering - | developer and user community: - ul.markedList - li - a(href='https://github.com/nokiadatagathering') Get the source code - | and develop - | Microsoft Data Gathering - li - | Become a Microsoft Data Gathering service partner - li - | Help us plan future software releases - li - | Translate the Microsoft Data Gathering application into your language - article#support.hidden - section - div - h1 SUPPORT - p How to get support: - ul.markedList - li - a(href='/docs') Read the Microsoft Data Gathering user guide and documentation - li - | Access the - a(href='https://github.com/nokiadatagathering') Microsoft Data Gathering code repository - li - | Send an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - h1 FREQUENTLY ASKED QUESTIONS - ul.questionList - .col-left - li - h2.blueHeader 1) What are the benefits of mobile data collection? - p + p.b-content__col-right__item__photo-location + | Phillip Fong, + br + | Regional Data and Information Coordinator, FAO + article#openSource.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Open Source + p.b-content-header__text + | Microsoft Data Gathering is an Open Source solution + .b-page__line + .b-content + .b-content__col-left + p.b-content__paragraph + | We launched the open source version of Microsoft Data Gathering on 30 July 2010, + | making the source code available to anyone for download, deployment and development. + | There are no licensing costs for using the software, the code base is public, + | and development occurs in a collaborative and community-driven manner. + p.b-content__paragraph + | The open source model also empowers universities and local developers to participate + | in creating tools and services on top of the core solution, helping to build local capacity. + | This ultimately promotes innovation and entrepreneurship, and increases the sustainability of + | technology adoption. + p.b-content__paragraph + | The Microsoft Data Gathering Windows Phone client is licensed under Berkely Software Distribution BSD, + | a family of permissive free software licenses, imposing minimal restrictions on the redistribution + | of covered software. + .b-content__col-right + .b-content__col-right__item + p.b-content__paragraph + | You can read the BSD license terms + a.b-content__paragraph__link(href='http://opensource.org/licenses/BSD-2-Clause', target='_blank') here + | . + p.b-content__paragraph + | The Microsoft Data Gathering Playground Server and the Java client + | are both licensed under the GNU Lesser General Public License, + a.b-content__paragraph__link(href='https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html', target='_blank') LGPL + | which allows developers and companies to use and integrate the software into + | their own (even proprietary) software without being required to release the source + | code of their own software-parts. + p.b-content__paragraph + | Microsoft Data Gathering complies with Open Rosa standards for data collection. + p.b-content__paragraph + | The Microsoft Data Gathering source code and documentation repository is at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') https://github.com/nokiadatagathering + | . + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | Get Involved + p.b-content__paragraph + | Here's how you can be a part of the Microsoft Data Gathering + | developer and user community: + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering', target='_blank') Get the source code + | and develop + | Microsoft Data Gathering + p.b-content__paragraph.b-content__paragraph--item + | Become a Microsoft Data Gathering service partner + p.b-content__paragraph.b-content__paragraph--item + | Help us plan future software releases + p.b-content__paragraph.b-content__paragraph--item + | Translate the Microsoft Data Gathering application into your language + + article#support.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Support + p.b-content-header__text + | Microsoft Data Gathering support page + .b-page__line + .b-content + .b-content__col-left + h2.b-content-title + | How to get support + p.b-content__paragraph.b-content__paragraph--item + a.b-content__paragraph__link(href='/docs') + | Read the Microsoft Data Gathering user guide and + | documentation + p.b-content__paragraph.b-content__paragraph--item + | Access the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering',, target='_blank') + | Microsoft Data Gathering code repository + p.b-content__paragraph.b-content__paragraph--item + | Send an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com') + | mdgspprt@microsoft.com + .b-page__line + .b-content + h2.b-content-title + | Frequently Asked Questions + .b-content__col-left + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 1 + | What are the benefits of mobile data collection? + p.b-content__paragraph | The key benefits of mobile data collection are speed, - | accuracy, cost efficiency and usability. Please see the - a(href='#/home') benefits section on the homepage + | accuracy, cost efficiency and usability. Please see the + a.b-content__paragraph__link(href='#') benefits section on the homepage | for more on benefits. - li - h2.blueHeader 2) How is Microsoft Data Gathering used in the field? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 2 + | How is Microsoft Data Gathering used in the field? + p.b-content__paragraph | When time is of the essence, rapidly available, accurate information | is critical for sound decision-making in any kind of organization. - p + p.b-content__paragraph | For example: In Brazil, the Amazonas State Health Department and | the Health Vigilance Foundation have used Microsoft Data Gathering | to monitor and control the spread of dengue fever. - p + p.b-content__paragraph | In East Africa, the Food and Agriculture Organization has conducted | water and livestock surveys to reduce the risk of vulnerable | communities to drought. - p + p.b-content__paragraph | In Kenya, Plan Finland has worked with the Kenyan government | to register births using Microsoft Data Gathering. - p - | For more on use cases, please see the - a(href='#') use cases page - | . - li - h2.blueHeader 3) Does it cost anything to use Microsoft Data Gathering? - p - | Nokia Data Gathering is an open source solution so there are no licensing fees - | or charges for using the software. For more on open source, please see the - a(href='#/openSource') open source page - | . - p + p.b-content__paragraph + | For more on use cases, please see the + a.b-content__paragraph__link(href='#/useCases') use cases page + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 3 + | Does it cost anything to use Microsoft Data Gathering? + p.b-content__paragraph + | Microsoft Data Gathering is an open source solution so there are no licensing fees + | or charges for using the software. For more on open source, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + p.b-content__paragraph | Of course, there are costs associated with the hardware | (mobile phones, servers, SIM cards) necessary for using - | Nokia Data Gathering, as well as the implementation of a data collection project. + | Microsoft Data Gathering, as well as the implementation of a data collection project. | These costs must be scoped and borne by the organization using the solution. - li - h2.blueHeader 4) What are the license terms for Microsoft Data Gathering? - p + .b-content__col-left__item + h3.b-content__col-left__item__title + span.b-content__col-left__item__title-number + | 4 + | What are the license terms for Microsoft Data Gathering? + p.b-content__paragraph | The Microsoft Data Gathering Windows Phone client is licensed under the open source | Berkeley Software Distribution (BSD) License family. The Microsoft | Data Gathering Playground Server and the Java client are both licensed under | the GNU Lesser General Public License (ILGPL).Microsoft Data Gathering complies with | the standards of the OpenROSA Consortium on mobile data collection. - p - | For more on our licenses, please see the - a(href='#/openSource') open source page - | . - .col-right - li - h2.blueHeader 5) Which devices are compatible with Microsoft Data Gathering? - p + p.b-content__paragraph + | For more on our licenses, please see the + a.b-content__paragraph__link(href='#/openSource') open source page + .b-content__col-right + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 5 + | Which devices are compatible with Microsoft Data Gathering? + p.b-content__paragraph | The Windows Phone version of the Microsft Data Gathering mobile client is | a Silverlight application for Windows Phone 7 and a Cordova/Sensa Touch application for | Windows Phone 8. The Windows Tablet version runs on Windows RT devices. The Java application runs | on Symbian and Nokia OS devices. - p + p.b-content__paragraph | If you have a specific query about device compatibility, please let - | us know by sending an email to - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | . - li - h2.blueHeader 6) Where can I find the Microsoft Data Gathering source code? - p - | You can get the source code at - a(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering - | . - li - h2.blueHeader 7) How can I host my own server data? - p + | us know by sending an email to + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com' ) mdgspprt@microsoft.com + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 6 + | Where can I find the Microsoft Data Gathering source code? + p.b-content__paragraph + | You can get the source code at + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering') https://github.com/nokiadatagathering + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 7 + | How can I host my own server data? + p.b-content__paragraph | The instructions for setting up and hosting your own - | server are contained in the - a(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README - | . - li - h2.blueHeader 8) What are the previous versions of Microsoft Data Gathering? - p - | Please see our - a(href='#') release archive - | . for more information on previous releases of - | Microsoft Data Gathering. - li - h2.blueHeader 9) Can students work on Microsoft Data Gathering? + | server are contained in the + a.b-content__paragraph__link(href='https://github.com/nokiadatagathering/ndgdocs/blob/master/README') README + | . + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 8 + | What are the previous versions of Microsoft Data Gathering? + p.b-content__paragraph + | Please see our + a.b-content__paragraph__link(href='#') release archive + | for more information on previous releases of + | Microsoft Data Gathering.. + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 9 + | Can students work on Microsoft Data Gathering? + p.b-content__paragraph + | Yes. Please see the description of our + a.b-content__paragraph__link(href='#') University Collaboration Program + .b-content__col-right__item + h3.b-content__col-right__item__title + span.b-content__col-right__item__title-number + | 10 + | Can I translate the Microsoft Data Gathering mobile client into my language? + p.b-content__paragraph + | Yes. Please get in touch with us at + a.b-content__paragraph__link(href='mailto:mdgspprt@microsoft.com', target='_blank') mdgspprt@microsoft.com + | and work with us to provide a translation of + | the software in your language. We will then push this out + | and make the language version available to all users. + + article#login.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Login + p.b-content-header__text + | Log in to the server below + .b-page__line + .b-content + form.e-form + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", placeholder="Enter your username...", tabindex="0") + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", placeholder="Enter your password...") + .error + button.e-form__button(type="submit" title='Login') Login + p.b-content__paragraph + a.b-content__paragraph__link(href="#/forgotPassword") Forgot your password? + p.b-content__paragraph + | Don’t have an account? + a.b-content__paragraph__link(href="#/register") Register here + + article#register.hidden + .b-page__line + .b-content-header + h1.b-content-header__title + | Register + p.b-content-header__text + | Create an account below + .b-page__line + .b-content + form.e-form(action='signup', method='POST', autocomplete="off") + .b-form-row + .b-form-row__col + label.e-form__label(for='firstName') First Name + input.e-form__field#firstName(type="text", name="firstName", data-validation='len(2, 60);', placeholder="Enter your First Name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label(for='lastName') Last name + input.e-form__field#lastName(type="text", name="lastName", data-validation='len(2, 60);', placeholder="Enter your Last name...") + .error + span(data-validation-msg='len') + | This field must have at least 2 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='username') Username + input.e-form__field#username(type="text", name="username", data-validation='len(5,13);isAlpha;uniqeUsrName;', placeholder="Enter your Username...") + .error + span(data-validation-msg='uniqeUsrName') + | This username is already used. + span(data-validation-msg='len') + | This field must have at least 5 and cannot be longer than 13 characters. + span(data-validation-msg='isAlpha') + | Nickname can contain only numbers, periods and Latin letters. + .b-form-row__col + label.e-form__label(for='email') Email + input.e-form__field#email(type="email", name="email", data-validation='isEmail;', placeholder="Enter your Email...") + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + .b-form-row + .b-form-row__col + label.e-form__label(for='password') Password + input.e-form__field#password(type="password", name="password", data-validation='len(8,20);', placeholder="Enter your Password...") + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + .b-form-row__col + label.e-form__label(for='confirmpass') Confirm Password + input.e-form__field#confirmpass(type="password", name="confirmpass", data-validation='isMatch(password)', placeholder="Confirm your Password...") + .error + span(data-validation-msg='isMatch') + | Passwords do not match + .b-form-row + .b-form-row__col + label.e-form__label(for='phone') Phone Number + input.e-form__field#phone(type="text", name="phone", data-validation='len(10,15);isNumber;', placeholder="Enter your Phone Number...") + .error + span(data-validation-msg='len') + | This field must have at least 10 and cannot be longer than 15 characters. + span(data-validation-msg='isNumber') + | This is not a valid phone number. + .b-form-row__col + label.e-form__label(for='company') Company + input.e-form__field#company(type="text", name="company", data-validation='len(2, 60);', placeholder="Enter your Company...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row + .b-form-row__col + label.e-form__label(for='industry') Industry + input.e-form__field#industry(type="text", name="industry", data-validation='len(2, 60);', placeholder="Enter your industry...") + .error + span(data-validation-msg='len') + | This field must have at least 2 and cannot be longer than 60 characters. + .b-form-row__col + label.e-form__label Country + .e-select + label.e-select__label(for='country') + select.e-select__box#country(placeholder='Country', name='country', data-validation='len(1);') + option(value='') Country + each country in countries + option(value=country) #{country} + .error + span(data-validation-msg='len') + | This field cannot be blank. + + button.e-form__button.e-form__button--offset(type="submit") Create Account + + article#forgotPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-forgot-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | FORGOT YOUR PASSWORD? + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/login') + .b-modal-window__main-block__body + .msg.hidden + p If you have entered a valid email, please check it for further instructions. + form.e-form(method='POST') p - | Yes. Please see the description of our - a(href='#') University Collaboration Program - | . - li - h2.blueHeader 10) Can I translate the Microsoft Data Gathering mobile client into my language? + | Please enter your username and email to reset your password. p - | Yes. Please get in touch with us at - a(href='mdgspprt@microsoft.com') mdgspprt@microsoft.com - | and work with us to provide a translation of - | the software in your language. We will then push this out - | and make the language version available to all users. - article#login.hidden - section - div - h1 LOGIN - form - label.col-left - input(type='text', name='username', placeholder='Enter your username...') - label.col-right - input(type='password', name='password', placeholder='Enter your password...') - .error - a(href='#/forgotPassword') Forgot your password? - button(type='submit') Login - article#register.hidden - section - div - h1 REGISTER - form(action='signup', met='post', autocomplete="off") - label.col-left - input(type='text', placeholder='First name', name='firstName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - input(type='text', placeholder='Last name', name='lastName', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 characters. - label.col-left - input(type='text', placeholder='Username', name='username', data-validation='len(5,13);isAlpha;uniqeUsrName;') - .error - span(data-validation-msg='uniqeUsrName') - | This username is already used. - span(data-validation-msg='len') - | This field must have at least 5 and cannot be longer than 13 characters. - span(data-validation-msg='isAlpha') - | Nickname can contain only numbers, periods and Latin letters. - label.col-right - input(type='text', placeholder='Email', name='email', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - label.col-left - input(type='password', placeholder='Password', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm password', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - label.col-left - input(type='text', placeholder='Phone number', name='phone', data-validation='len(10,15);isNumber;') - .error - span(data-validation-msg='len') - | This field must have at least 10 and cannot be longer than 15 characters. - span(data-validation-msg='isNumber') - | This is not a valid phone number. - label.col-right - input(type='text', placeholder='Company', name='company', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-left - input(type='text', placeholder='Industry', name='industry', data-validation='len(2, 60);') - .error - span(data-validation-msg='len') - | This field must have at least 2 and cannot be longer than 60 characters. - label.col-right - select(placeholder='Country', name='country', data-validation='len(1);') - option(value='') Country - each country in countries - option(value=country) #{country} - .error - span(data-validation-msg='len') - | This field cannot be blank. - button(type='submit') Create Account - article#forgotPassword.hidden - section - div - h1 FORGOT YOUR PASSWORD? - .msg.hidden - p If you have entered a valid email, please check it for further instructions. - form - p - | Please enter your username and email to reset your password. - p - | If you forgot your username, please enter your email - | only and we will send all usernames related to this email. - label.col-left - input(type='text', name='username', placeholder='Username...') - label.col-right - input(type='text', name='email', placeholder='Email...', data-validation='isEmail;') - .error - span(data-validation-msg='isEmail') - | This is not a valid email. - button(type='submit') Proceed - article#resetPassword.hidden - section - div - h1 RESET PASSWORD - form - label.col-left - input(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') - .error - span(data-validation-msg='len') - | This field must have at least 8 and cannot be longer than 20 characters. - label.col-right - input(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') - .error - span(data-validation-msg='isMatch') - | Passwords do not match - button(type='submit') Apply - article#resetPasswordError.hidden - section - div - h1 RESET PASSWORD - .msg - p Password reset token is invalid or has expired. - - .modal.success-registration.hidden - .overlay - .window - .window-body - div You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder - input(type="button" value="OK") + | If you forgot your username, please enter your email + | only and we will send all usernames related to this email. + label.e-form__label(for='username_forgot-pass') + input.e-form__field#username_forgot-pass(type='text', name='username', placeholder='Username...') + label.e-form__label(for='email_forgot-pass') + input.e-form__field#email_forgot-pass(type='text', name='email', placeholder='Email...', data-validation='isEmail;') + .error + span(data-validation-msg='isEmail') + | This is not a valid email. + button.e-form__button(type='submit') Proceed + article#resetPassword.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/login') + .b-modal-window__main-block__body + form.e-form(method='POST', autocomplete="off") + label.e-form__label(for='password_reset-pass') + input.e-form__field#password_reset-pass(type='password', placeholder='Enter new password...', name='password', data-validation='len(8,20);') + .error + span(data-validation-msg='len') + | This field must have at least 8 and cannot be longer than 20 characters. + label.e-form__label(for='confirmpass_reset-pass') + input.e-form__field#confirmpass_reset-pass(type='password', placeholder='Confirm new password...', name='confirmpass', data-validation='isMatch(password)') + .error + span(data-validation-msg='isMatch') + | Passwords do not match + button.e-form__button(type='submit') Apply + article#resetPasswordError.hidden + .b-modal-window + .b-modal-window__main-block.b-reset-pass-error + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | RESET PASSWORD + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href='#/resetPassword') + .b-modal-window__main-block__body + .modal.success-registration.hidden + .msg + p Password reset token is invalid or has expired. + + article#successRegistration.hidden + .b-modal-window + .b-modal-window__main-block.b-success-registration + .b-modal-window__main-block__header + h2.b-modal-window__main-block__header--title + | Successfully Registration + span.b-modal-window__main-block__header--icon-close() + a.fa.fa-times(href="#/register") + .b-modal-window__main-block__body + .modal.success-registration + .msg + p You have successfully created an account on the server! Please check your email to continue with the registration process. If you cannot find the email in your inbox then please check your Spam folder + button.b-success-registration__btn(type="button") + a(href='#/login') + span.fa.fa-check.b-success-registration__btn--icon + span() OK + .b-page__footer + ul.b-page__footer__box + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/policy/privacy-policy/') + | Privacy Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/cookie/cookie-policy/') + | Cookie Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='http://www.microsoft.com/en/mobile/privacy/privacy/service-terms/service-terms/') + | Service Policy + li.b-page__footer__box__item + a.b-page__footer__box__item__link(target='_blank', href='https://github.com/nokiadatagathering') + | Code diff --git a/app/views/index-development.jade b/app/views/index-development.jade deleted file mode 100644 index 4ff4b07..0000000 --- a/app/views/index-development.jade +++ /dev/null @@ -1,53 +0,0 @@ -!!! -html(manifest="mdgcache.manifest") - head - title= title - meta(charset='utf-8') - meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') - meta(name='viewport', content='initial-scale=1.0') - - link(rel='stylesheet/less', type='text/css', href='/resources/stylesheets/styles.less') - link(rel='stylesheet', href='bower_components/jquery-ui/themes/smoothness/jquery-ui.css') - link(rel='stylesheet', href='//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css') - - //- - script(src='bower_components/jquery/jquery.js') - script(src='bower_components/jquery-ui/ui/jquery-ui.js') - script(src='bower_components/d3/d3.js') - script(src='bower_components/d3-tip/index.js') - script(src='bower_components/angular/angular.js') - script(src='bower_components/angular-dragdrop/src/angular-dragdrop.js') - script(src='bower_components/angular-ui-router/release/angular-ui-router.js') - script(src='bower_components/underscore/underscore.js') - script(src='bower_components/angular-base64/angular-base64.js') - script(src='bower_components/angular-sanitize/angular-sanitize.min.js') - script(src='bower_components/angular-dropdowns/dist/angular-dropdowns.js') - script(src='bower_components/uuid-js/lib/uuid.js') - script(src='bower_components/angular-cache-buster/angular-cache-buster.js') - script(src='bower_components/angular-ui-sortable/sortable.js') - script(src='bower_components/angular-translate/angular-translate.js') - script(src='bower_components/angular-cookies/angular-cookies.js') - script(src='bower_components/angular-translate-storage-cookie/angular-translate-storage-cookie.js') - script(src='bower_components/angular-translate-storage-local/angular-translate-storage-local.js') - script(src='bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js') - script(src='bower_components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js') - script(src='bower_components/messageformat/messageformat.js') - script(src='bower_components/messageformat/locale/en.js') - script(src='bower_components/messageformat/locale/ru.js') - script(src='bower_components/messageformat/locale/zh.js') - script(src='bower_components/messageformat/locale/vi.js') - script(src='bower_components/async/lib/async.js') - //- - - script(src='bower_components/less/dist/less-1.6.2.min.js', type='text/javascript') - script(src='bower_components/requirejs/require.js', 'data-main'='/main') - - script(src='//tags.tiqcdn.com/utag/nokia/datagathering/dev/utag.js') - script(src="https://js.cit.api.here.com/ee/2.5.3/jsl.js?with=all") - - if (version) - script. - window.version = '!{version}'; - body - div('ui-view'='' class='templates') - diff --git a/app/views/index-production.jade b/app/views/index-production.jade deleted file mode 100644 index d7b22c8..0000000 --- a/app/views/index-production.jade +++ /dev/null @@ -1,28 +0,0 @@ -!!! -html - head - title= title - meta(charset='utf-8') - meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') - meta(name='viewport', content='initial-scale=1.0') - - link(rel='stylesheet', type='text/css', href='/resources/stylesheets/styles.css') - link(rel='stylesheet', href='/resources/jquery-ui/jquery-ui.css') - link(rel='stylesheet', href='//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css') - - script(src="https://js.cit.api.here.com/ee/2.5.3/jsl.js?with=all") - script(src='//tags.tiqcdn.com/utag/nokia/datagathering/dev/utag.js') - - script(src='/vendor.js') - script(src='/app.min.js') - - script. - //nokia analytics - var nkT = { - pName : "index", - sCountry : "ww", - sLang : "en" - }; - body - div('ui-view'='' class='templates') - diff --git a/app/views/index.jade b/app/views/index.jade new file mode 100644 index 0000000..cfe107f --- /dev/null +++ b/app/views/index.jade @@ -0,0 +1,49 @@ +doctype html +html( ng-app='mdg' manifest = manifest ) + head + title= title + meta(charset='utf-8') + meta('http-equiv'='X-UA-Compatible', content='IE=edge,chrome=1') + meta(name='viewport', content='initial-scale=1.0') + + link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css') + + // build:css({.tmp/serve,src}) styles/app.css + link(rel='stylesheet', href='../bower_components/jquery-ui/themes/excite-bike/jquery-ui.css') + + // bower:css + // endbower + //- inject:css + //- endinject + // endbuild + + script(src="https://js.cit.api.here.com/ee/2.5.3/jsl.js?with=all") + + // build:js(src) scripts/vendor.js + //- bower:js + // run `gulp wiredep` to automaticaly populate bower script dependencies + //- endbower + // endbuild + + // build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js + + script(src="../../src/application.js") + script(src="../../src/config.js") + //- inject:js + // js files will be automaticaly insert here + //- endinject + + //- inject:partials + //- endinject + + script(src='../../bower_components/messageformat/locale/en.js') + script(src='../../bower_components/messageformat/locale/ru.js') + script(src='../../bower_components/messageformat/locale/zh.js') + script(src='../../bower_components/messageformat/locale/vi.js') + // endbuild + if (version) + script. + window.version = '!{version}'; + body.b-page + div('ui-view'='' class='templates') + diff --git a/app/views/monthlyReport.jade b/app/views/monthlyReport.jade index 349de7b..d602718 100644 --- a/app/views/monthlyReport.jade +++ b/app/views/monthlyReport.jade @@ -1,4 +1,4 @@ -!!! +doctype html html head title= title @@ -24,4 +24,4 @@ html each month in months option(value=month) #{month} - input(type="submit", class="btn", value="Send") \ No newline at end of file + input(type="submit", class="btn", value="Send") diff --git a/app/views/sentMonthlyReport.jade b/app/views/sentMonthlyReport.jade index 7521bef..9e12037 100644 --- a/app/views/sentMonthlyReport.jade +++ b/app/views/sentMonthlyReport.jade @@ -1,4 +1,4 @@ -!!! +doctype html html head title= title @@ -10,4 +10,4 @@ html body h1 MONTHLY REPORT - div(class="content") Report was sent to email #{email} \ No newline at end of file + div(class="content") Report was sent to email #{email} diff --git a/bower.json b/bower.json index 1f9b78b..54d3f64 100644 --- a/bower.json +++ b/bower.json @@ -1,12 +1,14 @@ { - "name": "ndg", + "name": "mdg", + "version": "0.0.0", "dependencies": { "angular": "1.2.*", + "ng-file-upload": "~11.0.2", "angular-ui-router": "0.2.5", "angular-base64": "2.0.1", "angular-sanitize": "1.2.*", "angular-dragdrop": "1.0.6", - "angular-dropdowns": "https://github.com/annavernidub/angular-dropdowns.git#master", + "angular-dropdowns": "*", "angular-cache-buster": "0.3.1", "angular-ui-sortable": "0.12.6", "angular-translate": "~2.2.0", @@ -14,7 +16,7 @@ "angular-translate-loader-static-files": "~2.2.0", "angular-translate-interpolation-messageformat": "~2.1.0", "angular-cookies": "~1.2.19", - "requirejs": "2.1.*", + "clipboard": "~1.5.5", "jquery": "2.0.3", "jquery-ui": "1.10.3", "underscore": "1.5.*", @@ -23,6 +25,7 @@ "d3-tip": "0.6.4", "uuid-js": "~0.7.5", "almond": "~0.2.9", - "async": "0.9.0" + "async": "0.9.0", + "font-awesome": "~4.3.0" } } diff --git a/config.js b/config.js index f8bc3ea..5bd2acf 100644 --- a/config.js +++ b/config.js @@ -3,7 +3,7 @@ module.exports = { general: { siteName: 'Microsoft Data Gathering', protocolType: 'http', - port: 3000, + port: 3001, mongodbUrl: 'mongodb://127.0.0.1:27017/MDG-test' }, basicAuth: { @@ -17,7 +17,7 @@ module.exports = { }, mail: { from: { - registration: 'registration@nokiadatagathering.net', + registration: 'mdgspprt@microsoft.com', subscription: 'noreply@nokiadatagathering.net', report: 'report@nokiadatagathering.net' }, diff --git a/configurationSchema.js b/configurationSchema.js index 681174f..7299ee8 100644 --- a/configurationSchema.js +++ b/configurationSchema.js @@ -7,7 +7,7 @@ module.exports = { type: String, title: 'Site Name', description: '', - defaults: 'NOKIA DATA GATHERING' + defaults: 'MICROSOFT DATA GATHERING' }, protocolType: { type: String, @@ -53,6 +53,24 @@ module.exports = { } } }, + enketo: { + title: 'Enketo', + description: 'Parameters for Enketo', + children: { + token: { + type: String, + title: 'enketo token', + description: 'enketo token', + defaults: '5aslore4vgmvlsor' + }, + server: { + type: String, + title: 'enketo server url', + description: 'enketo server', + defaults: 'http://mdg-test.wookieelabs.com:9090/api/v1/survey' + } + } + }, languages: { title: 'Languages', description: 'Parameters for Digest Authorization. Do NOT change these unless you know what you are doing', @@ -68,10 +86,10 @@ module.exports = { title: 'Supported languages', description: '', defaults: [ - {value: 'en', text: 'English'}, - {value: 'ru', text: 'Русский'}, - {value: 'zh', text: '中文'}, - {value: 'vi', text: 'Việt' } + {value: 'en', text: 'English', title: 'English'}, + {value: 'ru', text: 'Русский', title: 'Russian'}, + {value: 'zh', text: '中文', title: 'Chinese'}, + {value: 'vi', text: 'Việt', title: 'Vietnamese' } ] }, supported_languages_mobile: { @@ -208,7 +226,7 @@ module.exports = { type: String, title: 'Registration Email from', description: '', - defaults: 'registration@nokiadatagathering.net' + defaults: 'mdgspprt@microsoft.com' }, subscription: { type: String, @@ -246,7 +264,7 @@ module.exports = { type: String, title: 'Mandrill Api Key', description: 'Defines Mandrill Api Key', - defaults: '' + defaults: 'WO6r_NFfdABIKOTEgdvuvQ' /* test api KEY */ }, emailsForUsersReport: { type: Object, diff --git a/e2e/main.po.js b/e2e/main.po.js new file mode 100644 index 0000000..6b88871 --- /dev/null +++ b/e2e/main.po.js @@ -0,0 +1,15 @@ +/** + * This file uses the Page Object pattern to define the main page for tests + * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ + */ + +'use strict'; + +var MainPage = function() { + this.jumbEl = element(by.css('.jumbotron')); + this.h1El = this.jumbEl.element(by.css('h1')); + this.imgEl = this.jumbEl.element(by.css('img')); + this.thumbnailEls = element(by.css('body')).all(by.repeater('awesomeThing in awesomeThings')); +}; + +module.exports = new MainPage(); diff --git a/e2e/main.spec.js b/e2e/main.spec.js new file mode 100644 index 0000000..da89d22 --- /dev/null +++ b/e2e/main.spec.js @@ -0,0 +1,21 @@ +'use strict'; + +describe('The main view', function () { + var page; + + beforeEach(function () { + browser.get('http://localhost:3000/index.html'); + page = require('./main.po'); + }); + + it('should include jumbotron with correct data', function() { + expect(page.h1El.getText()).toBe('\'Allo, \'Allo!'); + expect(page.imgEl.getAttribute('src')).toMatch(/assets\/images\/yeoman.png$/); + expect(page.imgEl.getAttribute('alt')).toBe('I\'m Yeoman'); + }); + + it('list more than 5 awesome things', function () { + expect(page.thumbnailEls.count()).toBeGreaterThan(5); + }); + +}); diff --git a/gulp/build.js b/gulp/build.js new file mode 100644 index 0000000..832ccdd --- /dev/null +++ b/gulp/build.js @@ -0,0 +1,99 @@ +'use strict'; + +var gulp = require('gulp'); + +var paths = gulp.paths; + + +var $ = require('gulp-load-plugins')({ + pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del'] +}); + +gulp.task('partials', [], function () { + return gulp.src([ + paths.src + '/{app,components}/**/*.html', + paths.tmp + '/{app,components}/**/*.html' + ]) + .pipe($.minifyHtml({ + empty: true, + spare: true, + quotes: true + })) + .pipe($.angularTemplatecache('templateCacheHtml.js', { + module: 'mdg' + })) + .pipe(gulp.dest(paths.tmp + '/partials/')); +}); + +gulp.task('html', ['inject'], function () { + + var htmlFilter = $.filter('*.html'); + var jsFilter = $.filter('**/*.js'); + var cssFilter = $.filter('**/index.css'); + var assets; + + return gulp.src(paths.tmp + '/serve/*.html') + .pipe(assets = $.useref.assets()) + .pipe($.rev()) + .pipe(jsFilter) + .pipe($.ngAnnotate()) + //.pipe($.uglify({preserveComments: $.uglifySaveLicense})) + .pipe(jsFilter.restore()) + .pipe(cssFilter) + .pipe($.csso()) + .pipe(cssFilter.restore()) + .pipe(assets.restore()) + .pipe($.useref()) + .pipe($.revReplace()) + .pipe(htmlFilter) + .pipe($.minifyHtml({ + empty: true, + spare: true, + quotes: true + })) + .pipe(htmlFilter.restore()) + .pipe(gulp.dest(paths.dist + '/')) + .pipe($.size({ title: paths.dist + '/', showFiles: true })); +}); + +gulp.task('html2jade',['html'], function () { + return gulp.src((paths.dist + '/index.html')) + .pipe($.html2jade()) + .pipe(gulp.dest(paths.dist + '/')); +}); + +gulp.task('images', function () { + return gulp.src(paths.src + '/assets/images/**/*') + .pipe(gulp.dest(paths.dist + '/assets/images/')) + .pipe(gulp.dest(paths.tmp + '/serve/assets/images/')); +}); + +gulp.task('icons', function () { + return gulp.src(paths.src + '/assets/icons/**/*') + .pipe(gulp.dest(paths.dist + '/assets/icons/')) + .pipe(gulp.dest(paths.tmp + '/serve/assets/icons/')); +}); + +gulp.task('fonts', function () { + return gulp.src($.mainBowerFiles()) + .pipe($.filter('**/*.{eot,svg,ttf,woff}')) + .pipe($.flatten()) + .pipe(gulp.dest(paths.dist + '/fonts/')); +}); + +gulp.task('misc', function () { + return gulp.src(paths.src + '/**/*.ico') + .pipe(gulp.dest(paths.dist + '/')); +}); + + +gulp.task('clean', function (done) { + $.del([paths.dist + '/', paths.tmp + '/'], done); +}); + +gulp.task('testing',['build'], function (done) { + return gulp.src('specs/**/*.js') + .pipe($.vows({reporter: 'spec'})); +}); + +gulp.task('build', ['html2jade', 'images', 'icons', 'fonts', 'misc']); diff --git a/gulp/develop.js b/gulp/develop.js new file mode 100644 index 0000000..c33d7b7 --- /dev/null +++ b/gulp/develop.js @@ -0,0 +1,33 @@ +'use strict'; + +var gulp = require('gulp'); + +var paths = gulp.paths; + +var $ = require('gulp-load-plugins')(); + +gulp.task('develop', function () { + + return $.nodemon({ + script: 'app.js', + ext: 'html js jade', + tasks: ['styles', 'inject'], /*requires Node v0.12*/ + env: {'NODE_ENV': 'development'} + }) + .on('restart', function () { + console.log('restarted!') + }) +}); + +gulp.task('prod', function () { + + return $.nodemon({ + script: 'app.js', + ext: 'html js jade', + tasks: ['styles', 'inject'], /*requires Node v0.12*/ + env: {'NODE_ENV': 'production'} + }) + .on('restart', function () { + console.log('restarted!') + }) +}); diff --git a/gulp/e2e-tests.js b/gulp/e2e-tests.js new file mode 100644 index 0000000..99ab2c5 --- /dev/null +++ b/gulp/e2e-tests.js @@ -0,0 +1,35 @@ +'use strict'; + +var gulp = require('gulp'); + +var $ = require('gulp-load-plugins')(); + +var browserSync = require('browser-sync'); + +var paths = gulp.paths; + +// Downloads the selenium webdriver +gulp.task('webdriver-update', $.protractor.webdriver_update); + +gulp.task('webdriver-standalone', $.protractor.webdriver_standalone); + +function runProtractor (done) { + + gulp.src(paths.e2e + '/**/*.js') + .pipe($.protractor.protractor({ + configFile: 'protractor.conf.js', + })) + .on('error', function (err) { + // Make sure failed tests cause gulp to exit non-zero + throw err; + }) + .on('end', function () { + // Close browser sync server + browserSync.exit(); + done(); + }); +} + +gulp.task('protractor', ['protractor:src']); +gulp.task('protractor:src', ['serve:e2e', 'webdriver-update'], runProtractor); +gulp.task('protractor:dist', ['serve:e2e-dist', 'webdriver-update'], runProtractor); diff --git a/gulp/inject.js b/gulp/inject.js new file mode 100644 index 0000000..8b006dd --- /dev/null +++ b/gulp/inject.js @@ -0,0 +1,70 @@ +'use strict'; + +var gulp = require('gulp'); + +var paths = gulp.paths; + +var $ = require('gulp-load-plugins')(); + +var wiredep = require('wiredep').stream; + +gulp.task('inject', ['partials', 'styles', 'home_inject', 'lang_inject', 'adminpage_inject'], function () { + + var partialsInjectFile = gulp.src(paths.tmp + '/partials/templateCacheHtml.js'); + var partialsInjectOptions = { + starttag: '//- inject:partials', + addRootSlash: false, + addPrefix: '../..' + }; + + var injectStyles = gulp.src([ + paths.tmp + '/serve/{app,components}/*.css', + '!' + paths.tmp + '/serve/app/404.css', + ]); + + var injectScripts = gulp.src([ + paths.src + '/{app,components}/**/*.js', + '!' + paths.src + '/application.js', + '!' + paths.src + '/config.js' + ]).pipe($.angularFilesort()); + + var injectOptions = { + relative: true + }; + + var wiredepOptions = { + src: [paths.tmp + '/serve/index.jade', '/async/lib/async.js'], + directory: 'bower_components', + ignorePath: ['/..'], + exclude: ['/angular-dropdowns/angular-dropdowns.css', '/angular-dropdowns/dist/angular-dropdowns.css', + '/angular-dropdowns/angular-dropdowns.min.css', '/angular-dropdowns/dist/angular-dropdowns.min.css'] + }; + + return gulp.src(paths.jade + '/index.jade') + .pipe($.inject(injectStyles, injectOptions)) + .pipe($.inject(injectScripts, injectOptions)) + .pipe($.inject(partialsInjectFile, partialsInjectOptions)) + .pipe(wiredep(wiredepOptions)) + .pipe(gulp.dest(paths.tmp + '/serve')) + .pipe($.jade({ pretty: true})) + .pipe(gulp.dest(paths.tmp + '/serve')); + +}); + +gulp.task('home_inject', function () { + return gulp.src('app/resources/home.js') + .pipe(gulp.dest(paths.dist + '/')) + .pipe(gulp.dest(paths.tmp + '/')); +}); + +gulp.task('adminpage_inject', function () { + return gulp.src('app/resources/adminPage.js') + .pipe(gulp.dest(paths.dist + '/')) + .pipe(gulp.dest(paths.tmp + '/')); +}); + +gulp.task('lang_inject', function () { + return gulp.src(paths.src + '/languages/*.json') + .pipe(gulp.dest(paths.dist + '/languages')) + .pipe(gulp.dest(paths.tmp + '/languages')); +}); diff --git a/gulp/proxy.js b/gulp/proxy.js new file mode 100644 index 0000000..2fcd734 --- /dev/null +++ b/gulp/proxy.js @@ -0,0 +1,65 @@ + /*jshint unused:false */ + +/*************** + + This file allow to configure a proxy system plugged into BrowserSync + in order to redirect backend requests while still serving and watching + files from the web project + + IMPORTANT: The proxy is disabled by default. + + If you want to enable it, watch at the configuration options and finally + change the `module.exports` at the end of the file + +***************/ + +'use strict'; + +var httpProxy = require('http-proxy'); +var chalk = require('chalk'); + +/* + * Location of your backend server + */ +var proxyTarget = 'http://server/context/'; + +var proxy = httpProxy.createProxyServer({ + target: proxyTarget +}); + +proxy.on('error', function(error, req, res) { + res.writeHead(500, { + 'Content-Type': 'text/plain' + }); + + console.error(chalk.red('[Proxy]'), error); +}); + +/* + * The proxy middleware is an Express middleware added to BrowserSync to + * handle backend request and proxy them to your backend. + */ +function proxyMiddleware(req, res, next) { + /* + * This test is the switch of each request to determine if the request is + * for a static file to be handled by BrowserSync or a backend request to proxy. + * + * The existing test is a standard check on the files extensions but it may fail + * for your needs. If you can, you could also check on a context in the url which + * may be more reliable but can't be generic. + */ + if (/\.(html|css|js|png|jpg|jpeg|gif|ico|xml|rss|txt|eot|svg|ttf|woff|cur)(\?((r|v|rel|rev)=[\-\.\w]*)?)?$/.test(req.url)) { + next(); + } else { + proxy.web(req, res); + } +} + +/* + * This is where you activate or not your proxy. + * + * The first line activate if and the second one ignored it + */ + +//module.exports = [proxyMiddleware]; +module.exports = []; diff --git a/gulp/server.js b/gulp/server.js new file mode 100644 index 0000000..58d7ad6 --- /dev/null +++ b/gulp/server.js @@ -0,0 +1,60 @@ +'use strict'; + +var gulp = require('gulp'); + +var paths = gulp.paths; + +var util = require('util'); + +var browserSync = require('browser-sync'); + +var middleware = require('./proxy'); + +function browserSyncInit(baseDir, files, browser) { + browser = browser === undefined ? 'default' : browser; + + var routes = null; + if(baseDir === paths.src || (util.isArray(baseDir) && baseDir.indexOf(paths.src) !== -1)) { + routes = { + '/bower_components': 'bower_components' + }; + } + + browserSync.instance = browserSync.init(files, { + startPath: '/', + server: { + baseDir: baseDir, + middleware: middleware, + routes: routes + }, + browser: browser + }); +} + +gulp.task('serve', ['watch'], function () { + browserSyncInit([ + paths.tmp + '/serve', + paths.src + ], [ + paths.tmp + '/serve/{app,components}/**/*.css', + paths.src + '/{app,components}/**/*.js', + paths.src + 'src/assets/images/**/*', + paths.tmp + '/serve/*.html', + paths.tmp + '/serve/*.jade', + paths.tmp + '/serve/{app,components}/**/*.html', + paths.tmp + '/serve/{app,components}/**/*.jade', + paths.src + '/{app,components}/**/*.html' + ]); +}); + +gulp.task('serve:dist', ['build'], function () { + browserSyncInit(paths.dist); +}); + +gulp.task('serve:e2e', ['inject'], function () { + browserSyncInit([paths.tmp + '/serve', paths.src], null, []); +}); + +gulp.task('serve:e2e-dist', ['build'], function () { + browserSyncInit(paths.dist, null, []); +}); diff --git a/gulp/styles.js b/gulp/styles.js new file mode 100644 index 0000000..96ed1fd --- /dev/null +++ b/gulp/styles.js @@ -0,0 +1,54 @@ +'use strict'; + +var gulp = require('gulp'); + +var paths = gulp.paths; + +var $ = require('gulp-load-plugins')(); + +gulp.task('styles', ['home_css'], function () { + + var sassOptions = { + style: 'expanded' + }; + + var injectFiles = gulp.src([ + paths.src + '/{app,components}/**/*.scss', + '!' + paths.src + '/app/index.scss' + ], {read: false}); + + var injectOptions = { + transform: function (filePath) { + filePath = filePath.replace(paths.src + '/app/', ''); + filePath = filePath.replace(paths.src + '/components/', '../components/'); + return '@import \'' + filePath + '\';'; + }, + starttag: '// injector', + endtag: '// endinjector', + addRootSlash: false + }; + + var indexFilter = $.filter('index.scss'); + + return gulp.src([ + paths.src + '/app/index.scss', + + ]) + .pipe(indexFilter) + .pipe($.inject(injectFiles, injectOptions)) + .pipe(indexFilter.restore()) + .pipe($.sass(sassOptions)) + + .pipe($.autoprefixer()) + .on('error', function handleError(err) { + console.error(err.toString()); + this.emit('end'); + }) + .pipe(gulp.dest(paths.tmp + '/serve/app/')); +}); + +gulp.task('home_css', function () { + return gulp.src('app/resources/*.css') + .pipe(gulp.dest(paths.dist + '/styles')) + .pipe(gulp.dest(paths.tmp + '/styles')); +}); diff --git a/gulp/unit-tests.js b/gulp/unit-tests.js new file mode 100644 index 0000000..f13a9c0 --- /dev/null +++ b/gulp/unit-tests.js @@ -0,0 +1,35 @@ +'use strict'; + +var gulp = require('gulp'); + +var $ = require('gulp-load-plugins')(); + +var wiredep = require('wiredep'); + +var paths = gulp.paths; + +function runTests (singleRun, done) { + var bowerDeps = wiredep({ + directory: 'bower_components', + exclude: ['bootstrap-sass-official'], + dependencies: true, + devDependencies: true + }); + + var testFiles = bowerDeps.js.concat([ + paths.src + '/{app,components}/**/*.js' + ]); + + gulp.src(testFiles) + .pipe($.karma({ + configFile: 'karma.conf.js', + action: (singleRun)? 'run': 'watch' + })) + .on('error', function (err) { + // Make sure failed tests cause gulp to exit non-zero + throw err; + }); +} + +gulp.task('test', function (done) { runTests(true /* singleRun */, done) }); +gulp.task('test:auto', function (done) { runTests(false /* singleRun */, done) }); diff --git a/gulp/watch.js b/gulp/watch.js new file mode 100644 index 0000000..8e87812 --- /dev/null +++ b/gulp/watch.js @@ -0,0 +1,15 @@ +'use strict'; + +var gulp = require('gulp'); + +var paths = gulp.paths; + +gulp.task('watch', ['inject'], function () { + gulp.watch([ + paths.src + '/*.html', + paths.src + '/{app,components}/**/*.scss', + paths.src + '/{app,components}/**/*.js', + 'bower.json' + ], []); + gulp.watch(paths.src + '/{app,components}/**/*.jade', []); +}); diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..10c3f8e --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,18 @@ +'use strict'; + +var gulp = require('gulp'); +var nodemon = require('gulp-nodemon'); + +gulp.paths = { + src: 'src', + dist: 'dist', + tmp: '.tmp', + e2e: 'e2e', + jade: 'app/views' +}; + +require('require-dir')('./gulp'); + +gulp.task('default', ['clean'], function () { + gulp.start('build'); +}); diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..12e3ff3 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function(config) { + + config.set({ + autoWatch : false, + + frameworks: ['jasmine'], + + browsers : ['PhantomJS'], + + plugins : [ + 'karma-phantomjs-launcher', + 'karma-jasmine' + ] + }); +}; diff --git a/mdgcache-dev.manifest b/mdgcache-dev.manifest new file mode 100644 index 0000000..0fc6fb0 --- /dev/null +++ b/mdgcache-dev.manifest @@ -0,0 +1,102 @@ +CACHE MANIFEST +# 2 +CACHE: + + +/supportedLanguages +/src/languages/locale-cn.json +/src/languages/locale-en.json +/src/languages/locale-ru.json + +/src/assets/icons/folder.png +/src/assets/icons/pen.png +/src/assets/icons/upload.png + +//js.cit.api.here.com/ee/2.5.3/jsl.js?with=all + +//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css +//tags.tiqcdn.com/utag/nokia/datagathering/dev/utag.js + + +/bower_components/jquery/jquery.js +/bower_components/angular/angular.js +/bower_components/angular-ui-router/release/angular-ui-router.js +/bower_components/angular-base64/angular-base64.js +/bower_components/angular-base64/angular-base64.min.js +/bower_components/angular-sanitize/angular-sanitize.js +/bower_components/jquery-ui/ui/jquery-ui.js +/bower_components/angular-dragdrop/src/angular-dragdrop.js +/bower_components/angular-dropdowns/dist/angular-dropdowns.js +/bower_components/angular-cache-buster/angular-cache-buster.js +/bower_components/angular-ui-sortable/sortable.js +/bower_components/angular-translate/angular-translate.js +/bower_components/angular-translate-storage-cookie/angular-translate-storage-cookie.js +/bower_components/angular-translate-storage-local/angular-translate-storage-local.js +/bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js +/bower_components/messageformat/messageformat.js +/bower_components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js +/bower_components/angular-cookies/angular-cookies.js +/bower_components/underscore/underscore.js +/bower_components/less/dist/less-1.6.2.js +/bower_components/d3/d3.js +/bower_components/d3-tip/index.js +/bower_components/uuid-js/lib/uuid.js +/bower_components/almond/almond.js + +/src/application.js +/src/config.js +/src/components/ui/validate-phone-number/validate-phone-number.directive.js +/src/components/ui/validate-pattern/validate-pattern.directive.js +/src/components/ui/time-selector/time-selector.directive.js +/src/components/ui/question-builder/question-builder.directive.js +/src/components/ui/notifications/notifications.directive.js +/src/components/ui/nf-event/nf-event.directive.js +/src/components/ui/focus-me/focus-me.directive.js +/src/components/ui/file-select/file-select.directive.js +/src/components/ui/expand/expand.directive.js +/src/components/ui/errorsblock/errorsblock.directive.js +/src/components/ui/date-range/date-range.directive.js +/src/components/ui/date-input/date-input.directive.js +/src/components/ui/csv-options-import/csv-options-import.directive.js +/src/components/ui/cascade-question/cascade-question.directive.js +/src/components/ui/auto-complete/auto-complete.service.js +/src/components/ui/auto-complete/auto-complete.directive.js +/src/components/helpers/validate/validate.service.js +/src/components/helpers/subscription/subscription.service.js +/src/components/helpers/offline/offline.service.js +/src/components/helpers/errors/errors.service.js +/src/components/api/sms/sms.service.js +/src/app/users/users.module.js +/src/app/users/sms-to-user/user.sms.controller.js +/src/app/users/sms-to-group/user.group.sms.controller.js +/src/app/users/groups/users.groups.service.js +/src/app/users/groups/users.groups.controller.js +/src/app/users/edit/user.edit.controller.js +/src/app/users/add/user.add.controller.js +/src/app/surveys/surveys.module.js +/src/app/surveys/send/surveys.send.controller.js +/src/app/surveys/edit/surveys.edit.controller.js +/src/app/results/results.module.js +/src/app/results/map/results.map.service.js +/src/app/results/map/results.map.comtroller.js +/src/app/results/export/results.export.controller.js +/src/app/results/details/results.details.controller.js +/src/app/results/chart/results.chart.service.js +/src/app/results/chart/results.chart.controller.js +/src/components/authorization/authorization.service.js +/src/app/users/users.service.js +/src/app/users/users.controller.js +/src/app/sync/sync.module.js +/src/app/sync/sync.service.js +/src/app/sync/sync.controller.js +/src/app/surveys/surveys.service.js +/src/app/surveys/surveys.controller.js +/src/app/results/results.service.js +/src/app/results/results.controller.js +/src/app/page/page.controller.js + +/.tmp/partials/templateCacheHtml.js + + +NETWORK: +* diff --git a/mdgcache.manifest b/mdgcache.manifest index 99be81d..cf57b2e 100644 --- a/mdgcache.manifest +++ b/mdgcache.manifest @@ -1,159 +1,29 @@ CACHE MANIFEST -# 4 +# 3 CACHE: -/main.js -/application.js -/config.js -/partials/templates/cascadeQuestion.html -/partials/templates/dateRange.html -/partials/templates/questionBuilder.html -/partials/templates/timeSelector.html -/partials/EditSurvey.html -/partials/ModalSyncOfflineMode.html -/partials/Page.html -/partials/SurveyList.html +# these filenames should be updated at each build +/styles/app-d6f3974b.css +/scripts/vendor-bdc00d12.js +/scripts/app-7e3772b3.js +# -/controllers/controllers.js -/controllers/AddUserCtrl.js -/controllers/BuilderCtrl.js -/controllers/EditSurveyCtrl.js -/controllers/EditUserCtrl.js -/controllers/ForgotPasswordCtrl.js -/controllers/GroupsCtrl.js -/controllers/LoginCtrl.js -/controllers/PageCtrl.js -/controllers/RegisterCtrl.js -/controllers/ResetPasswordCtrl.js -/controllers/ResultDetailsCtrl.js -/controllers/ResultsChartCtrl.js -/controllers/ResultsCtrl.js -/controllers/ResultsOnMapCtrl.js -/controllers/SendSurveyCtrl.js -/controllers/SurveysCtrl.js -/controllers/SyncCtrl.js -/controllers/UsersCtrl.js -/directives/directives.js -/directives/autoComplete.js -/directives/cascadeQuestion.js -/directives/csvOptioinsImport.js -/directives/dateInput.js -/directives/dateRange.js -/directives/errorsblock.js -/directives/expand.js -/directives/fileSelect.js -/directives/focusMe.js -/directives/nfEvent.js -/directives/notifications.js -/directives/questionBuilder.js -/directives/timeSelector.js -/directives/validatePattern.js -/directives/validatephonenumber.js /supportedLanguages -/languages/locale-zh.json +/languages/locale-cn.json /languages/locale-en.json /languages/locale-ru.json -/languages/locale-vi.json -/services/services.js -/services/autocompleteManager.js -/services/chartManager.js -/services/errorsManager.js -/services/groupsManager.js -/services/offlineManager.js -/services/profileManager.js -/services/resultsManager.js -/services/smsManager.js -/services/subscriptionManager.js -/services/surveysManager.js -/services/syncManager.js -/services/usersManager.js -/services/validateManager.js +/assets/icons/folder.png +/assets/icons/pen.png +/assets/icons/upload.png -/resources/fonts/NokiaPureText/nokiapuretext-webfont.eot -/resources/fonts/NokiaPureText/nokiapuretext-webfont.svg -/resources/fonts/NokiaPureText/nokiapuretext-webfont.ttf -/resources/fonts/NokiaPureText/nokiapuretext-webfont.woff -/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot -/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg -/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf -/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff - -/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot -/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg -/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf -/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff - -/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.eot -/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.svg -/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.ttf -/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.woff - -/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.eot -/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.svg -/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.ttf -/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.woff - -/resources/icons/accuracy.png -/resources/icons/alert.png -/resources/icons/arrow-20px.png -/resources/icons/browse-archive.png -/resources/icons/circle-tick-22px.png -/resources/icons/copy-20px.png -/resources/icons/cross-20px.png -/resources/icons/cross-red-13px.png -/resources/icons/delete-20px.png -/resources/icons/download-20px.png -/resources/icons/edit-20px.png -/resources/icons/lolgo-30px.png -/resources/icons/move-to-archive.png -/resources/icons/plus-16px.png -/resources/icons/search-20px.png -/resources/icons/send-20px.png -/resources/icons/upload-20px.png - -/resources/stylesheets/styles.less - -/bower_components/jquery/jquery.js -/bower_components/jquery-ui/ui/jquery-ui.js -/bower_components/angular/angular.js -/bower_components/d3/d3.js -/bower_components/d3-tip/index.js -/bower_components/angular-dragdrop/src/angular-dragdrop.js -/bower_components/angular-ui-router/release/angular-ui-router.js -/bower_components/underscore/underscore.js -/bower_components/angular-base64/angular-base64.js -/bower_components/angular-sanitize/angular-sanitize.min.js -/bower_components/angular-sanitize/angular-sanitize.min.js.map -/bower_components/angular-dropdowns/dist/angular-dropdowns.js -/bower_components/uuid-js/lib/uuid.js -/bower_components/angular-cache-buster/angular-cache-buster.js -/bower_components/angular-ui-sortable/sortable.js -/bower_components/async/lib/async.js //js.cit.api.here.com/ee/2.5.3/jsl.js?with=all -/bower_components/d3/d3.js -/bower_components/d3-tip/index.js -/bower_components/requirejs/require.js -/bower_components/less/dist/less-1.6.2.min.js -/bower_components/angular-translate/angular-translate.js -/bower_components/angular-cookies/angular-cookies.js -/bower_components/angular-translate-storage-cookie/angular-translate-storage-cookie.js -/bower_components/angular-translate-storage-local/angular-translate-storage-local.js -/bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js -/bower_components/angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat.js -/bower_components/messageformat/messageformat.js -/bower_components/messageformat/locale/en.js -/bower_components/messageformat/locale/ru.js -/bower_components/messageformat/locale/zh.js -/bower_components/messageformat/locale/vi.js -/bower_components/async/lib/async.js -//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css +//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css') //tags.tiqcdn.com/utag/nokia/datagathering/dev/utag.js -bower_components/jquery-ui/themes/smoothness/jquery-ui.css NETWORK: * diff --git a/package.json b/package.json index 5ac1431..4008bc7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "MDGServer", + "name": "mdg", "version": "1.0.0", "repository": { "type": "git", @@ -21,8 +21,12 @@ "express-resource-new": "0.1.1", "forever": "^0.11.1", "gridfs-stream": "0.5.1", + "gulp-html2jade": "^1.1.1", + "gulp-jade": "^1.0.1", + "gulp-nodemon": "^2.0.3", + "gulp-vows": "^0.1.2", "jade": "0.35.0", - "libxmljs": "~0.8.1", + "libxmljs": "~0.14.1", "mandrill-api": "1.0.40", "manifesto": "0.0.4", "method-override": "2.1.2", @@ -34,36 +38,57 @@ "passport-http": "~0.2.2", "passport-local": "0.1.6", "password-generator": "0.2.1", + "request": "~2.31.0", "sax": "~0.5.8", "stream-buffers": "0.2.5", "temp": "0.7.0", "twilio": "1.4.0", "underscore": "1.5.1", - "xmldom": "0.1.19", - "request": "~2.31.0" + "xmldom": "0.1.19" }, "devDependencies": { "api-easy": "~0.3.8", - "bower": "1.3.9", - "grunt": "~0.4.2", - "grunt-angular-templates": "^0.5.7", - "grunt-cli": "~0.1.11", - "grunt-contrib-concat": "^0.5.0", - "grunt-contrib-copy": "^0.5.0", - "grunt-contrib-jshint": "~0.7.2", - "grunt-contrib-less": "^0.11.4", - "grunt-contrib-requirejs": "^0.4.4", - "grunt-contrib-uglify": "^0.5.1", - "grunt-jade-usemin": "^0.6.0", - "grunt-jscs-checker": "~0.2.6", - "grunt-vows": "~0.4.0", + "gulp": "~3.8.10", + "gulp-autoprefixer": "~2.0.0", + "gulp-angular-templatecache": "~1.4.2", + "del": "~0.1.3", + "gulp-consolidate": "~0.1.2", + "gulp-csso": "~0.2.9", + "gulp-filter": "~1.0.2", + "gulp-flatten": "~0.0.4", + "gulp-jshint": "~1.9.0", + "gulp-load-plugins": "~0.7.1", + "gulp-size": "~1.1.0", + "gulp-uglify": "~1.0.1", + "gulp-useref": "~1.0.2", + "gulp-ng-annotate": "*", + "gulp-replace": "~0.5.0", + "gulp-rename": "~1.2.0", + "gulp-rev": "~2.0.1", + "gulp-rev-replace": "~0.3.1", + "gulp-minify-html": "~0.1.7", + "gulp-inject": "~1.0.2", + "gulp-protractor": "~0.0.11", + "gulp-karma": "~0.0.4", + "gulp-sass": "~1.1.0", + "gulp-angular-filesort": "~1.0.4", + "jade": "~1.8.1", + "main-bower-files": "~2.4.0", + "jshint-stylish": "~1.0.0", + "wiredep": "~2.2.0", + "karma-jasmine": "~0.3.1", + "karma-phantomjs-launcher": "~0.1.4", + "require-dir": "~0.1.0", + "browser-sync": "~1.7.1", + "http-proxy": "~1.7.0", + "chalk": "~0.5.1", + "protractor": "~1.4.0", + "uglify-save-license": "~0.4.1", "lodash": "^2.4.1", "pow-mongodb-fixtures": "^0.10.0", "vows": "git://github.com/wookieelabs/vows#fix-isolate-on-windows" }, - "scripts": { - "start": "node app", - "stop": "./node_modules/forever/bin/forever stop app.js", - "logs": "./node_modules/forever/bin/forever logs app.js" + "engines": { + "node": ">=0.10.0" } } diff --git a/protractor.conf.js b/protractor.conf.js new file mode 100644 index 0000000..0f43a9e --- /dev/null +++ b/protractor.conf.js @@ -0,0 +1,25 @@ +'use strict'; + +var paths = require('./.yo-rc.json')['generator-gulp-angular'].props.paths; + +// An example configuration file. +exports.config = { + // The address of a running selenium server. + //seleniumAddress: 'http://localhost:4444/wd/hub', + //seleniumServerJar: deprecated, this should be set on node_modules/protractor/config.json + + // Capabilities to be passed to the webdriver instance. + capabilities: { + 'browserName': 'chrome' + }, + + // Spec patterns are relative to the current working directly when + // protractor is called. + specs: [paths.e2e + '/**/*.js'], + + // Options to be passed to Jasmine-node. + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000 + } +}; diff --git a/src/404.html b/src/404.html new file mode 100644 index 0000000..fdace4a --- /dev/null +++ b/src/404.html @@ -0,0 +1,157 @@ + + + + + Page Not Found :( + + + +
+

Not found :(

+

Sorry, but the page you were trying to view does not exist.

+

It looks like this was the result of either:

+ + + +
+ + diff --git a/src/app/_common.scss b/src/app/_common.scss new file mode 100644 index 0000000..3f2a02d --- /dev/null +++ b/src/app/_common.scss @@ -0,0 +1,571 @@ +html { + height: 100%; +} + +body { + margin: 0; + font-family: Segoe UI; +} + +.g-pointer { cursor: pointer; } +.g-hide { display: none; } + +.g-left { float: left; } +.g-right { float: right; } + + +.g-aria-hide { + visibility: hidden; + width: 1px; + height: 1px; + display: inline-block; +} + +.g-page-wrapper { + min-height: 100vh; + position: relative; + + &:after { + content:' '; + display:block; + height:60px; + clear:both + } +} + +//common Elements + +.e-search-box { + background-color: $gray-light; + height: 42px; + + &__icon.fa { + color: $gray-icon; + float: left; + font-size: 24px; + margin: 0 6px; + line-height: 42px; + } + + &__input { + width: 85%; + height: 42px; + float: right; + border: none; + background-color: transparent; + font-size: 18px; + line-height: 42px; + font-weight: lighter; + color: $gray-text; + padding-right: 12px; + + } +} + +.e-create-btn { + background: transparent; + border: none; + cursor: pointer; + + &:hover { + .e-create-btn--title { + color : lighten($red, 10%); + } + .e-create-btn--icon.fa { + color : lighten($blue, 10%); + } + } + + &:active { + outline: none; + } + + &--title { + color: $red; + font-size: 30px; + float: left; + font-weight: bold; + @include text-ellipsis; + } + + &--icon.fa { + color: $blue; + font-size: 30px; + margin-right: 12px; + float: left; + line-height: 42px; + } +} + + +// styles for TABLES +.b-table { + &__box { + width: 100%; + border-collapse: collapse; + } + + &__header { + padding: 12px 36px; + background-color: $green; + color: #FFFFFF; + + &__item { + text-align: left; + padding-left: 30px; + height: 42px; + font-size: 18px; + font-weight: lighter; + white-space: nowrap; + } + } + + &__body { + &__row { + background-color: $gray-light; + border-bottom: 1px solid white; + color: $gray-text; + + &--active { + background-color: $green; + color: #FFFFFF; + + .b-table__body__row__circle { + background-color: #fff; + color: $green; + + } + } + &__circle { + width: 24px; + height: 24px; + display: inline-block; + border-radius: 50%; + background-color: $green; + margin-right: 6px; + text-align: center; + line-height: 24px; + color: #fff; + float: left; + font-size: 18px; + font-weight: bold; + } + + &__col { + padding: 12px 30px; + vertical-align: middle; + + &--text { + font-size: 18px; + font-weight: bold; + margin: 0; + text-decoration: none; + color: inherit; + line-height: 24px; + display: block; + float: left; + @include text-ellipsis(280px); + + &--results { + color: $green; + font-weight: bold; + cursor: pointer; + text-decoration: underline; + } + + &__publish { + float: left; + color: $green; + margin: 6px 10px 0 0; + } + } + + &__title { + width: 100%; + display: inline-block; + clear: both; + + .e-options { + display: inline-block; + float: right; + + &__item { + background-color: transparent; + font-size: 18px; + color: $gray; + border: 0; + + &:hover { + color: $green; + cursor: pointer; + } + } + } + } + + + &--text-light { + //display: inline-block; + margin-top: 12px; + color: $gray-text; + font-size: 18px; + font-weight: lighter; + } + } + } + } +} + +// styles for MODAL WINDOWS AND POPUPS +.b-modal-window { + + + &__overlay { + position: fixed; + top: 0; + right: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.65); + z-index: 2000; + overflow: auto; + } + + &__main-block { + background-color: #ffffff; + position: absolute; + top: 120px; + left: 50%; + z-index: 2020; + + &__header { + color: $gray-text; + font-size: 18px; + padding: 24px 36px; + background-color: $gray-light; + text-transform: capitalize; + text-align: center; + + &--title { + display: inline-block; + font-size: 18px; + margin: 0; + } + + &--icon-close { + font-size: 20px; + float: right; + cursor: pointer; + color: #000000; + &:hover { + color: $gray; + } + } + } + + &__body { + padding: 24px 36px; + font-size: 16px; + font-family: Segoe UI; + font-weight: 100; + + &__button { + background: none; + border: none; + font-size: 18px; + cursor: pointer; + + &:hover { + color: $gray-text; + } + &--icon { + color: $green; + } + } + } + } + + .b-sync { + width: 300px; + height: 200px; + margin-left: -(300px/2); + } +} + +.notifications { + position: absolute; + left: 0; + max-width: 150px; + z-index: 100; + margin: 30px 0; + + &__event { + @include notice; + } + .red { + @include notice(rgba(233, 140, 133, 0.8), rgba(185, 48, 38, 1), rgba(139, 36, 38, 1)) + } + &.fixed { + position: fixed; + margin: 0; + top: 0; + } +} + + + +.wrap-dd-select { + display: inline-block; + float: left; + background-color: $gray-light; + height: 35px; + font-size: 15px; + border: 1px solid $gray-light; + cursor: pointer; + position: relative; + width: 200px; + margin: 0 auto; + cursor: pointer; + padding: 0; + line-height: 33px; + + &:active { + outline: none; + } + .selected { + padding: 0 10px; + font-size: 18px; + } + + .dropdown { + position: absolute; + top: 100%; + left: 0; + right: 0; + margin: 0 0 0 -1px; + padding: 0; + background: white; + border: 1px solid $gray-light; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + font-weight: normal; + transition: all 0.2s ease-in; + list-style: none; + //opacity: 0; + visibility: hidden; + pointer-events: none; + + li { + &.divider { + padding: 2px 0; + background: $gray-light; + } + a { + display: block; + padding: 0 10px; + text-decoration: none; + box-shadow: inset 0 1px 0 rgba(255,255,255,1); + transition: all 0.3s ease-out; + @include text-ellipsis; + + } + i { + float: right; + color: inherit; + } + &:first-of-type a { + border-radius: 7px 7px 0 0; + } + &:last-of-type a { + border-radius: 0 0 7px 7px; + border: none; + } + } + + width: 100%; + z-index: 10; + li:hover a { + background: #f3f8f8; + } + + } + + &.active{ + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + + .dropdown { + //opacity: 1; + visibility: visible; + pointer-events: auto; + } + } + + &:after { + content: ""; + width: 0; + height: 0; + position: absolute; + right: 15px; + top: 50%; + margin-top: -3px; + border-width: 6px 6px 0 6px; + border-style: solid; + border-color: black transparent; + } +} + + +/* + Styles for dropdown-menu + */ + +.wrap-dd-menu { + display: inline-block; + position: relative; + margin-right: 10px; + + .dropdown { + z-index: 11; + width: 200px; + position: absolute; + left: 0; + right: 0; + margin-left: -1px; + padding: 10px 0; + background: white; + border: 1px solid $gray-light; + border-radius: 5px; + font-weight: normal; + transition: all 0.2s ease-in; + list-style: none; + visibility: hidden; + pointer-events: none; + -webkit-box-shadow: 0 0 10px 1px $gray-light; + box-shadow: 0 0 10px 1px $gray-light; + + li { + &.divider { + padding: 2px 0; + background: $gray-light; + } + a { + background-color: #fff ; + display: block; + padding: 0 10px; + text-decoration: none; + box-shadow: inset 0 1px 0 rgba(255,255,255,1); + transition: all 0.3s ease-out; + } + i { + float: right; + color: inherit; + } + } + &:after { + content: ""; + width: 0; + height: 0; + position: absolute; + bottom: 100%; + margin-left: 5px; + border-width: 0 6px 6px 6px; + border-style: solid; + border-color: #fff transparent; + } + + &.active { + visibility: visible; + pointer-events: auto; + } + } +} +/* active menu */ + +.wrap-dd-menu { + .dropdown { + z-index: 10; + li:hover a { + background: #f3f8f8; + } + } + &.active { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + background-color: rgba(240, 240, 240, 1); + box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); + .dropdown { + opacity: 1; + pointer-events: auto; + } + } +} + +.offline-block { + position: fixed; + border-top: 4px solid #ff0000; + border-bottom: 4px solid #ff0000; + color: #ff0000; + height: 60px; + width: 100%; + background: #ffffff; + top: 0px; + font-size: 25px; + text-align: center; + line-height: 60px; + z-index: 2000; + + input { + vertical-align: middle; + } +} + + +.sortable-placeholder { + height: 55px; + width: 100%; + border: 2px dotted #9f9f9f; + margin-bottom: 10px ; +} +.ui-sortable-helper { + opacity: 0.9; +} + +.hide-text { + height: 1px; + width: 1px; + position: absolute; + overflow: hidden; + top: -10px; +} + +.transparent-button { + background: none; + border: none; + color: inherit; + padding: 0; + font-size: inherit; + position: relative; + &:disabled { + opacity: 0.5; + } + + &:focus { + border-radius: 3px; + -webkit-box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,0.5); + -moz-box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,0.5); + box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,0.5); + } + + &:hover, + &:focus { + .button-title { + visibility: visible; + } + } + + .button-title { + @include button-title; + } + +} diff --git a/src/app/_fonts.scss b/src/app/_fonts.scss new file mode 100644 index 0000000..74eab2a --- /dev/null +++ b/src/app/_fonts.scss @@ -0,0 +1,33 @@ +//fonts +@font-face{ + font-family: 'Segoe UI'; + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.eot'); + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.eot?#iefix') format('embedded-opentype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.woff') format('woff'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.ttf') format('truetype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Bold/latest.svg#web') format('svg'); + font-weight: bold; + font-style: normal; +} + +@font-face{ + font-family: 'Segoe UI'; + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.eot'); + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.eot?#iefix') format('embedded-opentype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.woff') format('woff'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.ttf') format('truetype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Normal/latest.svg#web') format('svg'); + font-weight: normal; + font-style: normal; +} + +@font-face{ + font-family: 'Segoe UI'; + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.eot'); + src:url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.eot?#iefix') format('embedded-opentype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.woff') format('woff'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.ttf') format('truetype'), + url('http://i.s-microsoft.com/fonts/Segoe-UI/Cyrillic/Light/latest.svg#web') format('svg'); + font-weight: lighter; + font-style: normal; +} diff --git a/src/app/_home.scss b/src/app/_home.scss new file mode 100644 index 0000000..0605721 --- /dev/null +++ b/src/app/_home.scss @@ -0,0 +1,666 @@ +a { + +} + +// home page styles +.b-page { + width: 100%; + height: 100%; + margin: 0; + font-family: SegoeUI, Arial, sans-serif; + font-size: 12px; +} + +.b-page__head-line { + height: 6px; + width: 100%; +} + +.b-line-bit { + width: 25%; + height: 100%; + display: inline-block; + float: left; + &--red { + background-color: $red; + } + &--green { + background-color: $green; + } + &--blue { + background-color: $blue; + } + &--yellow { + background-color: $yellow; + } +} + +.b-head { + width: 100%; +} + +.b-page__line { + margin: 0 auto; + width: 100%; + //position: relative; +} + +.b-page__header { + height: 60px; + color: #4d4d4d; + background-color: #f2f2f2; + font-size: 18px; + text-decoration: none; + width: 100%; + display: table; + position: relative; +} + +.b-head-logo { + vertical-align: middle; + display: table-cell; + padding-left: 36px; +} + +.b-logo__title { + text-decoration: none; + color: #4d4d4d; + line-height: 40px; +} + +.b-logo__img { + width: 40px; + height: 40px; + float: left; + margin-right: 10px; +} + +.b-menu { + display: table-cell; + vertical-align: middle; +} + +.b-menu-nav { + display: table; + width: 100%; + + &__link { + text-decoration: none; + color: #4d4d4d; + display: table-cell; + vertical-align: middle; + text-align: center; + height: 60px; + transition: all 0.2s ease-in-out; + + &:hover { + color: #00a3ee; + } + + &.active, &--active { + background-color: $blue; + color: white; + &:hover { + color: white; + } + } + } +} + +.b-link_menu { + text-decoration: none; + color: #4d4d4d; +} + +.b-account-menu { + display: table-cell; + padding-right: 36px; + text-align: right; + vertical-align: middle; + + &__locale { + display: inline-block; + margin-right: 20px; + position: relative; + text-decoration: none; + color: #4d4d4d; + float: right; + + .dropdown { + opacity: 0; + position: absolute; + padding: 10px 0; + background-color: #fff; + z-index: 2; + font-family: SegoeUI, Arial, sans-serif; + font-size: 16px; + width: 150px; + top: 30px; + border: 1px solid rgba(166, 166, 166, 0.5); + border-radius: 5px; + left: 0; + + li { + display: block; + color: #000; + line-height: 20px; + padding: 0 5px; + font-family: SegoeUI, Arial, sans-serif; + + &:hover { + background: #f2f2f2; + } + + } + + &:after { + content: ""; + width: 0; + height: 0; + position: absolute; + bottom: 100%; + margin-left: 5px; + border-width: 0 6px 6px 6px; + border-style: solid; + border-color: #fff transparent; + left: 20px; + } + + &.open { + opacity: 1; + } + } + + &:after { + top: 10px; + margin-left: 6px; + content: ''; + position: absolute; + width: 0; + height: 0; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid transparent; + border-top: 5px solid #4d4d4d; + } + } + + &__user { + display: inline-block; + float: right; + text-decoration: none; + color: #4d4d4d; + + } + + .wrap-dd-menu .dropdown { + left: auto; + &:after { + right: 20px; + } + } + .fa { + font-size: 16px; + } +} + +.b-link_account-menu { + text-decoration: none; + color: #4d4d4d; +} + +.b-page__footer { + width: 100%; + height: 54px; + margin-top: -54px; + background-color: #666666; + display: table; + + &__box { + margin: 0 auto; + display: table-cell; + vertical-align: middle; + text-align: center; + + &__item { + display: inline-block; + list-style: none; + margin: 0 24px; + + &__link { + color: #fff; + font-weight: normal; + text-decoration: none; + margin: 0 6px; + font-size: 18px; + + &:hover { + color: lighten(#00a3ee, 5%); + } + } + } + } +} + +.b-content-header { + background-color: #f2f2f2; + padding: 30px 36px; + + &__title { + color: $red; + margin: 0; + font-size: 54px; + font-weight: normal; + } + + &__text { + color: #4d4d4d; + font-size: 24px; + margin: 0; + + &__link { + color: $blue; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; + + &:hover { + color: lighten($blue, 5%); + } + ; + } + } +} + +.b-content { + margin: 36px; + + &--line { + border-bottom: 1px solid #b2b2b2;; + } + + &-title { + margin-top: 0; + font-size: 36px; + color: $red; + } + &__paragraph { + margin-top: 0; + font-size: 18px; + font-weight: lighter; + color: #4d4d4d; + + &__link { + color: $blue; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; + + &:hover { + color: lighten($blue, 5%); + } + + } + &--item { + margin: 0; + } + } + + &--main { + display: table; + + &__article { + vertical-align: top; + display: table-cell; + padding-right: 84px; + + &__indent { + margin-top: 0; + color: #4d4d4d; + font-size: 18px; + } + } + + &__image { + display: table-cell; + } + } + + &__col-left { + width: 50%; + float: left; + &--video { + height: 390px; + width: 100%; + } + } + + &__col-right { + width: 50%; + float: right; + + &__study-article { + padding: 0 36px; + &--text { + margin: 0; + color: #4d4d4d; + font-size: 18px; + font-weight: lighter; + } + } + &__item { + margin-left: 36px; + } + } + &__col-left__item, + &__col-right__item { + display: table; + margin-bottom: 30px; + + &__picture { + display: table-cell; + border: 2px solid #b2b2b2; + width: 180px; + height: 180px; + + &--img { + width: 100%; + height: 100%; + } + } + + &__caption { + vertical-align: middle; + display: table-cell; + + &__number { + margin: 0 24px; + float: left; + color: white; + width: 36px; + height: 36px; + border-radius: 50%; + background-color: $red; + font-size: 24px; + line-height: 36px; + display: inline-block; + text-align: center; + font-weight: bold; + } + + &__text { + font-size: 18px; + margin: 0 24px; + + &--blue { + color: $blue; + font-size: 18px; + } + } + + &__title { + color: #4d4d4d; + margin: 0 0 0 24px; + font-size: 24px; + font-weight: bold; + } + } + &__title { + font-size: 24px; + color: #4d4d4d; + + &-number { + color: white; + width: 36px; + height: 36px; + border-radius: 50%; + background-color: $red; + font-size: 24px; + line-height: 36px; + display: inline-block; + text-align: center; + font-weight: bold; + margin-right: 6px; + } + } + + &__icon--img { + width: 72px; + } + + &--benefits { + margin-bottom: 90px; + } + + &__photo { + width: 100%; + } + &__photo-caption { + margin: 24px 0; + color: $red; + font-style: italic; + font-size: 18px; + font-weight: lighter; + } + + &__photo-location { + color: #666666; + font-size: 18px; + font-weight: lighter; + } + } + &__col-ternary { + width: (100%/3); + position: relative; + + &__col-ternary__item { + padding-right: 20px; + } + } + + &--acknowledge-list { + margin-top: 36px; + + &__link { + color: $blue; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; + + &:hover { + color: lighten($blue, 5%); + } + + line-height: 24px; + display: block; + font-size: 18px; + + } + } +} + +.e-form { + &__label { + display: block; + font-size: 18px; + color: #4d4d4d; + margin-top: 12px; + } + + &__field { + border: 0; + width: 336px; + height: 42px; + font-size: 18px; + padding: 0 12px; + color: #4d4d4d; + background-color: #f2f2f2; + margin: 12px 0; + display: block; + } + &__button { + display: block; + border: 0; + margin: 36px 0 24px 0; + width: 360px; + height: 42px; + text-align: center; + color: #fff; + font-size: 18px; + background-color: $green; + &--offset { + margin-left: 396px; + } + } + .error { + width: 360px; + height: 0; + position: relative; + display: none; + + & > span { + width: calc(100% - 24px); + padding: 12px; + min-height: 40px; + background: rgba(#f25022, 0.8); + color: white; + font-size: 12px; + position: absolute; + left: 0; + + &:after { + bottom: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + } + + &:after { + border-bottom-color: rgba(#f25022, 0.8); + border-width: 6px; + margin-left: -6px; + } + + } + } + .e-select { + display: inline-block; + width: 360px; + height: 42px; + position: relative; + &__label { + width: 100%; + height: 100%; + position: relative; + display: inline-block; + } + + &__box { + height: 100%; + width: 100%; + border-radius: 0; + display: inline-block; + border: none; + padding: 4px 3px 3px 5px; + margin: 0; + font: inherit; + font-size: 18px; + color: #666666; + background: #f2f2f2; + line-height: initial; + -webkit-appearance: none; /* remove the strong OSX influence from Webkit */ + &.ng-dirty.ng-invalid { + color: $red; + } + &:active { + outline: none; + } + } + + /* for Webkit's CSS-only solution */ + @media screen and (-webkit-min-device-pixel-ratio: 0) { + &__box { + padding-right: 30px; + } + } + + /* Select arrow styling */ + &__label:after { + font-family: FontAwesome; + content: "\f0d7"; + position: absolute; + top: 0; + right: 0; + bottom: 0; + font-size: 18px; + line-height: 42px; + padding: 0 10px; + background: transparent; + color: #4d4d4d; + pointer-events: none; + } + + .no-pointer-events .custom-select:after { + content: none; + } + } + +} + +.b-form-row { + width: 100%; + &__col { + display: inline-block; + width: auto; + padding-right: 36px; + } +} + +.b-step { + display: table; + &__left { + display: table-cell; + border: 2px solid #b2b2b2; + &__image { + width: 300px; + height: 300px; + } + } + &__right { + padding-left: 36px; + display: table-cell; + vertical-align: top; + &__title { + font-size: 24px; + color: #4d4d4d; + font-weight: bold; + &__count { + color: $red; + margin-right: 6px; + } + } + &__paragraph { + font-size: 18px; + font-weight: lighter; + color: #4d4d4d; + &__link { + color: $blue; + font-size: inherit; + font-weight: bold; + text-decoration: none; + margin: 0 6px; + + &:hover { + color: lighten($blue, 5%); + } + } + } + } +} diff --git a/src/app/_mixins.scss b/src/app/_mixins.scss new file mode 100644 index 0000000..2fab3fd --- /dev/null +++ b/src/app/_mixins.scss @@ -0,0 +1,164 @@ +//mixins +@mixin circle($color: $red, $size: 36px, $text-color: #fff) { + color: white; + width: 36px; + height: 36px; + border-radius: 50%; + background-color: $red; + font-size: 24px; + line-height: 36px; + display: inline-block; + text-align: center; + font-weight: bold; +} + +@mixin link($weight: bold, $color: $blue) { + color: $color; + font-size: inherit; + font-weight: $weight; + text-decoration: none; + margin: 0 6px; + + &:hover { + color: lighten($color, 5%); + } + +} + +@mixin select($width: 200px, $height: 36px, $color: white, $font-size: 18px) { + display: inline-block; + width: $width; + height: $height; + position: relative; + &__label { + width: 100%; + height: 100%; + position: relative; + display: inline-block; + } + + &__box { + height: 100%; + width: 100%; + border-radius: 0; + display: inline-block; + border: none; + padding: 4px 3px 3px 5px; + margin: 0; + font: inherit; + font-size: $font-size; + color: $gray; + background: $color; + line-height: initial; + -webkit-appearance: none; /* remove the strong OSX influence from Webkit */ + + &:focus { + outline: 1px dashed $gray; + } + + &.ng-dirty.ng-invalid { + color: $red; + } + } + + /* for Webkit's CSS-only solution */ + @media screen and (-webkit-min-device-pixel-ratio: 0) { + &__box { + padding-right: 30px; + } + } + + /* Select arrow styling */ + &__label:after { + font-family: FontAwesome; + content: "\f0d7"; + position: absolute; + top: 0; + right: 0; + bottom: 0; + font-size: 18px; + line-height: $height; + padding: 0 10px; + background: transparent; + color: $gray-text; + pointer-events: none; + } + + .no-pointer-events .custom-select:after { + content: none; + } +} + +/* + Mixin for notification + */ +@mixin notice($bg-color: rgba(156, 213, 86, 0.8), $text-color: #000000, $link-color: rgba(85, 138, 16, 1)) { + + background: $bg-color; + min-height: 50px; + line-height: 22px; + font-size: 12px; + text-align: center; + display: inline-block; + padding: 0 10px; + border-radius: 5px; + font-family: NokiaPureText; + margin: 0 0 2px 10px; + + span { + color: $text-color; + } + a { + color: $link-color; + text-decoration: underline; + &:hover { + cursor: pointer; + color: lighten($link-color, 8%); + } + } +} + +/* + Mixin for wrap text ellipsis + */ + +@mixin text-ellipsis($width: 100%) { + max-width: $width; + text-overflow: ellipsis; + -ms-text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + +} + +/* + Mixins for button titles tooltips +*/ + +@mixin button-title ($bg-color: #000000, $color: #ffffff, $width: 200px){ + visibility: hidden; + width: $width; + padding: 6px; + background: $bg-color; + color: $color; + font-size: 12px; + position: absolute; + left: calc(50%/2 - #{$width/2}); + bottom: 115%; + z-index: 1; + + &:after { + top: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-color: rgba(0, 0, 0, 0); + border-top-color: $bg-color; + border-width: 6px; + margin-left: -6px; + } +} diff --git a/src/app/_variables.scss b/src/app/_variables.scss new file mode 100644 index 0000000..fe4c6f7 --- /dev/null +++ b/src/app/_variables.scss @@ -0,0 +1,14 @@ +// colors +$red : #B32E09; +$green : #598200; +$blue: #007CB7; +$yellow: #FFB900; + +$gray: #666666; +$gray-light: #f2f2f2; + +$gray-text: #4d4d4d; +$gray-border: #b2b2b2; +$gray-icon: #b3b3b3; + +$red-error : rgba(194, 0, 0, 0.8); diff --git a/src/app/index.html b/src/app/index.html new file mode 100644 index 0000000..4c9ff24 --- /dev/null +++ b/src/app/index.html @@ -0,0 +1,71 @@ +
+
+
+
+
+
+
+
+
+ + + + +
+ {{dropdownList[$index].text = (item.translateId | translate) }} +
+ + + +
+
+
+ You are working in offline mode. Only Surveys page and Survey Builder are available in offline mode + +
+
+
+
+
diff --git a/src/app/index.scss b/src/app/index.scss new file mode 100644 index 0000000..661390e --- /dev/null +++ b/src/app/index.scss @@ -0,0 +1,10 @@ + +@import "variables"; +@import "mixins"; +@import "common"; +@import "fonts"; + +@import "home"; +@import "surveys/surveys"; +@import "users/users"; +@import "results/results"; diff --git a/src/app/page/page.controller.js b/src/app/page/page.controller.js new file mode 100644 index 0000000..f8053b2 --- /dev/null +++ b/src/app/page/page.controller.js @@ -0,0 +1,52 @@ +(function () { + 'use strict'; + + angular.module('mdg.app.page', []) + .controller('PageController', + function ($scope, $http, $location, $window, $rootScope, $state, $translate, $filter, authorizationService) { + $scope.dropdownList = [ + {translateId: 'header.Logout', value: 'logout'}, + {translateId: 'header.Documentation', href: '/docs'}, + {translateId: 'header.Download_app', href: '/docs/install.html'} + ]; + + $scope.dropdownSelect = {}; + + $scope.selectMenu = function (selected) { + if (selected.value === "logout") { + $rootScope.logout(); + } + }; + + $scope.langauges = []; + + $scope.getLanguages = function () { + authorizationService.getLanguages().then( + function success(config) { + $scope.langauges = config.data.languages; + if (!$translate.use()) { + $translate.use(config.data.preferred); + } + }, + + function failed(err) { + console.log("error:", err); + }); + }; + + $scope.getLanguages(); + + $scope.changeLanguage = function (selected) { + $translate.use(selected.value); + }; + + $scope.sync = function () { + if ($state.includes('page.surveys')) { + $state.go('page.surveys.sync'); + } else { + $rootScope.offlineMode = false; + localStorage.removeItem('offlineMode'); + } + }; + }); +})(); diff --git a/src/app/results/_results.scss b/src/app/results/_results.scss new file mode 100644 index 0000000..76ffa94 --- /dev/null +++ b/src/app/results/_results.scss @@ -0,0 +1,404 @@ +.b-results { + display: table; + width: 100%; + + &__header { + display: table-caption; + clear: both; + overflow: hidden; + + &__schedule-export { + float: right; + background: transparent; + border: none; + font-size: 24px; + color: $gray-text; + cursor: pointer; + .fa { + color: $green; + } + &:hover { + color: $gray; + } + } + + &__title { + float: left; + font-size: 24px; + color: $gray-text; + max-width: 600px; + overflow: hidden; + margin: 0 0 12px 0; + text-overflow: ellipsis; + word-wrap: break-word; + white-space: nowrap; + } + + &__caption { + display: block; + font-size: 18px; + color: $gray-text; + clear: both; + + &__link { + font-weight: bold; + cursor: pointer; + } + } + } + + &__list-box { + display: table-cell; + width: 50%; + vertical-align: top; + + + &__body { + + background-color: $gray-light; + + .b-table__body__row:hover { + background: rgba($green, 0.1); + } + + &__selected-result { + background: rgba($green, 0.3); + } + + .b-table__body__row__col, + .b-table__header__item { + padding: 12px; + } + + &__top { + padding: 12px 24px; + //overflow: hidden; + position: relative; + height: 44px; + + &__icon { + background: transparent; + border: none; + font-size: 24px; + color: $blue; + line-height: 36px; + + &:active { + outline: none; + } + } + + .dropdown { + margin-top: 100%; + } + + &__arrow-back { + font-size: 30px; + cursor: pointer; + color: $green; + float: left; + margin-right: 18px; + } + &__rules { + float: left; + } + + &__search { + float: right; + width: 360px; + + .e-search-box{ + background: white; + } + } + } + } + } + + &__details { + display: table-cell; + width: 50%; + max-width: 50vw; + vertical-align: top; + padding-left: 24px; + } + + &__modal-sent { + width: 400px; + height: 400px; + margin-left: -(400px/2); + + .b-modal-window__main-block__body { + height: 280px; + overflow-y: auto ; + } + } +} + +.b-result { + + .b-result__table { + border-collapse: collapse ; + width: 100%; + + &__col { + border: 1px solid $gray-border; + padding: 6px; + &--caption { + background-color: $gray-light; + } + } + } + + &__survey { + display: block; + padding: 0; + + &__category { + display: block; + list-style: none; + margin-top: 24px; + + &--title { + font-size: 24px; + text-decoration: underline; + } + + &__questions { + padding: 6px; + + &__question { + list-style: none; + font-size: 18px; + margin-top: 12px; + + &__answer { + color: $blue; + font-size: 18px; + font-weight: 100; + } + } + + &--image { + max-width: 100%; + } + } + } + } +} + +.b-results-export { + width: 600px; + height: 500px; + margin-left: -(600px/2); + + .b-modal-window__main-block__body { + height: 376px; + overflow-y: auto ; + } + &__export-schedule { + &__small-field { + width: 50%; + float: left; + padding: 12px 0; + position: relative; + } + + &__long-field { + display: inline-block; + width: 100%; + position: relative; + } + + &__label { + display: block; + color: $gray-text; + } + + &__select-field { + display: block; + height: 35px; + background: $gray-light; + padding: 0 10px; + border: 1px solid $gray-light; + font-size: 18px; + width: calc(100% - 30px); + } + + &__errors { + color: $red; + } + + &__actual { + margin: 12px 0 0 0 ; + padding: 0; + + &--caption { + font-size: 24px; + color: $blue; + } + + &__item { + list-style: none; + font-size: 18px; + color: $gray-text; + margin-top: 6px; + &--email { + font-weight: bold; + } + + &--date { + margin-left: 12px; + } + &--delete { + float: right; + color: $red; + font-size: 20px; + cursor: pointer; + } + + } + } + + &__export-button { + margin: 12px auto; + border: none; + background: transparent; + font-size: 24px; + display: block; + cursor: pointer; + + &:hover { + color: $gray; + } + .fa { + color: $green; + } + } + } +} + +.b-results-chart { + width: 700px; + height: 600px; + margin-left: -(700px/2); + + .b-modal-window__main-block__body { + height: 480px; + overflow-y: auto ; + } +} + +.b-map-panel { + float: left; + width: 100%; + height: 610px; + margin-bottom: 100px; + position: relative; + + &__search { + position: absolute; + z-index: 200; + width: 400px; + margin: 12px; + float: left; + height: 30px; + display: block; + border: 1px solid $blue; + background: white; + color: $gray-text; + } + + &__close { + position: absolute; + z-index: 200; + top: 12px; + right: 24px; + color: $blue; + text-align: center; + display: inline-block; + font-size: 30px; + cursor: pointer; + } + + #mapContainer { + width: 100%; + height: 100%; + + .nm_bubble_content { + font-size: 12px; + a { + color: black; + } + } + } +} + +.results-chart { + padding: 0; + overflow: auto; + height: 450px; + + li { + list-style: none; + font-family: NokiaPureText; + line-height: 30px; + padding: 20px; + border-bottom: 1px solid $gray-light; + + label { + float: left; + position: relative; + font-size: 16px; + display: inline-block; + @include text-ellipsis(380px); + + &:not(.void) { + padding-left: 16px; + //.open-arrow(0, 6px); + } + } + + .bar-icon, + .pie-icon { + position: inherit; + display: inline-block; + height: 30px; + width: 30px; + background-repeat: no-repeat; + font-size: 24px; + color: $green; + margin: 0 12px; + } + + .chart-image { + height: 330px; + width: 550px; + margin-left: 30px; + display: block; + + text { + font-family: NokiaPureText; + } + + .slice path { + stroke: #fff; + stroke-width: 2px; + } + + .axis path { + fill: none; + stroke: $gray-light; + shape-rendering: crispEdges; + } + + .axis text { + line-height: 45px; + } + + .bar { + fill: #4a98d8; + } + } + } +} diff --git a/web/controllers/ResultsChartCtrl.js b/src/app/results/chart/results.chart.controller.js similarity index 93% rename from web/controllers/ResultsChartCtrl.js rename to src/app/results/chart/results.chart.controller.js index 999e8d0..1cbf642 100644 --- a/web/controllers/ResultsChartCtrl.js +++ b/src/app/results/chart/results.chart.controller.js @@ -1,6 +1,7 @@ -define(function () { +(function () { 'use strict'; - return function ($scope, $rootScope, $http, $location, $window, surveysManager, chartManager, $stateParams) { + angular.module('mdg.app.results').controller('resultsChartController', + function ($scope, $rootScope, $http, $location, $window, surveysService, resultsChartService, $stateParams) { $scope.surveyTitle = ''; $scope.questions = []; @@ -182,7 +183,7 @@ define(function () { }; $scope.getSurveyInfo = function () { - surveysManager.surveyInfo($stateParams.surveyId).then( + surveysService.surveyInfo($stateParams.surveyId).then( function success (config) { var survey = config.data; @@ -215,15 +216,15 @@ define(function () { }); }; - $scope.click = function (index, type) { + $scope.renderChart = function (index, type) { if ($scope.questions[index].chart.rendered) { return; } - chartManager.getChartData({ + resultsChartService.getChartData({ survey: $stateParams.surveyId, question: $scope.questions[index].id, - results: $rootScope.selectedResults + results: $scope.selected.results }).then( function success (config) { if (type === 'bar') { @@ -239,10 +240,10 @@ define(function () { console.log("error:", err); }); - chartManager.getChartUrl({ + resultsChartService.getChartUrl({ survey: $stateParams.surveyId, question: $scope.questions[index].id, - results: $rootScope.selectedResults + results: $scope.selected.results }).then( function success (config) { $scope.questions[index].chart.url = config.data.imageUrl; @@ -255,5 +256,5 @@ define(function () { }; $scope.getSurveyInfo(); - }; -}); + }); +})(); diff --git a/src/app/results/chart/results.chart.html b/src/app/results/chart/results.chart.html new file mode 100644 index 0000000..b667185 --- /dev/null +++ b/src/app/results/chart/results.chart.html @@ -0,0 +1,34 @@ + + diff --git a/src/app/results/chart/results.chart.service.js b/src/app/results/chart/results.chart.service.js new file mode 100644 index 0000000..a9f0545 --- /dev/null +++ b/src/app/results/chart/results.chart.service.js @@ -0,0 +1,27 @@ +(function () { + 'use strict'; + angular.module('mdg.app.results') + .service('resultsChartService', function ($q, $http) { + /** @const */ + var + CHART_URL = '/chartUrl', + CHART_DATA = '/chartData'; + + function getChartUrl (data) { + return $http.post(CHART_URL, data) + .success(function (result) { + }); + } + + function getChartData (data) { + return $http.post(CHART_DATA, data) + .success(function (result) { + }); + } + + return { + getChartUrl: getChartUrl, + getChartData: getChartData + }; + }); +})(); diff --git a/web/controllers/ResultDetailsCtrl.js b/src/app/results/details/results.details.controller.js similarity index 59% rename from web/controllers/ResultDetailsCtrl.js rename to src/app/results/details/results.details.controller.js index f936e43..750fa0b 100644 --- a/web/controllers/ResultDetailsCtrl.js +++ b/src/app/results/details/results.details.controller.js @@ -1,10 +1,11 @@ -define(function () { +(function () { 'use strict'; - return function ($scope, $http, $location, $window, resultsManager, $stateParams) { + angular.module('mdg.app.results').controller('resultsDetailsController', + function ($scope, $http, $location, $window, resultsService, $stateParams) { $scope.result = {}; $scope.getResultDetails = function (surveyId, resultId) { - resultsManager.resultDetails(surveyId, resultId).then( + resultsService.resultDetails(surveyId, resultId).then( function success (config) { $scope.result = config.data; }, @@ -15,5 +16,5 @@ define(function () { }; $scope.getResultDetails($stateParams.surveyId, $stateParams.resultId); - }; -}); + }); +})(); diff --git a/src/app/results/details/results.details.html b/src/app/results/details/results.details.html new file mode 100644 index 0000000..729398b --- /dev/null +++ b/src/app/results/details/results.details.html @@ -0,0 +1,66 @@ +
+ + + + + + + + + + + + + +
{{ 'result.TIMESTAMP' | translate }}{{result.timeCreated|date:'HH:mm, dd MMMM yyyy'}}
{{ 'result.LOCATION' | translate }}{{result.geostamp}}
{{ 'result.TITLE' | translate }}{{result.title}}
+ + + +
diff --git a/src/app/results/export/results.export.controller.js b/src/app/results/export/results.export.controller.js new file mode 100644 index 0000000..bf2ecf5 --- /dev/null +++ b/src/app/results/export/results.export.controller.js @@ -0,0 +1,101 @@ +(function () { + 'use strict'; + angular.module('mdg.app.results').controller('resultsExportController', + function ($scope, $http, $location, $window, $stateParams, + subscriptionService, errorsService) { + + $scope.subscriptions = {}; + + $('#from').datepicker({ + dateFormat: 'dd/mm/yy', + defaultDate: '+0d', + onClose: function (selectedDate) { + $('#to').datepicker('option', 'minDate', selectedDate); + } + }); + + $('#to').datepicker({ + dateFormat: 'dd/mm/yy', + defaultDate: '+0d', + onClose: function (selectedDate) { + $('#from').datepicker('option', 'maxDate', selectedDate); + } + }); + + $scope.getSubscriptions = function () { + subscriptionService.subscriptionList($stateParams.surveyId).then( + function success(config) { + $scope.subscriptions = config.data; + }, + + function failed(err) { + console.log("error:", err); + }); + }; + + $scope.createSubscription = function () { + if ($scope.exportScheduleForm.$error.required.length > 0) { + $scope.exportScheduleForm.from.$dirty = true; + $scope.exportScheduleForm.to.$dirty = true; + $scope.exportScheduleForm.email.$dirty = true; + + $('input.ng-pristine').addClass('ng-dirty').removeClass('ng-pristine'); + } else if ($('.error-message:not(.ng-hide)').length === 0) { + delete $scope.schedule._id; + + subscriptionService.createSubscription($stateParams.surveyId, $scope.schedule).then( + function success(config) { + $scope.schedule._id = config.data.id; + $scope.subscriptions.push(_.clone($scope.schedule)); + $scope.schedule = {}; + + $scope.exportScheduleForm.from.$setPristine(); + $scope.exportScheduleForm.to.$setPristine(); + $scope.exportScheduleForm.email.$setPristine(); + + $('#from').datepicker('option', 'maxDate', null); + $('#to').datepicker('option', 'minDate', null); + }, + + function failed(err) { + if (err.status === 400) { + $scope.errorEmailPattern = true; + } + console.log("error:", err); + }); + } + }; + + $scope.deleteSubscription = function (subscriptionId, index) { + subscriptionService.deleteSubscription($stateParams.surveyId, subscriptionId).then( + function success(config) { + $scope.subscriptions.splice(index, 1); + }, + + function failed(err) { + console.log("error:", err); + }); + }; + + + $scope.addFieldsErrors = function () { + var fields = { + email: ['required', 'email', 'errorEmailPattern'], + from: ['required'], + to: ['required'] + }; + + _.map(_.pairs(fields), function (field) { + $scope.errors[field[0]] = errorsService.getFieldErrorsHtml(field[0], field[1], 'exportScheduleForm'); + }); + }; + + $scope.$on("$destroy", function () { + $('#ui-datepicker-div').css('display', 'none'); + }); + + $scope.addFieldsErrors(); + $scope.getSubscriptions(); + + }); +})(); diff --git a/src/app/results/export/results.export.html b/src/app/results/export/results.export.html new file mode 100644 index 0000000..fc4627b --- /dev/null +++ b/src/app/results/export/results.export.html @@ -0,0 +1,102 @@ + diff --git a/web/controllers/ResultsOnMapCtrl.js b/src/app/results/map/results.map.comtroller.js similarity index 81% rename from web/controllers/ResultsOnMapCtrl.js rename to src/app/results/map/results.map.comtroller.js index ca51c3f..bcdb64f 100644 --- a/web/controllers/ResultsOnMapCtrl.js +++ b/src/app/results/map/results.map.comtroller.js @@ -1,6 +1,7 @@ -define(function () { +(function () { 'use strict'; - return function ($scope, $rootScope, $http, $stateParams, chartManager, nokia_app_id, nokia_app_code) { + angular.module('mdg.app.results').controller('resultsMapController', + function ($scope, $rootScope, $http, $stateParams, $state, resultMapService, nokia_app_id, nokia_app_code) { var mapContainer, markers = [], @@ -28,20 +29,19 @@ define(function () { nokia.Settings.set("secureConnection", "force"); } - if ($rootScope.selectedResults.length !== 0) { - $scope.selectedResults = $rootScope.selectedResults; + if ($scope.selected.results.length !== 0) { - localStorage.setItem('selectedResults', $rootScope.selectedResults); + localStorage.setItem('selectedResults', $scope.selected.results); } else { if (localStorage.getItem('selectedResults')) { - $scope.selectedResults = localStorage.getItem('selectedResults').split(','); + $scope.selected.results = localStorage.getItem('selectedResults').split(','); } else { - $rootScope.goState('page.results', { surveyId: $stateParams.surveyId }); + $state.go('page.results.list.details', { surveyId: $stateParams.surveyId, resultId: $stateParams.resultId}); } } $scope.getMapData = function () { - chartManager.getChartData({ survey: $stateParams.surveyId, results: $scope.selectedResults }).then( + resultMapService.getChartData({ survey: $stateParams.surveyId, results: $scope.selected.results }).then( function success (config) { clusterDataPoints(config.data); }, @@ -65,14 +65,14 @@ define(function () { _.each(dataPoints.Bb, function (dataPoint) { message = message + dataPoint.user + ' ' + dataPoint.title + ' '; html = html + '' + - dataPoint.title + - '
Collected by: ' + - dataPoint.user + - '

'; + $stateParams.surveyId + + '/map/result:' + + dataPoint.id + + '">' + + dataPoint.title + + '
Collected by: ' + + dataPoint.user + + '
'; }); if (dataPoints.getSize() > 0) { @@ -114,9 +114,9 @@ define(function () { var existedMarker, marker = new nokia.maps.map.StandardMarker([dataPoint.latitude, dataPoint.longitude], { - _id: dataPoint.id, - message: dataPoint.user + ' ' + dataPoint.title, - html: '
Collected by: ' + dataPoint.user + '
' - }); + }); marker.addListener(CLICK, function (evt) { @@ -180,5 +180,5 @@ define(function () { } }); }); - }; -}); + }); +})(); diff --git a/src/app/results/map/results.map.html b/src/app/results/map/results.map.html new file mode 100644 index 0000000..d755f34 --- /dev/null +++ b/src/app/results/map/results.map.html @@ -0,0 +1,14 @@ +
+ +
+ +
+
+
+
+ diff --git a/web/services/chartManager.js b/src/app/results/map/results.map.service.js similarity index 80% rename from web/services/chartManager.js rename to src/app/results/map/results.map.service.js index d6e7f4e..83fd4da 100644 --- a/web/services/chartManager.js +++ b/src/app/results/map/results.map.service.js @@ -1,6 +1,6 @@ -define(function () { +(function () { 'use strict'; - return function ($q, $http) { + angular.module('mdg.app.results').service('resultMapService',function ($q, $http) { /** @const */ var CHART_URL = '/chartUrl', @@ -22,5 +22,5 @@ define(function () { getChartUrl: getChartUrl, getChartData: getChartData }; - }; -}); + }); +})(); diff --git a/src/app/results/results.controller.js b/src/app/results/results.controller.js new file mode 100644 index 0000000..6652033 --- /dev/null +++ b/src/app/results/results.controller.js @@ -0,0 +1,141 @@ +(function () { + 'use strict'; + angular.module('mdg.app.results').controller('resultsController', + function ($scope, $http, $location, $window, $rootScope, $stateParams, $state, + errorsService, + resultsService, + surveysService, + subscriptionService) { + + $scope.today = new Date(); + $scope.allChecked = false; + $scope.path = $location.$$path; + $scope.results = {}; + $scope.schedule = {}; + $scope.survey = {}; + $scope.subscriptions = {}; + $scope.exportForm = {}; + $scope.errors = {}; + + $scope.selected = { + results : ($scope.selected && $scope.selected.results) ? $scope.selected.results : [] + }; + $scope.dropdownList = [ + {text: 'Export to:', value: ''}, + {text: 'KML', value: 'kml'}, + {text: 'CSV', value: 'csv'}, + {text: 'Excel', value: 'xls'} + ]; + $scope.dropdownSelect = {}; + + $scope.getResultList = function () { + resultsService.resultList($stateParams.surveyId).then( + function success(config) { + $scope.results = config.data; + }, + + function failed(err) { + console.log("error:", err); + }); + }; + + $scope.getSurveyInfo = function () { + surveysService.surveyInfo($stateParams.surveyId).then( + function success(config) { + $scope.survey = config.data; + }, + + function failed(err) { + console.log("error:", err); + }); + }; + + $scope.modalSentTo = function () { + $state.go($state.current.name + '.sentto'); + }; + + $scope.viewMap = function () { + if ($scope.selected.results.length === 0) { + $rootScope.$broadcast('choose_results', 'view_map'); + return; + } + + $state.go('page.results.map', {surveyId: $stateParams.surveyId}); + }; + + $scope.modalExportSchedule = function () { + $state.go($state.$current.name + '.exportschedule'); + }; + + $scope.modalResultsChart = function () { + if ($scope.selected.results.length === 0) { + $rootScope.$broadcast('choose_results', 'view_charts'); + return; + } + $state.go($state.$current.name + '.resultschart'); + + }; + + $scope.selectAllResults = function () { + if ($scope.selected.results.length > 0) { + $scope.selected.results = []; + } else { + $scope.selected.results = _($scope.results).pluck('_id'); + } + }; + + $scope.formSelectedResults = function (resultId) { + if (_($scope.selected.results).contains(resultId)) { + $scope.selected.results = _($scope.selected.results).without(resultId); + + } else { + $scope.selected.results.push(resultId); + } + }; + + $scope.deleteResults = function () { + if ($scope.selected.results.length === 0) { + $rootScope.$broadcast('choose_results', 'delete'); + return; + } + + $rootScope.deletedItems.results = _.flatten([$rootScope.deletedItems.results, $scope.selected.results]); + $rootScope.$broadcast('deleted_result', $scope.survey._id, $scope.selected.results, $scope.survey.title); + $state.go('page.results.list'); + }; + + $scope.getSubscriptions = function () { + subscriptionService.subscriptionList($stateParams.surveyId).then( + function success(config) { + $scope.subscriptions = config.data; + }, + + function failed(err) { + console.log("error:", err); + }); + }; + + $scope.exportResults = function (type) { + if ($scope.selected.results.length === 0) { + $rootScope.$broadcast('choose_results', 'export'); + } else if ($scope.dropdownSelect.value) { + + var fakeForm = $('
') + .attr('method', 'POST') + .attr('action', '/export/' + $stateParams.surveyId + '/?type=' + type) + .append($scope.selected.results.map(function (id, index) { + return $('') + .attr('name', 'results[' + index + ']') + .attr('value', id) + ; + } + )); + fakeForm.appendTo("body").submit(); + } + }; + + $scope.getResultList(); + $scope.getSurveyInfo(); + $scope.getSubscriptions(); + }); +})(); diff --git a/src/app/results/results.html b/src/app/results/results.html new file mode 100644 index 0000000..97a4430 --- /dev/null +++ b/src/app/results/results.html @@ -0,0 +1,42 @@ +
+ +
+ +

+ {{'header.results' | translate }} +

+ +

+ {{'results.SUBTITLE' | translate }} +

+ +
+
+
+
+
+
+ +

+ {{survey.resultsCount}} {{ 'results.results_for' | translate }} + {{survey.title}}

+ +

+ {{ 'results.Sent_to' | translate }} + + {{survey.sentToUsers.length}} {{ 'results.users' | translate }} + +

+
+
+
+
+
diff --git a/src/app/results/results.list.html b/src/app/results/results.list.html new file mode 100644 index 0000000..b22ab06 --- /dev/null +++ b/src/app/results/results.list.html @@ -0,0 +1,152 @@ +
+
+ +
+ +
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + {{ 'results.RESULT_TITLE' | translate }} + + + + {{ 'results.DATE_SENT' | translate }} + + + + {{ 'results.GPS' | translate }} + + + {{ 'results.DATA_COLLECTOR' | translate }} + +
+ + + + + {{result.title.length ? result.title : '(no  title)'}} + + {{result.timeCreated | date: 'MM/dd/yy'}} + + + + {{result._user.name}} +
+ + +
+
+
diff --git a/src/app/results/results.module.js b/src/app/results/results.module.js new file mode 100644 index 0000000..41bac1f --- /dev/null +++ b/src/app/results/results.module.js @@ -0,0 +1,73 @@ +(function () { + 'use strict'; + angular.module('mdg.app.results', []) + .config(function ($stateProvider) { + $stateProvider + + .state('page.results', { + url: '/survey:{surveyId}', + templateUrl: 'app/results/results.html', + abstract: true, + controller: 'resultsController' + }) + + .state('page.results.list', { + url: '', + templateUrl: 'app/results/results.list.html' + }) + .state('page.results.list.details', { + url: '/result:{resultId}', + templateUrl: 'app/results/details/results.details.html', + controller: 'resultsDetailsController' + }) + + .state('page.results.list.sentto', { + url: '', + templateUrl: 'app/results/results.sent.html' + }) + + .state('page.results.list.details.sentto', { + url: '', + templateUrl: 'app/results/results.sent.html' + }) + + .state('page.results.list.exportschedule', { + url: '', + templateUrl: 'app/results/export/results.export.html', + controller: 'resultsExportController' + }) + .state('page.results.list.details.exportschedule', { + url: '', + templateUrl: 'app/results/export/results.export.html', + controller: 'resultsExportController' + }) + + .state('page.results.list.resultschart', { + url: '', + controller: 'resultsChartController', + templateUrl: 'app/results/chart/results.chart.html' + }) + .state('page.results.list.details.resultschart', { + url: '', + controller: 'resultsChartController', + templateUrl: 'app/results/chart/results.chart.html' + }) + + .state('page.results.map', { + url: '/map', + templateUrl: 'app/results/map/results.map.html', + controller: 'resultsController' + }) + .state('page.results.map.exportschedule', { + url: '', + templateUrl: 'app/results/export/results.export.html', + controller: 'resultsExportController' + }) + + .state('page.results.map.sentto', { + url: '', + templateUrl: 'app/results/results.sent.html' + }); + + }); +})(); diff --git a/src/app/results/results.sent.html b/src/app/results/results.sent.html new file mode 100644 index 0000000..6e08f8f --- /dev/null +++ b/src/app/results/results.sent.html @@ -0,0 +1,23 @@ + diff --git a/src/app/results/results.service.js b/src/app/results/results.service.js new file mode 100644 index 0000000..133f4d4 --- /dev/null +++ b/src/app/results/results.service.js @@ -0,0 +1,40 @@ +(function () { + 'use strict'; + angular.module('mdg.app.results') + .service('resultsService', function ($q, $http) { + /** @const */ + var + RESULT_URL = '/results/', + SURVEY_URL = '/surveys/'; + + function resultList(surveyId) { + var result_list_url = SURVEY_URL + surveyId + RESULT_URL; + + return $http.get(result_list_url) + .success(function (result) { + }); + } + + function resultDetails(surveyId, resultId) { + var result_details_url = SURVEY_URL + surveyId + RESULT_URL + resultId; + + return $http.get(result_details_url) + .success(function (result) { + }); + } + + function deleteResult(surveyId, resultId) { + var result_delete_url = SURVEY_URL + surveyId + RESULT_URL + resultId; + + return $http.delete(result_delete_url) + .success(function (result) { + }); + } + + return { + resultList: resultList, + deleteResult: deleteResult, + resultDetails: resultDetails + }; + }); +})(); \ No newline at end of file diff --git a/src/app/surveys/_surveys.scss b/src/app/surveys/_surveys.scss new file mode 100644 index 0000000..222f0f8 --- /dev/null +++ b/src/app/surveys/_surveys.scss @@ -0,0 +1,870 @@ +.b-surveys { + display: table; + width: 100%; + + &__left-content { + display: table-cell; + width: auto; + padding-right: 36px; + } + + &__right-content { + display: table-cell; + width: 318px; + vertical-align: top; + } +} + +.b-surveys-table { + + background-color: $gray-light; + + &__dropdown { + width: 200px; + height: 30px; + background: #FFF; + font-size: 16px; + float: left; + line-height: 32px; + padding-right: 16px; + } + + &__top { + padding: 12px 30px; + height: 42px; + position: relative; + + &--back { + background: none; + border: none; + color: $blue; + } + + &--title { + + color: $blue; + font-size: 36px; + font-weight: 100; + + .fa { + font-size: 36px; + margin-right: 36px; + cursor: pointer; + } + } + + &--right { + float: right; + } + + &--left { + position: relative; + float: left; + + .e-create-btn { + display: inline-block; + float: left; + } + } + + &__icon { + display: inline-block; + width: 36px; + height: 36px; + margin: 0 36px; + float: left; + position: relative; + + &--upload { + background: url("../assets/icons/upload.png") no-repeat; + + /* outline styles for focused invisible input element */ + &.selected { + outline-color: $gray; + outline-style: dashed; + outline-width: 1px; + } + + &--file { + width: 42px; + height: 42px; + opacity: 0; + cursor: pointer; + + &:focus { + opacity: 0; + } + + &:focus, &:hover { + & ~ .button-title { + visibility: visible; + } + } + } + + .button-title { + @include button-title; + } + } + + &--folder{ + background: url("../assets/icons/folder.png") no-repeat; + cursor: pointer; + background-color: transparent; + border: none; + } + } + } +} + +.b-surveys__right-content__search-title { + font-size: 18px; + font-weight: lighter; + color: $gray-text; + margin: 0; + line-height: 60px; + height: 60px; +} + +.b-surveys-edit { + &__header { + + &__name { + color: $red; + font-weight: bold; + font-size: 30px; + display: inline-block; + float: left; + min-width: 200px; + @include text-ellipsis(50%); + + &--edit.fa { + color: $blue; + font-size: 30px; + margin: 0 12px; + } + + &--input { + width: auto; + min-width: 200px; + max-width: 50%; + height: 35px; + border: none; + border-bottom: 1px solid $green; + font-size: 30px; + background: transparent; + margin: 0; + + &:active { + outline: none; + } + } + } + + &__save-btn { + display: inline-block; + float: right; + background-color: transparent; + border: none; + cursor: pointer; + + &--text { + color: $red; + font-size: 30px; + font-weight: bold; + + &:hover { + color: lighten($red, 10%); + } + + &--results { + color: $green; + text-decoration: none; + + } + } + + &--icon.fa { + color: $blue; + font-size: 30px; + margin: 0 12px; + + &:hover { + color: lighten($blue, 10%); + } + } + } + } + &__category { + margin-top: 12px; + + &__top { + background-color: $green; + color: #fff; + font-size: 18px; + padding: 12px; + + &__new-question-btn { + float: right; + color: #FFFFFF; + cursor: pointer; + display: block; + background-color: transparent; + font-size: 18px; + border: none; + } + + &--title { + display: inline-block; + float: left; + min-width: 200px; + @include text-ellipsis(50%); + } + + &--caret{ + float: left; + line-height: 18px; + margin-right: 4px; + } + + &--edit-input { + width: auto; + min-width: 200px; + max-width: 50%; + border: none; + border-bottom: 1px solid white; + font-size: 18px; + background: transparent; + margin: 0; + color: white; + + &:active { + outline: none; + } + } + + &--move-btns { + display: inline-block; + margin: 0 12px; + } + } + + &__question { + padding: 12px; + + &__header { + position: relative; + height: 42px; + line-height: 42px; + + &__title { + font-size: 24px; + color: $gray-text; + display: inline-block; + + &--text { + display: inline-block; + float: left; + margin-right: 12px; + @include text-ellipsis(500px); + } + + &--caret { + float: left; + line-height: 36px; + margin-right: 4px; + } + + &--edit-input { + width: auto; + min-width: 200px; + max-width: 400px; + border: none; + border-bottom: 1px solid $green; + font-size: 24px; + background: transparent; + margin: 0; + + } + } + &__rules { + float: right; + display: inline-block; + + .e-select { + @include select(200px, 36px, $gray-light); + display: inline-block; + } + + &__checkbox { + display: inline-block; + float: right; + height: 36px; + line-height: 36px; + margin: 0 36px 0 18px; + + &--icon { + font-size: 18px; + margin: 0 6px; + color: $green; + } + + &--label { + font-size: 18px; + color: $gray-text; + } + + &--input { + width: 18px; + height: 18px; + } + } + } + + &--move-btns { + display: inline-block; + margin: 0 12px; + } + } + + &__body { + margin: 24px; + + &__done-btn { + color: $red; + font-size: 30px; + display: inline-block; + font-weight: bold; + cursor: pointer; + background-color: transparent; + border: none; + } + } + } + } + + &__add-category-btn { + display: block; + background-color: transparent; + border: none; + margin: 24px auto 6px; + cursor: pointer; + + &--text { + color: $red; + font-size: 30px; + font-weight: bold; + + &:hover { + color: lighten($red, 10%); + } + } + + &--icon.fa { + color: $green; + font-size: 30px; + margin: 0 12px; + + &:hover { + color: lighten($green, 10%); + } + } + } +} + +$modalW: 500px; +$modalH: 400px; + +.b-send-survey { + width: $modalW; + height: $modalH; + margin-left: -($modalW/2); + + .b-modal-window__main-block__body { + height: $modalH - 120px; + overflow-y: auto; + } + &__all-groups { + &__group { + margin-left: 20px; + } + + &__user { + list-style: none; + } + } +} + +$publicModalW: 600px; +$publicModalH: 700px; + +.b-public-link { + width: $publicModalW; + height: $publicModalH; + margin-left: -($modalW/2); + + &_make_public { + height: 50px; + font-size: 22px; + } + + &_expire_date { + height: 70px; + font-size: 22px; + + &__input { + height: 35px; + background: #f2f2f2; + padding: 0 10px; + border: 1px solid #f2f2f2; + font-size: 22px; + width: 120px; + font-weight: lighter; + color: $gray-text; + } + } + + &_custom_message { + font-size: 22px; + margin-bottom: 20px; + + &__label { + display: block; + } + + &__input { + width: 100%; + height: 50px; + display: block; + } + } + + &_custom_logo { + font-size: 22px; + margin-bottom: 20px; + + &__image { + width: 100px; + height: 100px; + } + } + + &__link { + font-size: 22px; + } + + &_copy_to_clipboard { + background-color: $gray-light; + height: 42px; + margin-bottom: 20px; + + &__icon.fa { + color: $gray-icon; + float: right; + font-size: 24px; + margin: 0 6px; + line-height: 42px; + } + + .button-title { + line-height: 20px; + width: 102px; + left: -50px; + } + + &__input { + width: 85%; + height: 42px; + float: right; + border: none; + background-color: transparent; + font-size: 16px; + line-height: 42px; + font-weight: lighter; + color: $gray-text; + padding-right: 12px; + } + } + + &_save_button { + display: block; + margin: 20px auto; + font-size: 22px; + } +} + +.b-question-builder { + + &__input-box { + margin: 12px 0 24px 0; + + &--checkbox { + //float: left; + width: 15px; + height: 15px; + } + + &--label { + display: block; + color: $gray-text; + font-size: 18px; + font-weight: lighter; + margin-bottom: 6px; + } + + &--input { + display: block; + width: 300px; + height: 42px; + font-size: 18px; + font-weight: lighter; + border: 0; + padding: 0 12px; + background-color: $gray-light; + + &--small { + width: 102px; + display: inline-block; + } + } + + &--caption { + color: $gray-text; + margin-left: 36px; + font-size: 18px; + font-weight: lighter; + text-transform: capitalize; + } + + &--textarea { + width: 50%; + height: 100px; + border: none; + background: $gray-light; + resize: none; + color: rgb(0, 0, 0); + border-radius: 5px; + padding: 10px; + font-size: 16px; + } + &__error-message { + color: $red; + font-size: 16px; + margin: 10px 0; + } + &__clear-message { + color: $gray-text; + font-size: 16px; + margin: 5px 0 10px 0; + } + + &__button { + display: inline-block; + float: left; + border: none; + background-color: transparent; + height: 22px; + margin-right: 20px; + cursor: pointer; + position: relative; + + &--icon { + font-size: 20px; + line-height: 20px; + color: $green; + margin-right: 10px; + } + + &--label { + color: black; + line-height: 20px; + font-size: 18px; + + } + &--file { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + cursor: pointer; + opacity: 0; + } + } + } + + &__variants { + margin: 0; + padding: 10px 0 0 0; + clear: both; + + &__item { + list-style: none; + padding: 5px 0; + font-size: 15px; + color: $gray-text; + line-height: 20px; + + &--label { + float: left; + display: inline-block; + min-width: 200px; + @include text-ellipsis(200px); + } + + &__edit-input { + float: left; + margin-right: 10px; + border: none; + border-bottom: 1px solid rgb(0, 0, 0); + font-size: 15px; + padding: 0 5px; + line-height: 20px; + text-overflow: ellipsis; + } + + &__edit-input--icon { + font-size: 20px; + cursor: pointer; + color: $green; + } + + &__edit-variants { + cursor: pointer; + font-size: 18px; + line-height: 18px; + + .fa-pencil { + color: $green; + } + .fa-trash-o { + color: $red; + } + } + + } + } +} + +.b-date-range { + display: block; + overflow: hidden; + + &__small-field { + width: auto; + padding-right: 50px; + float: left; + } + + &__label { + display: block; + color: $gray-text; + font-size: 18px; + font-weight: lighter; + margin-bottom: 6px; + } + + &__input { + height: 35px; + background: $gray-light; + padding: 0 10px; + border: 1px solid $gray-light; + font-size: 18px; + } +} + +.b-mask-input { + &__header { + &--title { + display: block; + color: $gray-text; + font-size: 18px; + font-weight: lighter; + margin-bottom: 6px; + } + } + + &__body { + + &__input { + height: 35px; + background: $gray-light; + padding: 0 10px; + border: 1px solid $gray-light; + font-size: 18px; + } + + &__label { + color: $gray-text; + font-size: 18px; + font-weight: lighter; + margin-bottom: 6px; + } + + } +} + +.b-skip-logic { + &__header { + &__title { + display: block; + color: rgb(77, 77, 77); + font-size: 18px; + font-weight: lighter; + margin-bottom: 6px; + } + } + + &__body { + + &__input { + height: 35px; + background: $gray-light; + padding: 0 10px; + border: 1px solid $gray-light; + font-size: 18px; + float: left; + margin: 0 10px; + } + + &__add-option { + background: none; + border: none; + font-weight: bold; + font-size: 18px; + cursor: pointer; + margin-top: 10px; + clear: both; + display: block; + + &:hover { + color: $gray-text; + } + + &:active { + outline: none; + } + + .fa { + color: $red; + } + } + + &__error-message { + color: $red; + font-size: 16px; + } + + &__option { + display: block; + padding: 10px 0; + clear: both; + + &--label { + font-size: 18px; + color: $gray-text; + margin-right: 10px; + float: left; + line-height: 35px; + } + } + + + &__input--label { + font-size: 18px; + color: $gray-text; + margin: 0 10px; + float: left; + line-height: 35px; + } + + &__option-select { + margin-right: 10px; + } + &__question-select { + } + + &__del-option { + color: $red; + font-size: 24px; + border: none; + background: transparent; + float: left; + cursor: pointer; + + &:active { + outline: none; + } + } + } +} + +.b-cascade-question { + white-space: nowrap; + width: 100%; + height: auto; + overflow-x: auto; + padding-bottom: 30px; + position: relative; + + .b-question-builder__input-box, &__cascade-tmpl { + display: inline-block; + } + + &__cascade-subs { + max-width: 270px; + float: left; + display: inline-block; + } +} + +.b-time-selector { + background: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + + &__increase, &__decrease { + text-align: center; + vertical-align: middle; + color: rgb(112, 112, 112); + text-shadow: 0px 1px #FFF; + cursor: pointer; + -webkit-transition: 500ms ease-out all; + -moz-transition: 500ms ease-out all; + -o-transition: 500ms ease-out all; + transition: 500ms ease-out all; + font-size: 100%; + padding: 3px; + margin: 3px; + border: 1px solid #EDE; + + &:hover { + color: rgba(112, 112, 112, 0.5); + border-color: #CCC; + background-color: #FFF; + } + + &:active { + color: rgb(112, 112, 112); + box-shadow: inset 1px 1px 1px #DDD; + } + } + + &__section { + display: inline-block; + } + + &__display { + background-color: rgb(247, 247, 247); + color: #555555; + padding: 5px; + margin: 0px 3px; + min-width: 30px; + text-align: center; + border: 1px solid #DDD; + box-shadow: 1px 1px 1px #FFFFFF; + } +} diff --git a/src/app/surveys/archive/surveys.archive.controller.js b/src/app/surveys/archive/surveys.archive.controller.js new file mode 100644 index 0000000..11936d6 --- /dev/null +++ b/src/app/surveys/archive/surveys.archive.controller.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('mdg.app.surveys') + .controller('ArchiveController', + function ($scope, archivedSurveys) { + $scope.archivedSurveys = archivedSurveys; + } + ) +})(); diff --git a/src/app/surveys/archive/surveys.archive.html b/src/app/surveys/archive/surveys.archive.html new file mode 100644 index 0000000..5b17733 --- /dev/null +++ b/src/app/surveys/archive/surveys.archive.html @@ -0,0 +1,139 @@ +
+
+
+
+
+
+ + + + Archive +
+ + + + + + + + + + + + + + + + + + + + +
+ {{'table_header.Name'| translate }} + + + {{'table_header.Results'| translate }} + + + {{ 'table_header.Publisher'| translate }} + + + {{'table_header.Date'| translate }} + +
+
+ + {{survey.title}} + +
+ + + + +
+
+ ID: {{survey.id}} +
+ {{survey.resultsCount}} + +

{{survey._creator.name}}

+
+

+ {{survey.dateCreated | date : 'dd/MM/yyyy'}}

+
+ +
+
+ +
+

Search Name or Username

+ + +
+
+
+
+
diff --git a/web/controllers/EditSurveyCtrl.js b/src/app/surveys/edit/surveys.edit.controller.js similarity index 89% rename from web/controllers/EditSurveyCtrl.js rename to src/app/surveys/edit/surveys.edit.controller.js index c6d4aaf..1d233d8 100644 --- a/web/controllers/EditSurveyCtrl.js +++ b/src/app/surveys/edit/surveys.edit.controller.js @@ -1,7 +1,12 @@ -define(function () { +(function () { 'use strict'; - return function ($scope, $rootScope, $http, $location, $window, $stateParams, surveysManager) { + +angular.module('mdg.app.surveys') + .controller('SurveysEditController', + function ($scope, $rootScope, $http, $location, $window, $stateParams, $state, + surveysService) { $rootScope.surveyErrors = {}; + $scope.maskPattern = "^[A-Za-z0-9-]*$"; $scope.digitsPattern = "^[0-9]*$"; $scope.surveyData = {}; @@ -12,10 +17,10 @@ define(function () { { translateId: 'survey_builder.SL_Int_conditions.greater_than', value: '>' } ]; $scope.ddSelectOptionsInt = { - equal: { translateId: 'survey_builder.SL_Int_conditions.equal', value: '=' }, - between: { translateId: 'survey_builder.SL_Int_conditions.between', value: '<>' }, - less: { translateId: 'survey_builder.SL_Int_conditions.less_than', value: '<' }, - greater: { translateId: 'survey_builder.SL_Int_conditions.greater_than', value: '>' } + equal: { translateId: 'survey_builder.SL_Int_conditions.equal', value: '=' }, + between: { translateId: 'survey_builder.SL_Int_conditions.between', value: '<>' }, + less: { translateId: 'survey_builder.SL_Int_conditions.less_than', value: '<' }, + greater: { translateId: 'survey_builder.SL_Int_conditions.greater_than', value: '>' } }; $scope.dropdownList = [ { translateId: 'survey_builder.question_types.string', value: 'string' }, @@ -54,7 +59,7 @@ define(function () { update: function (event, ui) { var category = ui.item.sortable.droptarget.context.parentElement, - length = $(category).children('li').length; + length = $(category).children('.b-surveys-edit__category__question').length; if (category && length <= 1) { ui.item.sortable.cancel(); @@ -67,7 +72,7 @@ define(function () { var length = $scope.surveyData._categories.length, - cIndex = $('ol.category-box li.category-item').index(ui.item.sortable.droptarget[0].parentElement), + cIndex = $('.b-surveys-edit__category').index(ui.item.sortable.droptarget[0].parentElement), qIndex = ui.item.sortable.dropindex, question = $scope.surveyData._categories[cIndex]._questions[qIndex]; @@ -80,12 +85,50 @@ define(function () { } } }; + + $scope.moveQuestion = function(category, question, index) { + if (index < 0) {return}; + + var length = $scope.surveyData._categories.length, + cIndex = $scope.surveyData._categories.indexOf(category), + qIndex = category._questions.indexOf(question); + + + $scope.surveyData._categories[cIndex]._questions = _($scope.surveyData._categories[cIndex]._questions).without(question); + $scope.surveyData._categories[cIndex]._questions.splice(index, 0, question); + + surveyDirty = true; + + deleteSLSelect(question.id, length); + + if (question.type === 'select1' || question.type === 'int') { + $scope.selectQuestionType(question, cIndex, qIndex, true); + } + }; + + $scope.moveQuestionToCategory = function(category, question, i) { + var cIndex = $scope.surveyData._categories.indexOf(category), + qIndex = category._questions.indexOf(question); + + if (!$scope.surveyData._categories[cIndex + i]) { + return; + } + + if (category._questions.length === 1) { + $rootScope.$broadcast('empty_category'); + return; + } + + $scope.surveyData._categories[cIndex]._questions = _($scope.surveyData._categories[cIndex]._questions).without(question); + $scope.surveyData._categories[cIndex + i]._questions.push(question); + }; + $scope.sortableCategoriesOptions = { placeholder: 'sortable-placeholder', forcePlaceholderSize: true, cursor: 'move', cancel: '.disableddragcategory', - connectWith: '.builder', + connectWith: '.category-box', stop: function (event, ui) { if (!ui.item.sortable.droptarget) { return; @@ -108,6 +151,24 @@ define(function () { } }; + $scope.moveCategory = function(category, index) { + if (index < 0) {return}; + var length = $scope.surveyData._categories.length; + + $scope.surveyData._categories = _($scope.surveyData._categories).without(category); + $scope.surveyData._categories.splice(index, 0, category); + + surveyDirty = true; + + deleteSLSelect(category.id, length, true); + + _.each(category._questions, function (q, qIndex) { + if (q.type === 'select1' || q.type === 'int') { + $scope.selectQuestionType(q, cIndex, qIndex, true); + } + }); + }; + var defaultOption = { text: 'Option 1', @@ -298,7 +359,7 @@ define(function () { } if (questionValue.signs[0] === '>') { - q.skipLogicOptions[slIndex].ddSelectOptions = $scope.ddSelectOptionsInt.greater; + q.skipLogicOptions[slIndex].ddSelectOptions = $scope.ddSelectOptionsInt.greater; q.skipLogicOptions[slIndex].firstInput = questionValue.values[0]; return; } @@ -402,7 +463,7 @@ define(function () { item.prevTitle = item[itemTitle]; if (type === 'survey' || item.titleEdit) { - return; + return; } if (type === 'question') { @@ -498,6 +559,9 @@ define(function () { }, clearSurveyData = function (survey) { + delete survey.prevTitle; + delete survey.titleEdit; + var fields = { default: ['type', 'required', 'label', 'tagName', 'id', 'relevant', 'defaultRelevant'], string: ['mask', 'constraint', 'defaultValue'], @@ -516,49 +580,39 @@ define(function () { pickItems = function (item) { return _.pick(item, 'text', 'value'); }, - addCascedes = function (cIndex, question) { + addCascades = function (cIndex, question) { _.each(extractCascades(question), function (cascade) { - survey._categories[cIndex]._questions.push(cascade); + cascade = _.pick(cascade, fields.default, fields.cascade1); + cascade.items = _.map(cascade.items, pickItems); + clearedSurvey._categories[cIndex]._questions.push(cascade); }); - }; - - _.each(survey._categories, function (category, cIndex) { - var qIndex = 0; + }, + clearedSurvey = angular.copy(survey); - while (category._questions.length !== qIndex) { - var q = category._questions[qIndex]; + clearedSurvey._categories = []; - if (q.type == 'cascade1') { - addCascedes(cIndex, q); - } - - if (q.type.indexOf('cascade') >= 0 && (q.type !== 'cascade1')) { - q = _.pick(q, fields.default, fields.cascade1); - } else { - q = _.pick(q, fields.default, fields[q.type]); - } + _.each(survey._categories, function (category, cIndex) { + clearedSurvey._categories[cIndex] = _.pick(category, ['id', 'title', 'relevant', 'defaultRelevant']); + clearedSurvey._categories[cIndex]._questions = []; + _.each(survey._categories[cIndex]._questions, function(q) { if (q.type === 'select' || q.type === 'select1' || q.type.indexOf('cascade') !== -1) { q.items = _.map(q.items, pickItems); } - category._questions[qIndex] = q; + clearedSurvey._categories[cIndex]._questions.push(_.pick(q, fields.default, fields[q.type])); - qIndex++; - } - - survey._categories[cIndex] = _.pick(category, ['_questions', 'id', 'title', 'relevant', 'defaultRelevant']); + if (q.type == 'cascade1') { + addCascades(cIndex, q); + } + }); }); - delete survey.prevTitle; - delete survey.titleEdit; - - return survey; + return clearedSurvey; }, extractCascades = function (cascade1) { var - parentId, cascadesArray = [], makeArray = function (cascades, parentId) { _.each(cascades, function (cascade, index) { @@ -579,30 +633,6 @@ define(function () { surveyDirty = true; }); - $scope.checkMask = function (question) { - question.maskError = false; - $rootScope.surveyErrors.maskError = false; - - if (!question.mask || !question.defaultValue) { - return; - } - - var - defaultValue = question.defaultValue - .replace(/[A-Za-z]/g, 'A') - .replace(/[0-9]/g, '9') - .replace(/-+/g, '-'), - mask = question.mask - .replace(/[A-Za-z]/g, 'A') - .replace(/[0-9]/g, '9') - .replace(/-+/g, '-'); - - if (defaultValue !== mask) { - question.maskError = true; - $rootScope.surveyErrors.maskError = true; - } - }; - $scope.checkSLIntValueError = function (question) { question.slValueError = false; $rootScope.surveyErrors.slValueError = false; @@ -709,6 +739,7 @@ define(function () { optToCheck.errorValue = true; question.slValueError = true; $rootScope.surveyErrors.slValueError = true; + $rootScope.surveyErrors.slValueError = true; return; } @@ -1043,12 +1074,8 @@ define(function () { question.maxChecked = false; question.defaultValue = null; question.minmaxError = false; - question.maxLengthError = false; - question.maskError = false; $rootScope.surveyErrors.minmaxError = false; - $rootScope.surveyErrors.maxLengthError = false; - $rootScope.surveyErrors.maskError = false; } if (question.type === 'select1' || question.type === 'int') { @@ -1100,10 +1127,10 @@ define(function () { $scope.updateOption = function (question, item, index, event) { var oldValue = question.items[index].value, - value = item.text.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`'"~()/?/@/±<>§"|+\[\]\s]/g, '').toLowerCase(), - repeatedItems = _.find(question.items, function (item) { - return item.value == value; - }); + value = item.text.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`'"~()/?/@/±<>§"|+\[\]\s]/g, '').toLowerCase(), + repeatedItems = _.find(question.items, function (item) { + return item.value == value; + }); surveyDirty = true; @@ -1276,7 +1303,7 @@ define(function () { $scope.surveyData = angular.copy(newSurvey); addProperties(); } else { - surveysManager.surveyInfo(surveyId).then( + surveysService.surveyInfo(surveyId).then( function success (config) { $scope.surveyData = config.data; $scope.ddSelectSelected = {}; @@ -1364,36 +1391,36 @@ define(function () { }; var makeRelevantValue = function (question, option) { - var value = ''; + var value = ''; - if (question.type === 'select1' && option.ddSelectOptions.value) { - value = option.ddSelectOptions.value; + if (question.type === 'select1' && option.ddSelectOptions.value) { + value = option.ddSelectOptions.value; - _.find(question.items, function (item) { - return item.value === option.ddSelectOptions.value; - }).checked = true; - } else { - if (option.firstInput && option.firstInput !== '-') { - if (option.ddSelectOptions.value === '=') { - value = '(. = ' + option.firstInput + ')'; - } + _.find(question.items, function (item) { + return item.value === option.ddSelectOptions.value; + }).checked = true; + } else { + if (option.firstInput && option.firstInput !== '-') { + if (option.ddSelectOptions.value === '=') { + value = '(. = ' + option.firstInput + ')'; + } - if (option.ddSelectOptions.value === '>') { - value = '(. > ' + option.firstInput + ')'; - } + if (option.ddSelectOptions.value === '>') { + value = '(. > ' + option.firstInput + ')'; + } - if (option.ddSelectOptions.value === '<') { - value = '(. < ' + option.firstInput + ')'; - } + if (option.ddSelectOptions.value === '<') { + value = '(. < ' + option.firstInput + ')'; + } - if (option.ddSelectOptions.value === '<>' && option.secondInput && option.secondInput !== '-') { - value = '(. >= ' + option.firstInput + ' and . <= ' + option.secondInput + ')'; + if (option.ddSelectOptions.value === '<>' && option.secondInput && option.secondInput !== '-') { + value = '(. >= ' + option.firstInput + ' and . <= ' + option.secondInput + ')'; + } } } - } - return value; - }, + return value; + }, makeRelevantSL = function (question, cIndex, survey) { var path = "/data/" + survey._categories[cIndex].id + "/" + question.id + "='"; @@ -1467,8 +1494,8 @@ define(function () { return ''; } var categoryId = cascade.relevantOptions.categoryId, - questionId = cascade.relevantOptions.questionId, - questionValue = cascade.relevantOptions.questionValue; + questionId = cascade.relevantOptions.questionId, + questionValue = cascade.relevantOptions.questionValue; return '/data/' + categoryId + '/' + questionId + '=\'' + questionValue + '\''; }; @@ -1479,7 +1506,6 @@ define(function () { } var survey = angular.copy($scope.surveyData); - _.each(survey._categories, function (category, cIndex) { _.each(category._questions, function (question) { @@ -1511,34 +1537,34 @@ define(function () { }); if ($stateParams.surveyId) { - return surveysManager.editSurvey({ id: $stateParams.surveyId, body: clearSurveyData(survey) }).then( + return surveysService.editSurvey({ id: $stateParams.surveyId, body: clearSurveyData(survey) }).then( function success (config) { $rootScope.$broadcast('saved_survey', survey.title); surveyDirty = false; - $scope.surveyEdit.$dirty = false; + $scope.editSurveyForm.$dirty = false; - if ($rootScope.offlineMode === false) { + if (!$rootScope.offlineMode) { $scope.surveyData.__v = $scope.surveyData.__v + 1; } }, function failed (err) { if (err.status === 409) { $rootScope.$broadcast('invalid_version', 'survey'); - $rootScope.goState('page.editsurvey', { surveyId: $stateParams.surveyId }); + //$state.go('page.surveys.edit', { surveyId: $stateParams.surveyId }, {reload: true}); } console.log("error:", err); }); } else { - return surveysManager.createSurvey({ body: clearSurveyData(survey) }).then( + return surveysService.createSurvey({ body: clearSurveyData(survey) }).then( function success (config) { if (buttonClick) { - $rootScope.goState('page.editsurvey', { surveyId: config.data.id }); + $state.go('page.surveys.edit', { surveyId: config.data.id }, {reload: true}) } $rootScope.$broadcast('saved_survey', survey.title); surveyDirty = false; - $scope.surveyEdit.$dirty = false; + $scope.editSurveyForm.$dirty = false; $scope.surveyData.__v = $scope.surveyData.__v + 1; }, function failed (err) { @@ -1548,8 +1574,8 @@ define(function () { }; $scope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) { - if (toState.name !== "page.editsurvey" && - ($scope.surveyEdit.$dirty || surveyDirty) && + if (toState.name !== "page.surveys.edit" && + ($scope.editSurveyForm.$dirty || surveyDirty) && confirm("You are leaving this page.\nDo you want to save changes to your survey?")) { if (findErrors()) { @@ -1560,8 +1586,10 @@ define(function () { $rootScope.saveSurveyPromise = $scope.saveSurvey(); } + }); $scope.getSurveyData($stateParams.surveyId); - }; -}); + + }); +})(); diff --git a/src/app/surveys/edit/surveys.edit.html b/src/app/surveys/edit/surveys.edit.html new file mode 100644 index 0000000..a578987 --- /dev/null +++ b/src/app/surveys/edit/surveys.edit.html @@ -0,0 +1,438 @@ +
+
+
+
+
+ +
{{surveyData.title}} +
+ + + + + + +
+ + +
+ {{dropdownList[$index].text = (item.translateId | translate) }} +
+ + + +
+ {{ddListOptionsInt[$index].text = (item.translateId | translate) }} +
+ + +
+
+ +
+ + + + {{category.title}} + + + + + + + + + +
+ + +
+ + + + +
+
+ +
+ +
+ +
+ + + + + + + + {{question.label}} + + + + + + + + + + + +
+ + + + + +
+ +
+
+ + + +
+ {{question.dropdownSelect.text = (question.dropdownSelect.translateId | translate)}} +
+ + + +
+ + +
+
+
+ +
+ +
+ +
+
+ +
+ + + {{ 'survey_builder.SL_OPTIONS' | translate }} +
+
+
+ + + {{ 'survey_builder.SL_error' | translate }} + + +
+ {{ 'survey_builder.DEFAULT' | translate }} + + + +
+
+ +
+ {{slOpt.ddSelectOptions.text = (slOpt.ddSelectOptions.translateId | + translate)}} +
+ + + + +
+
+ + + + + + + + +
+
+ + +
+ + +
+
+ +
+
+ +
+ {{'survey_builder.MASK_INPUT'| translate }} + +
+
+
+

{{ 'survey_builder.MASK_INPUT_DESCRIPTION' | translate }}

+ +
+
+ + +
+
+
+
+
+ + +
+
+
+
diff --git a/src/app/surveys/publicLink/surveys.publicLink.controller.js b/src/app/surveys/publicLink/surveys.publicLink.controller.js new file mode 100644 index 0000000..bb1f995 --- /dev/null +++ b/src/app/surveys/publicLink/surveys.publicLink.controller.js @@ -0,0 +1,75 @@ +(function () { + 'use strict'; + angular.module('mdg.app.surveys') + .controller('SurveyPublicLinkController', + function ($scope, $rootScope, $stateParams, $filter, surveysService) { + + $('#expire-date').datepicker({ + dateFormat: 'dd/mm/yy', + defaultDate: '+0d' + }); + + new Clipboard('#linkcopy'); + + $scope.public = {}; + + $scope.survey = $scope.surveys.list.find(function (survey) { + + return survey.id === $stateParams.surveyId; + }); + + surveysService.getPublicLink($stateParams.surveyId).then(function (resp) { + if (resp.data && resp.data.publicUrl) { + $scope.public.url = resp.data.publicUrl; + $scope.public.customMessage = resp.data.customMessage; + $scope.public.customLogoLink = resp.data.customLogoLink; + $scope.public.expireDate = resp.data.expire ? $filter('date')(resp.data.expire, 'dd/MM/yyyy') : null; + $scope.public.checked = true; + } + }); + + $scope.makeSurveyPublic = function (survey, expireDate, customMessage) { + var data = {}; + + data.expire = $scope.public.checked ? expireDate : null; + data.customMessage = customMessage; + + if ($scope.customLogo) { + data.logo = $scope.customLogo; + } + + surveysService.makeSurveyPublic(survey, data).then(function (resp) { + if (resp.data.expire) { + $scope.public.url = resp.data.publicUrl; + $scope.public.customMessage = resp.data.customMessage; + $scope.public.expireDate = $filter('date')(resp.data.expire, 'dd/MM/yyyy'); + + if (!$scope.survey.published) { + $scope.survey.published = true; + + $rootScope.$broadcast('publish_survey', $scope.survey.title); + } + } else { + $scope.public.url = null; + $scope.public.expireDate = null; + } + }); + }; + + $scope.$watch(function () { + return $scope.customLogo; + }, function (logo) { + if (!logo) { + return; + } + + var reader = new FileReader(); + reader.onload = function (e) { + $scope.$evalAsync(function () { + $scope.public.customLogoLink = e.target.result; + }); + }; + reader.readAsDataURL(logo); + }); + }); +})(); diff --git a/src/app/surveys/publicLink/surveys.publicLink.html b/src/app/surveys/publicLink/surveys.publicLink.html new file mode 100644 index 0000000..a796117 --- /dev/null +++ b/src/app/surveys/publicLink/surveys.publicLink.html @@ -0,0 +1,99 @@ +' }; - }; }); diff --git a/web/directives/notifications.js b/src/components/ui/notifications/notifications.directive.js similarity index 97% rename from web/directives/notifications.js rename to src/components/ui/notifications/notifications.directive.js index ff5be94..abb9257 100644 --- a/web/directives/notifications.js +++ b/src/components/ui/notifications/notifications.directive.js @@ -1,6 +1,7 @@ -define(function () { - 'use strict'; - return function () { +angular.module('mdg.ui.notifications', []) + .directive('notifications', + function () { + 'use strict'; return { restrict: 'AC', replace: false, @@ -284,7 +285,7 @@ define(function () { }); } ], - template: '
' + template: '
' }; - }; -}); + } +); \ No newline at end of file diff --git a/src/components/ui/on-enter/on-enter.directive.js b/src/components/ui/on-enter/on-enter.directive.js new file mode 100644 index 0000000..6a7de3e --- /dev/null +++ b/src/components/ui/on-enter/on-enter.directive.js @@ -0,0 +1,14 @@ +angular.module('mdg.ui.onEnter',[]) + .directive('onEnter', function () { + return function (scope, element, attrs) { + element.bind("keydown keypress", function (event) { + if(event.which === 13) { + scope.$apply(function (){ + scope.$eval(attrs.onEnter); + }); + + event.preventDefault(); + } + }); + }; +}); diff --git a/web/directives/questionBuilder.js b/src/components/ui/question-builder/question-builder.directive.js similarity index 89% rename from web/directives/questionBuilder.js rename to src/components/ui/question-builder/question-builder.directive.js index 2342fb7..0ca00bd 100644 --- a/web/directives/questionBuilder.js +++ b/src/components/ui/question-builder/question-builder.directive.js @@ -1,10 +1,11 @@ -define(function () { - 'use strict'; - return function ($compile) { +angular.module('mdg.ui.questionBuilder', []) + + .directive('questionBuilder', + function () { + 'use strict'; return { restrict: 'A', - transclude: true, - + require: '^dateRange', scope: { question: '=questionData', type: '=questionType', @@ -13,7 +14,8 @@ define(function () { updateOption: '=updateOption' }, controller: [ - '$scope', '$element', '$attrs', '$rootScope', '$compile', function ($scope, $element, $attrs, $rootScope, $compile) { + '$scope', '$element', '$attrs', '$rootScope', '$compile', + function ($scope, $element, $attrs, $rootScope, $compile) { $scope.question.addOption = false; $scope.newOption = {}; $scope.maxLengthPattern = "((^[1-9][0-9]*$)|(^$))"; @@ -21,7 +23,7 @@ define(function () { $scope.decimalPattern = "^[0-9]*\\.?[0-9]*$"; var makeOptionValue = function (text) { - return text.toString().replace(/[\.,-\/#!$%\^&\*;:{}=\-_`'"~()/?/@/±<>§"|+\[\]\s]/g,'').toLowerCase(); + return text.toString().replace(/[\.,-\/#!$%\^&\*;:{}=\-_`'"~()/?/@/±<>§"|+\[\]\s]/g, '').toLowerCase(); }; $scope.question.items = $scope.question.items ? $scope.question.items : []; @@ -43,7 +45,6 @@ define(function () { var cascadeString = '
', cascadeParentTmpl = $compile(cascadeString)($scope); - $element.find('.cascade2-tmpl').html(cascadeParentTmpl); }; @@ -65,7 +66,7 @@ define(function () { }); if (!repeatedItems) { - $scope.question.items.push({ text: text, value: value, prevText: text }); + $scope.question.items.push({text: text, value: value, prevText: text}); $scope.question.addOption = false; $scope.newOption = {}; } else { @@ -146,7 +147,7 @@ define(function () { } deleteCascadeLevel(1, $scope.question.cascades.cascade2[item.value].items, item); } - $scope.question.items.splice(index,1); + $scope.question.items.splice(index, 1); }; $scope.checkMinMaxValues = function (question, changeChecked) { @@ -194,21 +195,9 @@ define(function () { $rootScope.surveyErrors.defaultValueError = true; } }; - - $scope.checkMaxLength = function (question) { - question.maxLengthError = false; - $rootScope.surveyErrors.maxLengthError = false; - - if (question.defaultValue.length >= question.maxLength) { - question.maxLengthError = true; - $rootScope.surveyErrors.maxLengthError = true; - } - - $scope.$parent.$parent.$parent.checkMask(question); - }; } ], - templateUrl: '/partials/templates/questionBuilder.html' + templateUrl: 'components/ui/question-builder/question-builder.html' }; - }; -}); + } +); diff --git a/src/components/ui/question-builder/question-builder.html b/src/components/ui/question-builder/question-builder.html new file mode 100644 index 0000000..1a15ebd --- /dev/null +++ b/src/components/ui/question-builder/question-builder.html @@ -0,0 +1,512 @@ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+
+

+ {{ 'survey_builder.Notes_description' | translate }} +

+ +
+
+
+
+
+ {{ 'survey_builder.DEFAULT_ANSWER' | translate }} +
+ +
+
+
+
+
+ +
+ +
+
+ + {{ 'survey_builder.defaultValueError' | translate}} +
+
+ + + + + + +
+
+ + + + + + + + +
+
+ + {{ 'survey_builder.Invalid_min_max_range' | translate }} +
+
+
+
+
+ +
+ +
+
+ + {{ 'survey_builder.defaultValueError' | translate}} +
+
+ + + + + + +
+
+ + + + + + +
+
+ + {{ 'survey_builder.Invalid_min_max_range' | translate }} +
+
+
+
+
+ +
+ + + +

+ +

+ +
+
+
+
+
+
+ +
+ + + {{ 'survey_builder.Import_existing_option' | translate }} + + +
+
+ + +
+
+
+
+
+ +
+ + + {{ 'survey_builder.Import_existing_option' | translate }} + + +
+
+ +
+
+
+
+ + +
+ +
+ + + {{ 'survey_builder.Import_existing_option' | translate }} + + +
+
+
+
+
diff --git a/src/components/ui/select-custom-logo/select-custom-logo.js b/src/components/ui/select-custom-logo/select-custom-logo.js new file mode 100644 index 0000000..a33aea9 --- /dev/null +++ b/src/components/ui/select-custom-logo/select-custom-logo.js @@ -0,0 +1,13 @@ +angular.module('mdg.ui.selectCustomLogo', []) + .directive('selectCustomLogo', + function () { + 'use strict'; + return function (scope, elem, attrs) { + elem.bind('change', function (event) { + scope.$apply(function () { + scope.$parent[attrs.selectCustomLogo] = event.originalEvent.target.files[0]; + }); + }); + }; + } +); diff --git a/web/directives/timeSelector.js b/src/components/ui/time-selector/time-selector.directive.js similarity index 85% rename from web/directives/timeSelector.js rename to src/components/ui/time-selector/time-selector.directive.js index 06db096..096a7fb 100644 --- a/web/directives/timeSelector.js +++ b/src/components/ui/time-selector/time-selector.directive.js @@ -1,9 +1,10 @@ -define(function () { - 'use strict'; - return function () { +angular.module('mdg.ui.timeSelector',[]) + .directive('timeSelector', + function () { + 'use strict'; return { restrict: 'EA', - templateUrl: '/partials/templates/timeSelector.html', + templateUrl: 'components/ui/time-selector/time-selector.html', scope: { hours: '=', minutes: '=' @@ -43,5 +44,5 @@ define(function () { }; } }; - }; -}); + } +); diff --git a/src/components/ui/time-selector/time-selector.html b/src/components/ui/time-selector/time-selector.html new file mode 100644 index 0000000..5c675ef --- /dev/null +++ b/src/components/ui/time-selector/time-selector.html @@ -0,0 +1,42 @@ +
+
+
+ +
+
{{displayHours()}}
+ +
+ +
+ +
+
+
+ +
+
{{displayMinutes()}}
+
+ +
+
+
diff --git a/src/components/ui/validate-pattern/validate-pattern.directive.js b/src/components/ui/validate-pattern/validate-pattern.directive.js new file mode 100644 index 0000000..6ef52b3 --- /dev/null +++ b/src/components/ui/validate-pattern/validate-pattern.directive.js @@ -0,0 +1,21 @@ +angular.module('mdg.ui.validatePattern', []) + .directive('validatePattern', + function () { + 'use strict'; + return function () { + return { + scope: { + regexp: '=regexp', + value: '=valueToCheck' + }, + controller: function ($scope) { + $scope.$watch('value', function (newValue, oldValue) { + if (!new RegExp($scope.regexp).test(newValue)) { + $scope.value = oldValue ? oldValue : ''; + } + }); + } + }; + }; + } +); \ No newline at end of file diff --git a/web/directives/validatephonenumber.js b/src/components/ui/validate-phone-number/validate-phone-number.directive.js similarity index 85% rename from web/directives/validatephonenumber.js rename to src/components/ui/validate-phone-number/validate-phone-number.directive.js index 05f7cfd..022fe30 100644 --- a/web/directives/validatephonenumber.js +++ b/src/components/ui/validate-phone-number/validate-phone-number.directive.js @@ -1,6 +1,7 @@ -define(function () { - 'use strict'; - return function ($parse) { +angular.module('mdg.ui.validatePhoneNumber', []) + .directive('validatePhoneNumber', + function ($parse) { + 'use strict'; return { restrict: 'A', require: 'ngModel', @@ -24,5 +25,5 @@ define(function () { }); } }; - }; -}); + } +); \ No newline at end of file diff --git a/web/config.js b/src/config.js similarity index 100% rename from web/config.js rename to src/config.js diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 0000000..e41deb9 Binary files /dev/null and b/src/favicon.ico differ diff --git a/web/languages/locale-en.json b/src/languages/locale-en.json similarity index 89% rename from web/languages/locale-en.json rename to src/languages/locale-en.json index 6879d04..4e2e767 100644 --- a/web/languages/locale-en.json +++ b/src/languages/locale-en.json @@ -2,21 +2,25 @@ "offlineMode": "You are working in offline mode. Only Surveys page and Survey Builder are available in offline mode", "offlineNotSupport": "Your browser does not support webSQL. Please use Google Chrome browser to work in the offline mode.", "Synchronize": "Synchronize", + "Close_popup": "Close popup", "header": { "surveys": "Surveys", "users": "Users", + "results": "Results", "language": "en", "Logout": "Logout", "Documentation": "Documentation", "Download_app": "Download the app" }, "table_header": { - "NAME": "NAME", - "RESULTS": "RESULTS", - "PUBLISHER": "PUBLISHER", - "DATE": "DATE" + "Name": "Name", + "Results": "Results", + "Publisher": "Publisher", + "Date": "Date", + "Sort_by": "Sort by " }, "surveys": { + "SUBTITLE": "Surveys Home", "ARCHIVE": "ARCHIVE", "Upload_XML_survey": "Upload XML survey", "Only_XML_file_format": "Only XML file format", @@ -29,6 +33,14 @@ "Duplicate_survey": "Duplicate this survey", "Delete_survey": "Delete this survey", "Can_not_be_deleted": "Published survey can not be deleted", + "Get_public_link": "Get public link for {title} survey", + "Public_link": "Public link for this survey is:", + "Custom_Survey_Message": "Custom Thank You Message", + "Custom_Survey_Logo": "Custom Survey Logo", + "Copy_to_clipboard": "Copy to clipboard", + "Make_survey_public": "Make this survey public", + "Select_expire_date": "Select the expire date", + "Save": "Save", "Create_Survey": "Create a new Survey", "Search_Name_Publisher": "Search Name or Publisher...", "All": "All", @@ -37,6 +49,7 @@ "Publish_survey_title": "Publish this Survey" }, "results": { + "SUBTITLE": "Results Home", "RESULT_TITLE": "RESULT TITLE", "DATE_SENT": "DATE SENT", "GPS": "GPS", @@ -68,6 +81,7 @@ "Schedule_this_Export": "Schedule this Export" }, "users": { + "SUBTITLE": "Users Home", "Search": "Search Name or Username...", "NAME": "NAME", "PERMISSION": "PERMISSION", @@ -77,12 +91,14 @@ "Edit_details": "Edit this user's details", "Cannot_delete": "Can't delete this user", "Delete_user": "Delete this user", + "USERNAME": "USERNAME:", "PHONE": "PHONE:", "EMAIL": "EMAIL:", + "MOVE_TO": "MOVE TO:", "Add_Group": "Add a new Group", "All_users": "All users", "New_group_name": "New group name", - "save_group": "Press enter to save group", + "save_group": "Save group", "Send_SMS_group": "Send an SMS to this group", "Delete_group": "Delete this group" }, @@ -146,12 +162,18 @@ "Edit_category_title": "Edit this category name", "Duplicate_category": "Duplicate this category", "Delete_category": "Delete this category", + "Move_category_up": "Move category up", + "Move_category_down": "Move category down", "Add_question": "Add a new question", "Add_category": "Add a new category", "Question_Title": "Question Title", "Edit_question_title": "Edit this question title", "Duplicate_question": "Duplicate this question", "Delete_question": "Delete this question", + "Move_question_up": "Move question up", + "Move_question_down": "Move question down", + "Move_question_to_category_above": "Move question to category above", + "Move_question_to_category_below": "Move question to category below", "Mandatory": "Mandatory", "question_types": { "string": "Descriptive", @@ -196,6 +218,8 @@ "maskError": "If Mask Input is used, the Default Answer value should match the mask.", "maxLengthError": "The Default Answer should not exceed the Maximum Answer Length", "Add_option": "Add a new option", + "Edit_option": "Edit an option", + "Delete_option": "Delete an option", "Import_existing_option": "Import existing option...", "Notes_description": "Notes are no-input text prompts which can provide notes, hints, instructions or messages to the surveyor or respondent" }, diff --git a/web/languages/locale-ru.json b/src/languages/locale-ru.json similarity index 90% rename from web/languages/locale-ru.json rename to src/languages/locale-ru.json index 403451c..7b768c6 100644 --- a/web/languages/locale-ru.json +++ b/src/languages/locale-ru.json @@ -2,21 +2,25 @@ "offlineMode": "Вы работаете в автономном режиме, доступны только страницы Опросы и Конструктор Опросов", "offlineNotSupport": "Ваш браузер не поддерживает webSQL. Используйте Google Chrome для работы в автономном режиме.", "Synchronize": "Синхронизировать", + "Close_popup": "Закрыть окно", "header": { "surveys": "Опросы", "users": "Пользователи", + "results": "Результаты", "language": "ru", "Logout": "Выйти", "Documentation": "Документация", "Download_app": "Скачать" }, "table_header": { - "NAME": "ИМЯ", - "RESULTS": "РЕЗУЛЬТАТЫ", - "PUBLISHER": "ОТПРАВИТЕЛЬ", - "DATE": "ДАТА" + "Name": "Имя", + "Results": "Результаты", + "Publisher": "Отправитель", + "Date": "Дата", + "Sort_by": "Сортировать " }, "surveys": { + "SUBTITLE": "Surveys Home", "ARCHIVE": "АРХИВ", "Upload_XML_survey": "Загрузить XML опрос", "Only_XML_file_format": "Только XML формат", @@ -29,6 +33,14 @@ "Duplicate_survey": "Дублировать опрос", "Delete_survey": "Удалить опрос", "Can_not_be_deleted": "Опубликованный опрос не может быть удален", + "Get_public_link": "Get public link for {title} survey", + "Public_link": "Public link for this survey is:", + "Custom_Survey_Message": "Custom Thank You Message", + "Custom_Survey_Logo": "Custom Survey Logo", + "Copy_to_clipboard": "Copy to clipboard", + "Make_survey_public": "Make this survey public", + "Select_expire_date": "Select the expire date", + "Save": "Save", "Create_Survey": "Создать опрос", "Search_Name_Publisher": "Название или Отправитель...", "All": "Все", @@ -37,6 +49,7 @@ "Publish_survey_title": "Опубликовать опрос" }, "results": { + "SUBTITLE": "Results Home", "RESULT_TITLE": "НАЗВАНИЕ", "DATE_SENT": "ДАТА", "GPS": "GPS", @@ -68,6 +81,7 @@ "Schedule_this_Export": "Добавить" }, "users": { + "SUBTITLE": "Users Home", "Search": "Имя или username...", "NAME": "ИМЯ", "PERMISSION": "ПРАВА ДОСТУПА", @@ -77,7 +91,9 @@ "Edit_details": "Редактировать данные пользователя", "Cannot_delete": "Невозможно удалить пользователя", "Delete_user": "Удалить пользователя", + "USERNAME": "НИК:", "PHONE": "ТЕЛЕФОН:", + "MOVE_TO": "ПЕРЕНЕСТИ В:", "EMAIL": "ПОЧТА:", "Add_Group": "Добавить группу", "All_users": "Все пользователи", @@ -146,12 +162,18 @@ "Edit_category_title": "Редактировать имя категории", "Duplicate_category": "Создать дубликат категории", "Delete_category": "Удалить категорию", + "Move_category_up": "Переместить категорию выше", + "Move_category_down": "Переместить категорию ниже", "Add_question": "Добавить вопрос", "Add_category": "Добавить категорию", "Question_Title": "Название вопроса", "Edit_question_title": "Редактировать название вопроса", "Duplicate_question": "Создать дубликат вопроса", "Delete_question": "Удалить вопрос", + "Move_question_up": "Переместить вопрос выше", + "Move_question_down": "Переместить вопрос ниже", + "Move_question_to_category_above": "Переместить вопрос в категорию выше", + "Move_question_to_category_below": "Переместить вопрос в категорию ниже", "Mandatory": "Обязательный", "question_types": { "string": "Свободный ответ", @@ -196,6 +218,8 @@ "maskError": "In case Mask Input is used, the Default Answer value should match the mask.", "maxLengthError": "Длина значения по умолчанию не может превышать максимальную длину ответа.", "Add_option": "Добавить опцию", + "Edit_option": "Редактировать опцию", + "Delete_option": "Удалить опцию", "Import_existing_option": "Импорт опции...", "Notes_description": "Вопрос типа 'заметка' представляет собой сообщение, подсказку или инструкцию для человека, который заполняет опрос. Данный тип вопроса носит сугубо информативный характер и не предусматривает возможность ответа." }, diff --git a/web/languages/locale-vi.json b/src/languages/locale-vi.json similarity index 90% rename from web/languages/locale-vi.json rename to src/languages/locale-vi.json index 986ca14..8cef7ac 100644 --- a/web/languages/locale-vi.json +++ b/src/languages/locale-vi.json @@ -2,21 +2,25 @@ "offlineMode": "Bạn đang làm việc trong chế độ offline. Chỉ trang Khảo sát và Builder Khảo sát có sẵn trong chế độ offline", "offlineNotSupport": "Trình duyệt của bạn không hỗ trợ webSQL . Vui lòng sử dụng trình duyệt Google Chrome để làm việc ở chế độ offline.", "Synchronize": "Synchronize", + "Close_popup": "gần cửa sổ bật lên", "header": { "surveys": "Khảo sát", "users": "Người dùng", + "results": "Results", "language": "Tiếng Anh", "Logout": "Đăng xuất", "Documentation": "Tài liệu hóa", "Download_app": "Tải ứng dụng" }, "table_header": { - "NAME": "TÊN", - "RESULTS": "KẾT QUẢ", - "PUBLISHER": "NGƯỜI GỬI", - "DATE": "NGÀY" + "Name": "TÊN", + "Results": "KẾT QUẢ", + "Publisher": "NGƯỜI GỬI", + "Date": "NGÀY", + "Sort_by": "Sắp xếp theo" }, "surveys": { + "SUBTITLE": "Surveys Home", "ARCHIVE": "LƯU TRỮ", "Upload_XML_survey": "Đăng tải khảo sát định dạng XML", "Only_XML_file_format": "Chỉ dùng file định dạnh XML", @@ -29,6 +33,14 @@ "Duplicate_survey": "Sao chép khảo sát này", "Delete_survey": "Xóa khảo sát này", "Can_not_be_deleted": "Không thể xóa Khảo sát đã được gửi", + "Get_public_link": "Get public link for {title} survey", + "Public_link": "Public link for this survey is:", + "Custom_Survey_Message": "Custom Thank You Message", + "Custom_Survey_Logo": "Custom Survey Logo", + "Copy_to_clipboard": "Copy to clipboard", + "Make_survey_public": "Make this survey public", + "Select_expire_date": "Select the expire date", + "Save": "Save", "Create_Survey": "Tạo một Khảo sát mới", "Search_Name_Publisher": "Tìm Tên hoặc Người gửi", "All": "Tất cả", @@ -37,6 +49,7 @@ "Publish_survey_title": "Tên bản Khảo sát đã gửi" }, "results": { + "SUBTITLE": "Results Home", "RESULT_TITLE": "TÊN KẾT QUẢ", "DATE_SENT": "NGÀY GỬI", "GPS": "GPS", @@ -68,6 +81,7 @@ "Schedule_this_Export": "Lên lịch Xuất" }, "users": { + "SUBTITLE": "Users Home", "Search": "Tìm Tên hoặc Tên người dùng...", "NAME": "TÊN", "PERMISSION": "CHO PHÉP", @@ -77,7 +91,9 @@ "Edit_details": "Chỉnh sửa thông tin của người dùng này", "Cannot_delete": "Không xóa được người dùng này", "Delete_user": "Xóa người dùng này", + "USERNAME": "USERNAME:", "PHONE": "Điện thoại Di Động:", + "MOVE_TO": "MOVE_TO", "EMAIL": "EMAIL:", "Add_Group": "Thêm một Nhóm mới", "All_users": "Toàn bộ người dùng", @@ -146,12 +162,18 @@ "Edit_category_title": "Sửa tên mục này", "Duplicate_category": "Sao chép mục này", "Delete_category": "Xóa mục này", + "Move_category_up": "Di chuyển loại lên", + "Move_category_down": "Di chuyển xuống mục", "Add_question": "Thêm một câu hỏi mới", "Add_category": "Thêm một mục mới", "Question_Title": "Tiêu đề Câu hỏi", "Edit_question_title": "Sửa tiêu đề câu hỏi này", "Duplicate_question": "Sao chép câu hỏi này", "Delete_question": "Xóa câu hỏi này", + "Move_question_up": "Di chuyển câu hỏi lên", + "Move_question_down": "Di chuyển xuống câu hỏi", + "Move_question_to_category_above": "Di chuyển câu hỏi để loại trên", + "Move_question_to_category_below": "Di chuyển câu hỏi để loại dưới đây", "Mandatory": "Bắt buộc", "question_types": { "string": "Mô tả", @@ -196,6 +218,8 @@ "maskError": "Nếu Mask Input được sử dụng , mặc định giá trị trả lời phải phù hợp với mặt nạ.", "maxLengthError": "Default trả lời không được vượt quá các trả lời Chiều dài tối đa.", "Add_option": "Thêm một lựa chọn", + "Edit_option": "Hiệu chỉnh tùy chọn", + "Delete_option": "Xóa một lựa chọn", "Import_existing_option": "Chèn lựa chọn sẵn có...", "Notes_description": "Ghi chú là các hướng dẫn văn bản không đầu vào cung cấp các lưu ý, gợi ý, hướng dẫn hoặc lời nhắn cho khảo sát hoặc người trả lời" }, @@ -219,4 +243,4 @@ "invalid_version": "{loại, số nhiều, khảo sát{khảo sát} người dùng{người dùng} khác{{loại}}} này đã được thay đổi. Hãy làm mới lại trang", "publish_survey": "Khảo sát {tiêu đề} đã được gửi thành công" } -} \ No newline at end of file +} diff --git a/web/languages/locale-zh.json b/src/languages/locale-zh.json similarity index 89% rename from web/languages/locale-zh.json rename to src/languages/locale-zh.json index 806cd42..82b9103 100644 --- a/web/languages/locale-zh.json +++ b/src/languages/locale-zh.json @@ -2,21 +2,25 @@ "offlineMode": "您工作在離線模式。只有調查頁面,調查生成器是在離線模式下可用", "offlineNotSupport": "您的瀏覽器不支持webSQL 請使用谷歌Chrome瀏覽器在離線模式下工作", "Synchronize": "Synchronize", + "Close_popup": "關閉彈出窗口", "header": { "surveys": "调查问卷", "users": "用户名", + "results": "Results", "language": "中文", "Logout": "退出", "Documentation": "文件", "Download_app": "下载应用程序" }, "table_header": { - "NAME": "姓名", - "RESULTS": "结果", - "PUBLISHER": "发布者", - "DATE": "日期" + "Name": "姓名", + "Results": "结果", + "Publisher": "发布者", + "Date": "日期", + "Sort_by": "排序" }, "surveys": { + "SUBTITLE": "Surveys Home", "ARCHIVE": "存档", "Upload_XML_survey": "上载 XML 调查", "Only_XML_file_format": "仅 XML 文件格式", @@ -29,6 +33,14 @@ "Duplicate_survey": "复制调查问卷", "Delete_survey": "删除调查问卷", "Can_not_be_deleted": "不能删除", + "Get_public_link": "Get public link for {title} survey", + "Public_link": "Public link for this survey is:", + "Custom_Survey_Message": "Custom Thank You Message", + "Custom_Survey_Logo": "Custom Survey Logo", + "Copy_to_clipboard": "Copy to clipboard", + "Make_survey_public": "Make this survey public", + "Select_expire_date": "Select the expire date", + "Save": "Save", "Create_Survey": "创建一个新调查", "Search_Name_Publisher": "搜索发布者姓名...", "All": "全部", @@ -37,6 +49,7 @@ "Publish_survey_title": "发布调查标题" }, "results": { + "SUBTITLE": "Results Home", "RESULT_TITLE": "答卷名", "DATE_SENT": "发送日期", "GPS": "GPS", @@ -68,6 +81,7 @@ "Schedule_this_Export": "安排这次输出时间" }, "users": { + "SUBTITLE": "Users Home", "Search": "搜寻姓名或用户名...", "NAME": "姓名", "PERMISSION": "许可", @@ -77,7 +91,9 @@ "Edit_details": "编辑该用户详细资料", "Cannot_delete": "不能删除该用户", "Delete_user": "删除此用户", + "USERNAME": "USERNAME:", "PHONE": "电话:", + "MOVE_TO": "MOVE_TO", "EMAIL": "电子邮件", "Add_Group": "添加一个新群", "All_users": "所有用户", @@ -146,12 +162,18 @@ "Edit_category_title": "编辑该类别名称", "Duplicate_category": "复制该类别", "Delete_category": "删除该类别", + "Move_category_up": "移動類別最多", + "Move_category_down": "下移類別", "Add_question": "添加新问题", "Add_category": "添加新类别", "Question_Title": "问题标题", "Edit_question_title": "编辑该问题标题", "Duplicate_question": "复制该问题", "Delete_question": "删除该问题", + "Move_question_up": "轉存質疑最多", + "Move_question_down": "移動的問題倒", + "Move_question_to_category_above": "將問題類以上", + "Move_question_to_category_below": "將問題分類波紋管", "Mandatory": "强制的", "question_types": { "string": "描叙型", @@ -196,6 +218,8 @@ "maskError": "如果屏蔽輸入時,默認回答值應符合口罩", "maxLengthError": "默認回答不應超過最大長度答案", "Add_option": "添加新选项", + "Edit_option": "編輯選項", + "Delete_option": "刪除選項", "Import_existing_option": "导入现有选项...", "Notes_description": "“提示”是指无输入提示文字,能够为被调查者或答题者提供注释,提醒,介绍或者信息。" }, diff --git a/tasks/run_server.js b/tasks/run_server.js index 4b1af64..006915d 100644 --- a/tasks/run_server.js +++ b/tasks/run_server.js @@ -3,9 +3,10 @@ process.env.NODE_ENV = 'testing'; var app = require('../app'), Configuration = require('../app/helpers/Configuration'); -module.exports = function (grunt) { - grunt.registerTask('run_server', 'Run server for testing', function () { +module.exports = function (gulp) { + gulp.task('run_server', 'Run server for testing', function () { var done = this.async(); app.run(Configuration.get('tests.mongodbUrl'), Configuration.get('tests.port'), done); + //app.run(Configuration.get('general.mongodbUrl'), process.env.PORT || Configuration.get('general.port')); }); }; diff --git a/web/application.js b/web/application.js deleted file mode 100644 index f8c14c4..0000000 --- a/web/application.js +++ /dev/null @@ -1,363 +0,0 @@ -define([ - 'angular', - 'services/services', - 'controllers/controllers', - 'directives/directives', - 'config' -], function (angular, services, controllers, directives, config) { - 'use strict'; - var application = angular.module('Application',['ui.router','ui.sortable', - 'ngDragDrop', 'ngSanitize', 'ngDropdowns', - 'config', 'base64', 'ngCookies', 'pascalprecht.translate', - 'expand', 'errorsblock', 'validatephonenumber', 'validatePattern', - 'timeSelector', 'questionBuilder', 'cascadeQuestion', - 'dateInput', 'dateRange', - 'csvOptioinsImport', - 'notifications', 'nfEvent', - 'fileSelect', 'autoComplete','focusMe' - ], function ($httpProvider) { - $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; - $httpProvider.defaults.headers.put['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; - - $httpProvider.defaults.transformRequest = [function (data) { - /** - * - * @param {Object} obj - * @return {String} - */ - var param = function (obj) { - var query = '', - name, value, fullSubName, subValue, innerObj, i, subName; - - for (name in obj) { - value = obj[name]; - if (value instanceof Array) { - for (i = 0; i < value.length; ++i) { - subValue = value[i]; - fullSubName = name + '[' + i + ']'; - innerObj = {}; - innerObj[fullSubName] = subValue; - query += param(innerObj) + '&'; - } - } else if (value instanceof Object) { - for (subName in value) { - subValue = value[subName]; - fullSubName = name + '[' + subName + ']'; - innerObj = {}; - innerObj[fullSubName] = subValue; - query += param(innerObj) + '&'; - } - } else if (value !== undefined && value !== null) { - query += encodeURIComponent(name) + '=' + encodeURIComponent(value) + '&'; - } - } - - return query.length ? query.substr(0, query.length - 1) : query; - }; - - return angular.isObject(data) && String(data) !== '[object File]' ? param(data) : data; - }]; - - var interceptor = ['$rootScope', '$q', '$window', '$location', function ($scope, $q, $window, $location) { - - function success (response) { - return response; - } - - function error (response) { - var status = response.status; - - if (status == 401) { - window.document.location.href = '/home'; - } - - if (status === 404 || status >= 500 || status === 0) { - $scope.offlineMode = true; - localStorage.setItem('offlineMode', true); - return response; - } - - return $q.reject(response); - } - - return function (promise) { - return promise.then(success, error); - }; - }]; - - $httpProvider.responseInterceptors.push(interceptor); - }); - - services.initialize(application); - controllers.initialize(application); - directives.initialize(application); - - application.filter('cascadeFilter', [function () { - return function (questions) { - var exp = new RegExp('cascade([^1]\\d*|\\d{2,})'), - tempQuestions = []; - angular.forEach(questions, function (question) { - if (!exp.test(question.type)) { - tempQuestions.push(question); - } - }); - return tempQuestions; - }; - }]); - - application.filter('deletedItemsFilter', ['$rootScope', function ($rootScope) { - return function (items, type) { - angular.forEach(items, function (item) { - if (_.find($rootScope.deletedItems[type], function (id) { - return id === item._id; - })) { - item.hidden = true; - } - }); - - return items; - }; - }]); - - application.config(function ($urlRouterProvider, $stateProvider) { - $urlRouterProvider - .otherwise('/surveys'); - $stateProvider - .state('page', { - url: '', - templateUrl: '/partials/Page.html' - }) - .state('page.surveys', { - url: '/surveys', - templateUrl: '/partials/SurveyList.html' - }) - .state('page.surveys.sendsurvey', { - url: '/send:{surveyId}', - templateUrl: '/partials/ModalSendSurvey.html' - }) - .state('page.surveys.sync', { - url: '/sync', - templateUrl: '/partials/ModalSyncOfflineMode.html' - }) - - .state('page.archive', { - url: '/archive', - templateUrl: '/partials/Archive.html' - }) - .state('page.archive.sendsurvey', { - url: '/send:{surveyId}', - templateUrl: '/partials/ModalSendSurvey.html' - }) - - .state('page.users', { - url: '/users', - templateUrl: '/partials/GroupList.html' - }) - .state('page.users.group', { - url: '/group:{groupId}', - templateUrl: '/partials/UserList.html' - }) - .state('page.users.group.smstogroup', { - url: '/sms', - templateUrl: '/partials/ModalGroupSms.html' - }) - .state('page.users.group.smstouser', { - url: '/sms:{userId}', - templateUrl: '/partials/ModalUserSms.html' - }) - .state('page.users.group.edituser', { - url: '/edit:{userId}', - templateUrl: '/partials/ModalEditUser.html' - }) - .state('page.users.group.adduser', { - url: '/adduser', - templateUrl: '/partials/ModalAddUser.html' - }) - - .state('page.map', { - url: '/survey:{surveyId}/map', - templateUrl: '/partials/ResultsOnMap.html' - }) - .state('page.map.details', { - url: '/result:{resultId}', - templateUrl: '/partials/ResultDetails.html' - }) - .state('page.map.exportschedule', { - url: '', - templateUrl: '/partials/ModalExportSchedule.html' - }) - .state('page.map.details.exportschedule', { - url: '', - templateUrl: '/partials/ModalExportSchedule.html' - }) - .state('page.map.sentto', { - url: '', - templateUrl: '/partials/ModalSentToUsers.html' - }) - .state('page.map.details.sentto', { - url: '', - templateUrl: '/partials/ModalSentToUsers.html' - }) - - .state('page.results', { - url: '/survey:{surveyId}', - templateUrl: '/partials/ResultList.html' - }) - .state('page.results.details', { - url: '/result:{resultId}', - templateUrl: '/partials/ResultDetails.html' - }) - .state('page.results.sentto', { - url: '', - templateUrl: '/partials/ModalSentToUsers.html' - }) - .state('page.results.details.sentto', { - url: '', - templateUrl: '/partials/ModalSentToUsers.html' - }) - .state('page.results.exportschedule', { - url: '', - templateUrl: '/partials/ModalExportSchedule.html' - }) - .state('page.results.details.exportschedule', { - url: '', - templateUrl: '/partials/ModalExportSchedule.html' - }) - .state('page.results.resultschart', { - url: '', - templateUrl: '/partials/ModalResultsChart.html' - }) - .state('page.results.details.resultschart', { - url: '', - templateUrl: '/partials/ModalResultsChart.html' - }) - - .state('page.builder', { - url: '/builder', - templateUrl: '/partials/EditSurvey.html' - }) - .state('page.builder.sync', { - url: '/sync', - templateUrl: '/partials/ModalSyncOfflineMode.html' - }) - .state('page.editsurvey', { - url: '/editsurvey:{surveyId}', - templateUrl: '/partials/EditSurvey.html' - }) - .state('page.editsurvey.sync', { - url: '/sync', - templateUrl: '/partials/ModalSyncOfflineMode.html' - }); - }); - - application.config(['$translateProvider', function ($translateProvider) { - $translateProvider.useStaticFilesLoader({ - prefix: 'languages/locale-', - suffix: '.json' - }); - - $translateProvider.useMessageFormatInterpolation(); - $translateProvider.useCookieStorage(); - }]); - - application.run(function ($templateCache, $rootScope, $location, $state, $stateParams, profileManager, $anchorScroll) { - if (window.addTemplatesToCache) { - window.addTemplatesToCache($templateCache); - } - $rootScope.generateUUID = function () { - return 'id_' + UUIDjs.create().toString().replace(/-/g, '_'); - }; - - $rootScope.$on('$stateChangeSuccess', function () { - $location.hash($rootScope.scrollTo); - $anchorScroll(); - $rootScope.scrollTo = null; - }); - - $rootScope.version = window.version; - $rootScope.$state = $state; - $rootScope.$stateParams = $stateParams; - $rootScope.goState = function (state, stateParams) { - $rootScope.scrollTo = stateParams ? stateParams.scrollTo : undefined; - $state.go(state, stateParams); - }; - $rootScope.setRoute = function (route) { - $location.path(route); - }; - $rootScope.back = function () { - window.history.back(); - }; - - $rootScope.offlineMode = JSON.parse(localStorage.getItem('offlineMode')); - $rootScope.loggedInUser = JSON.parse(localStorage.getItem('user')); - - $rootScope.deletedItems = { - surveys: [], - users: [], - groups: [], - results: [] - }; - - $rootScope.logout = function () { - var logout = function () { - profileManager.logout().then( - function success () { - localStorage.clear(); - window.document.location.href = '/home'; - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - if ($location.$$path.indexOf('/editsurvey:') !== -1 || $location.$$path.indexOf('/builder') !== -1) { - $rootScope.goState('page.surveys'); - - $rootScope.saveSurveyPromise.then( - function success () { - logout(); - }); - } else { - logout(); - } - }; - - $rootScope.$on('$stateChangeStart', function (event, toState) { - if (!$rootScope.loggedInUser) { - $rootScope.offlineMode = false; - localStorage.clear(); - } - - if ($rootScope.offlineMode && - toState.name !== 'page.surveys' && toState.name !== 'page.builder' && toState.name !== 'page.editsurvey' && - toState.name !== 'page.surveys.sync' && toState.name !== 'page.builder.sync' && toState.name !== 'page.editsurvey.sync') { - event.preventDefault(); - } else { - profileManager.getUserPermission().then( - function success (config) { - if (!$rootScope.offlineMode) { - $rootScope.loggedInUser = config.data; - localStorage.setItem('user', JSON.stringify(config.data)); - } - - if ($rootScope.loggedInUser && toState.name === 'page') { - event.preventDefault(); - $location.path('/surveys'); - } - }, - - function failed (err) { - if (toState.name === 'page') { - event.preventDefault(); - window.document.location.href = '/home'; - } - - console.log("error:", err); - }); - } - }); - - }); - return application; -}); diff --git a/web/controllers/AddUserCtrl.js b/web/controllers/AddUserCtrl.js deleted file mode 100644 index 75d67a6..0000000 --- a/web/controllers/AddUserCtrl.js +++ /dev/null @@ -1,91 +0,0 @@ -define(function () { - 'use strict'; - return function ($scope, $http, $state, $stateParams, $base64, - usersManager, errorsManager, validateManager) { - $scope.user = {}; - $scope.user.permission = 'admin'; - $scope.errors = {}; - - $scope.addUser = function () { - if ($scope.addUserForm.$error.required.length > 0) { - _.each($scope.addUserForm.$error.required, function (field) { - $scope.addUserForm[field].$error.required = true; - }); - - $('input.ng-pristine').addClass('ng-dirty').removeClass('ng-pristine'); - } else if ($('.error-message:not(.ng-hide)').length === 0) { - $scope.update(); - - usersManager.createUser($scope.newUser).then( - function success (config) { - $state.go('page.users.group', {}, { reload: true }); - }, - - function failed (err) { - if (err.status === 400 && _.find(err.data, function (data) { - return data.path === 'email'; - })) { - $scope.errorEmailPattern = true; - } - - console.log("error:", err); - }); - } - }; - - $scope.update = function () { - $scope.newUser = angular.copy($scope.user); - - if ($scope.newUser.password) { - $scope.newUser.password = $base64.encode($scope.newUser.password); - } - }; - - $scope.checkExistingEmail = function () { - $scope.errorEmailPattern = false; - - validateManager.validate({ field: 'email', value: $scope.user.email }).then( - function success () { - $scope.errorExistingEmail = false; - }, - - function failed () { - $scope.errorExistingEmail = true; - } - ); - }; - - $scope.checkExistingUsername = function () { - validateManager.validate({ field: 'username', value: $scope.user.username }).then( - function success () { - $scope.errorExistingUsername = false; - }, - - function failed () { - $scope.errorExistingUsername = true; - } - ); - }; - - $scope.$watch('addUserForm.username.$error.pattern', function () { - $scope.errorUsernamePattern = $scope.addUserForm.username.$error.pattern; - }); - - $scope.addFieldsErrors = function () { - var fields = { - firstName: [{ minlength: 2 }, { maxlength: 60 }, 'required'], - lastName: [{ minlength: 2 }, { maxlength: 60 }, 'required'], - username: [{ minlength: 5 }, { maxlength: 13 }, 'required', 'errorUsernamePattern', 'errorExistingUsername'], - phone: ['errorPhoneMaxLength', 'errorPhoneMinLength', 'required'], - email: [{ minlength: 3 }, { maxlength: 60 }, 'required', 'email','errorExistingEmail', 'errorEmailPattern'], - password: [{ minlength: 8 }, { maxlength: 20 }, 'required'] - }; - - _.map(_.pairs(fields), function (field) { - $scope.errors[field[0]] = errorsManager.getFieldErrorsHtml(field[0], field[1], 'addUserForm'); - }); - }; - - $scope.addFieldsErrors(); - }; -}); diff --git a/web/controllers/EditUserCtrl.js b/web/controllers/EditUserCtrl.js deleted file mode 100644 index 87ef511..0000000 --- a/web/controllers/EditUserCtrl.js +++ /dev/null @@ -1,118 +0,0 @@ -define(function () { - 'use strict'; - return function ($scope, $http, $state, $stateParams, $base64, - usersManager, errorsManager, validateManager) { - $scope.user = {}; - $scope.userUpdated = {}; - $scope.errors = {}; - - $scope.oldEmail = ''; - $scope.oldUsername = ''; - $scope.oldPhone = ''; - - $scope.getUserInfo = function (userId) { - usersManager.userInfo(userId).then( - function success (config) { - $scope.user = config.data; - $scope.user.password = ''; - $scope.user.confirmpass = ''; - $scope.oldEmail = $scope.user.email; - $scope.oldUsername = $scope.user.username; - $scope.oldPhone = $scope.user.phone; - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.getUserInfo($stateParams.userId); - - $scope.updateUser = function (userId) { - if ($scope.editUserForm.$error.required.length > 0) { - _.each($scope.editUserForm.$error.required, function (field) { - $scope.editUserForm[field].$error.required = true; - }); - - $('input.ng-pristine').addClass('ng-dirty').removeClass('ng-pristine'); - } else if ($('.error-message:not(.ng-hide)').length === 0) { - $scope.update(); - - usersManager.updateUser(userId, $scope.userUpdated).then( - function success (config) { - $state.go('page.users.group', {}, { reload: true }); - }, - - function failed (err) { - if (err.status === 400 && _.find(err.data, function (data) { - return data.path === 'password'; - })) { - $scope.errorPassword = true; - } - - if (err.status === 409) { - $scope.errorInvalidVersion = true; - } - - console.log("error:", err); - }); - } - }; - - $scope.update = function () { - $scope.userUpdated = angular.copy($scope.user); - - if ($scope.userUpdated.password.length !== 0) { - $scope.userUpdated.password = $base64.encode($scope.userUpdated.password); - } - }; - - $scope.checkExistingEmail = function () { - $scope.errorEmailPattern = false; - - validateManager.validate({ field: 'email', value: $scope.user.email }, $scope.user._id).then( - function success () { - $scope.errorExistingEmail = false; - }, - - function failed () { - $scope.errorExistingEmail = true; - } - ); - - }; - - $scope.checkExistingUsername = function () { - validateManager.validate({ field: 'username', value: $scope.user.username }, $scope.user._id).then( - function success () { - $scope.errorExistingUsername = false; - }, - - function failed () { - $scope.errorExistingUsername = true; - } - ); - }; - - $scope.$watch('editUserForm.username.$error.pattern', function () { - $scope.errorUsernamePattern = $scope.editUserForm.username.$error.pattern; - }); - - $scope.addFieldsErrors = function () { - var fields = { - firstName: [{ minlength: 2 }, { maxlength: 60 }, 'required'], - lastName: [{ minlength: 2 }, { maxlength: 60 }, 'required'], - username: [{ minlength: 5 }, { maxlength: 13 }, 'required', 'errorUsernamePattern', 'errorExistingUsername'], - phone: ['errorPhoneMaxLength', 'errorPhoneMinLength', 'required'], - email: [{ minlength: 3 }, { maxlength: 60 }, 'required', 'email', 'errorExistingEmail', 'errorEmailPattern'], - password: [{ minlength: 8 }, { maxlength: 20 }, 'errorPassword'] - }; - - _.map(_.pairs(fields), function (field) { - $scope.errors[field[0]] = errorsManager.getFieldErrorsHtml(field[0], field[1], 'editUserForm'); - }); - }; - - $scope.addFieldsErrors(); - }; -}); diff --git a/web/controllers/PageCtrl.js b/web/controllers/PageCtrl.js deleted file mode 100644 index fd4da25..0000000 --- a/web/controllers/PageCtrl.js +++ /dev/null @@ -1,64 +0,0 @@ -define(function () { - 'use strict'; - return function ($scope, $http, $location, $window, $rootScope, $state, $translate, $filter, profileManager) { - $scope.dropdownList = [ - { translateId: 'header.Logout', value: 'logout' }, - { translateId: 'header.Documentation', href: '/docs' }, - { translateId: 'header.Download_app', href: '/docs/install.html' } - ]; - - $scope.dropdownSelect = {}; - - $scope.selectMenu = function (selected) { - if (selected.value === "logout") { - $rootScope.logout(); - } - }; - - $scope.langauges = []; - - $scope.getLanguages = function () { - profileManager.getLanguages().then( - function success (config) { - $scope.langauges = config.data.languages; - - if (!$translate.use()) { - $translate.use(config.data.preferred); - } - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.getLanguages(); - - $scope.changeLanguage = function (selected) { - $translate.use(selected.value); - }; - - function getSyncPageState () { - var state = 'page.'; - - if ($state.includes('page.surveys')) { - state = 'page.surveys'; - } else if ($state.includes('page.builder')) { - state = 'page.builder'; - } else if ($state.includes('page.editsurvey')) { - state = 'page.editsurvey'; - } - - return state + '.sync'; - } - - $scope.sync = function () { - if ($state.includes('page.surveys') || $state.includes('page.builder') || $state.includes('page.editsurvey')) { - $rootScope.goState(getSyncPageState()); - } else { - $rootScope.offlineMode = false; - localStorage.removeItem('offlineMode'); - } - }; - }; -}); diff --git a/web/controllers/ResultsCtrl.js b/web/controllers/ResultsCtrl.js deleted file mode 100644 index 7a3a96b..0000000 --- a/web/controllers/ResultsCtrl.js +++ /dev/null @@ -1,241 +0,0 @@ -define(function () { - 'use strict'; - return function ($scope, $http, $location, $window, $rootScope, $stateParams, - errorsManager, - resultsManager, - surveysManager, - subscriptionManager) { - - $scope.today = new Date(); - $scope.allChecked = false; - $scope.path = $location.$$path; - $scope.results = {}; - $scope.schedule = {}; - $rootScope.selectedResults = $rootScope.selectedResults ? $rootScope.selectedResults : []; - $scope.survey = {}; - $scope.subscriptions = {}; - $scope.exportForm = {}; - $scope.errors = {}; - - $scope.dropdownList = [ - { text: 'Export to:', value: '' }, - { text: 'KML', value: 'kml' }, - { text: 'CSV', value: 'csv' }, - { text: 'Excel', value: 'xls' } - ]; - $scope.dropdownSelect = {}; - function getCurrentState () { - var state = 'page.'; - - if ($scope.path.indexOf('/map') !== -1) { - state = state + 'map'; - } else { - state = state + 'results'; - } - - if ($stateParams.resultId !== undefined) { - state = state + '.details'; - } - - return state; - } - - $('#from').datepicker({ - dateFormat: 'dd/mm/yy', - defaultDate: '+0d', - onClose: function (selectedDate) { - $('#to').datepicker('option', 'minDate', selectedDate); - } - }); - - $('#to').datepicker({ - dateFormat: 'dd/mm/yy', - defaultDate: '+0d', - onClose: function (selectedDate) { - $('#from').datepicker('option', 'maxDate', selectedDate); - } - }); - - $scope.getResultList = function () { - resultsManager.resultList($stateParams.surveyId).then( - function success (config) { - $scope.results = config.data; - - if ($scope.results.length === $rootScope.selectedResults.length) { - $scope.allChecked = true; - } - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.getSurveyInfo = function () { - surveysManager.surveyInfo($stateParams.surveyId).then( - function success (config) { - $scope.survey = config.data; - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.modalSentTo = function () { - $rootScope.goState(getCurrentState() + '.sentto'); - }; - - $scope.viewMap = function () { - if ($rootScope.selectedResults.length === 0) { - $rootScope.$broadcast('choose_results', 'view_map'); - return; - } - - $rootScope.goState('page.map', $stateParams.surveyId); - }; - - $scope.modalExportSchedule = function () { - $rootScope.goState(getCurrentState() + '.exportschedule'); - }; - - $scope.modalResultsChart = function () { - if ($rootScope.selectedResults.length === 0) { - $rootScope.$broadcast('choose_results', 'view_charts'); - return; - } - - $rootScope.goState(getCurrentState() + '.resultschart'); - }; - - $scope.formSelectedResults = function (resultId) { - if (resultId) { - var index = $rootScope.selectedResults.indexOf(resultId); - - if (index !== -1) { - $rootScope.selectedResults.splice (index, 1); - } else { - $rootScope.selectedResults.push(resultId); - } - } else { - if (!$scope.allChecked && $scope.results.length !== $rootScope.selectedResults.length) { - $rootScope.selectedResults = []; - - _.each($scope.results, function (result) { - $rootScope.selectedResults.push(result._id); - }); - } else { - $rootScope.selectedResults = []; - } - } - }; - - $scope.deleteResults = function () { - if ($rootScope.selectedResults.length === 0) { - $rootScope.$broadcast('choose_results', 'delete'); - return; - } - - $rootScope.deletedItems.results = _.flatten([$rootScope.deletedItems.results, $rootScope.selectedResults]); - - $rootScope.goState('page.results'); - $rootScope.$broadcast('deleted_result', $scope.survey._id, $rootScope.selectedResults, $scope.survey.title); - }; - - $scope.getSubscriptions = function () { - subscriptionManager.subscriptionList($stateParams.surveyId).then( - function success (config) { - $scope.subscriptions = config.data; - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.deleteSubscription = function (subscriptionId, index) { - subscriptionManager.deleteSubscription($stateParams.surveyId, subscriptionId).then( - function success (config) { - $scope.subscriptions.splice (index, 1); - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.createSubscription = function () { - if ($scope.exportScheduleForm.$error.required.length > 0) { - $scope.exportScheduleForm.from.$dirty = true; - $scope.exportScheduleForm.to.$dirty = true; - $scope.exportScheduleForm.email.$dirty = true; - - $('input.ng-pristine').addClass('ng-dirty').removeClass('ng-pristine'); - } else if ($('.error-message:not(.ng-hide)').length === 0) { - delete $scope.schedule._id; - - subscriptionManager.createSubscription($stateParams.surveyId, $scope.schedule).then( - function success (config) { - $scope.schedule._id = config.data.id; - $scope.subscriptions.push(_.clone($scope.schedule)); - $scope.schedule = {}; - - $scope.exportScheduleForm.from.$setPristine(); - $scope.exportScheduleForm.to.$setPristine(); - $scope.exportScheduleForm.email.$setPristine(); - - $('#from').datepicker('option', 'maxDate', null); - $('#to').datepicker('option', 'minDate', null); - }, - - function failed (err) { - if (err.status === 400) { - $scope.errorEmailPattern = true; - } - console.log("error:", err); - }); - } - }; - - $scope.exportResults = function (type) { - if ($rootScope.selectedResults.length === 0) { - $rootScope.$broadcast('choose_results', 'export'); - } else if ($scope.dropdownSelect.value) { - - var fakeForm = $('
') - .attr('method', 'POST') - .attr('action', '/export/' + $stateParams.surveyId + '/?type=' + type) - .append($rootScope.selectedResults.map(function (id, index) { - return $('') - .attr('name', 'results[' + index + ']') - .attr('value', id) - ; - } - )); - fakeForm.appendTo("body").submit(); - } - }; - - $scope.addFieldsErrors = function () { - var fields = { - email: ['required', 'email', 'errorEmailPattern'], - from: ['required'], - to: ['required'] - }; - - _.map(_.pairs(fields), function (field) { - $scope.errors[field[0]] = errorsManager.getFieldErrorsHtml(field[0], field[1], 'exportScheduleForm'); - }); - }; - - $scope.$on("$destroy", function () { - $('#ui-datepicker-div').css('display', 'none'); - }); - - $scope.addFieldsErrors(); - - $scope.getResultList(); - $scope.getSurveyInfo(); - $scope.getSubscriptions(); - }; -}); diff --git a/web/controllers/SendSurveyCtrl.js b/web/controllers/SendSurveyCtrl.js deleted file mode 100644 index fbc099b..0000000 --- a/web/controllers/SendSurveyCtrl.js +++ /dev/null @@ -1,133 +0,0 @@ -define (function () { - 'use strict'; - return function ($scope, $http, $location, $window, $rootScope, - surveysManager, - groupsManager, - usersManager) { - - $scope.groups = {}; - $scope.allUsers = {}; - $scope.allUsers.checked = false; - $scope.allUsers.isVisible = false; - - $scope.getGroupList = function () { - groupsManager.groupList().then( - function success (config) { - $scope.groups = config.data; - - _.each($scope.groups, function (group) { - group.isVisible = false; - }); - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.getAllUsers = function () { - usersManager.userList().then( - function success (config) { - $scope.allUsers = config.data; - _.each($scope.allUsers, function (user) { - user.checked = false; - }); - }, - - function failed (err) { - console.log("error:", err); - }); - }; - - $scope.getGroupList(); - $scope.getAllUsers(); - - $scope.checkAllUsersInGroup = function (usersInGroup) { - _.each(usersInGroup, function (userFromGroup) { - userFromGroup.checked = usersInGroup.checked; - - _.each($scope.allUsers, function (user) { - if (userFromGroup.username == user.username) { - user.checked = usersInGroup.checked; - } - }); - }); - }; - - $scope.checkAllUsers = function (users) { - for (var i = 0; i < users.length; i++) { - users[i].checked = users.checked; - - for (var j = 0; j < $scope.allUsers.length; j++) { - if (users[i].username == $scope.allUsers[j].username) { - $scope.allUsers[j].checked = users.checked; - } - } - } - - for (var group in $scope.groups) { - $scope.groups[group].users.checked = $scope.allUsers.checked; - - for (var k = 0; k < $scope.groups[group].users.length; k++) { - $scope.groups[group].users[k].checked = $scope.allUsers.checked; - } - } - }; - - $scope.checkUser = function (users, user, type) { - if (_.find(users, function (val) { - return !val.checked; - })) { - users.checked = false; - } - - if (_.filter(users, function (val) { - return val.checked; - }).length == users.length) { - users.checked = true; - } - - if (type == 'group') { - for (var i = 0; i < $scope.allUsers.length; i++) { - if (user.username == $scope.allUsers[i].username){ - $scope.allUsers[i].checked = user.checked; - } - } - } - - if (type == 'allUsers') { - for (var group in $scope.groups) { - for (var j = 0; j < $scope.groups[group].users.length; j++) { - if ($scope.groups[group].users[j].username == user.username) { - $scope.groups[group].users[j].checked = user.checked; - } - } - } - } - }; - - $scope.sendSurvey = function (surveyId) { - var usersIds = _.filter($scope.allUsers, function (val) { - return val.checked; - }); - - usersIds = _.pluck(usersIds, '_id'); - - surveysManager.sendSurvey(surveyId, { users: usersIds }).then( - function success () { - var survey = _.find($scope.$parent.$parent.surveys, function (survey) { - return survey._id === surveyId; - }); - - survey.published = true; - - $rootScope.$broadcast('publish_survey', survey.title); - $rootScope.goState('^'); - }, - - function failed (err) { - console.log("error:", err); - }); - }; - }; -}); diff --git a/web/controllers/SyncCtrl.js b/web/controllers/SyncCtrl.js deleted file mode 100644 index 0e7dad6..0000000 --- a/web/controllers/SyncCtrl.js +++ /dev/null @@ -1,105 +0,0 @@ -define(function () { - 'use strict'; - return function ($scope, $http, $location, $window, $state, $rootScope, syncManager, surveysManager) { - $scope.requestsInConflict = []; - - var - request, - requestSyncComplete, - db; - - try { - db = openDatabase('ndg', '1.0', 'NDG', 2 * 1024 * 1024); - - requestSyncComplete = function (request) { - db.transaction(function (tx) { - tx.executeSql("DELETE FROM requests WHERE id == ?", [request.id], function (tx, result) {}); - console.log('request.id', request.id); - }); - }; - } catch (e) { - $rootScope.offlineNotSupport = true; - } - - - $scope.Sync = function () { - if ($rootScope.offlineNotSupport) { - $scope.successSync = true; - $rootScope.offlineMode = false; - localStorage.clear(); - return; - } - - db.transaction(function (tx) { - tx.executeSql("SELECT * FROM requests", [], function (tx, result) { - $rootScope.offlineMode = false; - $scope.failedSync = false; - $scope.requestsLength = result.rows.length; - $scope.doneRequests = 0; - $scope.requests = []; - $scope.$apply(); - localStorage.removeItem('offlineMode'); - - for (var i = 0; i < result.rows.length; i++) { - request = _.clone(result.rows.item(i)); - request.body = JSON.parse(request.body); - $scope.requests.push(request); - } - - surveysManager.surveyList().then( - function success () { - if ($rootScope.offlineMode) { - $scope.failedSync = true; - $scope.syncError = 'No internet connection'; - } else { - if ($scope.requests.length !== 0) { - async.mapSeries($scope.requests, - function (request, cb) { - syncManager.sendRequest(request).then( - function success (config) { - if ($rootScope.offlineMode) { - if (request.type !== 'editSurvey') { - requestSyncComplete(request); - } - - cb('failed'); - return; - } - - requestSyncComplete(request); - - $scope.doneRequests = $scope.doneRequests + 1; - cb(null); - }, - function failed (err) { - if (err.status === 409) { - $scope.requestsInConflict.push({ title: request.body.title, id: request._id }); - $scope.doneRequests = $scope.doneRequests + 1; - } - - requestSyncComplete(request); - cb(null); - }); - }, - function (err) { - if (err) { - $scope.failedSync = true; - $scope.syncError = 'Internet connection lost'; - } else { - $scope.successSync = true; - localStorage.clear(); - surveysManager.surveyList(); - } - }); - } else { - $scope.successSync = true; - } - } - }); - }, null); - }); - }; - - $scope.Sync(); - }; -}); diff --git a/web/controllers/controllers.js b/web/controllers/controllers.js deleted file mode 100644 index 34afe95..0000000 --- a/web/controllers/controllers.js +++ /dev/null @@ -1,64 +0,0 @@ -define([ - 'controllers/GroupsCtrl', - 'controllers/UsersCtrl', - 'controllers/AddUserCtrl', - 'controllers/EditUserCtrl', - 'controllers/SurveysCtrl', - 'controllers/SendSurveyCtrl', - 'controllers/EditSurveyCtrl', - - 'controllers/PageCtrl', - 'controllers/ResultsCtrl', - 'controllers/ResultsOnMapCtrl', - 'controllers/ResultDetailsCtrl', - 'controllers/ResultsChartCtrl', - 'controllers/SyncCtrl' -], function ( - GroupsCtrl, - UsersCtrl, - AddUserCtrl, - EditUserCtrl, - SurveysCtrl, - SendSurveyCtrl, - EditSurveyCtrl, - - PageCtrl, - ResultsCtrl, - ResultsOnMapCtrl, - ResultDetailsCtrl, - - ResultsChartCtrl, - SyncCtrl - ) { - 'use strict'; - - var controllers = { - GroupsCtrl: GroupsCtrl, - UsersCtrl: UsersCtrl, - AddUserCtrl: AddUserCtrl, - EditUserCtrl: EditUserCtrl, - SurveysCtrl: SurveysCtrl, - SendSurveyCtrl: SendSurveyCtrl, - EditSurveyCtrl: EditSurveyCtrl, - - PageCtrl: PageCtrl, - ResultsCtrl: ResultsCtrl, - ResultsOnMapCtrl: ResultsOnMapCtrl, - ResultDetailsCtrl: ResultDetailsCtrl, - - ResultsChartCtrl: ResultsChartCtrl, - SyncCtrl: SyncCtrl - }, - - initialize = function (angModule) { - for (var name in controllers) { - if (controllers.hasOwnProperty(name)) { - angModule.controller(name, controllers[name]); - } - } - }; - - return { - initialize: initialize - }; -}); diff --git a/web/directives/directives.js b/web/directives/directives.js deleted file mode 100644 index edceacc..0000000 --- a/web/directives/directives.js +++ /dev/null @@ -1,67 +0,0 @@ -define([ - 'directives/expand', - 'directives/errorsblock', - 'directives/validatephonenumber', - 'directives/validatePattern', - 'directives/timeSelector', - 'directives/questionBuilder', - 'directives/cascadeQuestion', - 'directives/dateInput', - 'directives/dateRange', - 'directives/csvOptioinsImport', - 'directives/notifications', - 'directives/nfEvent', - 'directives/fileSelect', - 'directives/autoComplete', - 'directives/focusMe' - -], function ( - expand, - errorsblock, - validatephonenumber, - validatePattern, - timeSelector, - questionBuilder, - cascadeQuestion, - dateInput, - dateRange, - csvOptioinsImport, - notifications, - nfEvent, - fileSelect, - autoComplete, - focusMe - ) { - 'use strict'; - - var directives = { - expand: expand, - errorsblock: errorsblock, - validatephonenumber: validatephonenumber, - validatePattern: validatePattern, - timeSelector: timeSelector, - questionBuilder: questionBuilder, - cascadeQuestion: cascadeQuestion, - dateInput: dateInput, - dateRange: dateRange, - csvOptioinsImport: csvOptioinsImport, - notifications: notifications, - nfEvent: nfEvent, - fileSelect: fileSelect, - autoComplete: autoComplete, - focusMe: focusMe - - }, - - initialize = function () { - for (var name in directives) { - if (directives.hasOwnProperty(name)) { - angular.module(name, []).directive(name, directives[name]); - } - } - }; - - return { - initialize: initialize - }; -}); diff --git a/web/directives/fileSelect.js b/web/directives/fileSelect.js deleted file mode 100644 index 633917f..0000000 --- a/web/directives/fileSelect.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - 'use strict'; - return function () { - return function (scope, elem, attrs) { - elem.bind('change', function (event) { - scope.$apply(function () { - scope[attrs.fileSelect] = event.originalEvent.target.files[0]; - scope.uploadSurvey(); - elem.val(null); - }); - }); - }; - }; -}); diff --git a/web/directives/validatePattern.js b/web/directives/validatePattern.js deleted file mode 100644 index 9af0f66..0000000 --- a/web/directives/validatePattern.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - 'use strict'; - return function () { - return { - scope: { - regexp: '=regexp', - value: '=valueToCheck' - }, - controller: function ($scope) { - $scope.$watch('value', function (newValue, oldValue) { - if (!new RegExp($scope.regexp).test(newValue)) { - $scope.value = oldValue ? oldValue : ''; - } - }); - } - }; - }; -}); diff --git a/web/main.js b/web/main.js deleted file mode 100644 index 218adff..0000000 --- a/web/main.js +++ /dev/null @@ -1,11 +0,0 @@ -define('jquery', [], function () { - return window.jQuery; -}); - -define('angular', [], function () { - return window.angular; -}); - -require(['application'], function () { - angular.bootstrap($('html'), ['Application']); -}); diff --git a/web/partials/Archive.html b/web/partials/Archive.html deleted file mode 100644 index 9eca0da..0000000 --- a/web/partials/Archive.html +++ /dev/null @@ -1,80 +0,0 @@ -
- -
-
-
-
{{ 'surveys.ARCHIVE' | translate }}
-
- -
-
- -
-
-
-
-
- {{ 'table_header.NAME' | translate }} -
-
    -
  • {{ 'table_header.RESULTS' | translate }}
  • -
  • {{ 'table_header.PUBLISHER' | translate }}
  • -
  • {{ 'table_header.DATE' | translate }}
  • -
-
- -
    -
  • -
    -
    -
    -
    -

    {{survey.title}}

    - ID: {{survey._id}} -
    -
    - - {{ 'surveys.Restore' | translate }} - -
      -
    • - - {{ 'surveys.Download_survey' | translate }} -
    • - - {{ 'surveys.Publish_survey' | translate }} -
    • - - {{ 'surveys.Duplicate_survey' | translate }} -
    • -
    -
    - -
  • -
- -
-
diff --git a/web/partials/EditSurvey.html b/web/partials/EditSurvey.html deleted file mode 100644 index 3af4c58..0000000 --- a/web/partials/EditSurvey.html +++ /dev/null @@ -1,276 +0,0 @@ -
- -
-

{{surveyData.title}}

-
- - - - -
- - {{ 'survey_builder.Edit_survey_title' | translate }} -
-
- -
- - -
- {{dropdownList[$index].text = (item.translateId | translate) }} -
- - - -
- {{ddListOptionsInt[$index].text = (item.translateId | translate) }} -
- - -
-
    -
  1. -
    -
    -

    {{category.title}}

    - - - - -
    -
    - - {{ 'survey_builder.Edit_category_title' | translate }} -
      -
    • - - {{ 'survey_builder.Duplicate_category' | translate }} -
    • - - {{ 'survey_builder.Delete_category' | translate }} -
    • -
    -
    - -
    - - - -
    -
    -
      -
    1. -
      -
      -

      {{question.label}} -

      - - - -
      -
      - - {{ 'survey_builder.Edit_question_title' | translate }} -
        -
      • - - {{ 'survey_builder.Duplicate_question' | translate }} -
      • - - {{ 'survey_builder.Delete_question' | translate }} -
      • -
      -
      -
      - -
      - {{question.dropdownSelect.text = (question.dropdownSelect.translateId | translate)}} -
      - -
      -
      -
      {{dropdownSelect[question.type].text}}
      - -
      -
      -
      - -
      - -
      -
      - -
      - {{ 'survey_builder.SL_OPTIONS' | translate }} -
      -
      -
      - - {{ 'survey_builder.SL_error' | translate }} - -
      - {{ 'survey_builder.DEFAULT' | translate }} - -
      -
      -
      -
      - -
      - {{slOpt.ddSelectOptions.text = (slOpt.ddSelectOptions.translateId | translate)}} -
      - - - -
      -
      - - - - - -
      -
      - - -
      - -
      -
      - -
      -
      -
      {{ 'survey_builder.MASK_INPUT' | translate }}
      -
      -
      -

      {{ 'survey_builder.MASK_INPUT_DESCRIPTION' | translate }}

      - -
      -
      - - -
      -
    2. -
    -
  2. - -
-
- - -
diff --git a/web/partials/GroupList.html b/web/partials/GroupList.html deleted file mode 100644 index caef8c4..0000000 --- a/web/partials/GroupList.html +++ /dev/null @@ -1,59 +0,0 @@ -
-
-
- -
- -
-
-
diff --git a/web/partials/ModalAddUser.html b/web/partials/ModalAddUser.html deleted file mode 100644 index 0dd050f..0000000 --- a/web/partials/ModalAddUser.html +++ /dev/null @@ -1,111 +0,0 @@ -
-
-
-

{{ 'users.Add_User' | translate }}

-
-
-
-
- -
-
- - - -
-
-
- - - -
- - {{ 'errors.passwordsDoNotMatch' | translate }} - -
-
-
- -
- {{ 'edit_user.info_msg_add_form' | translate }} -
- -
-
-
\ No newline at end of file diff --git a/web/partials/ModalEditUser.html b/web/partials/ModalEditUser.html deleted file mode 100644 index f7db7f2..0000000 --- a/web/partials/ModalEditUser.html +++ /dev/null @@ -1,116 +0,0 @@ -
-
-
-

{{ 'edit_user.Edit_Details' | translate}}

-
-
-
-
- -
-
- - - -
-
-
- - - -
- - {{ 'errors.passwordsDoNotMatch' | translate }} - -
-
-
- -
- {{ 'edit_user.info_msg_edit_form' | translate }} -
- - {{ 'edit_user.info_was_changed' | translate }} - - -
-
-
\ No newline at end of file diff --git a/web/partials/ModalExportSchedule.html b/web/partials/ModalExportSchedule.html deleted file mode 100644 index f2e926b..0000000 --- a/web/partials/ModalExportSchedule.html +++ /dev/null @@ -1,55 +0,0 @@ -
-
-
-

{{ 'schedule_export.Schedule_an_Export' | translate }}

-
-
-
- -
-
-

{{ 'schedule_export.tip' | translate }}

-
- - -
-
- -
- - -
-
- -
- - - -
-
- -
    -

    {{ 'schedule_export.Actual_subscriptions' | translate }}

    -
  • - -
    {{subscription.from | date: 'dd/MM/yyyy'}}
    -
    {{subscription.to | date: 'dd/MM/yyyy'}}
    -
    -
  • -
- - -
-
-
-
\ No newline at end of file diff --git a/web/partials/ModalGroupSms.html b/web/partials/ModalGroupSms.html deleted file mode 100644 index 5746d63..0000000 --- a/web/partials/ModalGroupSms.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
-

{{ 'sms.SMS_to' | translate:'{group:groupName}' }}

-
-
-
-
- - - -
-
-
\ No newline at end of file diff --git a/web/partials/ModalResultsChart.html b/web/partials/ModalResultsChart.html deleted file mode 100644 index 662aabd..0000000 --- a/web/partials/ModalResultsChart.html +++ /dev/null @@ -1,21 +0,0 @@ -
-
-
-

{{ 'results.Charts_for' | translate}} {{surveyTitle}}

-
-
-
- -
-
\ No newline at end of file diff --git a/web/partials/ModalSendSurvey.html b/web/partials/ModalSendSurvey.html deleted file mode 100644 index 37b5529..0000000 --- a/web/partials/ModalSendSurvey.html +++ /dev/null @@ -1,59 +0,0 @@ -
-
-
-

{{ 'surveys.Publish_survey_title' | translate }}

-
-
-
-
-
    -

    - - -

    -
    -
  • - - -
  • -
    -
-
-
    -

    - - -

    -
    -
  • - - -
  • -
    -
-
- - -
-
-
\ No newline at end of file diff --git a/web/partials/ModalSentToUsers.html b/web/partials/ModalSentToUsers.html deleted file mode 100644 index 959468c..0000000 --- a/web/partials/ModalSentToUsers.html +++ /dev/null @@ -1,15 +0,0 @@ -
-
-
-

{{ 'results.survey_was_sent_to' | translate }}

-
-
-
- -
-
- diff --git a/web/partials/ModalUserSms.html b/web/partials/ModalUserSms.html deleted file mode 100644 index bee611b..0000000 --- a/web/partials/ModalUserSms.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
-

{{ 'sms.SMS_to' | translate }} {{ 'sms.User' | translate }}

-
-
-
-
- - - -
-
-
\ No newline at end of file diff --git a/web/partials/Page.html b/web/partials/Page.html deleted file mode 100644 index 5f6ad1a..0000000 --- a/web/partials/Page.html +++ /dev/null @@ -1,57 +0,0 @@ -
-
- {{'offlineMode' | translate}} - {{'offlineNotSupport' | translate}} - -
-
- - -
-
- -
-
diff --git a/web/partials/ResultDetails.html b/web/partials/ResultDetails.html deleted file mode 100644 index f3e8503..0000000 --- a/web/partials/ResultDetails.html +++ /dev/null @@ -1,43 +0,0 @@ -
- - - - - - - - - - - - - -
{{ 'result.TIMESTAMP' | translate }}{{result.timeCreated|date:'HH:mm, dd MMMM yyyy'}}
{{ 'result.LOCATION' | translate }}{{result.geostamp}}
{{ 'result.TITLE' | translate }}{{result.title}}
- -
  • {{category.title}} - -
  • - -
    \ No newline at end of file diff --git a/web/partials/ResultList.html b/web/partials/ResultList.html deleted file mode 100644 index 8ce3ceb..0000000 --- a/web/partials/ResultList.html +++ /dev/null @@ -1,84 +0,0 @@ -
    -
    -
    - -

    {{survey.resultsCount}} {{ 'results.results_for' | translate }} {{survey.title}}

    -

    {{ 'results.Sent_to' | translate }} - {{survey.sentToUsers.length}} {{ 'results.users' | translate }} -

    - -
    -
    -
    -
    -
    -
      -
    • - - {{ 'results.results_on_map' | translate }} -
    • - - {{ 'results.results_on_chart' | translate }} -
    • -
    - - {{ 'results.Export_results' | translate }} - - {{ 'results.Delete_results' | translate }} - - -
    -
    - -
    - {{ 'results.RESULT_TITLE' | translate }} -
    -
      -
    • - {{ 'results.DATE_SENT' | translate }} -
    • -
    • - {{ 'results.GPS' | translate }} -
    • -
    • - {{ 'results.DATA_COLLECTOR' | translate }} -
    • -
    -
    - -
    - -
    -
    -
    - -
    diff --git a/web/partials/ResultsOnMap.html b/web/partials/ResultsOnMap.html deleted file mode 100644 index b0a19b6..0000000 --- a/web/partials/ResultsOnMap.html +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    -
    - -

    {{survey.resultsCount}} {{ 'results.results_for' | translate }} {{survey.title}}

    -

    {{ 'results.Sent_to' | translate }} - {{survey.sentToUsers.length}} {{ 'results.users' | translate }} -

    -
    -
    - -
    -
    -
    -
    -
    - -
    \ No newline at end of file diff --git a/web/partials/SurveyList.html b/web/partials/SurveyList.html deleted file mode 100644 index 531b141..0000000 --- a/web/partials/SurveyList.html +++ /dev/null @@ -1,114 +0,0 @@ -
    - -
    -
    - - - {{ 'surveys.Upload_XML_survey' | translate }} - {{ 'surveys.Only_XML_file_format' | translate }} - -
    - - {{ 'surveys.Browse_archive' | translate }} - - -
    - {{dropdownList[$index].text = (item.translateId | translate) }} -
    -
    - {{dropdownSelect.text = (dropdownSelect.translateId | translate)}} -
    - - -
    -
    - -
    -
    - -
    -
    -
    -
    -
    - {{ 'table_header.NAME' | translate }} -
    -
      -
    • {{ 'table_header.RESULTS' | translate }} -
    • -
    • {{ 'table_header.PUBLISHER' | translate }}
    • -
    • {{ 'table_header.DATE' | translate }}
    • -
    -
    - - - -
    -
    diff --git a/web/partials/UserList.html b/web/partials/UserList.html deleted file mode 100644 index 53fecf8..0000000 --- a/web/partials/UserList.html +++ /dev/null @@ -1,65 +0,0 @@ -
    -
    - -
    - -
    -
    -
    -
    - {{ 'users.NAME' | translate }} -
    - - -
    - - -
    diff --git a/web/partials/templates/cascadeQuestion.html b/web/partials/templates/cascadeQuestion.html deleted file mode 100644 index 1e8be0a..0000000 --- a/web/partials/templates/cascadeQuestion.html +++ /dev/null @@ -1,61 +0,0 @@ - -
    -
    - -
    - - - -
    -
    -
    -
    - - diff --git a/web/partials/templates/dateRange.html b/web/partials/templates/dateRange.html deleted file mode 100644 index d143c38..0000000 --- a/web/partials/templates/dateRange.html +++ /dev/null @@ -1,28 +0,0 @@ -
    -
    -
    - -
    - - -
    -
    -
    - -
    - - -
    -
    diff --git a/web/partials/templates/questionBuilder.html b/web/partials/templates/questionBuilder.html deleted file mode 100644 index 213dd71..0000000 --- a/web/partials/templates/questionBuilder.html +++ /dev/null @@ -1,317 +0,0 @@ -
    -
    -
    {{ 'survey_builder.DEFAULT_ANSWER' | translate }}
    - -
    -
    {{ 'survey_builder.maxLengthError' | translate }}
    -
    {{ 'survey_builder.maskError' | translate }}
    -
    -
    {{ 'survey_builder.MAXIMUM_ANSWER_LENGTH' | translate }}
    - - -
    -
    -
    -
    -

    {{ 'survey_builder.Notes_description' | translate }}

    - -
    -
    -
    -
    -
    {{ 'survey_builder.DEFAULT_ANSWER' | translate }}
    - -
    -
    -
    -
    -
    {{ 'survey_builder.DEFAULT_ANSWER' | translate }}
    - -
    -
    {{ 'survey_builder.defaultValueError' | translate }}
    -
    - - - - -
    -
    - - - - -
    -
    {{ 'survey_builder.Invalid_min_max_range' | translate }}
    -
    -
    -
    -
    {{ 'survey_builder.DEFAULT_ANSWER' | translate }}
    - -
    -
    {{ 'survey_builder.defaultValueError' | translate }}
    -
    - - - - -
    -
    - - - - -
    -
    {{ 'survey_builder.Invalid_min_max_range' | translate }}
    -
    -
    -
    -
    {{ 'survey_builder.DEFAULT_ANSWER' | translate }}
    - - - {{ 'survey_builder.Clear_default_field' | translate }} -
    -
    -
    -
    -
    -
    - - - -
    - -
    -
    -
    -
    -
    - - - -
    - -
    -
    -
    -
    - -
    - - - -
    -
    -
    -
    diff --git a/web/partials/templates/timeSelector.html b/web/partials/templates/timeSelector.html deleted file mode 100644 index 4b5b34e..0000000 --- a/web/partials/templates/timeSelector.html +++ /dev/null @@ -1,20 +0,0 @@ -
    -
    -
    - -
    -
    {{displayHours()}}
    -
    - -
    -
    -
    -
    - -
    -
    {{displayMinutes()}}
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/web/resetPassword.js b/web/resetPassword.js deleted file mode 100644 index 9f1a787..0000000 --- a/web/resetPassword.js +++ /dev/null @@ -1,69 +0,0 @@ -var errors = { - required: 'This field cannot be blank.', - minlength: 'This field must have at least $ characters.', - maxlength: 'This field cannot be longer than $ characters.', - confirmPassword: 'Passwords do not match' -}; - -function hideError (elem) { - var field = elem.id; - $('.errorsblock span.' + field).hide(); -} - -function showErrorMsg (field, type, param) { - var errorMsg = errors[type]; - - if (param) { - errorMsg = errorMsg.replace('$', param); - } - - $('.errorsblock span.' + field)[0].innerText = errorMsg; - $('.errorsblock span.' + field).show(); -} - -function validateData (data) { - var - length = { - password: { min: 8, max: 20 } - }; - - if (!data.password) { - showErrorMsg('password', 'required'); - return; - } - - if (data.password.length < 8) { - showErrorMsg('password', 'minlength', 8); - return; - } - - if (data.password.length > 20) { - showErrorMsg('password', 'maxlength', 20); - return; - } - - if (data.confirmpass !== data.password) { - showErrorMsg('confirmpass', 'confirmPassword'); - return; - } -} - -function resetPassword () { - var - path = location.pathname, - data = { - password: $("#password")[0].value.trim(), - confirmpass: $("#confirmpass")[0].value.trim() - }; - - validateData(data); - - if ($('.errorsblock span.error-message:not([style="display: none;"])').length === 0) { - $.post(path, { password: window.btoa(data.password) }) - .done(function (data) { - window.document.location.href = '/login'; - }) - .fail(function (data) { - }); - } -} diff --git a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.eot b/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.eot deleted file mode 100644 index 374a5a0..0000000 Binary files a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.eot and /dev/null differ diff --git a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.svg b/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.svg deleted file mode 100644 index d3388cf..0000000 --- a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.svg +++ /dev/null @@ -1,11615 +0,0 @@ - - - - -Created by FontForge 20090914 at Fri Sep 26 21:14:57 2014 - By www-data -Copyright © 2011 Nokia. All rights reserved. Reproduction, transfer, distribution or storage of part or all of the contents in this document in any form without the prior written permission of Nokia is prohibited. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.ttf b/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.ttf deleted file mode 100644 index af2a886..0000000 Binary files a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.ttf and /dev/null differ diff --git a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.woff b/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.woff deleted file mode 100644 index 53a85ed..0000000 Binary files a/web/resources/fonts/NokiaPureText/nokiapuretext-webfont.woff and /dev/null differ diff --git a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot b/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot deleted file mode 100644 index 15d4ae9..0000000 Binary files a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot and /dev/null differ diff --git a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg b/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg deleted file mode 100644 index 6f11319..0000000 --- a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg +++ /dev/null @@ -1,11570 +0,0 @@ - - - - -Created by FontForge 20090914 at Fri Sep 26 21:23:28 2014 - By www-data -Copyright © 2011 Nokia. All rights reserved. Reproduction, transfer, distribution or storage of part or all of the contents in this document in any form without the prior written permission of Nokia is prohibited. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf b/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf deleted file mode 100644 index cc34dc3..0000000 Binary files a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf and /dev/null differ diff --git a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff b/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff deleted file mode 100644 index cb9cf78..0000000 Binary files a/web/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff and /dev/null differ diff --git a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot b/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot deleted file mode 100644 index 0a58640..0000000 Binary files a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot and /dev/null differ diff --git a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg b/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg deleted file mode 100644 index d9fd706..0000000 --- a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg +++ /dev/null @@ -1,10948 +0,0 @@ - - - - -Created by FontForge 20090914 at Fri Sep 26 21:23:19 2014 - By www-data -Copyright © 2011 Nokia. All rights reserved. Reproduction, transfer, distribution or storage of part or all of the contents in this document in any form without the prior written permission of Nokia is prohibited. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf b/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf deleted file mode 100644 index 8030250..0000000 Binary files a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf and /dev/null differ diff --git a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff b/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff deleted file mode 100644 index 78f6f95..0000000 Binary files a/web/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.eot b/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.eot deleted file mode 100755 index 07b9d33..0000000 Binary files a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.eot and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.svg b/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.svg deleted file mode 100755 index 4df9e17..0000000 Binary files a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.svg and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.ttf b/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.ttf deleted file mode 100755 index 97cc2b6..0000000 Binary files a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.ttf and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.woff b/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.woff deleted file mode 100755 index c94f4bf..0000000 Binary files a/web/resources/fonts/ProximaNovaTextBold/ProximaNovaTextBold.woff and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.eot b/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.eot deleted file mode 100755 index 4781d9f..0000000 Binary files a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.eot and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.svg b/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.svg deleted file mode 100755 index 11a950a..0000000 Binary files a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.svg and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.ttf b/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.ttf deleted file mode 100755 index 8039973..0000000 Binary files a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.ttf and /dev/null differ diff --git a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.woff b/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.woff deleted file mode 100755 index 45ad3b8..0000000 Binary files a/web/resources/fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.woff and /dev/null differ diff --git a/web/resources/icons/1-new.png b/web/resources/icons/1-new.png deleted file mode 100644 index d442643..0000000 Binary files a/web/resources/icons/1-new.png and /dev/null differ diff --git a/web/resources/icons/1-to-be-updated.png b/web/resources/icons/1-to-be-updated.png deleted file mode 100644 index b352b1c..0000000 Binary files a/web/resources/icons/1-to-be-updated.png and /dev/null differ diff --git a/web/resources/icons/accuracy.png b/web/resources/icons/accuracy.png deleted file mode 100644 index e768612..0000000 Binary files a/web/resources/icons/accuracy.png and /dev/null differ diff --git a/web/resources/icons/alert.png b/web/resources/icons/alert.png deleted file mode 100644 index 8e7c9f2..0000000 Binary files a/web/resources/icons/alert.png and /dev/null differ diff --git a/web/resources/icons/arrow-20px.png b/web/resources/icons/arrow-20px.png deleted file mode 100644 index 5a27b11..0000000 Binary files a/web/resources/icons/arrow-20px.png and /dev/null differ diff --git a/web/resources/icons/browse-archive.png b/web/resources/icons/browse-archive.png deleted file mode 100644 index 9e1d288..0000000 Binary files a/web/resources/icons/browse-archive.png and /dev/null differ diff --git a/web/resources/icons/chart-20px.png b/web/resources/icons/chart-20px.png deleted file mode 100644 index 3896f13..0000000 Binary files a/web/resources/icons/chart-20px.png and /dev/null differ diff --git a/web/resources/icons/chart-bar.png b/web/resources/icons/chart-bar.png deleted file mode 100644 index 14e1fca..0000000 Binary files a/web/resources/icons/chart-bar.png and /dev/null differ diff --git a/web/resources/icons/chart-pie.png b/web/resources/icons/chart-pie.png deleted file mode 100644 index cda3863..0000000 Binary files a/web/resources/icons/chart-pie.png and /dev/null differ diff --git a/web/resources/icons/circle-tick-22px.png b/web/resources/icons/circle-tick-22px.png deleted file mode 100644 index 9840364..0000000 Binary files a/web/resources/icons/circle-tick-22px.png and /dev/null differ diff --git a/web/resources/icons/copy-20px.png b/web/resources/icons/copy-20px.png deleted file mode 100644 index de48eb5..0000000 Binary files a/web/resources/icons/copy-20px.png and /dev/null differ diff --git a/web/resources/icons/cost-efficiency.png b/web/resources/icons/cost-efficiency.png deleted file mode 100644 index e6bdaa5..0000000 Binary files a/web/resources/icons/cost-efficiency.png and /dev/null differ diff --git a/web/resources/icons/cross-20px.png b/web/resources/icons/cross-20px.png deleted file mode 100644 index cc449d1..0000000 Binary files a/web/resources/icons/cross-20px.png and /dev/null differ diff --git a/web/resources/icons/cross-red-13px.png b/web/resources/icons/cross-red-13px.png deleted file mode 100644 index c125639..0000000 Binary files a/web/resources/icons/cross-red-13px.png and /dev/null differ diff --git a/web/resources/icons/delete-20px.png b/web/resources/icons/delete-20px.png deleted file mode 100644 index 2baa5c2..0000000 Binary files a/web/resources/icons/delete-20px.png and /dev/null differ diff --git a/web/resources/icons/details-20px.png b/web/resources/icons/details-20px.png deleted file mode 100644 index a33d27b..0000000 Binary files a/web/resources/icons/details-20px.png and /dev/null differ diff --git a/web/resources/icons/download-20px.png b/web/resources/icons/download-20px.png deleted file mode 100644 index 6682253..0000000 Binary files a/web/resources/icons/download-20px.png and /dev/null differ diff --git a/web/resources/icons/edit-20px.png b/web/resources/icons/edit-20px.png deleted file mode 100644 index f817437..0000000 Binary files a/web/resources/icons/edit-20px.png and /dev/null differ diff --git a/web/resources/icons/export-20px.png b/web/resources/icons/export-20px.png deleted file mode 100644 index 26fc71f..0000000 Binary files a/web/resources/icons/export-20px.png and /dev/null differ diff --git a/web/resources/icons/lolgo-30px.png b/web/resources/icons/lolgo-30px.png deleted file mode 100644 index 14186b5..0000000 Binary files a/web/resources/icons/lolgo-30px.png and /dev/null differ diff --git a/web/resources/icons/map-20px.png b/web/resources/icons/map-20px.png deleted file mode 100644 index e78930a..0000000 Binary files a/web/resources/icons/map-20px.png and /dev/null differ diff --git a/web/resources/icons/move-to-archive.png b/web/resources/icons/move-to-archive.png deleted file mode 100644 index f0843ae..0000000 Binary files a/web/resources/icons/move-to-archive.png and /dev/null differ diff --git a/web/resources/icons/plus-16px.png b/web/resources/icons/plus-16px.png deleted file mode 100644 index f9055e4..0000000 Binary files a/web/resources/icons/plus-16px.png and /dev/null differ diff --git a/web/resources/icons/plus-gray-16px.png b/web/resources/icons/plus-gray-16px.png deleted file mode 100644 index 09f98fb..0000000 Binary files a/web/resources/icons/plus-gray-16px.png and /dev/null differ diff --git a/web/resources/icons/restore-from-archive.png b/web/resources/icons/restore-from-archive.png deleted file mode 100644 index 77459d8..0000000 Binary files a/web/resources/icons/restore-from-archive.png and /dev/null differ diff --git a/web/resources/icons/search-20px.png b/web/resources/icons/search-20px.png deleted file mode 100644 index bccada3..0000000 Binary files a/web/resources/icons/search-20px.png and /dev/null differ diff --git a/web/resources/icons/select-icon.png b/web/resources/icons/select-icon.png deleted file mode 100755 index 3dc7b3d..0000000 Binary files a/web/resources/icons/select-icon.png and /dev/null differ diff --git a/web/resources/icons/send-20px.png b/web/resources/icons/send-20px.png deleted file mode 100644 index 063a4b4..0000000 Binary files a/web/resources/icons/send-20px.png and /dev/null differ diff --git a/web/resources/icons/send-green-20px.png b/web/resources/icons/send-green-20px.png deleted file mode 100644 index 908a619..0000000 Binary files a/web/resources/icons/send-green-20px.png and /dev/null differ diff --git a/web/resources/icons/sms-20px.png b/web/resources/icons/sms-20px.png deleted file mode 100644 index 3801967..0000000 Binary files a/web/resources/icons/sms-20px.png and /dev/null differ diff --git a/web/resources/icons/speed.png b/web/resources/icons/speed.png deleted file mode 100644 index fd37971..0000000 Binary files a/web/resources/icons/speed.png and /dev/null differ diff --git a/web/resources/icons/tick-20px.png b/web/resources/icons/tick-20px.png deleted file mode 100644 index f28c64e..0000000 Binary files a/web/resources/icons/tick-20px.png and /dev/null differ diff --git a/web/resources/icons/upload-20px.png b/web/resources/icons/upload-20px.png deleted file mode 100644 index dbd349d..0000000 Binary files a/web/resources/icons/upload-20px.png and /dev/null differ diff --git a/web/resources/icons/usability.png b/web/resources/icons/usability.png deleted file mode 100644 index 2e4c7d2..0000000 Binary files a/web/resources/icons/usability.png and /dev/null differ diff --git a/web/resources/images/getstarted_step1.png b/web/resources/images/getstarted_step1.png deleted file mode 100644 index 9394db2..0000000 Binary files a/web/resources/images/getstarted_step1.png and /dev/null differ diff --git a/web/resources/images/getstarted_step2.png b/web/resources/images/getstarted_step2.png deleted file mode 100644 index a530da9..0000000 Binary files a/web/resources/images/getstarted_step2.png and /dev/null differ diff --git a/web/resources/images/getstarted_step4.png b/web/resources/images/getstarted_step4.png deleted file mode 100644 index 1b605ce..0000000 Binary files a/web/resources/images/getstarted_step4.png and /dev/null differ diff --git a/web/resources/images/getstarted_step6.png b/web/resources/images/getstarted_step6.png deleted file mode 100644 index ffd6985..0000000 Binary files a/web/resources/images/getstarted_step6.png and /dev/null differ diff --git a/web/resources/images/howitworks_1.png b/web/resources/images/howitworks_1.png deleted file mode 100644 index 14ea8f0..0000000 Binary files a/web/resources/images/howitworks_1.png and /dev/null differ diff --git a/web/resources/images/howitworks_2.png b/web/resources/images/howitworks_2.png deleted file mode 100644 index e906aa3..0000000 Binary files a/web/resources/images/howitworks_2.png and /dev/null differ diff --git a/web/resources/images/howitworks_5.png b/web/resources/images/howitworks_5.png deleted file mode 100644 index c90113b..0000000 Binary files a/web/resources/images/howitworks_5.png and /dev/null differ diff --git a/web/resources/stylesheets/404.less b/web/resources/stylesheets/404.less deleted file mode 100644 index 3a07b35..0000000 --- a/web/resources/stylesheets/404.less +++ /dev/null @@ -1,35 +0,0 @@ -body { - background-color: #C4D1E6; - line-height: 1.5; - margin: 0; - position: relative; -} - - -.content { - width: 65%; - margin: auto; - position: relative; - transform: translateY(65%); - - .logo { - - font-size: 36px; - background: #C4D1E6 url(../icons/big-logo.png) no-repeat; - background-size: 30%; - background-position: center; - - .error { - text-align: center; - position: relative; - transform: translateY(20%); - - a { - display: block; - color: #104199; - font-size: 24px; - margin-top: 100px; - } - } - } -} diff --git a/web/resources/stylesheets/homePage.css b/web/resources/stylesheets/homePage.css deleted file mode 100644 index 4c5f5f2..0000000 --- a/web/resources/stylesheets/homePage.css +++ /dev/null @@ -1,707 +0,0 @@ -/** - * Global Reset of all HTML Elements - */ -html, -body { - border: 0; - font-family: "Helvetica-Neue", "Helvetica", Arial, sans-serif; - line-height: 1.5; - margin: 0; - padding: 0; - width: 100%; -} -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -b, -i ol, -ul, -li, -label { - border: 0; - font-size: 100%; - vertical-align: baseline; - margin: 0; - padding: 0; - text-decoration: none; - color: #000000; -} -:focus { - outline: 0; -} -/** - * Fonts for page - */ -@font-face { - font-family: 'NokiaPureText'; - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.eot); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.ttf) format('truetype'); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: 'NokiaPureTextBold'; - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: 'NokiaPureTextLight'; - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf) format("truetype"); - font-weight: lighter; - font-style: normal; -} -/** - * ------- - */ -.left { - float: left; -} -.right { - float: right; -} -.hide { - display: none !important; -} -.show { - visibility: visible !important; -} -.hidden { - visibility: hidden; -} -.bold { - font-family: NokiaPureTextBold; -} -.light { - font-family: NokiaPureTextLight; -} -.blue { - color: #2468a0; -} -.gray { - color: #a6a6a6; -} -.dark-gray { - color: #787878; -} -.gray-background { - background-color: #f0f0f0; -} -.light-gray-background { - background-color: rgba(240, 240, 240, 0.5); -} -.header-background { - background-color: #ebebeb; -} -.center-text { - text-align: center; -} -/* - Mixin for inputs field-stylisation - */ -/* - Mixin for inputs button-stylisation - */ -/* - Mixin for inset button-shadow - */ -.inset-shadow-active { - background-color: #f0f0f0; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.inset-shadow { - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); -} -.inset-shadow:not(:disabled):active { - background-color: #f0f0f0; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.header { - height: 60px; - line-height: 60px; - background: #2468a0; - min-width: 1300px; -} -.header div.get-started { - margin: 0 auto; - width: 1000px; - height: 60px; -} -.header div.get-started .logo { - display: block; - margin-right: 50px; - cursor: pointer; -} -.header div.get-started .logo img { - margin: 15px 0; -} -.header div.get-started .logo h1 { - margin-left: 15px; - color: #fff; -} -.header div.get-started a { - color: #fff; -} -.header div.get-started a.language-select { - padding-right: 40px; - cursor: pointer; -} -.header div.get-started a.language-select .dropdown { - opacity: 0; - position: absolute; - padding: 10px 0; - background-color: #fff; - z-index: 2; - font-family: NokiaPureText; - font-size: 16px; - width: 200px; - top: 50px; - border: 1px solid rgba(166, 166, 166, 0.5); - border-radius: 5px; -} -.header div.get-started a.language-select .dropdown.open { - opacity: 1; -} -.header div.get-started a.language-select .dropdown li { - display: block; - color: #000; - line-height: 60px; - padding: 0 10px; -} -.header div.get-started a.language-select .dropdown:after { - content: ""; - width: 0; - height: 0; - position: absolute; - bottom: 100%; - margin-left: 5px; - border-width: 0 6px 6px 6px; - border-style: solid; - border-color: #fff transparent; -} -.header div.get-started a.language-select:after { - top: 29px; - margin-left: 0; - content: ''; - position: absolute; - width: 0; - height: 0; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid transparent; - border-top: 5px solid #fff; -} -.header div.get-started a.active { - font-family: NokiaPureTextBold; -} -.header div.get-started a li { - color: #fff; - display: inline-block; -} -.header div.get-started a.active:after { - content: none; -} -.header div.get-started .main-menu { - display: block; -} -.header div.get-started .main-menu a { - margin-right: 10px; - position: relative; -} -.header div.get-started .main-menu a.active:after { - content: ''; - position: absolute; - left: 32%; - top: 33px; - width: 0; - height: 0; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-bottom: 8px solid #ffffff; -} -.header div.get-started .login-menu { - display: block; - float: right; -} -.content { - margin: 40px auto; - position: relative; - width: 1000px; -} -.content .panel, -.content.home { - width: 1000px; - margin: 0 auto; - font-size: 23px; -} -.content .panel h1, -.content.home h1 { - margin-bottom: 25px; -} -.content .panel h3, -.content.home h3 { - font-size: 15px; -} -.content .panel a, -.content.home a { - color: #558a10; - cursor: pointer; - text-decoration: underline; -} -.content .panel span.title, -.content.home span.title { - display: inline-block; - font-size: 24px; - margin: 0 125px 25px 150px; -} -.content .panel .image, -.content.home .image, -.content .panel .video, -.content.home .video { - width: 600px; - height: 300px; - border: 1px solid rgba(166, 166, 166, 0.5); - margin-left: 210px; - margin-bottom: 25px; -} -.content .panel .column, -.content.home .column { - width: 48%; -} -.content .panel .column ~ span.title, -.content.home .column ~ span.title { - margin-top: 50px; -} -.content .panel .column.short, -.content.home .column.short { - width: 35%; -} -.content .panel div.block, -.content.home div.block { - width: 100%; - display: inline-block; -} -.content .panel div.block .center, -.content.home div.block .center { - margin-left: 200px; - margin-right: 200px; - margin-top: 50px; -} -.content .panel div.block h3, -.content.home div.block h3 { - font-size: 20px; -} -.content .panel div.block ul.open-source, -.content.home div.block ul.open-source, -.content .panel div.block ul.acknowledgements, -.content.home div.block ul.acknowledgements, -.content .panel div.block ul.support, -.content.home div.block ul.support { - margin: 20px 0 40px 40px; -} -.content .panel div.block p, -.content.home div.block p, -.content .panel div.block li, -.content.home div.block li { - font-size: 17px; -} -.content .panel div.block p, -.content.home div.block p { - margin-bottom: 25px; -} -.content .panel div.block p ~ h3, -.content.home div.block p ~ h3 { - margin-top: 50px; -} -.content .panel div.block .author, -.content.home div.block .author { - width: 77%; - font-size: 14px; - text-align: right; - float: right; -} -.content .panel div.block .blockquote:before, -.content.home div.block .blockquote:before { - content: open-quote; -} -.content .panel div.block .blockquote:after, -.content.home div.block .blockquote:after { - content: close-quote; -} -.content .panel div.block li, -.content.home div.block li { - margin-top: 5px; -} -.content .panel div.block .italic, -.content.home div.block .italic { - font-style: italic; -} -.content .panel ul.steps li, -.content.home ul.steps li { - margin-top: 40px; - list-style-type: none; - height: 300px; - width: 1000px; - display: inline-block; -} -.content .panel ul.steps li div, -.content.home ul.steps li div { - display: inline-block; -} -.content .panel ul.steps li .image, -.content.home ul.steps li .image { - width: 300px; - margin: 0; - float: left; -} -.content .panel ul.steps li div.step-info, -.content.home ul.steps li div.step-info { - margin-left: 20px; - width: 670px; -} -.content .panel ul.steps li div.step-info h2, -.content.home ul.steps li div.step-info h2 { - font-size: 20px; -} -.content .panel ul.steps li div.step-info p, -.content.home ul.steps li div.step-info p { - font-size: 19px; - margin-top: 25px; -} -.content .panel ul.steps li div.step-info p a, -.content.home ul.steps li div.step-info p a { - color: #558a10; - cursor: pointer; - text-decoration: underline; -} -.content .panel ul.steps li div.step-info .download-app, -.content.home ul.steps li div.step-info .download-app { - margin-top: 25px; -} -.content .panel ul.steps li div.step-info .download-app p, -.content.home ul.steps li div.step-info .download-app p { - margin: 0; -} -.content .panel form { - position: absolute; - margin-left: 240px; - margin-top: 20px; - width: 505px; - padding: 10px; - background-color: #f0f0f0; - height: auto; -} -.content .panel form a, -.content .panel form p { - font-size: 15px; - display: inline-block; - margin-left: 5px; -} -.content .panel form p { - margin-bottom: 15px; -} -.content .panel form .small-field { - display: inline-block; - padding-bottom: 10px; - margin-left: 5px; -} -.content .panel form .small-field input { - height: 13px; - border-radius: 5px; - border: 1px solid rgba(166, 166, 166, 0.5); - background-color: #f8f8f8; - padding: 10px; - font-family: NokiaPureText; - font-size: 15px; - width: 220px; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.content .panel form .small-field select { - height: 35px; - border-radius: 5px; - border: 1px solid rgba(166, 166, 166, 0.5); - background-color: #f8f8f8; - padding: 10px; - font-family: NokiaPureText; - font-size: 15px; - width: 242px; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - padding: 0; - padding-left: 6px; -} -.content .panel form .small-field input[id="phone"] { - background-image: url(../icons/plus-gray-16px.png); - background-position: 6px center; - background-repeat: no-repeat; - background-size: 12px; - padding-left: 20px; - width: 210px; -} -.content .panel form .login-btn, -.content .panel form .forgot-btn, -.content .panel form .reset-btn, -.content .panel form .sign-up-btn { - margin-top: 10px; - margin-left: 13%; - background-color: #fafafa; - border-radius: 5px; - height: 35px; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid rgba(166, 166, 166, 0.5); - cursor: pointer; - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); -} -.content .panel form .login-btn:not(:disabled):active, -.content .panel form .forgot-btn:not(:disabled):active, -.content .panel form .reset-btn:not(:disabled):active, -.content .panel form .sign-up-btn:not(:disabled):active { - background-color: #f0f0f0; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.content .panel form .sign-up-btn { - margin-left: 40%; -} -.content .panel form .reset-btn { - margin-left: 45%; -} -.content .panel form .forgot-btn { - margin-left: 43%; -} -.content.home { - margin: 0; - width: 100%; -} -.content.home .content-block { - margin: 0 auto; - width: 1000px; -} -.content.home h1 { - margin-top: 50px; -} -.content.home ul.footer { - font-size: 15px; - margin: 100px 270px 100px 270px; -} -.content.home ul.footer li { - display: inline-block; - margin-right: 20px; -} -.content.home ul.footer li a { - text-decoration: none; -} -.content.home .video { - margin: 0 200px 50px; - width: 640px; - height: 390px; -} -.content.home .image.mobile-collage { - margin: 0; - width: 445px; - height: 450px; -} -.content.home .header-logo { - font-size: 23px; - background: #ebebeb url(../icons/big-logo.png) no-repeat 50% 35%; - background-size: 25%; - margin: 0 auto 50px; -} -.content.home .header-logo span.big-logo { - margin: 20px 200px 20px 200px; -} -.content.home ul.how-it-works { - margin-top: 20px; -} -.content.home ul.how-it-works li { - list-style-type: none; - margin: 0; - position: relative; - height: 210px; -} -.content.home ul.how-it-works .image { - width: 180px; - height: 180px; - margin: 0; - float: left; -} -.content.home ul.how-it-works .number { - display: inline-block; - margin-top: 65px; - margin-right: 2%; - margin-bottom: 0; - margin-left: 2%; - font-size: 32px; -} -.content.home ul.how-it-works p { - display: inline-block; - float: right; - margin-top: 60px; - width: 240px; - font-size: 20px; -} -.content.home .benefits { - margin-bottom: 50px; - height: 280px; -} -.content.home .benefits .speed { - background-image: url(../icons/speed.png); - margin-left: 200px; -} -.content.home .benefits .usability { - background-image: url(../icons/usability.png); - margin-left: 165px; -} -.content.home .benefits .cost-efficiency { - background-image: url(../icons/cost-efficiency.png); - margin-left: 170px; -} -.content.home .benefits .accuracy { - background-image: url(../icons/accuracy.png); - margin-left: 195px; -} -.content.home .benefits .img { - background-repeat: no-repeat; - height: 115px; - margin-bottom: 25px; -} -/* - Mixin for error-block - */ -.validation-field div.errorsblock { - position: relative; -} -.validation-field div.errorsblock span.error-message { - position: absolute; - width: 210px; - font-family: NokiaPureTextLight; - font-size: 13px; - color: #ffffff !important; - background-color: #c85950; - height: 40px; - border-radius: 6px; - z-index: 999; - padding: 5px; - top: -42px; -} -.validation-field div.errorsblock span.error-message:after { - content: ''; - position: absolute; - width: 0; - height: 0; - border-top: 6px solid rgba(0, 0, 0, 0); - border-bottom: 6px solid rgba(0, 0, 0, 0); - top: 38%; -} -.validation-field:nth-of-type(odd) .error-message { - text-align: center; - right: 100%; - margin-right: 10px; -} -.validation-field:nth-of-type(odd) .error-message:after { - border-right: 6px solid rgba(0, 0, 0, 0); - border-left: 6px solid #c85950; - left: 100%; - margin-left: 0px; -} -.validation-field:nth-of-type(even) .error-message { - text-align: center; - left: 100%; - margin-left: 15px; -} -.validation-field:nth-of-type(even) .error-message:after { - border-left: 6px solid rgba(0, 0, 0, 0); - border-right: 6px solid #c85950; - right: 100%; - margin-right: 0px; -} -.validation-field.small-field input.ng-invalid-required + div.errorsblock .error-message, -.validation-field.small-field input[name="confirmpass"] + div.errorsblock .error-message { - line-height: 40px; - text-align: center; -} -.modal .overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 1000; - background: rgba(0, 0, 0, 0.8); - transition: all 0.3s; -} -.modal .window { - position: absolute; - left: 50%; - margin-left: -225px; - width: 450px; - background-color: #ffffff; - height: auto; - z-index: 2000; - top: 100px; -} -.modal .window .window-body { - padding: 20px; -} -.modal .window .window-body input { - margin-left: 45%; - margin-top: 20px; - background-color: #fafafa; - border-radius: 5px; - height: 35px; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid rgba(166, 166, 166, 0.5); - cursor: pointer; - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); -} -.modal .window .window-body input:not(:disabled):active { - background-color: #f0f0f0; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.ui-autocomplete { - height: 200px; - overflow-y: scroll; - overflow-x: hidden; -} diff --git a/web/resources/stylesheets/homePage.less b/web/resources/stylesheets/homePage.less deleted file mode 100644 index 69c1b21..0000000 --- a/web/resources/stylesheets/homePage.less +++ /dev/null @@ -1,650 +0,0 @@ -@light-gray: rgba(166, 166, 166, 0.5); - -@button-color: rgba(250, 250, 250, 1); - -@header-bg: #2468a0; - -/** - * Global Reset of all HTML Elements - */ -html, body { - border: 0; - font-family: "Helvetica-Neue", "Helvetica", Arial, sans-serif; - line-height: 1.5; - margin: 0; - padding: 0; - width: 100%; -} -h1, h2, h3, h4, h5, h6, -p, blockquote, pre, a, b, i -ol, ul, li, label { - border: 0; - font-size: 100%; - vertical-align: baseline; - margin: 0; - padding: 0; - text-decoration: none; - color: #000000; -} -:focus { - outline: 0; -} - -/** - * Fonts for page - */ -@font-face { - font-family: 'NokiaPureText'; - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.eot); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.ttf) format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'NokiaPureTextBold'; - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'NokiaPureTextLight'; - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf) format("truetype"); - font-weight: lighter; - font-style: normal; -} - -/** - * ------- - */ -.left { float: left } -.right { float: right } - -.hide { display: none !important; } -.show { visibility: visible !important; } -.hidden { visibility: hidden } - -.bold { font-family: NokiaPureTextBold } -.light { font-family: NokiaPureTextLight } - -.blue { color: #2468a0 } -.gray { color: rgba(166, 166, 166, 1) } -.dark-gray { color: rgba(120, 120, 120, 1) } - -.gray-background { background-color: rgba(240, 240, 240, 1) } -.light-gray-background { background-color: rgba(240, 240, 240, 0.5) } -.header-background { background-color: rgba(235, 235, 235, 1) } - -.center-text { text-align: center } - -/* - Mixin for inputs field-stylisation - */ -.field-stylisation(@height : 13px, @width: auto) { - height: @height; - border-radius: 5px; - border: 1px solid @light-gray; - background-color: rgba(248, 248, 248, 1); - padding: 10px; - font-family: NokiaPureText; - font-size: 15px; - width: @width; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} - -/* - Mixin for inputs button-stylisation - */ -.button-stylisation (@height : 35px) { - background-color: @button-color; - border-radius: 5px; - height: @height; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid @light-gray; - cursor: pointer; - .inset-shadow; -} - -/* - Mixin for inset button-shadow - */ -.inset-shadow-active { - background-color: rgba(240, 240, 240, 1); - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.inset-shadow { - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - - &:not(:disabled):active { - .inset-shadow-active; - } -} - -.header { - height: 60px; - line-height: 60px; - background: @header-bg; - min-width: 1300px; - div.get-started { - margin: 0 auto; - width: 1000px; - height: 60px; - .logo { - display: block; - margin-right: 50px; - cursor: pointer; - img { - margin: 15px 0; - } - h1 { - margin-left: 15px; - color: #fff; - } - } - a { - color: #fff; - &.language-select { - padding-right: 40px; - cursor: pointer; - .dropdown { - &.open { - opacity: 1; - } - opacity: 0; - position: absolute; - padding: 10px 0; - background-color: #fff; - z-index: 2; - font-family: NokiaPureText; - font-size: 16px; - width: 200px; - top: 50px; - border: 1px solid rgba(166, 166, 166, 0.5); - border-radius: 5px; - li { - display: block; - color: #000; - line-height: 60px; - padding: 0 10px; - } - &:after { - content: ""; - width: 0; - height: 0; - position: absolute; - bottom: 100%; - margin-left: 5px; - border-width: 0 6px 6px 6px; - border-style: solid; - border-color: #fff transparent; - } - } - &:after { - top: 29px; - margin-left: 0; - content: ''; - position: absolute; - width: 0; - height: 0; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid transparent; - border-top: 5px solid #fff; - } - } - &.active { - font-family: NokiaPureTextBold; - } - li { - color: #fff; - display: inline-block; - } - &.active { - &:after { - content: none; - } - } - } - .main-menu { - display: block; - a { - margin-right: 10px; - position: relative; - &.active { - &:after { - content: ''; - position: absolute; - left: 32%; - top: 33px; - width: 0; - height: 0; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-bottom: 8px solid #ffffff; - } - } - } - } - .login-menu { - display: block; - float: right; - } - } -} - -.content { - margin: 40px auto; - position: relative; - width: 1000px; - .panel, - &.home { - width: 1000px; - margin: 0 auto; - font-size: 23px; - - h1 { - margin-bottom: 25px; - } - h3 { - font-size: 15px; - } - a { - color: #558a10; - cursor: pointer; - text-decoration: underline; - } - span.title { - display: inline-block; - font-size: 24px; - margin: 0 125px 25px 150px; - } - .image, - .video { - width: 600px; - height: 300px; - border: 1px solid @light-gray; - margin-left: 210px; - margin-bottom: 25px; - } - .column { - width: 48%; - ~span.title { - margin-top: 50px; - } - &.short { - width: 35%; - } - } - div.block { - width: 100%; - display: inline-block; - .center { - margin-left: 200px; - margin-right: 200px; - margin-top: 50px; - } - h3 { - font-size: 20px; - } - ul.open-source, - ul.acknowledgements, - ul.support { - margin: 20px 0 40px 40px; - } - p, - li { - font-size: 17px; - } - p { - margin-bottom: 25px; - ~h3 { - margin-top: 50px; - } - } - .author { - width: 77%; - font-size: 14px; - text-align: right; - float: right; - } - .blockquote:before { - content: open-quote; - } - .blockquote:after { - content: close-quote; - } - li { - margin-top: 5px; - } - .italic { - font-style: italic; - } - } - ul.steps { - li { - margin-top: 40px; - list-style-type: none; - height: 300px; - width: 1000px; - display: inline-block; - div { - display: inline-block; - } - .image { - width: 300px; - margin: 0; - float: left; - } - - div.step-info { - margin-left: 20px; - width: 670px; - - h2 { - font-size: 20px; - } - p { - font-size: 19px; - margin-top: 25px; - a { - color: #558a10; - cursor: pointer; - text-decoration: underline; - } - } - .download-app { - margin-top: 25px; - p { - margin: 0; - } - } - } - } - } - } - .panel form { - position: absolute; - margin-left: 240px; - margin-top: 20px; - width: 505px; - padding: 10px; - background-color: rgba(240, 240, 240, 1); - height: auto; - a, p { - font-size: 15px; - display: inline-block; - margin-left: 5px; - } - p { - margin-bottom: 15px; - } - .small-field { - display: inline-block; - padding-bottom: 10px; - margin-left: 5px; - - input { - .field-stylisation(13px, 220px); - } - - select { - .field-stylisation(35px, 242px); - padding: 0; - padding-left: 6px; - } - - input[id="phone"] { - background-image: url(../icons/plus-gray-16px.png); - background-position: 6px center; - background-repeat: no-repeat; - background-size: 12px; - padding-left: 20px; - width: 210px; - } - } - - .login-btn, - .forgot-btn, - .reset-btn, - .sign-up-btn { - margin-top: 10px; - margin-left: 13%; - .button-stylisation(35px); - } - - .sign-up-btn { - margin-left: 40%; - } - - .reset-btn { - margin-left: 45%; - } - - .forgot-btn { - margin-left: 43%; - } - } - - &.home { - margin: 0; - width: 100%; - .content-block { - margin: 0 auto; - width: 1000px; - } - h1 { - margin-top: 50px; - } - ul.footer { - font-size: 15px; - margin: 100px 270px 100px 270px; - li { - display: inline-block; - margin-right: 20px; - a { - text-decoration: none; - } - } - } - .video { - margin: 0 200px 50px; - width: 640px; - height: 390px; - } - .image.mobile-collage { - margin: 0; - width: 445px; - height: 450px; - } - .header-logo { - font-size: 23px; - background: #ebebeb url(../icons/big-logo.png) no-repeat 50% 35%; - background-size: 25%; - margin: 0 auto 50px; - span.big-logo { - margin: 20px 200px 20px 200px; - } - } - ul.how-it-works { - margin-top: 20px; - li { - list-style-type: none; - margin: 0; - position: relative; - height: 210px; - } - .image { - width: 180px; - height: 180px; - margin: 0; - float: left; - } - .number { - display: inline-block; - margin-top: 65px; - margin-right: 2%; - margin-bottom: 0; - margin-left: 2%; - font-size: 32px; - } - p { - display: inline-block; - float: right; - margin-top: 60px; - width: 240px; - font-size: 20px; - } - } - .benefits { - .speed { - background-image: url(../icons/speed.png); - margin-left: 200px; - } - .usability { - background-image: url(../icons/usability.png); - margin-left: 165px; - } - .cost-efficiency { - background-image: url(../icons/cost-efficiency.png); - margin-left: 170px; - } - .accuracy { - background-image: url(../icons/accuracy.png); - margin-left: 195px; - } - .img { - background-repeat: no-repeat; - height: 115px; - margin-bottom: 25px; - } - margin-bottom: 50px; - height: 280px; - } - } -} - -/* - Mixin for error-block - */ -.validation-field { - div.errorsblock { - position: relative; - span { - &.error-message { - position: absolute; - width: 210px; - font-family: NokiaPureTextLight; - font-size: 13px; - color: rgb(255, 255, 255) !important; - background-color: rgb(200, 89, 80); - height: 40px; - border-radius: 6px; - z-index: 999; - padding: 5px; - top: -42px; - } - &.error-message:after { - content: ''; - position: absolute; - width: 0; - height: 0; - border-top: 6px solid rgba(0, 0, 0, 0); - border-bottom: 6px solid rgba(0, 0, 0, 0); - top: 38%; - } - } - } - - &:nth-of-type(odd) { - .error-message { - text-align: center; - right: 100%; - margin-right: 10px; - } - .error-message:after { - border-right: 6px solid rgba(0, 0, 0, 0); - border-left: 6px solid rgb(200, 89, 80); - left: 100%; - margin-left: 0px; - } - } - &:nth-of-type(even) { - .error-message { - text-align: center; - left: 100%; - margin-left: 15px; - } - .error-message:after { - border-left: 6px solid rgba(0, 0, 0, 0); - border-right: 6px solid rgb(200, 89, 80); - right: 100%; - margin-right: 0px; - } - } - &.small-field { - input.ng-invalid-required, input[name="confirmpass"] { - & + div.errorsblock { - .error-message { - line-height: 40px; - text-align: center; - } - } - } - } -} - -.modal { - .overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 1000; - background: rgba(0, 0, 0,0.8); - transition: all 0.3s; - } - .window { - position: absolute; - left: 50%; - margin-left: -225px; - width: 450px; - background-color: rgba(255,255,255,1); - height: auto; - z-index: 2000; - top: 100px; - .window-body { - input { - margin-left: 45%; - margin-top: 20px; - .button-stylisation; - } - padding: 20px; - } - } -} - -.ui-autocomplete { - height: 200px; - overflow-y: scroll; - overflow-x: hidden; -} diff --git a/web/resources/stylesheets/less/common.less b/web/resources/stylesheets/less/common.less deleted file mode 100644 index 40eeb2f..0000000 --- a/web/resources/stylesheets/less/common.less +++ /dev/null @@ -1,344 +0,0 @@ -@font-face { - font-family: 'NokiaPureText'; - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.eot); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.ttf) format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'NokiaPureTextBold'; - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'NokiaPureTextLight'; - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf) format("truetype"); - font-weight: lighter; - font-style: normal; -} - -body { - margin: 0; - padding: 0; - border: 0; - line-height: 1.5; - width: 100%; - font-family: Helvetica-Neue,Helvetica,Arial,sans-serif; -} - -.hidden { - display: none; -} - -.bold { font-family: NokiaPureTextBold } - -header { - background-color: #2468a0; - img { - float: left; - margin-top: 15px; - } - h1 { - font-size: 16px; - float: left; - } -} - -article { - section { - clear: both; - overflow: hidden; - > div { - width: 1000px; - margin: 0 auto; - >ul { - display: inline-block; - margin-bottom: 40px; - } - } - &:nth-child(odd) { - background-color: #ebebeb; - } - h1 { - margin: 0; - margin-top: 40px; - margin-bottom: 25px; - font-size: 23px; - text-align: center; - } - h2 { - font-size: 23px; - margin: 50px 0 25px; - text-align: center; - } - .nptlHeader { - margin: 0; - margin: 0 125px 25px 150px; - text-align: left; - font-family: NokiaPureTextLight; - font-size: 24px; - font-weight: normal; - } - .markedList { - li { - list-style-type: disc; - margin-top: 5px; - margin-left: 40px; - font-size: 17px; - } - } - form { - width: 50%; - margin-left: 240px; - margin-top: 45px; - padding: 10px; - padding-top: 13px; - padding-left: 14px; - background-color: #ebebeb; - label { - position: relative; - div.error { - position: absolute; - background-color: #c85950; - top: -8px; - width: 210px; - height: auto; - font-size: 13px; - font-family: NokiaPureTextLight; - color: #fff; - text-align: center; - padding: 5px; - border-radius: 6px; - overflow: visible; - display: none; - &:after { - content: ''; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - position: absolute; - top: 50%; - margin-top: -6px; - } - span { - display: none; - } - } - &.col-left { - div.error { - left: -230px; - &:after { - right: -6px; - border-left: 6px solid #c85950; - } - } - } - &.col-right { - div.error { - right: -230px; - &:after { - left: -6px; - border-right: 6px solid #c85950; - } - } - } - } - input { - outline: none; - width: 220px; - height: 13px; - padding: 10px; - margin-bottom: 13px; - margin-left: 1px; - box-shadow: 0px 2px 2px #e7e7e7 inset; - border-radius: 5px; - background-color: #f8f8f8; - border: 1px solid #d2d2d2; - font-family: NokiaPureText; - font-size: 15px; - color: #000; - } - select { - outline: none; - width: 242px; - height: 35px; - padding: 6px; - margin-bottom: 13px; - margin-left: 1px; - box-shadow: 0px 2px 2px #e7e7e7 inset; - border-radius: 5px; - background-color: #f8f8f8; - border: 1px solid #d2d2d2; - font-family: NokiaPureText; - font-size: 15px; - color: #000; - } - button { - &:active { - backgroung-color: blue; - } - outline: none; - border-radius: 5px; - height: 35px; - padding: 1px 6px; - border:1px solid #d2d2d2; - background-color: #fafafa; - font-family: NokiaPureTextBold; - font-size: 15px; - margin-top: 7px; - box-shadow: 0 -1px 2px #e7e7e7 inset; - } - } - } -} -ul { - padding: 0; - margin: 0; - list-style: none; -} -.col-left { - float: left; - width: 48%; -} - -.col-right { - float: right; - width: 48%; - margin-right: 6px; - - &:after { - clear: both; - float: none; - } -} - -.video { - border: 0; - margin: 0 200px 50px; - width: 640px; - height: 390px; -} -p { - font-size: 17px; -} -#mainMenu { - margin: 0; - width: 100%; - height: 60px; - color:#fff; - a { - color: #fff; - h1 { - line-height: 60px; - margin: 0px; - margin-right: 75px; - margin-left: 15px; - float:left; - display: inline; - font-family: NokiaPureTextLight; - b { - font-family: NokiaPureTextBold; - } - } - } - nav { - margin: 0 auto; - width: 1000px; - >ul { - >li{ - display: inline-block; - margin-right: 10px; - line-height: 60px; - font-family: NokiaPureTextLight; - a { - color: #fff; - &:link { - text-decoration: none; - } - &.language-select { - padding-right: 40px; - cursor: pointer; - .dropdown { - &.open { - opacity: 1; - } - opacity: 0; - position: absolute; - padding: 10px 0; - background-color: #fff; - z-index: 2; - font-family: NokiaPureText; - font-size: 16px; - width: 200px; - top: 50px; - border: 1px solid rgba(166, 166, 166, 0.5); - border-radius: 5px; - li { - display: block; - color: #000; - line-height: 60px; - padding: 0 10px; - } - &:after { - content: ""; - width: 0; - height: 0; - position: absolute; - bottom: 100%; - margin-left: 5px; - border-width: 0 6px 6px 6px; - border-style: solid; - border-color: #fff transparent; - } - } - &:after { - top: 29px; - margin-left: 0; - content: ''; - position: absolute; - width: 0; - height: 0; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid transparent; - border-top: 5px solid #fff; - } - } - &.active { - font-family: NokiaPureTextBold; - position: relative; - &:after { - content: ''; - position: absolute; - left: 32%; - top: 33px; - width: 0; - height: 0; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-bottom: 9px solid #ffffff; - } - } - li { - color: #fff; - display: inline-block; - } - } - &:last-child { - float: right; - margin-right: 0; - } - } - } - } -} diff --git a/web/resources/stylesheets/less/forgotPassword.less b/web/resources/stylesheets/less/forgotPassword.less deleted file mode 100644 index 674d88c..0000000 --- a/web/resources/stylesheets/less/forgotPassword.less +++ /dev/null @@ -1,27 +0,0 @@ -#forgotPassword,#resetPasswordError,#resetPassword { - section { - background-color: #fff; - .msg { - p { - font-size: 23px; - color: #787878; - font-family: NokiaPureTextLight; - } - } - form { - - p { - font-size: 15px; - font-family: NokiaPureTextLight; - margin: 6px 0 15px 1px; - color: #787878; - } - input { - margin-top: 3px; - } - button { - margin-left: 213px; - } - } - } -} diff --git a/web/resources/stylesheets/less/getStarted.less b/web/resources/stylesheets/less/getStarted.less deleted file mode 100644 index 3139ef9..0000000 --- a/web/resources/stylesheets/less/getStarted.less +++ /dev/null @@ -1,44 +0,0 @@ -#getStarted { - section { - background-color: #fff; - } - a { - color: #558a10; - } - h1 { - + p { - margin-bottom: 0; - font-size: 15px; - font-weight: bold; - text-align: center; - } - } - ul > li { - clear: both; - padding-top: 40px; - >img { - height: 300px; - width: 300px; - margin-right: 20px; - border: 1px solid #d2d2d2; - float: left; - } - > *:not(img) { - margin-left: 320px !important; - } - >a[name] { - display: none; - } - h2 { - font-size: 20px; - font-weight: bold; - margin: 0; - text-align: left; - } - p { - font-size: 19px; - margin: 0; - margin-top: 25px; - } - } -} diff --git a/web/resources/stylesheets/less/home.less b/web/resources/stylesheets/less/home.less deleted file mode 100644 index 46adedc..0000000 --- a/web/resources/stylesheets/less/home.less +++ /dev/null @@ -1,132 +0,0 @@ -.headDescrip { - margin: 0; - width: 100%; - height: 148px; - margin-bottom: 50px; - - div { - background: url(../icons/big-logo.png) no-repeat 50% 35% transparent; - background-size: 25%; - height: 100%; - text-align: center; - font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; - font-size: 24px; - &:before { - display: block; - content: ""; - padding-top: 20px; - } - } -} -.contentDescrip { - margin-bottom: 9px; - img { - border: 1px solid #cecece; - width: 445px; - height: 450px; - } - p { - &:first-of-type { - margin-top: 0; - } - margin-bottom: 25px; - } -} -#instruction { - li { - height: 210px; - > a { - &:link { - text-decoration: none; - color: #000; - - } - &:visited { - text-decoration: none; - color: #000; - } - display: table-row; - > * { - display: table-cell; - vertical-align: middle; - } - } - } - img { - border: 1px solid #cecece; - height: 180px; - width: 180px; - } - span { - font-size: 20px; - &:first-of-type { - font-family: NokiaPureTextBold; - font-size: 32px; - padding: 0 10px; - font-weight: bold; - } - } -} -.videoBlock { - p { - margin: 50px 205px 25px 205px; - text-align: center; - font-family: NokiaPureTextLight; - color: #a6a6a6; - } -} -#benefits { - img { - margin-bottom: 18px; - } - li { - text-align: center; - color: #787878; - margin-bottom: 50px; - font-size: 17px; - } - h3 { - font-family: NokiaPureTextLight; - font-size: 23px; - color: #000; - margin: 0; - } -} -#awards { - .col-left { - li { - margin-bottom: 25px; - font-size: 17px; - } - } - h2 { - text-align: left; - } - .col-right { - a { - font-size: 17px; - color: #558a10; - } - } -} -#footer { - width:500px; - margin: 100px auto; - - li { - display: inline-block; - margin-right: 20px; - a { - &:link { - text-decoration: none; - color: #558A10; - font-size: 15px; - } - &:visited { - text-decoration: none; - color: #558A10; - font-size: 15px; - } - } - } -} diff --git a/web/resources/stylesheets/less/login.less b/web/resources/stylesheets/less/login.less deleted file mode 100644 index 90fffb6..0000000 --- a/web/resources/stylesheets/less/login.less +++ /dev/null @@ -1,58 +0,0 @@ -#login { - section { - background-color: #fff; - a { - margin-left: 1px; - font-size: 15px; - color: #558a10; - } - form { - label { - position: relative; - div.error { - position: absolute; - background-color: #c85950; - top: -8px; - width: 210px; - height: 40px; - font-size: 13px; - font-family: NokiaPureTextLight; - color: #fff; - text-align: center; - padding: 5px; - border-radius: 6px; - overflow: visible; - &:after { - content: ''; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - position: absolute; - top: 50%; - margin-top: -6px; - } - } - &.col-left { - div.error { - left: -230px; - &:after { - right: -6px; - border-left: 6px solid #c85950; - } - } - } - &.col-right { - div.error { - right: -230px; - &:after { - left: -6px; - border-right: 6px solid #c85950; - } - } - } - } - button { - margin-left: 68px; - } - } - } -} \ No newline at end of file diff --git a/web/resources/stylesheets/less/openSource.less b/web/resources/stylesheets/less/openSource.less deleted file mode 100644 index 979fc09..0000000 --- a/web/resources/stylesheets/less/openSource.less +++ /dev/null @@ -1,20 +0,0 @@ -#openSource { - section { - background-color: #fff; - &:last-of-type { - h1 { - margin-top: 0px; - } - } - } - p { - margin: 0; - margin-bottom: 25px; - } - a { - color: #558a10; - } - ul { - margin-bottom: 80px; - } -} diff --git a/web/resources/stylesheets/less/register.less b/web/resources/stylesheets/less/register.less deleted file mode 100644 index a694fa6..0000000 --- a/web/resources/stylesheets/less/register.less +++ /dev/null @@ -1,85 +0,0 @@ -#register { - section { - background-color: #fff; - form { - input[name="phone"] { - background-image: url(../icons/plus-gray-16px.png); - background-position: 6px center; - background-repeat: no-repeat; - background-size: 12px; - padding-left: 20px; - width: 210px; - } - button { - margin-left: 198px; - } - } - } -} -.results { - position: absolute; - width: 230px; - margin-top: 35px; - margin-left: 4px; - background-color: #FFF; - list-style: none; - padding: 2px; - outline: none; - border-radius: 4px; - z-index: 10; - border: 1px solid #AAA; - height: 200px; - overflow-y: scroll; - overflow-x: hidden; - li:hover { - background-color: #f0f0f0; - } -} - -.modal { - .overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 1000; - background: rgba(0, 0, 0, 0.8); - transition: all 0.3s; - } - .window { - position: absolute; - left: 50%; - margin-left: -225px; - width: 450px; - background-color: #FFF; - height: auto; - z-index: 2000; - top: 100px; - .window-body { - padding: 20px; - input { - margin-left: 45%; - margin-top: 20px; - background-color: #fafafa; - border-radius: 5px; - height: 35px; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid rgba(166, 166, 166, 0.5); - cursor: pointer; - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - } - &:not(:disabled):active { - background-color: #f0f0f0; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - } - } - } -} diff --git a/web/resources/stylesheets/less/style.less b/web/resources/stylesheets/less/style.less deleted file mode 100644 index 0767708..0000000 --- a/web/resources/stylesheets/less/style.less +++ /dev/null @@ -1,9 +0,0 @@ -@import 'common'; -@import 'home'; -@import 'getStarted'; -@import 'useCases'; -@import 'openSource'; -@import 'support'; -@import 'login'; -@import 'register'; -@import 'forgotPassword'; diff --git a/web/resources/stylesheets/less/support.less b/web/resources/stylesheets/less/support.less deleted file mode 100644 index 0beec02..0000000 --- a/web/resources/stylesheets/less/support.less +++ /dev/null @@ -1,27 +0,0 @@ -#support { - section { - background-color: #fff; - p { - margin: 0; - margin-bottom: 25px; - } - } - .markedList { - margin: 0; - } - a { - color: #558a10; - } - .blueHeader { - font-size: 20px; - font-family: NokiaPureTextLight; - color: #2468a0; - text-align: left; - margin: 0; - } - .questionList { - li { - margin-bottom: 50px; - } - } -} diff --git a/web/resources/stylesheets/less/useCases.less b/web/resources/stylesheets/less/useCases.less deleted file mode 100644 index 5c14348..0000000 --- a/web/resources/stylesheets/less/useCases.less +++ /dev/null @@ -1,52 +0,0 @@ -#useCases { - section { - background-color: #fff; - } - ul { - h2 { - text-align: center; - } - li { - img { - height: 300px; - width: 600px; - margin-left: 210px; - margin-bottom: 27px; - border: 1px solid #d2d2d2; - } - .col-left { - p { - margin: 0; - margin-bottom: 25px; - } - } - .col-right { - margin: 0; - blockquote { - font-family: NokiaPureTextLight; - font-size: 17px; - font-style: italic; - color: #2468a0; - margin: 0; - padding-left: 130px; - p { - margin: 0; - margin-top: 25px; - text-align: right; - margin-left: auto; - font-size: 14px; - font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; - color: #a6a6a6; - font-style: normal; - width: 270px; - margin-right: 1px; - b { - font-family: NokiaPureTextBold; - } - } - } - } - clear: both; - } - } -} diff --git a/web/resources/stylesheets/monthlyReport.less b/web/resources/stylesheets/monthlyReport.less deleted file mode 100644 index 490b2b2..0000000 --- a/web/resources/stylesheets/monthlyReport.less +++ /dev/null @@ -1,99 +0,0 @@ -html, body { - font-family: "Helvetica-Neue", "Helvetica", Arial, sans-serif; - line-height: 1.5; - background-color: rgba(240, 240, 240, 1); -} - -@button-color: rgba(250, 250, 250, 1); -@light-gray: rgba(166, 166, 166, 0.5); - -/* - Mixin for inputs field-stylisation - */ -.field-stylisation(@height : 13px, @width: auto) { - height: @height; - border-radius: 5px; - border: 1px solid @light-gray; - background-color: rgba(248, 248, 248, 1); - padding: 10px; - font-size: 15px; - width: @width; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} - -/* - Mixin for inset button-shadow - */ -.inset-shadow-active { - background-color: rgba(240, 240, 240, 1); - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.inset-shadow { - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - - &:not(:disabled):active { - .inset-shadow-active; - } -} - -/* - Mixin for inputs button-stylisation - */ -.button-stylisation (@height : 35px) { - background-color: @button-color; - border-radius: 5px; - height: @height; - width: auto; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid @light-gray; - cursor: pointer; - .inset-shadow; -} - -h1 { - font-size: 23px; - text-align: center; -} - -.content { - font-family: NokiaPureText; - text-align: center; - margin: auto; - margin-top: 20px; - width: 315px; - padding: 10px; - background-color: rgba(240, 240, 240, 1); - height: auto; - - div.field { - display: inline-block; - padding-bottom: 10px; - margin-left: 5px; - } - - select { - .field-stylisation(35px, 150px); - padding: 0; - padding-left: 6px; - } - - input { - .field-stylisation(13px, 283px); - } - - .btn { - margin-top: 10px; - .button-stylisation(35px); - } - -} diff --git a/web/resources/stylesheets/style.css b/web/resources/stylesheets/style.css deleted file mode 100644 index 6bf553c..0000000 --- a/web/resources/stylesheets/style.css +++ /dev/null @@ -1,724 +0,0 @@ -@font-face { - font-family: 'NokiaPureText'; - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.eot); - src: url(/resources/fonts/NokiaPureText/nokiapuretext-webfont.woff) format('woff'); - src: url(/resources/fonts/NokiaPureText/nokiapuretext-webfont.svg) format('svg'); - src: url(/resources/fonts/NokiaPureText/nokiapuretext-webfont.ttf) format('truetype'); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: 'NokiaPureTextBold'; - src: url(/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot); - src: url(/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff) format('woff'); - src: url(/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg) format('svg'); - src: url(/resources/fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: 'NokiaPureTextLight'; - src: url(/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot); - src: url(/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff) format('woff'); - src: url(/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg) format('svg'); - src: url(/resources/fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf) format("truetype"); - font-weight: lighter; - font-style: normal; -} -body { - margin: 0; - padding: 0; - border: 0; - line-height: 1.5; - width: 100%; - font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; -} -.hidden { - display: none; -} -.bold { - font-family: NokiaPureTextBold; -} -header { - background-color: #2468a0; -} -header img { - float: left; - margin-top: 15px; -} -header h1 { - font-size: 16px; - float: left; -} -article section { - clear: both; - overflow: hidden; -} -article section > div { - width: 1000px; - margin: 0 auto; -} -article section > div > ul { - display: inline-block; - margin-bottom: 40px; -} -article section:nth-child(odd) { - background-color: #ebebeb; -} -article section h1 { - margin: 0; - margin-top: 40px; - margin-bottom: 25px; - font-size: 23px; - text-align: center; -} -article section h2 { - font-size: 23px; - margin: 50px 0 25px; - text-align: center; -} -article section .nptlHeader { - margin: 0; - margin: 0 125px 25px 150px; - text-align: left; - font-family: NokiaPureTextLight; - font-size: 24px; - font-weight: normal; -} -article section .markedList li { - list-style-type: disc; - margin-top: 5px; - margin-left: 40px; - font-size: 17px; -} -article section form { - width: 50%; - margin-left: 240px; - margin-top: 45px; - padding: 10px; - padding-top: 13px; - padding-left: 14px; - background-color: #ebebeb; -} -article section form label { - position: relative; -} -article section form label div.error { - position: absolute; - background-color: #c85950; - top: -8px; - width: 210px; - height: auto; - font-size: 13px; - font-family: NokiaPureTextLight; - color: #fff; - text-align: center; - padding: 5px; - border-radius: 6px; - overflow: visible; - display: none; -} -article section form label div.error:after { - content: ''; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - position: absolute; - top: 50%; - margin-top: -6px; -} -article section form label div.error span { - display: none; -} -article section form label.col-left div.error { - left: -230px; -} -article section form label.col-left div.error:after { - right: -6px; - border-left: 6px solid #c85950; -} -article section form label.col-right div.error { - right: -230px; -} -article section form label.col-right div.error:after { - left: -6px; - border-right: 6px solid #c85950; -} -article section form input { - outline: none; - width: 220px; - height: 13px; - padding: 10px; - margin-bottom: 13px; - margin-left: 1px; - box-shadow: 0px 2px 2px #e7e7e7 inset; - border-radius: 5px; - background-color: #f8f8f8; - border: 1px solid #d2d2d2; - font-family: NokiaPureText; - font-size: 15px; - color: #000; -} -article section form select { - outline: none; - width: 242px; - height: 35px; - padding: 6px; - margin-bottom: 13px; - margin-left: 1px; - box-shadow: 0px 2px 2px #e7e7e7 inset; - border-radius: 5px; - background-color: #f8f8f8; - border: 1px solid #d2d2d2; - font-family: NokiaPureText; - font-size: 15px; - color: #000; -} -article section form button { - outline: none; - border-radius: 5px; - height: 35px; - padding: 1px 6px; - border: 1px solid #d2d2d2; - background-color: #fafafa; - font-family: NokiaPureTextBold; - font-size: 15px; - margin-top: 7px; - box-shadow: 0 -1px 2px #e7e7e7 inset; -} -article section form button:active { - backgroung-color: blue; -} -ul { - padding: 0; - margin: 0; - list-style: none; -} -.col-left { - float: left; - width: 48%; -} -.col-right { - float: right; - width: 48%; - margin-right: 6px; -} -.col-right:after { - clear: both; - float: none; -} -.video { - border: 0; - margin: 0 200px 50px; - width: 640px; - height: 390px; -} -p { - font-size: 17px; -} -#mainMenu { - margin: 0; - width: 100%; - height: 60px; - color: #fff; -} -#mainMenu a { - color: #fff; -} -#mainMenu a h1 { - line-height: 60px; - margin: 0px; - margin-right: 75px; - margin-left: 15px; - float: left; - display: inline; - font-family: NokiaPureTextLight; -} -#mainMenu a h1 b { - font-family: NokiaPureTextBold; -} -#mainMenu nav { - margin: 0 auto; - width: 1000px; -} -#mainMenu nav > ul > li { - display: inline-block; - margin-right: 10px; - line-height: 60px; - font-family: NokiaPureTextLight; -} -#mainMenu nav > ul > li a { - color: #fff; -} -#mainMenu nav > ul > li a:link { - text-decoration: none; -} -#mainMenu nav > ul > li a.language-select { - padding-right: 40px; - cursor: pointer; -} -#mainMenu nav > ul > li a.language-select .dropdown { - opacity: 0; - position: absolute; - padding: 10px 0; - background-color: #fff; - z-index: 2; - font-family: NokiaPureText; - font-size: 16px; - width: 200px; - top: 50px; - border: 1px solid rgba(166, 166, 166, 0.5); - border-radius: 5px; -} -#mainMenu nav > ul > li a.language-select .dropdown.open { - opacity: 1; -} -#mainMenu nav > ul > li a.language-select .dropdown li { - display: block; - color: #000; - line-height: 60px; - padding: 0 10px; -} -#mainMenu nav > ul > li a.language-select .dropdown:after { - content: ""; - width: 0; - height: 0; - position: absolute; - bottom: 100%; - margin-left: 5px; - border-width: 0 6px 6px 6px; - border-style: solid; - border-color: #fff transparent; -} -#mainMenu nav > ul > li a.language-select:after { - top: 29px; - margin-left: 0; - content: ''; - position: absolute; - width: 0; - height: 0; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid transparent; - border-top: 5px solid #fff; -} -#mainMenu nav > ul > li a.active { - font-family: NokiaPureTextBold; - position: relative; -} -#mainMenu nav > ul > li a.active:after { - content: ''; - position: absolute; - left: 32%; - top: 33px; - width: 0; - height: 0; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-bottom: 9px solid #ffffff; -} -#mainMenu nav > ul > li a li { - color: #fff; - display: inline-block; -} -#mainMenu nav > ul > li:last-child { - float: right; - margin-right: 0; -} -.headDescrip { - margin: 0; - width: 100%; - height: 148px; - margin-bottom: 50px; -} -.headDescrip div { - background: url(../icons/big-logo.png) no-repeat 50% 35% transparent; - background-size: 25%; - height: 100%; - text-align: center; - font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; - font-size: 24px; -} -.headDescrip div:before { - display: block; - content: ""; - padding-top: 20px; -} -.contentDescrip { - margin-bottom: 9px; -} -.contentDescrip img { - border: 1px solid #cecece; - width: 445px; - height: 450px; -} -.contentDescrip p { - margin-bottom: 25px; -} -.contentDescrip p:first-of-type { - margin-top: 0; -} -#instruction li { - height: 210px; -} -#instruction li > a { - display: table-row; -} -#instruction li > a:link { - text-decoration: none; - color: #000; -} -#instruction li > a:visited { - text-decoration: none; - color: #000; -} -#instruction li > a > * { - display: table-cell; - vertical-align: middle; -} -#instruction img { - border: 1px solid #cecece; - height: 180px; - width: 180px; -} -#instruction span { - font-size: 20px; -} -#instruction span:first-of-type { - font-family: NokiaPureTextBold; - font-size: 32px; - padding: 0 10px; - font-weight: bold; -} -.videoBlock p { - margin: 50px 205px 25px 205px; - text-align: center; - font-family: NokiaPureTextLight; - color: #a6a6a6; -} -#benefits img { - margin-bottom: 18px; -} -#benefits li { - text-align: center; - color: #787878; - margin-bottom: 50px; - font-size: 17px; -} -#benefits h3 { - font-family: NokiaPureTextLight; - font-size: 23px; - color: #000; - margin: 0; -} -#awards .col-left li { - margin-bottom: 25px; - font-size: 17px; -} -#awards h2 { - text-align: left; -} -#awards .col-right a { - font-size: 17px; - color: #558a10; -} -#footer { - width: 500px; - margin: 100px auto; -} -#footer li { - display: inline-block; - margin-right: 20px; -} -#footer li a:link { - text-decoration: none; - color: #558A10; - font-size: 15px; -} -#footer li a:visited { - text-decoration: none; - color: #558A10; - font-size: 15px; -} -#getStarted section { - background-color: #fff; -} -#getStarted a { - color: #558a10; -} -#getStarted h1 + p { - margin-bottom: 0; - font-size: 15px; - font-weight: bold; - text-align: center; -} -#getStarted ul > li { - clear: both; - padding-top: 40px; -} -#getStarted ul > li > img { - height: 300px; - width: 300px; - margin-right: 20px; - border: 1px solid #d2d2d2; - float: left; -} -#getStarted ul > li > *:not(img) { - margin-left: 320px !important; -} -#getStarted ul > li > a[name] { - display: none; -} -#getStarted ul > li h2 { - font-size: 20px; - font-weight: bold; - margin: 0; - text-align: left; -} -#getStarted ul > li p { - font-size: 19px; - margin: 0; - margin-top: 25px; -} -#useCases section { - background-color: #fff; -} -#useCases ul h2 { - text-align: center; -} -#useCases ul li { - clear: both; -} -#useCases ul li img { - height: 300px; - width: 600px; - margin-left: 210px; - margin-bottom: 27px; - border: 1px solid #d2d2d2; -} -#useCases ul li .col-left p { - margin: 0; - margin-bottom: 25px; -} -#useCases ul li .col-right { - margin: 0; -} -#useCases ul li .col-right blockquote { - font-family: NokiaPureTextLight; - font-size: 17px; - font-style: italic; - color: #2468a0; - margin: 0; - padding-left: 130px; -} -#useCases ul li .col-right blockquote p { - margin: 0; - margin-top: 25px; - text-align: right; - margin-left: auto; - font-size: 14px; - font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; - color: #a6a6a6; - font-style: normal; - width: 270px; - margin-right: 1px; -} -#useCases ul li .col-right blockquote p b { - font-family: NokiaPureTextBold; -} -#openSource section { - background-color: #fff; -} -#openSource section:last-of-type h1 { - margin-top: 0px; -} -#openSource p { - margin: 0; - margin-bottom: 25px; -} -#openSource a { - color: #558a10; -} -#openSource ul { - margin-bottom: 80px; -} -#support section { - background-color: #fff; -} -#support section p { - margin: 0; - margin-bottom: 25px; -} -#support .markedList { - margin: 0; -} -#support a { - color: #558a10; -} -#support .blueHeader { - font-size: 20px; - font-family: NokiaPureTextLight; - color: #2468a0; - text-align: left; - margin: 0; -} -#support .questionList li { - margin-bottom: 50px; -} -#login section { - background-color: #fff; -} -#login section a { - margin-left: 1px; - font-size: 15px; - color: #558a10; -} -#login section form label { - position: relative; -} -#login section form label div.error { - position: absolute; - background-color: #c85950; - top: -8px; - width: 210px; - height: 40px; - font-size: 13px; - font-family: NokiaPureTextLight; - color: #fff; - text-align: center; - padding: 5px; - border-radius: 6px; - overflow: visible; -} -#login section form label div.error:after { - content: ''; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - position: absolute; - top: 50%; - margin-top: -6px; -} -#login section form label.col-left div.error { - left: -230px; -} -#login section form label.col-left div.error:after { - right: -6px; - border-left: 6px solid #c85950; -} -#login section form label.col-right div.error { - right: -230px; -} -#login section form label.col-right div.error:after { - left: -6px; - border-right: 6px solid #c85950; -} -#login section form button { - margin-left: 68px; -} -#register section { - background-color: #fff; -} -#register section form input[name="phone"] { - background-image: url(../icons/plus-gray-16px.png); - background-position: 6px center; - background-repeat: no-repeat; - background-size: 12px; - padding-left: 20px; - width: 210px; -} -#register section form button { - margin-left: 198px; -} -.results { - position: absolute; - width: 230px; - margin-top: 35px; - margin-left: 4px; - background-color: #FFF; - list-style: none; - padding: 2px; - outline: none; - border-radius: 4px; - z-index: 10; - border: 1px solid #AAA; - height: 200px; - overflow-y: scroll; - overflow-x: hidden; -} -.results li:hover { - background-color: #f0f0f0; -} -.modal .overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 1000; - background: rgba(0, 0, 0, 0.8); - transition: all 0.3s; -} -.modal .window { - position: absolute; - left: 50%; - margin-left: -225px; - width: 450px; - background-color: #FFF; - height: auto; - z-index: 2000; - top: 100px; -} -.modal .window .window-body { - padding: 20px; -} -.modal .window .window-body input { - margin-left: 45%; - margin-top: 20px; - background-color: #fafafa; - border-radius: 5px; - height: 35px; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid rgba(166, 166, 166, 0.5); - cursor: pointer; - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); -} -.modal .window .window-body:not(:disabled):active { - background-color: #f0f0f0; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -#forgotPassword section, -#resetPasswordError section, -#resetPassword section { - background-color: #fff; -} -#forgotPassword section .msg p, -#resetPasswordError section .msg p, -#resetPassword section .msg p { - font-size: 23px; - color: #787878; - font-family: NokiaPureTextLight; -} -#forgotPassword section form p, -#resetPasswordError section form p, -#resetPassword section form p { - font-size: 15px; - font-family: NokiaPureTextLight; - margin: 6px 0 15px 1px; - color: #787878; -} -#forgotPassword section form input, -#resetPasswordError section form input, -#resetPassword section form input { - margin-top: 3px; -} -#forgotPassword section form button, -#resetPasswordError section form button, -#resetPassword section form button { - margin-left: 213px; -} diff --git a/web/resources/stylesheets/styles.less b/web/resources/stylesheets/styles.less deleted file mode 100644 index ccdfd44..0000000 --- a/web/resources/stylesheets/styles.less +++ /dev/null @@ -1,2643 +0,0 @@ -/** - * Global Reset of all HTML Elements - */ - -html, body { - border: 0; - font-family: "Helvetica-Neue", "Helvetica", Arial, sans-serif; - line-height: 1.5; - margin: 0; - padding: 0; - width: 100%; -} - -div, span, object, iframe, img, table, caption, thead, tbody, -tfoot, tr, tr, td, article, aside, canvas, details, figure, hgroup, menu, -nav, footer, header, section, summary, mark, audio, video { - border: 0; - margin: 0; - padding: 0; -} - -h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cit, code, -del, dfn, em, ins, q, samp, small, strong, sub, sup, b, i, hr, dl, dt, dd, -ol, ul, li, fieldset, legend, label { - border: 0; - font-size: 100%; - vertical-align: baseline; - margin: 0; - padding: 0; - text-decoration: none; - color: #000000; -} - -article, aside, canvas, figure, figure img, figcaption, hgroup, -footer, header, nav, section, audio, video { - display: block; -} - -table { - border-collapse: separate; - border-spacing: 0; - caption, th, td { - text-align: left; - vertical-align: middle; - } -} - -a img { - border: 0; -} - -:focus { - outline: 0; -} -/** - * Fonts for page - */ -@font-face { - font-family: 'NokiaPureText'; - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.eot); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureText/nokiapuretext-webfont.ttf) format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'NokiaPureTextBold'; - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.eot); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextBold/nokiapuretextbold-webfont.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'NokiaPureTextLight'; - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.eot); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.woff) format('woff'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.svg) format('svg'); - src: url(../fonts/NokiaPureTextLight/nokiapuretextlight-webfont.ttf) format("truetype"); - font-weight: lighter; - font-style: normal; -} - -@font-face { - font-family: 'ProximaNovaTextBold'; - src: url(../fonts/ProximaNovaTextBold/ProximaNovaTextBold.eot); - src: url(../fonts/ProximaNovaTextBold/ProximaNovaTextBold.woff) format('woff'); - src: url(../fonts/ProximaNovaTextBold/ProximaNovaTextBold.svg) format('svg'); - src: url(../fonts/ProximaNovaTextBold/ProximaNovaTextBold.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'ProximaNovaTextSemibold'; - src: url(../fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.eot); - src: url(../fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.woff) format('woff'); - src: url(../fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.svg) format('svg'); - src: url(../fonts/ProximaNovaTextSemibold/ProximaNovaTextSemibold.ttf) format("truetype"); - font-weight: bold; - font-style: normal; -} - -/** - * ------- - * Variables - */ - -@header-bg: #2468a0; - -@column-header-bg: rgba(247, 247, 247, 1); - -@even-surveys-bg: rgba(249, 252, 255, 1); - -@button-color: rgba(250, 250, 250, 1); - -/* - * colors - */ -@gray: rgba(166, 166, 166, 1); -@green: rgba(85, 138, 16, 1); -@light-gray: rgba(166, 166, 166, 0.5); - -/** - * ------- - */ -.left {float: left}; -.right {float: right}; -.hide { display: none !important;} -.show {visibility: visible !important} -.hidden { visibility: hidden} -/* - Mixin for notification - */ -.notice(@bg-color: rgba(156, 213, 86, 0.8), @text-color: #000000, @link-color: rgba(85, 138, 16, 1)) { - background: @bg-color; - min-height: 50px; - line-height: 22px; - font-size: 12px; - text-align: center; - display: inline-block; - padding: 0 10px; - border-radius: 5px; - font-family: NokiaPureText; - margin: 0 0 2px 10px; - span { - color: @text-color; - } - a { - color: @link-color; - text-decoration: underline; - &:hover { - cursor: pointer; - color: lighten(@link-color, 8%); - } - } -} - -/* - * Mixin for function-bar - */ - -.function-bar { - background: rgba(235, 235, 235, 1); - padding: 10px; - height: 35px; -} - -/* - * Mixin for column header - */ -.column-header { - height: 15px; - line-height: 15px; - background: @column-header-bg; - padding: 10px 20px; - position: relative; - z-index: 2; - .name, .result-title { - height: 15px; - position: relative; - display: inline-block; - float: left; - padding-right: 20px; - .sort-arrow(0); - span { - font-family: NokiaPureTextBold; - font-size: 0.9em; - } - } - .result-title { - .sort-arrow(0); - } - .circle { - margin-right: 20px; - float: left; - cursor: pointer; - .circle(rgb(148, 216, 72, 1)); - } - ul { - float: right; - margin-left: 10px; - display: block; - li { - padding: 0; - padding-left: 10px; - font-family: NokiaPureTextBold; - font-size: 0.9em; - display: inline-block; - border-left: 1px solid #000000; - position: relative; - .long-text; - &.results { - width: 100px; - padding-right: 20px; - .sort-arrow(); - } - &.publisher { - width: 140px; - padding-right: 20px; - .sort-arrow(); - } - &.date { - width: 72px; - padding-right: 20px; - .sort-arrow(); - } - &.permission { - width: 125px; - padding-right: 20px; - .sort-arrow(); - } - &.sent { - width: 80px; - padding-right: 20px; - .sort-arrow(); - } - &.gps { - width: 35px; - padding-right: 20px; - .sort-arrow(); - } - &.collector { - width: 140px; - padding-right: 20px; - .sort-arrow(0); - } - } - } -} - -/* - Mixin for inset button-shadow - */ -.inset-shadow-active { - background-color: rgba(240, 240, 240, 1); - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} -.inset-shadow { - box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.1); - - &:not(:disabled):active { - .inset-shadow-active; - } -} - - -/* - Mixin for inputs button-stylisation - */ -.button-stylisation (@height : 35px) { - background-color: @button-color; - border-radius: 5px; - height: @height; - font-family: NokiaPureTextBold; - font-size: 15px; - border: 1px solid @light-gray; - cursor: pointer; - .inset-shadow; - &:hover { - - } - &:disabled { - } -} - -/* - Mixin for small button with icon - */ -.button-icon { - width: 43px; - height: 35px; - border: 1px solid @light-gray; - background-color: @button-color; - background-repeat: no-repeat; - background-position: center; - cursor: pointer; - .inset-shadow; - &.single { - border-radius: 5px; - } - &:disabled { - opacity: 0.7; - cursor: auto; - } -} - -/* - Styles for buttons icons - */ - -.download { background-image: url(../icons/download-20px.png);} -.browse-archive { background-image: url(../icons/browse-archive.png);} -.restore { background-image: url(../icons/restore-from-archive.png);} -.add-to-archive { background-image: url(../icons/move-to-archive.png);} -.upload { background-image: url(../icons/upload-20px.png);} -.send { background-image: url(../icons/send-20px.png);} -.copy { background-image: url(../icons/copy-20px.png);} -.delete { background-image: url(../icons/delete-20px.png);} -.sms { background-image: url(../icons/sms-20px.png);} -.edit { background-image: url(../icons/edit-20px.png);} -.map { background-image: url(../icons/map-20px.png);} -.export { background-image: url(../icons/export-20px.png);} -.chart { background-image: url(../icons/chart-20px.png);} -.del-option { background-image: url(../icons/cross-red-13px.png);} - -.details { background-image: url(../icons/details-20px.png);} -.save { background-image: url(../icons/circle-tick-22px.png);} -.alert { background-image: url(../icons/alert.png);} - -/* - Mixin for inputs with plus-icon - */ -.button-plus { - background-image: url(../icons/plus-16px.png); - background-position: 8px center; - background-repeat: no-repeat; - padding: 0 10px 0 30px; - .button-stylisation; - &:disabled { - background-image: url(../icons/plus-gray-16px.png); - } -} - -/* - Mixin for group of buttons with icons - */ - -.button-group { - height: 35px; - line-height: 35px; - li { - display: inline-block; - position: relative; - input[type="button"]{ - .button-icon; - .tooltip(-65px, 50px); - .inset-shadow; - border-right: 1px solid transparent; - } - &:first-of-type { - input[type="button"] { - border-top-left-radius: 5px ; - border-bottom-left-radius: 5px ; - &:active{ - border-left: 1px solid rgba(177, 177, 177, 1); - } - } - } - &:last-of-type { - input[type="button"] { - border-top-right-radius: 5px ; - border-bottom-right-radius: 5px ; - border-right: 1px solid rgba(177, 177, 177, 1); - &:active{ - border-right: 1px solid rgba(177, 177, 177, 1); - } - } - } - } -} - -/* - Mixin for tooltips - */ -.tooltip (@left: 0, @bottom: 0, @width: 180px) { - - & + span.caption, & + div[errorsblock] span { - overflow: visible; - position: absolute; - width: @width; - font-family: NokiaPureTextLight; - font-size: 13px; - color: #FFFFFF !important; - background: #000000; - height: 25px; - line-height: 25px; - text-align: center; - visibility: hidden; - border-radius: 6px; - z-index: 999; - &.surveypublished { - width: 295px; - left: -122px !important; - opacity: 0.6 !important; - } - } - & + span.caption.new-group-tooltip, & + div[errorsblock] span { - width: 260px; - } - & + span.caption:after, - & + div[errorsblock] span:after { - content: ''; - position: absolute; - top: 100%; - left: 50%; - margin-left: -8px; - width: 0; height: 0; - border-top: 4px solid #000000 ; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - - } - &:hover + span.caption, - & + div[errorsblock] span, - &[name="groupName"]:focus + span.caption { - visibility: visible; - opacity: 0.8; - bottom: @bottom; - left: @left; - margin-left: 0; - - } - - &.delete + span.caption { - background-color: rgba(200, 89, 80, 1); - } - &.delete + span.caption:after { - border-top: 4px solid rgba(200, 89, 80, 1); - } - & + div[errorsblock] span { - background: #c85950; - opacity: 1; - } -} - -.tooltip-down (@left: 0, @bottom: 0, @width: 180px) { - .tooltip(@left, @bottom, @width); - & + span.caption:after, - & + div[errorsblock] span:after { - top: -33%; - border-bottom: 4px solid #000000 ; - border-top: 4px solid transparent ; - } - & + div[errorsblock] span:after { - border-bottom: 4px solid #c85950; - opacity: 1; - } - & + div[errorsblock] span { - bottom: -23px; - } - &.delete + span.caption { - background-color: rgba(200, 89, 80, 1); - } - &.delete + span.caption:after { - border-bottom: 4px solid rgba(200, 89, 80, 1); - border-top: 4px solid transparent; - } - &:hover + span.caption.error, - & + span.caption.error { - opacity: 1; - visibility: visible; - left: @left; - bottom: @bottom; - width: @width; - background-color: rgba(200, 89, 80, 1); - } - & + span.caption.error:after { - border-bottom: 4px solid rgba(200, 89, 80, 1); - border-top: 4px solid transparent; - } -} - - -/* - Mixin for error-block - */ -.validation-field { - div[errorsblock] { - position: relative; - span { - &.error-message { - position: absolute; - width: 210px; - font-family: NokiaPureTextLight; - font-size: 13px; - color: rgb(255, 255, 255) !important; - background-color: rgb(200, 89, 80); - height: 40px; - border-radius: 6px; - z-index: 999; - padding: 5px; - top: -42px; - } - &.error-message:after { - content: ''; - position: absolute; - width: 0; - height: 0; - border-top: 6px solid rgba(0, 0, 0, 0); - border-bottom: 6px solid rgba(0, 0, 0, 0); - top: 38%; - } - } - } - - &:nth-of-type(odd) { - .error-message { - text-align: center; - right: 100%; - margin-right: 10px; - } - .error-message:after { - border-right: 6px solid rgba(0, 0, 0, 0); - border-left: 6px solid rgb(200, 89, 80); - left: 100%; - margin-left: 0px; - } - &.long-field { - .error-message { - width: 100%; - height: 20px; - left: -5px; - margin-left: 5px; - margin-top: 51px; - text-align: center; - } - .error-message:after { - border-bottom: 6px solid rgb(200, 89, 80); - border-right: 6px solid rgba(0, 0, 0, 0); - border-left: 6px solid rgba(0, 0, 0, 0); - border-top: 6px solid rgba(0, 0, 0, 0); - top: -12px; - left: 50%; - } - } - } - &:nth-of-type(even) { - .error-message { - text-align: center; - left: 100%; - margin-left: 15px; - } - .error-message:after { - border-left: 6px solid rgba(0, 0, 0, 0); - border-right: 6px solid rgb(200, 89, 80); - right: 100%; - margin-right: 0px; - } - &.long-field { - .error-message { - width: 100%; - height: 20px; - left: -5px; - margin-left: 5px; - margin-top: 51px; - text-align: center; - } - .error-message:after { - border-bottom: 6px solid rgb(200, 89, 80); - border-right: 6px solid rgba(0, 0, 0, 0); - border-left: 6px solid rgba(0, 0, 0, 0); - border-top: 6px solid rgba(0, 0, 0, 0); - top: -12px; - left: 50%; - } - } - } - &.small-field { - input.ng-invalid-required, input[name="confirmpass"] { - & + div[errorsblock]{ - .error-message { - line-height: 40px; - text-align: center; - } - } - } - } -} - -/* - Mixin for select - */ -.select-stylisation { - height: 35px; - margin-right: 10px; - border-radius: 5px; - border: 1px solid @light-gray; - font-family: NokiaPureText; - font-size: 15px; - background-color: rgba(248, 248, 248, 1); - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} - -/* - Mixin for inputs field-stylisation - */ -.field-stylisation(@height : 13px, @width: auto) { - height: @height; - border-radius: 5px; - border: 1px solid @light-gray; - background-color: rgba(248, 248, 248, 1); - padding: 10px; - font-family: NokiaPureText; - font-size: 15px; - width: @width; - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); -} - -/* - Mixin for inputs search-fields - */ -.search-field { - width: 264px; - height: 35px; - font-size: 15px; - border-radius: 5px; - border: 1px solid @light-gray; - background-image: url(../icons/search-20px.png); - background-position: 234px center; - background-repeat: no-repeat; - padding: 0 30px 0 10px; - font-family: NokiaPureTextLight; -} - -/* - Mixin for lists of users or surveys - */ -.list-box { - max-height: ~"calc(100vh - 260px)"; - .item { - display: block; - padding: 10px 20px; - height: 35px; - border-bottom: 1px solid @light-gray; - &:nth-of-type(even){ - background: @even-surveys-bg; - } - &:hover { - .options { - display: block; - } - } - &.active { - background-color: rgba(13, 117, 203, 0.7); - h4,li { - color: #ffffff; - } - .gps { - background-color: #ffffff !important; - } - } - .name { - float: left; - display: inline-block; - margin-right: 10px; - h4 { - font-family: NokiaPureText; - font-size: 1em; - line-height: 1.2em; - .long-text; - } - .id { - font-family: NokiaPureText; - font-size: 0.8em; - line-height: 0.9em; - color: @light-gray; - } - } - .options { - float: left; - display: none; - position: relative; - & > .edit, - & > .archive { - .tooltip(-65px, 40px); - } - .details { - .tooltip(-95px, 40px, 240px); - } - .users-page input { - .tooltip(-95px, 50px, 240px); - } - .button-group { - float: right; - } - } - - ul.data { - float: right; - display:block; - li { - display: inline-block; - padding: 0 10px; - position: relative; - line-height: 35px; - &.results { - width: 125px; - text-align: center; - float: left; - } - &.publisher, - &.collector { - width: 140px; - height: 35px; - .long-text; - } - &.date { - width: 70px; - float: right; - } - &.permission { - width: 100px; - text-transform: capitalize; - } - &.sent { - width: 80px; - float: left; - } - &.gps { - width: 35px; - } - &.collector { - width: 140px; - float: right; - } - a { - color: @green; - text-decoration: underline; - .long-text; - } - .void { - color: @light-gray; - text-decoration: none; - } - } - } - } - &>li { - &:nth-of-type(1){ - .options { - .button-group input { - .tooltip-down(-65px, -22px); - } - .button-group.users-page input { - .tooltip-down(-95px, -22px, 240px); - } - .details { - .tooltip-down(-95px, -32px, 240px); - } - input.edit, - input.archive { - .tooltip-down(-65px, -32px); - } - } - } - } -} - -/* - Mixin for sort-arrow in column header - */ -.sort-arrow(@right: auto, @top: 35%, @margin-left: 10px, @color: #000) { - cursor: pointer; - &:after { - top: @top; - margin-left: @margin-left; - content: ''; - position: absolute; - right: @right; - width: 0; - height: 0; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid transparent; - border-top: 5px solid @color; - } - &.down:after { - top: -1px; - border-bottom: 5px solid @color; - border-top: 5px solid transparent; - } -} -/* - Mixin for open/close arrow in column header - */ -.open-arrow(@left: 41px, @size: 5px, @top: 33%, @closetop: 25%) { - cursor: pointer; - &:after { - content: ''; - position: absolute; - left: @left; - top: @top; - width: 0; - height: 0; - border-left: @size solid transparent; - border-right: @size solid transparent; - border-bottom: @size solid transparent; - border-top: @size solid #000; - } - &.close:after { - top: @closetop; - border-left: @size solid #000; - border-top: @size solid transparent; - } -} -/* - Mixin for green circles in survey list - */ - -.circle(@circle-bg: rgba(124,180,50,1)){ - display: block; - width: 10px; - height: 10px; - border: 2px solid rgba(166, 166, 166, 0.9); - border-radius: 7px; - content: ''; - &.green { - border: 2px solid @circle-bg; - background: @circle-bg; - } -} -/* - Mixin for overflow long text - */ -.long-text { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* - Mixin for back arrow - */ -.arrow { - float: left; - width: 30px; - height: 35px; - margin-right: 10px; - background-image: url(../icons/arrow-20px.png); - background-position: center; - background-repeat: no-repeat; - cursor: pointer; - &.up { - -moz-transform: scale(1,-1); - -webkit-transform: scale(1, -1); - -o-transform: scale(1, -1); - transform: scale(1, -1); - filter: FlipV; - -ms-filter: "FlipV"; - } -} - -/* -Styles for dropdown-select -*/ - -.wrap-dd-select { - .button-stylisation(33px); - position: relative; - width: 200px; - margin: 0 auto; - cursor: pointer; - outline: none; - padding: 0 10px; - line-height: 33px; - - .dropdown { - position: absolute; - top: 100%; - left: 0; - right: 0; - margin-left: -1px; - padding: 10px 0; - background: white; - border: 1px solid @light-gray; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - font-weight: normal; - transition: all 0.2s ease-in; - list-style: none; - opacity: 0; - pointer-events: none; - li { - &.divider { - padding: 2px 0; - background: @light-gray; - } - a { - display: block; - padding: 0 10px; - text-decoration: none; - box-shadow: inset 0 1px 0 rgba(255,255,255,1); - transition: all 0.3s ease-out; - } - i { - float: right; - color: inherit; - } - &:first-of-type a { - border-radius: 7px 7px 0 0; - } - &:last-of-type a { - border-radius: 0 0 7px 7px; - border: none; - } - } - - } - &:after { - content: ""; - width: 0; - height: 0; - position: absolute; - right: 15px; - top: 50%; - margin-top: -3px; - border-width: 6px 6px 0 6px; - border-style: solid; - border-color: black transparent; - } -} - -/* Styles for sortable-placeholder */ -.sortable-placeholder { - height: 55px; - width: 100%; - border: 2px dotted #9f9f9f; - margin-bottom: 10px ; -} -.ui-sortable-helper { - opacity: 0.9; -} - - -/* active state */ - -.wrap-dd-select { - .dropdown { - width: 100%; - z-index: 10; - li:hover a { - background: #f3f8f8; - } - } - &.active{ - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - .inset-shadow-active; - .dropdown { - opacity: 1; - pointer-events: auto; - } - } -} - -/* -Styles for dropdown-menu -*/ -.wrap-dd-menu { - display: inline-block; - position: relative; - margin-right: 10px; - .dropdown { - z-index: 11; - width: 200px; - position: absolute; - left: 0; - right: 0; - margin-left: -1px; - padding: 10px 0; - background: white; - border: 1px solid @light-gray; - border-radius: 5px; - font-weight: normal; - transition: all 0.2s ease-in; - list-style: none; - opacity: 0; - pointer-events: none; - -webkit-box-shadow: 0 0 10px 1px @light-gray; - box-shadow: 0 0 10px 1px @light-gray; - li { - &.divider { - padding: 2px 0; - background: @light-gray; - } - a { - background-color: #fff ; - display: block; - padding: 0 10px; - text-decoration: none; - box-shadow: inset 0 1px 0 rgba(255,255,255,1); - transition: all 0.3s ease-out; - } - i { - float: right; - color: inherit; - } - } - &:after { - content: ""; - width: 0; - height: 0; - position: absolute; - bottom: 100%; - margin-left: 5px; - border-width: 0 6px 6px 6px; - border-style: solid; - border-color: #fff transparent; - - } - &.active { - opacity: 1; - pointer-events: auto; - } - } -} -/* active menu */ - -.wrap-dd-menu { - .dropdown { - z-index: 10; - li:hover a { - background: #f3f8f8; - } - } - &.active { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - .inset-shadow-active; - .dropdown { - opacity: 1; - pointer-events: auto; - } - } -} - -.offline-block { - position: fixed; - border-top: 4px solid #ff0000; - border-bottom: 4px solid #ff0000; - color: #ff0000; - height: 60px; - width: 100%; - background: #ffffff; - top: 0px; - font-size: 25px; - text-align: center; - line-height: 60px; - z-index: 2000; - input { - vertical-align: middle; - .button-stylisation; - } -} - -.header { - &.offlineMode { - margin-top: 68px; - } - height: 60px; - line-height: 60px; - background: @header-bg; - min-width: 1300px; - div.home { - margin: 0 auto; - width: 940px; - .logo { - display: block; - float: left; - margin-right: 55px; - cursor: pointer; - img { - float: left; - margin: 15px 0; - } - h1 { - float: left; - margin-left: 15px; - font-family: NokiaPureTextLight; - color: #ffffff; - span { - font-family: NokiaPureTextBold; - } - } - } - .main-menu { - display: block; - float: left; - a { - color: #fff; - margin-right: 25px; - font-family: NokiaPureTextLight; - position: relative; - &.active { - font-family: NokiaPureTextBold; - &:after { - content: ''; - position: absolute; - left: 32%; - top: 33px; - width: 0; - height: 0; - border-left: 8px solid transparent; - border-right: 8px solid transparent; - border-bottom: 8px solid #ffffff; - } - } - - li { - color: #fff; - display: inline-block; - } - } - } - .user-menu { - display: block; - float: right; - - .version { - display: inline-block; - float: left; - margin: 20px; - min-width: 50px; - padding: 0 10px; - background-color: white; - border-radius: 10px ; - line-height: 20px; - text-align: center; - color: rgb(36, 104, 160); - } - - div.wrap-dd-menu .dropdown { - top: 50px; - } - div.wrap-dd-menu > a { - color: #fff; - font-family: NokiaPureTextBold; - cursor: pointer; - display: inline-block; - max-width: 130px; - position: relative; - padding-right: 15px ; - .long-text; - .sort-arrow(0, 48%, 10px, #fff); - } - } - } -} - -.d3-tip { - z-index: 2000; -} - -.notifications { - position: absolute; - left: 0; - max-width: 150px; - z-index: 100; - margin: 30px 0; - .event { - .notice - } - .red { - .notice(rgba(233, 140, 133, 0.8), rgba(185, 48, 38, 1), rgba(139, 36, 38, 1)) - } - &.fixed { - position: fixed; - margin: 0; - top: 0; - } -} - -.timeSelectorDirective { - background: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} - -.timeSelectorDirective .increase, .timeSelectorDirective .decrease { - text-align: center; - vertical-align: middle; - color: rgb(112, 112, 112); - text-shadow: 0px 1px #FFF; - cursor: pointer; - -webkit-transition: 500ms ease-out all; - -moz-transition: 500ms ease-out all; - -ms-transition: 500ms ease-out all; - -o-transition: 500ms ease-out all; - transition: 500ms ease-out all; - font-size: 100%; - border: 1px solid #CCC; - padding: 3px; - margin: 3px; - border: 1px solid #EDE; -} - -.timeSelectorDirective .increase:hover, .timeSelectorDirective .decrease:hover { - color: rgba(112, 112, 112, 0.5); - border-color: #CCC; - background-color: #FFF; -} - -.timeSelectorDirective .increase:active, .timeSelectorDirective .decrease:active { - color: rgb(112, 112, 112); - box-shadow: inset 1px 1px 1px #DDD; -} - -.timeSelectorDirective .section { - display: inline-block; -} - -.timeSelectorDirective .display { - background-color: rgb(247, 247, 247); - color: #555555; - padding: 5px; - margin: 0px 3px; - min-width: 30px; - text-align: center; - border: 1px solid #DDD; - box-shadow: 1px 1px 1px #FFFFFF; -} - -.content { - margin: 40px auto; - position: relative; - width: 1000px; - .survey-panel { - .function-bar { - position: relative; - .title { - width: 200px; - position: absolute; - margin-left: 45px; - font-family: ProximaNovaTextSemibold; - font-size: 25px; - } - input[type="button"].upload { - margin-left: 10px; - } - input[type="file"] { - margin-left: 9px; - .tooltip(106px, 50px); - opacity: 0; - position: absolute; - - &:active ~ input[type="button"].upload { - .inset-shadow-active; - } - } - input.browse-archive { - float: left; - margin-right: 10px; - .tooltip(411px, 50px); - } - .wrap-dd-select{ - width: 165px; - margin-right: 10px; - } - - } - .list-box { - .item { - ul.data { - width: 420px; - } - .circle { - margin: 12px 20px 12px 0; - float: left; - .circle; - } - .name { - width: 480px; - } - .options { - input.edit, - input.archive { - float: left; - margin-right: 10px; - } - .button-group { - float: right; - } - } - - &:hover { - .name { - width: 255px - } - } - } - } - - } - .groups-panel { - width: 300px; - float: left; - .groups-list { - .item { - padding: 10px 20px; - height: 35px; - line-height: 35px; - border-bottom: 1px solid @light-gray; - list-style: none; - position: relative; - &.user-added { - &:after { - font-size: 13px; - content: '\2714'; - position: absolute; - width: 20px; - height: 20px; - right: 20px; - top: 17px; - border-radius: 14px; - line-height: 21px; - text-align: center; - color: rgb(255, 255, 255); - background-color: rgb(124, 180, 50); - } - } - - &.new-group { - input { - .field-stylisation(13px, 238px); - .tooltip-down(20px, -23px, 240px); - } - border-bottom: none; - } - .button-group { - float:right; - display: none; - .sms + span { - width: 160px; - } - input { - .tooltip(-75px, 50px, 200px); - } - } - h3 { - display: inline-block; - width: 260px; - color: #000000; - font-family: NokiaPureText; - .long-text; - } - &:hover { - h3 { - width: 165px; - } - .button-group { - float: right; - display: block; - } - } - &.droppable-hover { - border: 3px dotted rgba(124, 180, 50, 1); - padding: 7px 17px; - &.active { - border: 3px dotted #ffffff; - } - } - &.active { - background-color: rgba(13, 117, 203, 0.7); - h3 { - color: #ffffff; - } - } - } - } - } - .users-panel { - width: 620px; - float: right; - .search-field { - float: right; - } - .list-box { - & > li { - height: 35px; - position: relative; - .name { - width: 430px; - } - .options { - input.details { - float: left; - margin-right: 10px; - .button-icon; - } - } - &:hover { - .name { - width: 250px; - }; - .options{ - display: inline-block; - }; - &:before { - content: ''; - position: absolute; - width: 2px; - height: 38px; - border: 2px dotted rgb(159, 159, 159); - left: 5px; - top: 6px; - } - } - &:nth-of-type(even) { - &.item { - background: @even-surveys-bg; - } - } - &:nth-of-type(odd) { - &.item { - background: #fff; - } - } - .user-details { - padding: 10px 20px; - line-height: 35px; - height: 35px; - background-color: rgba(246, 250, 253, 1); - border-bottom: 1px solid @light-gray; - p { - display: inline-block; - width: 250px; - margin-right: 20px; - font-family: NokiaPureTextBold; - font-size: 15px; - .long-text; - span { - margin: 0 5px; - max-width: 165px; - display: inline-block; - font-family: NokiaPureTextLight; - } - } - } - &.show-details { - position: relative; - height: 110px; - padding: 0; - .name{ - width: 250px; - } - .options { - display: inline-block; - } - input.details { - background-color: rgba(240, 240, 240, 1); - box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -o-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1); - } - & > div { - padding: 10px 20px; - height: 35px; - } - } - &.ui-sortable-helper { - opacity: 0.9; - } - } - - - } - } - .result-panel { - width: 610px; - float: left; - .function-bar { - position: relative; - .wrap-dd-menu { - .tooltip(41px, 50px, 260px); - .dropdown { - li:first-of-type a { - color: @gray; - &:hover { - background-color: #ffffff; - cursor: auto; - } - } - } - } - - .button-group { - float: left; - margin-right: 10px; - .map { - .tooltip(-117px, 50px, 285px) - } - .chart { - .tooltip(-123px, 50px, 295px) - } - } - .button-icon { - margin-right: 6px; - &.delete { - .tooltip(130px, 50px, 210px) - } - } - .search-field { - float: right; - } - - } - .column-header { - padding-left: 12px; - input[type="checkbox"] { - width: 16px; - height: 16px; - float: left; - margin-right: 10px; - } - } - .list-box { - height: auto; - .item { - padding-left: 12px; - .title { - width: 200px; - float: left; - display: inline-block; - margin-right: 10px; - h4 { - font-family: NokiaPureText; - font-size: 1em; - line-height: 35px; - .long-text; - } - } - input[type="checkbox"] { - margin-right: 10px; - margin-top: 12px; - display: inline-block; - float: left; - } - .data { - width: 310px; - .gps { - width: 20px; - height: 20px; - padding: 0; - margin: 5px 10px 0 10px; - -webkit-mask-image: url(../icons/cross-20px.png); - background-color: @gray; - &.ok { - background-color: @green; - -webkit-mask-image: url(../icons/tick-20px.png); - } - } - } - } - } - } - .map-panel { - float: left; - width: 610px; - height: 610px; - margin-bottom: 100px; - .search-field { - position: absolute; - z-index: 200; - margin-top: 15px; - margin-left: 180px; - } - .close-window { - position: absolute; - z-index: 200; - margin-left: 570px; - margin-top: 20px; - color: rgb(156, 156, 156); - text-align: center; - width: 21px; - height: 21px; - border: 2px solid rgb(156, 156, 156); - border-radius: 14px; - display: inline-block; - line-height: 21px; - font-size: 18px; - cursor: pointer; - } - #mapContainer { - width: 100%; - height: 100%; - .nm_bubble_content { - font-size: 12px; - a { - color: black; - } - } - } - } - .map-details { - .detail-panel { - height: 588px; - overflow-y: auto; - overflow-x: hidden; - } - } - .detail-panel { - float: right; - width: 308px; - padding: 10px; - border: 1px solid @light-gray; - table { - &.detail-panel-table { - border: 1px solid @light-gray; - border-collapse:collapse; - width: 308px; - max-height: 36px; - font-family: NokiaPureText; - font-size: 0.8em; - tr { - border: 1px solid @light-gray; - td { - border: 1px solid @light-gray; - padding:8px 10px; - &:first-of-type{ - background-color: rgba(235, 235, 235, 1); - font-family: NokiaPureTextBold; - - } - } - } - } - } - - li { - list-style-type: none; - font-family: NokiaPureText; - font-size: 17px; - } - li.cat-results { - border-bottom: 1px solid @light-gray; - padding: 20px 0; - word-wrap: break-word; - } - ul { - padding: 10px; - ul { - padding: 20px 0; - margin-bottom: 20px; - } - } - .cat-name { - font-size: 19px; - text-decoration: underline; - } - .answer { - margin: 10px 0; - color: rgba(74, 152, 216, 1); - font-family: NokiaPureTextBold; - } - .image-answer { - max-width: 100% - } - } - .topic { - margin-bottom: 30px; - input { - float: right; - .button-stylisation; - } - .schedule-export { - padding: 0 10px; - } - h1 { - font-size: 1.5em; - span{ - font-style: italic; - } - } - p { - color: @gray; - display: inline-block; - a { - color: @green; - cursor: pointer; - text-decoration: underline; - } - } - } - - .survey-title { - display: inline-block; - width: 100%; - h1 { - font-size: 1.5em; - display: inline-block; - float: left; - margin-right: 10px; - max-width: 600px; - .long-text; - } - .edit-title { - input[type="text"] { - .field-stylisation; - } - .edit-button { - position: relative; - display: inline-block; - float: left; - width: 43px; - height: 35px; - .edit { - .tooltip(-85px, 40px, 220px) - } - } - } - .save-survey { - float: right; - height: 40px; - background-image: url(../icons/circle-tick-22px.png); - background-position: 8px center; - background-repeat: no-repeat; - cursor: pointer; - padding: 0 10px 0 35px; - .button-stylisation(40px); - } - } - - .builder { - input.button-icon.single.save:disabled { - opacity: 1; - } - - li[class $= item] { - list-style-type: none; - font-family: NokiaPureText; - font-size: 17px; - } - - input[type="text"], - textarea { - margin-right: 10px; - .field-stylisation(13px, 174px); - } - - .options { - display: inline-block; - height: 35px; - position: relative; - .edit { - margin-right: 10px; - display: inline-block; - .tooltip(-50px, 50px) - } - .button-group { - display: inline; - } - } - - ol.category-box { - list-style: none; - counter-reset: list1; - position: relative; - .add-category { - margin: 0 50% 10px 50%; - position: relative; - left: -90px; - .button-plus - } - li.category-item { - margin-bottom: 10px; - .category-header { - background-color: rgba(235, 235, 235, 1); - padding: 10px; - height: 35px; - position: relative; - .open-arrow(25px, 6px, 40%, 37%); - .category-title{ - width: 340px; - display: inline-block; - float: left; - position: relative; - height: 34px; - input[type="text"] { - display: inline-block; - width: 220px; - float: left; - } - h2 { - width: 240px; - height: 35px; - line-height: 35px; - .long-text; - } - &:before { - counter-increment: list1; - list-style-position: inside; - content: "(" counter(list1) ")"; - font-size: 19px; - float: left; - line-height: 35px; - margin: 0 10px 0 30px; - } - } - .options { - display: none; - .edit { - .tooltip(-85px, 40px, 220px); - } - } - &:hover { - h2 { - width: 240px; - } - .options { - display: inline-block; - } - &.category-header.close:before { - content: ''; - position: absolute; - width: 2px; - height: 55%; - border: 2px dotted #9f9f9f; - left: 10px; - } - } - } - ol.questions-box { - list-style: none; - padding: 10px; - counter-reset: list2; - background-color: rgba(247, 247, 247, 1); - .question-item { - background-color: #ffffff; - margin-bottom: 10px; - position: relative; - label { - color: rgba(119, 119, 119, 0.94); - font-family: NokiaPureTextLight; - margin-right: 10px; - } - .question-header { - padding: 10px 20px; - height: 35px; - border-bottom: 2px solid rgba(247, 247, 247, 1); - position: relative; - .open-arrow(25px, 6px, 40%, 37%); - .question-title { - position: relative; - display: inline-block; - float: left; - height: 34px; - h3 { - width: 460px; - height: 100%; - line-height: 35px; - .long-text; - } - input[type="text"] { - width: 288px; - } - &:before { - float: left; - line-height: 35px; - counter-increment: list2; - margin-right: 10px; - margin-left: 20px; - content:"(" counter(list1) "." counter(list2) ") "; - } - } - .right { - height: 35px; - line-height: 35px; - } - .right > div, label { - display: inline-block; - margin-left: 10px; - } - .options { - display: none; - .edit { - .tooltip(-85px, 40px, 220px); - } - } - - &:hover { - h3 { - width: 315px; - } - .options { - display: inline-block; - }; - &.question-header.close:before { - content: ''; - position: absolute; - width: 2px; - height: 55%; - border: 2px dotted #9f9f9f; - left: 10px; - } - } - - } - .question-body { - margin: 10px; - padding: 20px; - h5 { - font-family: NokiaPureTextBold; - font-size: 0.8em; - } - .question-constr { - padding-bottom: 30px; - overflow: hidden; - .default-question { - margin-bottom: 10px; - input { - margin: 10px 10px 10px 0; - width: 430px; - } - } - .default-date { - margin-bottom: 25px; - } - .del-option { - .tooltip(166px, 250px); - .button-icon; - .single; - height: 24px; - width: 24px; - position: relative; - top: 5px; - } - .note-question textarea { - width: 890px; - height: 100px; - margin: 10px 10px 10px 0; - border-radius: 5px; - border: 1px solid rgba(196,196,196,1); - background-color: rgba(248, 248, 248, 1); - resize: none; - } - .small-field,.words-length { - &.date { - width: 258px; - } - width: 220px; - display: inline-block; - h5 { - display: inline-block; - } - } - .words-length { - input[type="text"] { - width: 60px; - margin: 5px 10px 10px 0; - } - &.disabled { - opacity: 0.3; - } - } - .select-question { - position: relative; - [type="checkbox"], [type="radio"] { - width: 16px; - height: 16px; - } - .rules{ - position: relative; - input[type="button"] { - .button-stylisation; - font-family: NokiaPureText; - font-size: 13px; - padding: 0 10px; - - } - input[type="file"] { - height: 35px; - width: 163px; - position: absolute; - opacity: 0; - cursor: pointer; - z-index: 1; - &:active + input[type="button"] { - .inset-shadow-active; - } - } - input.cascade { - display: block; - margin-bottom: 10px; - width: 155px; - } - } - .variants { - padding: 35px 0; - display: block; - & > li { - list-style: none; - min-width: 30%; - position: relative; - label { - max-width: 77%; - min-width: 30%; - position: relative; - .long-text; - } - input[type="text"] { - .tooltip-down(0, -32px, 196px); - } - .edit-variants { - visibility: hidden; - li { - list-style: none; - display: inline-block; - height: 18px; - width: 18px; - border-radius: 5px; - border: 2px solid @gray; - &.edit-variant { - background-color: @gray; - -webkit-mask-image: url(../icons/edit-20px.png); - } - &.delete-variant { - background-color: @gray; - -webkit-mask-image: url(../icons/delete-20px.png); - } - &:hover { - cursor: pointer; - background-color: @green; - } - } - } - &:hover .edit-variants { - visibility: visible; - } - } - } - } - .cascade { - white-space: nowrap; - width: 100%; - height: auto; - overflow-x: auto; - padding-bottom: 30px; - position: relative; - .select-question { - display: inline-block; - width: 260px; - float: left; - .variants label { - color: #000000; - span { - padding: 0 5px; - &.selected { - background-color: #dbeaf7; - border-radius: 3px; - } - } - - } - } - [cascade-question] { - display: inline-block; - } - } - } - .error-message { - color: #b93026; - font-size: 15px; - font-family: NokiaPureTextBold; - padding-left: 20px; - margin-top: 15px; - margin-bottom: 15px; - background-image: url(../icons/alert.png); - background-repeat: no-repeat; - } - .skip-logic, - .mask-input { - border-top: 2px solid rgba(247, 247, 247, 1); - border-bottom: 2px solid rgba(247, 247, 247, 1); - .skip-logic-header, - .mask-input-header { - padding: 20px; - h5 { - position: relative; - .open-arrow(136px); - - &.close:after { - top: 23%; - } - } - } - .mask-input-header h5 { - .open-arrow(80px); - } - .mask-input-body.mask { - margin-left: 30px; - margin-bottom: 10px; - input { - margin: 10px 10px 10px 0; - width: 430px; - } - - } - .skip-logic-body { - padding: 0 20px 20px 20px; - .error-message { - color: #b93026; - font-size: 15px; - font-family: NokiaPureTextBold; - padding-left: 20px; - margin-bottom: 20px; - margin-left: 20px; - display: inline-block; - background-image: url(../icons/alert.png); - background-repeat: no-repeat; - } - - .logic-option { - padding: 10px 20px; - background-color: rgba(244, 248, 251, 1); - margin-bottom: 10px; - height: 35px; - span { - font-family: NokiaPureTextBold; - margin-right: 5px; - } - div { - .select-stylisation; - opacity: 1; - margin: 0 10px 0 0; - width: 268px; - display: inline-block; - span.selected { - width: 250px; - display: inline-block; - .long-text; - } - } - &.default{ - line-height: 35px; - div { - width: 400px; - span.selected { - width: 380px; - display: inline-block; - .long-text; - } - } - } - label { - line-height: 35px; - display: inline-block; - color: #000000; - } - &.error { - background-color: #b93026; - label, - span.default { - color: #ffffff; - } - } - .del-option { - display: inline-block; - float: right; - .button-icon; - .single; - height: 24px; - width: 24px; - margin:5px 0 ; - } - &.int { - div.option-select { - width: 110px; - span.selected { - width: 100px; - } - } - div.question-select { - width: 245px; - span.selected { - width: 240px; - } - } - input.first, - input.second { - text-align: center; - width: 50px; - height: 15px; - } - } - } - .add-option { - .button-plus; - } - } - } - .question-footer { - padding: 20px; - input { - .button-stylisation; - padding: 0 20px; - font-size: 15px; - } - } - } - } - } - } - } - } -} - -.modal { - .overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 1000; - background: rgba(0, 0, 0,0.8); - transition: all 0.3s; - } - .window { - position: absolute; - top: -70px; - left: 50%; - margin-left: -225px; - width: 450px; - background-color: rgba(255,255,255,1); - height: auto; - z-index: 2000; - &.results-chart { - width: 700px; - margin-left: -350px; - .window-header h2 { - width: 620px; - } - } - &.success-registration { - top: 100px; - .window-body { - input { - margin-left: 45%; - .button-stylisation; - } - padding: 20px; - } - } - .window-header { - background-color: rgba(235,235,235,1); - padding: 20px; - height: 25px; - h2 { - width: 380px; - font-family: NokiaPureTextBold; - font-size: 19px; - display: inline-block; - text-align: center; - } - .close-window { - color: rgb(156, 156, 156); - text-align: center; - width: 21px; - height: 21px; - border: 2px solid rgb(156, 156, 156); - border-radius: 14px; - display: inline-block; - line-height: 21px; - float: right; - font-size: 18px; - cursor: pointer; - } - } - .window-body { - position: relative; - .sync { - padding: 20px; - font-family: NokiaPureTextBold; - font-size: 15px; - ul { - list-style: none; - font-family: NokiaPureText; - padding: 10px; - li { - display: block; - div { - display: inline-block; - &.id { - width: 190px; - float: left; - } - &.title { - width: 180px; - margin-left: 20px; - .long-text; - } - } - } - } - div.status { - margin-bottom: 10px; - } - input { - .button-stylisation; - margin-left: 43%; - } - } - #sms-form { - padding: 20px; - overflow: hidden; - label { - display: block; - font-family: NokiaPureTextBold; - font-size: 15px; - } - textarea { - width: 388px; - height: 180px; - border-radius: 5px; - padding: 5px 10px; - border: 1px solid rgba(196,196,196,1); - background-color: rgba(248, 248, 248, 1); - font-family: NokiaPureTextLight; - font-size: 15px; - margin: 10px 0; - resize: none; - } - input { - overflow: hidden; - float: right; - .button-stylisation; - } - } - #add-user-form, - #edit-user-form, - #export-schedule { - padding: 0 20px; - label { - font-size: 14px; - font-family: NokiaPureTextBold ; - margin-bottom: 5px; - } - .small-field { - width: 190px; - height: 60px; - display: inline-block; - margin-bottom: 20px; - &:nth-of-type(even){ - margin-left: 20px; - } - - input { - .field-stylisation(13px, 173px); - } - input[name="phone"]:not(.ng-invalid-required) { - background-image: url(../icons/plus-gray-16px.png); - background-position: 6px center; - background-repeat: no-repeat; - background-size: 12px; - padding-left: 20px; - width: 165px; - } - } - .long-field { - input { - .field-stylisation(13px, 388px); - } - .error-message { - width: 401px; - } - } - .small-field .error-message { - width: 255px; - } - .small-field .error-message[ng-show="errorPassword"] { - width: 300px; - } - .user-info { - min-height: 220px; - padding: 20px 0 30px 0; - border-bottom: 1px solid rgba(196,196,196,1); - } - .export-schedule { - min-height: 220px; - padding: 20px 0 30px 0; - } - select { - width: 193px; - .select-stylisation; - } - .user-pass { - padding: 20px 0 10px 0; - border-bottom: 1px solid rgba(196,196,196,1); - margin-bottom: 10px; - } - .save-changes { - float: right; - height: 40px; - background-image: url(../icons/circle-tick-22px.png); - background-position: 8px center; - background-repeat: no-repeat; - cursor: pointer; - padding: 0 10px 0 35px; - margin-bottom: 30px; - .button-stylisation(40px); - } - - div.small-field:nth-of-type(odd) { - .error-message { - padding-left: 20px; - } - } - div.small-field:nth-of-type(even) { - .error-message { - padding-right: 20px; - } - } - .error-message { - color: #b93026; - font-size: 15px; - display: inline-block; - } - .info-msg { - font-size: 14px; - font-family: NokiaPureText; - color: rgba(134,134,134,1); - margin-bottom: 30px; - } - } - #export-schedule { - p { - padding: 20px 0px; - } - .select-field { - cursor: pointer; - background-repeat: no-repeat; - background-image: url(../icons/select-icon.png); - background-position: right; - } - - .export-schedule-button { - margin-bottom: 30px; - margin-top: 30px; - float: right; - .button-stylisation; - } - - .actual-subscriptions { - width: 100%; - padding: 0; - p { - text-align: center; - } - } - - li { - font-family: NokiaPureText; - font-size: 16px; - list-style: none; - div { - display: inline-block; - } - .email { - float: left; - width: 200px; - cursor: alias; - .long-text; - } - .from { - width: 90px; - } - .to { - width: 90px; - } - - .delete-subscription { - color: rgb(156, 156, 156); - display: inline-block; - line-height: 24px; - float: right; - font-size: 18px; - cursor: pointer; - } - } - } - #send-survey-form { - position: relative; - .all, .groups-list { - h4 { - line-height: 25px; - label { - position: relative; - max-width: 370px; - display: inline-block; - .long-text; - &:not(.void) { - padding-left: 15px; - .open-arrow(0, 6px); - } - } - input { - width: 15px; - height: 19px; - float: left; - margin-right: 5px; - } - } - padding: 20px; - border-bottom: 1px solid @light-gray; - li { - margin-left: 25px; - list-style: none; - line-height: 25px; - max-height: 25px; - .long-text; - } - } - .send-survey { - background-image: url(../icons/send-green-20px.png); - background-position: 8px center; - background-repeat: no-repeat; - cursor: pointer; - padding: 0 10px 0 35px; - margin: 20px 33% 20px 33%; - .button-stylisation(40px); - } - } - .sent-to-user { - padding: 20px; - overflow: auto; - height: 450px; - li { - list-style: none; - font-family: NokiaPureText; - font-size: 15px; - line-height: 35px; - .long-text; - } - } - .results-chart { - padding: 0; - overflow: auto; - height: 450px; - li { - list-style: none; - font-family: NokiaPureText; - line-height: 30px; - padding: 20px; - border-bottom: 1px solid @light-gray; - - label { - float: left; - position: relative; - font-size: 16px; - max-width: 380px; - display: inline-block; - .long-text; - - &:not(.void) { - padding-left: 16px; - .open-arrow(0, 6px); - } - } - - .bar-icon, - .pie-icon { - margin-left: 5px; - position: inherit; - display: inline-block; - height: 30px; - width: 30px; - background-repeat: no-repeat; - } - - .bar-icon { - background-image: url(../icons/chart-bar.png); - } - - .pie-icon { - background-image: url(../icons/chart-pie.png); - } - - .chart-image { - height: 330px; - width: 550px; - margin-left: 30px; - display: block; - - text { - font-family: NokiaPureText; - } - - .slice path { - stroke: #fff; - stroke-width: 2px; - } - - .axis path { - fill: none; - stroke: @light-gray; - shape-rendering: crispEdges; - } - - .axis text { - line-height: 45px; - } - - .bar { - fill: #4a98d8; - } - } - } - } - } - } -} - diff --git a/web/services/groupsManager.js b/web/services/groupsManager.js deleted file mode 100644 index c8b5e45..0000000 --- a/web/services/groupsManager.js +++ /dev/null @@ -1,44 +0,0 @@ -define(function () { - 'use strict'; - return function ($q, $http) { - /** @const */ - var GROUPS_URL = '/groups/'; - - function groupList () { - return $http.get(GROUPS_URL) - .success(function (result) { - }); - } - function groupData (groupId) { - var group_url = GROUPS_URL + groupId; - return $http.get(group_url) - .success(function (result) { - }); - } - function createGroup (groupName) { - return $http.post(GROUPS_URL, { name: groupName }) - .success(function (result) { - }); - } - function updateGroup (groupId, groupData) { - var group_url = GROUPS_URL + groupId; - return $http.put(group_url, groupData) - .success(function (result) { - }); - } - function deleteGroup (groupId) { - var delete_group_url = GROUPS_URL + groupId; - return $http.delete(delete_group_url) - .success(function (result) { - }); - } - - return { - groupList: groupList, - groupData: groupData, - createGroup: createGroup, - updateGroup: updateGroup, - deleteGroup: deleteGroup - }; - }; -}); diff --git a/web/services/offlineManager.js b/web/services/offlineManager.js deleted file mode 100644 index bad8b22..0000000 --- a/web/services/offlineManager.js +++ /dev/null @@ -1,122 +0,0 @@ -define(function () { - 'use strict'; - return function ($q, $http, $rootScope) { - var db; - - try { - db = openDatabase('ndg', '1.0', 'NDG', 2 * 1024 * 1024); - - db.transaction(function (tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS requests (id INTEGER PRIMARY KEY AUTOINCREMENT, _id TEXT, type TEXT, body TEXT)'); - }); - } catch (e) { - $rootScope.offlineNotSupport = true; - } - - - function saveRequest (type, body, id) { - var - deferred = $q.defer(); - - if ($rootScope.offlineNotSupport) { - return $q.reject({ error: "Your browser does not support webSQL. Please use Google Chrome browser to work in the offline mode."}); - } - - var ids = localStorage.getItem('survey_ids') ? localStorage.getItem('survey_ids').split(',') : [], - - updateLocalStorage = function (type, body, id) { - if (type == "editSurvey") { - localStorage.setItem(body.id, JSON.stringify(body)); - } - - if (type == "createSurvey") { - body.id = id; - body.resultsCount = 0; - body.published = false; - body.dateCreated = new Date().toISOString(); - body._creator = $rootScope.loggedInUser; - body.__v = 0; - - ids.push(id); - - localStorage.setItem(id, JSON.stringify(body)); - localStorage.setItem('survey_ids', ids); - } - - if (type == "deleteSurvey") { - var index = ids.indexOf(body.id); - - ids.splice(index, 1); - - localStorage.removeItem(body.id); - localStorage.setItem('survey_ids', ids); - } - - deferred.resolve({ data: { id: id } }); - }; - - db.transaction(function (tx) { - tx.executeSql("UPDATE requests SET body = ?, type = ? WHERE _id LIKE ? AND type <> 'createSurvey'", [JSON.stringify(body), type, id], - function (tx, results) { - - if (results.rowsAffected === 0) { - tx.executeSql('INSERT INTO requests (_id, body, type) VALUES (?, ?, ?)', [id, JSON.stringify(body), type], - function (tx, results) { - updateLocalStorage(type, body, id ? id : results.insertId); - }, - function (transaction, error) { - console.log('transaction error1: ', error.message); - }); - } else { - updateLocalStorage(type, body, id); - } - }, - function (transaction, error) { - console.log('transaction error2: ', error.message); - }); - }); - - return deferred.promise; - } - - function getSurveys () { - var - deferred = $q.defer(), - surveys = [], - ids = localStorage.getItem('survey_ids') ? localStorage.getItem('survey_ids').split(',') : []; - - _.each(ids, function (id) { - surveys.push(JSON.parse(localStorage.getItem(id))); - }); - - deferred.resolve({ data: surveys }); - return deferred.promise; - } - - function getSurveyInfo (id) { - var deferred = $q.defer(); - - deferred.resolve({ data: JSON.parse(localStorage.getItem(id)) }); - - return deferred.promise; - } - - function saveSurveys (surveys) { - var ids = []; - - _.each(surveys, function (survey) { - localStorage.setItem(survey.id, JSON.stringify(survey)); - ids.push(survey.id); - }); - - localStorage.setItem('survey_ids', ids); - } - - return { - saveRequest: saveRequest, - saveSurveys: saveSurveys, - getSurveys: getSurveys, - getSurveyInfo: getSurveyInfo - }; - }; -}); diff --git a/web/services/resultsManager.js b/web/services/resultsManager.js deleted file mode 100644 index d209d75..0000000 --- a/web/services/resultsManager.js +++ /dev/null @@ -1,39 +0,0 @@ -define(function () { - 'use strict'; - return function ($q, $http) { - /** @const */ - var - RESULT_URL = '/results/', - SURVEY_URL = '/surveys/'; - - function resultList (surveyId) { - var result_list_url = SURVEY_URL + surveyId + RESULT_URL; - - return $http.get(result_list_url) - .success(function (result) { - }); - } - - function resultDetails (surveyId, resultId) { - var result_details_url = SURVEY_URL + surveyId + RESULT_URL + resultId; - - return $http.get(result_details_url) - .success(function (result) { - }); - } - - function deleteResult (surveyId, resultId) { - var result_delete_url = SURVEY_URL + surveyId + RESULT_URL + resultId; - - return $http.delete(result_delete_url) - .success(function (result) { - }); - } - - return { - resultList: resultList, - deleteResult: deleteResult, - resultDetails: resultDetails - }; - }; -}); diff --git a/web/services/services.js b/web/services/services.js deleted file mode 100644 index 0fcf98f..0000000 --- a/web/services/services.js +++ /dev/null @@ -1,66 +0,0 @@ -define([ - 'services/autocompleteManager', - - 'services/chartManager', - 'services/profileManager', - 'services/groupsManager', - 'services/usersManager', - 'services/resultsManager', - 'services/smsManager', - 'services/subscriptionManager', - 'services/surveysManager', - - 'services/errorsManager', - 'services/validateManager', - 'services/offlineManager', - 'services/syncManager' - -], function ( - autocompleteManager, - - chartManager, - profileManager, - groupsManager, - usersManager, - resultsManager, - smsManager, - subscriptionManager, - surveysManager, - - errorsManager, - validateManager, - offlineManager, - syncManager - ) { - 'use strict'; - - var services = { - autocompleteManager: autocompleteManager, - - chartManager: chartManager, - profileManager: profileManager, - groupsManager: groupsManager, - usersManager: usersManager, - resultsManager: resultsManager, - smsManager: smsManager, - subscriptionManager: subscriptionManager, - surveysManager: surveysManager, - - errorsManager: errorsManager, - validateManager: validateManager, - offlineManager: offlineManager, - syncManager: syncManager - }, - - initialize = function (angModule) { - for (var name in services) { - if (services.hasOwnProperty(name)) { - angModule.factory(name, services[name]); - } - } - }; - - return { - initialize: initialize - }; -}); diff --git a/web/services/surveysManager.js b/web/services/surveysManager.js deleted file mode 100644 index f8835ed..0000000 --- a/web/services/surveysManager.js +++ /dev/null @@ -1,185 +0,0 @@ -define(function () { - - 'use strict'; - return function ($q, $http, $rootScope, offlineManager) { - /** @const */ - var - SURVEYS_URL = '/surveys/', - SURVEY_SEND_URL = '/sendSurvey/', - SURVEY_DUPLICATE_URL = '/duplicate/', - SURVEY_ARCHIVE_URL = '/archive/', - XML_URL = '/xml'; - - function surveyList (archive) { - if (archive) { - return $http.get(SURVEYS_URL + '?archive=true') - .success(function (result) { - }); - } - - if ($rootScope.offlineMode) { - return offlineManager.getSurveys(); - } - - return $http.get(SURVEYS_URL).then(function (result) { - var deferred = $q.defer(); - - if ($rootScope.offlineMode) { - return offlineManager.getSurveys(); - } else { - offlineManager.saveSurveys(result.data); - deferred.resolve(result); - return deferred.promise; - } - }); - } - - function surveyInfo (surveyId) { - if ($rootScope.offlineMode) { - return offlineManager.getSurveyInfo(surveyId); - } - - return $http.get(SURVEYS_URL + surveyId).then(function (result) { - var deferred = $q.defer(); - - if ($rootScope.offlineMode) { - return offlineManager.getSurveyInfo(surveyId); - } else { - deferred.resolve(result); - return deferred.promise; - } - }); - } - - function sendSurvey (surveyId, users) { - var survey_send_url = SURVEY_SEND_URL + surveyId; - return $http.post(survey_send_url, users) - .success(function (result) { - }); - } - - function deleteSurvey (data) { - var - surveyId = data.id, - delete_survey_url = SURVEYS_URL + surveyId; - - if ($rootScope.offlineMode) { - return offlineManager.saveRequest('deleteSurvey', { id: surveyId }, surveyId); - } - - return $http.delete(delete_survey_url).then(function (result) { - var deferred = $q.defer(); - - if ($rootScope.offlineMode) { - return offlineManager.saveRequest('deleteSurvey', { id: surveyId }, surveyId); - } else { - deferred.resolve(result); - return deferred.promise; - } - }); - } - - function duplicateSurvey (surveyId) { - var duplicate_survey_url = SURVEY_DUPLICATE_URL + surveyId; - return $http.post(duplicate_survey_url) - .success(function (result) { - }); - } - - function editSurvey (data) { - var - surveyId = data.id, - surveyData = data.body, - edit_survey_url = SURVEYS_URL + surveyId; - - if ($rootScope.offlineMode) { - return offlineManager.saveRequest('editSurvey', surveyData, surveyId); - } - - return $http.put(edit_survey_url, surveyData).then(function (result) { - var deferred = $q.defer(); - - if ($rootScope.offlineMode) { - return offlineManager.saveRequest('editSurvey', surveyData, surveyId); - } else { - deferred.resolve(result); - return deferred.promise; - } - }); - } - - function createSurvey (data) { - var surveyData = data.body; - - if ($rootScope.offlineMode) { - return offlineManager.saveRequest('createSurvey', surveyData); - } - - return $http.post(SURVEYS_URL, surveyData).then(function (result) { - var deferred = $q.defer(); - - if ($rootScope.offlineMode) { - return offlineManager.saveRequest('createSurvey', surveyData); - } else { - deferred.resolve(result); - return deferred.promise; - } - }); - } - - function uploadXML (file, cb) { - var data = new FormData(), - xhr = new XMLHttpRequest(); - - xhr.onerror = function (e) { - console.log(e); - }; - - data.append('xml', file); - xhr.open('POST', XML_URL); - xhr.send(data); - xhr.onload = function (res) { - if (res.currentTarget.status === 400) { - cb('error'); - } else { - cb(); - } - }; - } - - function downloadXML (surveyId) { - var downloa_xml_url = XML_URL + '/' + surveyId; - document.location = downloa_xml_url; - } - - function checkFileType (file) { - if (file.type === 'text/xml') { - return true; - } else { - return false; - } - } - - function archiveSurvey (surveyId) { - var archive_survey_url = SURVEY_ARCHIVE_URL + surveyId; - - return $http.post(archive_survey_url) - .success(function (result) { - }); - } - - return { - surveyList: surveyList, - surveyInfo: surveyInfo, - sendSurvey: sendSurvey, - deleteSurvey: deleteSurvey, - duplicateSurvey: duplicateSurvey, - editSurvey: editSurvey, - createSurvey: createSurvey, - uploadXML: uploadXML, - downloadXML: downloadXML, - checkFileType: checkFileType, - archiveSurvey: archiveSurvey - }; - }; -}); diff --git a/web/services/syncManager.js b/web/services/syncManager.js deleted file mode 100644 index 9b50371..0000000 --- a/web/services/syncManager.js +++ /dev/null @@ -1,40 +0,0 @@ -define(function () { - 'use strict'; - return function ($q, $http, $rootScope, surveysManager) { - - var db; - - try { - db = openDatabase('ndg', '1.0', 'NDG', 2 * 1024 * 1024); - } catch (e) { - $rootScope.offlineNotSupport = true; - } - - function sendRequest (request) { - if (request._id && request._id.length < 24) { - request._id = localStorage.getItem(request._id); - } - - return surveysManager[request.type]({ id: request._id, body: request.body }).then(function (result) { - var deferred = $q.defer(); - - if (request.type === 'createSurvey') { - db.transaction(function (tx) { - tx.executeSql("UPDATE requests SET _id = ? WHERE _id LIKE ? ", [result.data.id, request.id], function (tx, results) { - localStorage.setItem(request.id, result.data.id); - deferred.resolve(result); - }, null); - }); - } else { - deferred.resolve(result); - } - - return deferred.promise; - }); - } - - return { - sendRequest: sendRequest - }; - }; -});