Skip to content

Dep updates #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7a8840d
Merge pull request #35 from agoravoting/master
Findeton May 10, 2017
c87f28f
for borda type, question percentage over points
May 11, 2017
f3a05fe
fix over total valid votes percent
May 17, 2017
3d9e20e
grunt build
May 17, 2017
5b58ab2
Merge pull request #36 from agoravoting/desborda2
Findeton May 17, 2017
ad04332
Go next (#97)
edulix Jan 24, 2019
179558b
update config version
edulix Jan 24, 2019
967b149
updating some depencencies and old versions (#98)
edulix Feb 8, 2019
d503efa
merge
edulix Oct 15, 2019
35fb567
updating version config
edulix Oct 16, 2019
4b98b60
Merge branch 'helsi-2' into next
edulix Oct 18, 2019
972b404
updating helsinki theme to improve visibility of booth search box
edulix Oct 30, 2019
f42e2d4
adding email-otp
edulix Dec 18, 2019
81b72b2
building
edulix Dec 18, 2019
c78dee2
fix template
edulix Dec 18, 2019
8ca0481
using underscore contains instead of in keyword
edulix Dec 18, 2019
fa9e86e
update otp help
edulix Dec 18, 2019
2298d46
change email placeholder
edulix Dec 19, 2019
ddeb7ad
fix typo error
edulix Feb 11, 2020
84fce06
starting to use yarn
edulix Feb 13, 2020
0c552a9
bumping version
edulix Feb 13, 2020
f88b4e3
ifinally making nanoscroller import correctly in grunt build
edulix Feb 13, 2020
5bdc49f
moving all dependencies to devDependencies really
edulix Feb 13, 2020
0eade29
update readme to use yarn instead of npm or bower
edulix Feb 13, 2020
1efa4ae
removing dependencies from bower
edulix Feb 13, 2020
1c7f5ab
changing package version
edulix Feb 13, 2020
62a121e
merging with email-otp
edulix Feb 14, 2020
35a3394
making it compile
edulix Feb 14, 2020
cd1976e
compiled
edulix Feb 14, 2020
87ab264
adding missing files
edulix Feb 14, 2020
cb3f07b
using specific version of i18next
edulix Feb 14, 2020
90f6b1e
add missing files from dist and correct link to autofocus lib
edulix Feb 14, 2020
a455d0d
adding autofocus to the build
edulix Feb 14, 2020
5cf2aa7
adding the other autofocus
edulix Feb 14, 2020
d151d63
updating angular cookies
edulix Feb 14, 2020
049e773
updating angular-animate to match angular version
edulix Feb 14, 2020
3e31fae
updating angular-sanitize and angular-resource versions to match angu…
edulix Feb 14, 2020
4a1d6bd
updating ui router to try prevent this issue https://github.com/angul…
edulix Feb 15, 2020
a8cc67a
migrating code to use then instead of success and error functions, b…
edulix Feb 15, 2020
8152d6d
migrating code to use then instead of success and error functions, b…
edulix Feb 15, 2020
1d810ae
testing old version of angular to see if it works
edulix Feb 15, 2020
3265557
remove duplicated angular-bootstrap/ui-bootstrap declarations
edulix Feb 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true

[*]
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bower_components
node_modules
yarn-error.log
.yarnclean
temp
_SpecRunner.html
.DS_Store
Expand Down
167 changes: 105 additions & 62 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
'use strict';

var pkg = require('./package.json');
var AV_CONFIG_VERSION = '17.04';
var AV_CONFIG_VERSION = '20.2.0';

//Using exclusion patterns slows down Grunt significantly
//instead of creating a set of patterns like '**/*.js' and '!**/node_modules/**'
//this method is used to create a set of inclusive patterns for all subdirectories
//skipping node_modules, bower_components, dist, and any .dirs
//skipping node_modules, dist, and any .dirs
//This enables users to create any directory structure they desire.
var createFolderGlobs = function(fileTypePatterns) {
fileTypePatterns = Array.isArray(fileTypePatterns) ? fileTypePatterns : [fileTypePatterns];
var ignore = ['node_modules','bower_components','dist','temp'];
var ignore = ['node_modules','dist','temp'];
var fs = require('fs');
return fs.readdirSync(process.cwd())
.map(function(file){
Expand Down Expand Up @@ -118,12 +118,13 @@ module.exports = function (grunt) {
less: {
production: {
options: {
strictImports: true
},
files: [{
expand: true,
src: ['themes/**/app.less'],
dest: 'temp/',
ext: '.css',
ext: '.css'
}]
}
},
Expand All @@ -145,37 +146,6 @@ module.exports = function (grunt) {
dest: 'temp/templates.js'
}
},
copy: {
main: {
files: [
{src: ['img/**'], dest: 'dist/'},
{src: ['temp_data/**'], dest: 'dist/'},
{src: ['avUi/**/*.less'], dest: 'dist/less/'},
{src: ['themes/**'], dest: 'dist/'},
{
expand: true,
cwd: 'bower_components/bootstrap/fonts/',
src: ['**'],
dest: 'dist/themes/fonts/'
},
{
expand: true,
cwd: 'bower_components/bootstrap/fonts/',
src: ['**'],
dest: 'dist/themes/fonts/'
},
{
expand: true,
cwd: 'bower_components/font-awesome/fonts/',
src: ['**'],
dest: 'dist/fonts/'
}
//{src: ['bower_components/angular-ui-utils/ui-utils-ieshiv.min.js'], dest: 'dist/'},
//{src: ['bower_components/select2/*.png','bower_components/select2/*.gif'], dest:'dist/css/',flatten:true,expand:true},
//{src: ['bower_components/angular-mocks/angular-mocks.js'], dest: 'dist/'}
]
}
},
dom_munger:{
read: {
options: {
Expand All @@ -192,10 +162,10 @@ module.exports = function (grunt) {
options: {
remove: ['script[data-remove!="false"]','link[data-remove!="false"]'],
append: [
{selector:'body',html:'<!--[if lte IE 8]><script src="/libcompat-v17.04.js"></script><![endif]--><!--[if gte IE 9]><script src="/libnocompat-v17.04.js"></script><![endif]--><!--[if !IE]><!--><script src="/libnocompat-v17.04.js"></script><!--<![endif]-->'},
{selector:'body',html:'<!--[if lte IE 8]><script src="/libcompat-v20.2.0.js"></script><![endif]--><!--[if gte IE 9]><script src="/libnocompat-v20.2.0.js"></script><![endif]--><!--[if !IE]><!--><script src="/libnocompat-v20.2.0.js"></script><!--<![endif]-->'},
{selector:'body',html:'<!--All the source code of this program under copyright. Take a look at the license details at https://github.com/agoravoting/agora-core-view/blob/master/README.md -->'},
{selector:'body',html:'<script src="/appCommon-v17.04.js"></script>'},
{selector:'body',html:'<script src="/avPlugins-v17.04.js"></script>'},
{selector:'body',html:'<script src="/appCommon-v20.2.0.js"></script>'},
{selector:'body',html:'<script src="/avPlugins-v20.2.0.js"></script>'},
{selector:'head',html:'<link rel="stylesheet" id="theme" href="/themes/default/app.min.css">'}
]
},
Expand Down Expand Up @@ -225,9 +195,9 @@ module.exports = function (grunt) {
'temp/libnocompat.js': ['<%= dom_munger.data.libnocompatjs %>'],
'temp/lib.js': ['<%= dom_munger.data.libjs %>'],
'temp/app.js': ['<%= dom_munger.data.appjs %>','<%= ngtemplates.main.dest %>'],
'dist/avConfig-v17.04.js': ['avConfig.js'],
'dist/avThemes-v17.04.js': ['avThemes.js'],
'dist/avPlugins-v17.04.js': ['plugins/**/*.js']
'dist/avConfig-v20.2.0.js': ['avConfig.js'],
'dist/avThemes-v20.2.0.js': ['avThemes.js'],
'dist/avPlugins-v20.2.0.js': ['plugins/**/*.js']
}
}
},
Expand All @@ -237,6 +207,8 @@ module.exports = function (grunt) {
"dist/locales/en.json": ["locales/en.json", "plugins/**/locales/en.json"],
"dist/locales/es.json": ["locales/es.json", "plugins/**/locales/es.json"],
"dist/locales/gl.json": ["locales/gl.json", "plugins/**/locales/gl.json"],
"dist/locales/sv.json": ["locales/sv.json", "plugins/**/locales/sv.json"],
"dist/locales/fi.json": ["locales/fi.json", "plugins/**/locales/fi.json"],
"dist/locales/ca.json": ["locales/ca.json", "plugins/**/locales/ca.json"]
}
}
Expand All @@ -259,18 +231,69 @@ module.exports = function (grunt) {
beautify: true
},
files: {
'dist/appCommon-v17.04.js': 'temp/app.js',
'dist/libCommon-v17.04.js': 'temp/lib.js',
'dist/libnocompat-v17.04.js': 'temp/libnocompat.js',
'dist/libcompat-v17.04.js': 'temp/libcompat.js',
'dist/appCommon-v20.2.0.js': 'temp/app.js',
'dist/libCommon-v20.2.0.js': 'temp/lib.js',
'dist/libnocompat-v20.2.0.js': 'temp/libnocompat.js',
'dist/libcompat-v20.2.0.js': 'temp/libcompat.js',
'dist/avWidgets.js': 'avWidgets.js',

"dist/locales/moment/es.js": "bower_components/moment/lang/es.js",
"dist/locales/moment/gl.js": "bower_components/moment/lang/gl.js",
"dist/locales/moment/ca.js": "bower_components/moment/lang/ca.js"
"dist/locales/moment/es.js": "node_modules/moment/locale/es.js",
"dist/locales/moment/gl.js": "node_modules/moment/locale/gl.js",
"dist/locales/moment/ca.js": "node_modules/moment/locale/ca.js"
}
}
},
copy: {
temp: {
files: [
{
expand: true,
cwd: 'node_modules/nanoscroller/bin/css/',
src: ['*'],
dest: 'temp/'
},
{
expand: true,
cwd: 'node_modules/intl-tel-input/build/css/',
src: ['*'],
dest: 'temp/'
}
]
},
main: {
files: [
{src: ['img/**'], dest: 'dist/'},
{src: ['node_modules/intl-tel-input/build/img/flags.png'], dest: 'dist/img/flags.png'},
{src: ['node_modules/intl-tel-input/build/js/utils.js'], dest: 'dist/utils.js'},
{src: ['node_modules/intl-tel-input/build/css/intlTelInput.css'], dest: 'dist/intlTelInput.css'},
{src: ['node_modules/nanoscroller/bin/css/*.css'], dest: 'temp/'},
{src: ['temp_data/**'], dest: 'dist/'},
{src: ['avUi/**/*.less'], dest: 'dist/less/'},
{src: ['themes/**'], dest: 'dist/'},
{
expand: true,
cwd: 'node_modules/bootstrap/fonts/',
src: ['**'],
dest: 'dist/themes/fonts/'
},
{
expand: true,
cwd: 'node_modules/bootstrap/fonts/',
src: ['**'],
dest: 'dist/themes/fonts/'
},
{
expand: true,
cwd: 'node_modules/font-awesome/fonts/',
src: ['**'],
dest: 'dist/fonts/'
}
//{src: ['node_modules/angular-ui-utils/ui-utils-ieshiv.min.js'], dest: 'dist/'},
//{src: ['node_modules/select2/*.png','node_modules/select2/*.gif'], dest:'dist/css/',flatten:true,expand:true},
//{src: ['node_modules/angular-mocks/angular-mocks.js'], dest: 'dist/'}
]
}
},
htmlmin: {
main: {
options: {
Expand Down Expand Up @@ -307,7 +330,7 @@ module.exports = function (grunt) {
'avWidgets.js',
'<%= dom_munger.data.appjs %>',
'<%= ngtemplates.main.dest %>',
'bower_components/angular-mocks/angular-mocks.js',
'node_modules/angular-mocks/angular-mocks.js',
createFolderGlobs('*-spec.js')
],
logLevel:'ERROR',
Expand All @@ -329,20 +352,40 @@ module.exports = function (grunt) {
noColor: false, // If true, protractor will not use colors in its output.
args: {
// Arguments passed to the command
}
},
//your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
all: {
options: {
configFile: "e2e.conf.js", // Target-specific config file
args: {} // Target-specific arguments
}
},
},

}
},
//your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
all: {
options: {
configFile: "e2e.conf.js", // Target-specific config file
args: {} // Target-specific arguments
}
},
}
});

grunt.registerTask('build',['check_config', 'jshint','clean:before','less','autoprefixer','dom_munger','ngtemplates','cssmin','concat','merge-json','ngAnnotate','uglify','copy','htmlmin','imagemin','clean:after']);
grunt.registerTask(
'build',
[
'check_config',
'jshint',
'clean:before',
'copy:temp',
'less',
'autoprefixer',
'dom_munger',
'ngtemplates',
'cssmin',
'concat',
'merge-json',
'ngAnnotate',
'uglify',
'copy:main',
'htmlmin',
'imagemin',
'clean:after'
]
);
grunt.registerTask('serve', ['dom_munger:read','jshint','connect', 'watch']);
grunt.registerTask('test',['dom_munger:read','karma:all_tests']);

Expand All @@ -368,7 +411,7 @@ module.exports = function (grunt) {
if (grunt.file.exists(spec)) {
var files = [].concat(grunt.config('dom_munger.data.libnocompatjs'));
files.concat(grunt.config('dom_munger.data.libjs'));
files.push('bower_components/angular-mocks/angular-mocks.js');
files.push('node_modules/angular-mocks/angular-mocks.js');
files.push('avConfig.js');
files.push('avThemes.js');
files.push('avWidgets.js');
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ example) or install it from the web and follow the instructions in the README
./configure && make && sudo make install
sudo chown -R `whoami` ~/.npm

You need also to install globally grunt and bower:
You need also to install globally grunt and yarn:

sudo npm install -g grunt-cli grunt bower
sudo npm install -g grunt-cli grunt yarn

After that, you can install the agora-core-view javascript dependencies:

npm install && bower install
yarn

Once that's done, you have 3 simple Grunt commands available:

Expand Down
16 changes: 16 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ angular.module('agora-gui-common').run(function($http, $rootScope) {
});
});

/*
This directive will trigger a click if the user presses space or enter
*/
angular.module('agora-gui-common').directive('ngSpaceClick', function ($timeout) {
return function (scope, element, attrs) {
element.bind("keydown", function (event) {
switch (event.which) {
case 13: // ENTER
case 32: { // SPACE
$timeout(function() {event.currentTarget.click();},0);
event.stopPropagation();
}
}
});
};
});

/*
This directive allows us to pass a function in on an enter key to do what we want.
Expand Down
5 changes: 5 additions & 0 deletions app.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/* avRegistration */
@import "avRegistration/login-controller/login-controller.less";
@import "avRegistration/login-directive/login-directive.less";
@import "avRegistration/openid-connect-directive/openid-connect-directive.less";
@import "avRegistration/register-directive/register-directive.less";
@import "avRegistration/field-directive/field-directive.less";
@import "avRegistration/fields/email-field-directive/email-field-directive.less";
Expand All @@ -30,13 +31,17 @@
@import "avRegistration/fields/dni-field-directive/dni-field-directive.less";
@import "avRegistration/fields/tel-field-directive/tel-field-directive.less";
@import "avRegistration/fields/code-field-directive/code-field-directive.less";
@import "avRegistration/fields/date-field-directive/date-field-directive.less";
@import "avRegistration/fields/bool-field-directive/bool-field-directive.less";
@import "avRegistration/fields/image-field-directive/image-field-directive.less";

@import "../../intlTelInput.css";

/* avUi */
@import "avUi/simple-error-directive/simple-error-directive.less";
@import "avUi/change-lang-directive/change-lang-directive.less";
@import "avUi/foot-directive/foot-directive.less";
@import "avUi/documentation-directive/documentation-directive.less";

/* Add Component LESS Above */
@import "../../app.less";
Expand Down
8 changes: 7 additions & 1 deletion avConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* in this same file, which you might want to edit and tune if needed.
*/

var AV_CONFIG_VERSION = '17.04';
var AV_CONFIG_VERSION = '20.2.0';

var avConfigData = {
// the base url path for ajax requests, for example for sending ballots or
Expand All @@ -37,6 +37,9 @@ var avConfigData = {
// Show 'Success Action' tab in admin agora_gui
showSuccessAction: false,

// Configurable Sign Up link
signupLink: "/admin/signup",

// AuthApi base url
authAPI: "https://agora/authapi/api/",
dnieUrl: "https://agora.dev/authapi/api/authmethod/dnie/auth/",
Expand Down Expand Up @@ -136,6 +139,9 @@ var avConfigData = {
// if we are in debug mode or not
debug: true,

// Information regarding OpenID Connect authentication
openIDConnectProviders: [],

// contact data where users can reach to a human when they need it
contact: {
// Support contact email displayed in the footer links
Expand Down
Loading