Skip to content

Commit 7c9e689

Browse files
edulixFindeton
andauthored
Dep updates (#99)
* for borda type, question percentage over points * fix over total valid votes percent * grunt build * Go next (#97) * test extra field for documentation directive * test * test * grunt build * add sce * fix npm * fix locales * grunt build * change cookies to enable multiple logins at once * syntax fix * grunt build * fixes * grunt build * release 103111.2 * grunt build * add append to lambda on checker service * fixes * grunt build * change to v3 * grunt build * adding some minor style changes * rebuild * randomice pass field id, set default value to none * grunt build * changes have to be on code-field not on password-field * refactor code/password fields * grunt build * make signup link configurable * rebuild common * filter required_when_registered extra field on signup * grunt build * add extra functions to authmethod * grunt build * set grunt-merge-json to 0.9.5 because last version gives problems with chalk (eirslett/frontend-maven-plugin#629) * change version to go v4 * change version to go v4 * simplify footer * test * fix css * add hook to plugin * grunt build * add element to plugin data * remove element * refactor * refactor * go v5 * grunt build * add left margin to footer * grunt build * change legal * grunt build * add target _blank to footer links * grunt build * fix doc directive ul css * grunt build * add less file, grunt build * install international phone-number * grunt build * test bower * trying to add components * img changes * refactor * grunt build * test * test.. * test * fixes * test * test css * refactor * readd intl to bower * test * test * change utils * test * dist * flags * fixes * tel country set to auto * get ip country * grunt build * refactor, add tel validation * grunt build * change error color, change id to class * a fix, grunt build * change id, use it * grunt build * revert changes * grunt build * test change id * grunt build * change id name again * grunt build * changes * grunt build * revert * grunt build * test * grunt build * test * grunt build * test * test * test * fixes * fix css, errors * grunt build * test * test * test * test * refactor error, color red * grunt build * fix translation * fix input * grunt build * bower angular 1.2 * fix dependencies * intl dep version * grunt build * use full international number * grunt build * fix dependencies * update to v5, grunt build * grunt build * fix tel validation check * grunt build * change version to go v6 * grunt build * add tel number value * grunt build * show resend when required * grunt build * refactor * grunt build * refactor * grunt build * add email to valid resend auth code * grunt build * allow email resend * fix syntax, grunt build * fix disabled when clicked resend auth * grunt build * fix email getter issue * grunt build * trying to fix error * fix syntax * grunt build * refactor * grunt build * refactor * grunt build * change version to go v7 * grunt build * add get/save draft el * grunt build * change version to go v8 * grunt build * adding initial support for activity log * rebuild * adding support for advanced filtering in activity log * fixing typo * build * fixing typo * build * fix get activity page * rebuild * Action comments (#85) * Added comment optional for activate/deactivate user ids * rebuild * set lang in html tag * grunt build * increase contrast * grunt build * add aria label to foot links * grunt build * fix lang buttons keyboard accessibility * grunt build * refactor to ng-space-click directive * css fixes * grunt build * fix ng-space-click * grunt build * Added avrDateField directive to show a datepicker (#86) * Added avrDateField directive to show a datepicker * field name in avrDateField as label * fix color contrast on text warning * grunt build * Tally sheets (#88) * adding ballot boxes support * rebuilding * adding support for creating ballot boxes * rebuild * fix params in create ballot box * rebuild * adding modal-text-success * rebuild * adding support for deleting ballot boxes * rebuild * fixing modelline * adding support for adding tally sheets * adding support for getting tally sheets * adding support for delete tally sheets * increase contrast * grunt build * moar contrast * grunt build * fixes * email-and-password and user-and-password as login methods (#87) * fix lang css * grunt build * fixes * Census query (#89) * initial work on census query * rebuild * set cookie path to base * grunt build * fixes * Fix date field (#92) * adding it to the list * rebuild * adding some styles * rebuild * adding more vertical spacing to the date field * adding model binding * rebuild * improving looks of the census query * rebuild * rebuild and success in green * Census accessible (#94) * fix date * grunt build * fixes * fix aria labels for fields * grunt build * fixes * grunt build * fixes * grunt build * fixes * rebuild * update gl i18n * rebuild * Enre 1 (#95) * fixing dni * fixing dni * rebuild * fix login redirect after signup * adding a default country code and making it easier to find * Fix reorder options (#96) * fixing some gl i18n * updating dnd library * using latest dnd list lib version * update config version * updating some depencencies and old versions (#98) * updating some depencencies and old versions * update version * merge * updating version config * updating helsinki theme to improve visibility of booth search box * adding email-otp * building * fix template * using underscore contains instead of in keyword * update otp help * change email placeholder * fix typo error * starting to use yarn * bumping version * ifinally making nanoscroller import correctly in grunt build * moving all dependencies to devDependencies really * update readme to use yarn instead of npm or bower * removing dependencies from bower * changing package version * making it compile * compiled * adding missing files * using specific version of i18next * add missing files from dist and correct link to autofocus lib * adding autofocus to the build * adding the other autofocus * updating angular cookies * updating angular-animate to match angular version * updating angular-sanitize and angular-resource versions to match angular version in use * updating ui router to try prevent this issue angular-ui/ui-router#3246 * migrating code to use then instead of success and error functions, because new angular version deprecated that * migrating code to use then instead of success and error functions, because new angular version deprecated that * testing old version of angular to see if it works * remove duplicated angular-bootstrap/ui-bootstrap declarations Co-authored-by: Félix Robles <[email protected]>
1 parent 1eb31ba commit 7c9e689

File tree

111 files changed

+25689
-14329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+25689
-14329
lines changed

.bowerrc

-3
This file was deleted.

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33

44
[*]
55
indent_style = space
6-
indent_size = 4
6+
indent_size = 2
77
end_of_line = lf
88
charset = utf-8
99
trim_trailing_whitespace = true

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
bower_components
21
node_modules
2+
yarn-error.log
3+
.yarnclean
34
temp
45
_SpecRunner.html
56
.DS_Store

Gruntfile.js

+105-62
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
'use strict';
2020

2121
var pkg = require('./package.json');
22-
var AV_CONFIG_VERSION = '17.04';
22+
var AV_CONFIG_VERSION = '20.2.0';
2323

2424
//Using exclusion patterns slows down Grunt significantly
2525
//instead of creating a set of patterns like '**/*.js' and '!**/node_modules/**'
2626
//this method is used to create a set of inclusive patterns for all subdirectories
27-
//skipping node_modules, bower_components, dist, and any .dirs
27+
//skipping node_modules, dist, and any .dirs
2828
//This enables users to create any directory structure they desire.
2929
var createFolderGlobs = function(fileTypePatterns) {
3030
fileTypePatterns = Array.isArray(fileTypePatterns) ? fileTypePatterns : [fileTypePatterns];
31-
var ignore = ['node_modules','bower_components','dist','temp'];
31+
var ignore = ['node_modules','dist','temp'];
3232
var fs = require('fs');
3333
return fs.readdirSync(process.cwd())
3434
.map(function(file){
@@ -118,12 +118,13 @@ module.exports = function (grunt) {
118118
less: {
119119
production: {
120120
options: {
121+
strictImports: true
121122
},
122123
files: [{
123124
expand: true,
124125
src: ['themes/**/app.less'],
125126
dest: 'temp/',
126-
ext: '.css',
127+
ext: '.css'
127128
}]
128129
}
129130
},
@@ -145,37 +146,6 @@ module.exports = function (grunt) {
145146
dest: 'temp/templates.js'
146147
}
147148
},
148-
copy: {
149-
main: {
150-
files: [
151-
{src: ['img/**'], dest: 'dist/'},
152-
{src: ['temp_data/**'], dest: 'dist/'},
153-
{src: ['avUi/**/*.less'], dest: 'dist/less/'},
154-
{src: ['themes/**'], dest: 'dist/'},
155-
{
156-
expand: true,
157-
cwd: 'bower_components/bootstrap/fonts/',
158-
src: ['**'],
159-
dest: 'dist/themes/fonts/'
160-
},
161-
{
162-
expand: true,
163-
cwd: 'bower_components/bootstrap/fonts/',
164-
src: ['**'],
165-
dest: 'dist/themes/fonts/'
166-
},
167-
{
168-
expand: true,
169-
cwd: 'bower_components/font-awesome/fonts/',
170-
src: ['**'],
171-
dest: 'dist/fonts/'
172-
}
173-
//{src: ['bower_components/angular-ui-utils/ui-utils-ieshiv.min.js'], dest: 'dist/'},
174-
//{src: ['bower_components/select2/*.png','bower_components/select2/*.gif'], dest:'dist/css/',flatten:true,expand:true},
175-
//{src: ['bower_components/angular-mocks/angular-mocks.js'], dest: 'dist/'}
176-
]
177-
}
178-
},
179149
dom_munger:{
180150
read: {
181151
options: {
@@ -192,10 +162,10 @@ module.exports = function (grunt) {
192162
options: {
193163
remove: ['script[data-remove!="false"]','link[data-remove!="false"]'],
194164
append: [
195-
{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]-->'},
165+
{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]-->'},
196166
{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 -->'},
197-
{selector:'body',html:'<script src="/appCommon-v17.04.js"></script>'},
198-
{selector:'body',html:'<script src="/avPlugins-v17.04.js"></script>'},
167+
{selector:'body',html:'<script src="/appCommon-v20.2.0.js"></script>'},
168+
{selector:'body',html:'<script src="/avPlugins-v20.2.0.js"></script>'},
199169
{selector:'head',html:'<link rel="stylesheet" id="theme" href="/themes/default/app.min.css">'}
200170
]
201171
},
@@ -225,9 +195,9 @@ module.exports = function (grunt) {
225195
'temp/libnocompat.js': ['<%= dom_munger.data.libnocompatjs %>'],
226196
'temp/lib.js': ['<%= dom_munger.data.libjs %>'],
227197
'temp/app.js': ['<%= dom_munger.data.appjs %>','<%= ngtemplates.main.dest %>'],
228-
'dist/avConfig-v17.04.js': ['avConfig.js'],
229-
'dist/avThemes-v17.04.js': ['avThemes.js'],
230-
'dist/avPlugins-v17.04.js': ['plugins/**/*.js']
198+
'dist/avConfig-v20.2.0.js': ['avConfig.js'],
199+
'dist/avThemes-v20.2.0.js': ['avThemes.js'],
200+
'dist/avPlugins-v20.2.0.js': ['plugins/**/*.js']
231201
}
232202
}
233203
},
@@ -237,6 +207,8 @@ module.exports = function (grunt) {
237207
"dist/locales/en.json": ["locales/en.json", "plugins/**/locales/en.json"],
238208
"dist/locales/es.json": ["locales/es.json", "plugins/**/locales/es.json"],
239209
"dist/locales/gl.json": ["locales/gl.json", "plugins/**/locales/gl.json"],
210+
"dist/locales/sv.json": ["locales/sv.json", "plugins/**/locales/sv.json"],
211+
"dist/locales/fi.json": ["locales/fi.json", "plugins/**/locales/fi.json"],
240212
"dist/locales/ca.json": ["locales/ca.json", "plugins/**/locales/ca.json"]
241213
}
242214
}
@@ -259,18 +231,69 @@ module.exports = function (grunt) {
259231
beautify: true
260232
},
261233
files: {
262-
'dist/appCommon-v17.04.js': 'temp/app.js',
263-
'dist/libCommon-v17.04.js': 'temp/lib.js',
264-
'dist/libnocompat-v17.04.js': 'temp/libnocompat.js',
265-
'dist/libcompat-v17.04.js': 'temp/libcompat.js',
234+
'dist/appCommon-v20.2.0.js': 'temp/app.js',
235+
'dist/libCommon-v20.2.0.js': 'temp/lib.js',
236+
'dist/libnocompat-v20.2.0.js': 'temp/libnocompat.js',
237+
'dist/libcompat-v20.2.0.js': 'temp/libcompat.js',
266238
'dist/avWidgets.js': 'avWidgets.js',
267239

268-
"dist/locales/moment/es.js": "bower_components/moment/lang/es.js",
269-
"dist/locales/moment/gl.js": "bower_components/moment/lang/gl.js",
270-
"dist/locales/moment/ca.js": "bower_components/moment/lang/ca.js"
240+
"dist/locales/moment/es.js": "node_modules/moment/locale/es.js",
241+
"dist/locales/moment/gl.js": "node_modules/moment/locale/gl.js",
242+
"dist/locales/moment/ca.js": "node_modules/moment/locale/ca.js"
271243
}
272244
}
273245
},
246+
copy: {
247+
temp: {
248+
files: [
249+
{
250+
expand: true,
251+
cwd: 'node_modules/nanoscroller/bin/css/',
252+
src: ['*'],
253+
dest: 'temp/'
254+
},
255+
{
256+
expand: true,
257+
cwd: 'node_modules/intl-tel-input/build/css/',
258+
src: ['*'],
259+
dest: 'temp/'
260+
}
261+
]
262+
},
263+
main: {
264+
files: [
265+
{src: ['img/**'], dest: 'dist/'},
266+
{src: ['node_modules/intl-tel-input/build/img/flags.png'], dest: 'dist/img/flags.png'},
267+
{src: ['node_modules/intl-tel-input/build/js/utils.js'], dest: 'dist/utils.js'},
268+
{src: ['node_modules/intl-tel-input/build/css/intlTelInput.css'], dest: 'dist/intlTelInput.css'},
269+
{src: ['node_modules/nanoscroller/bin/css/*.css'], dest: 'temp/'},
270+
{src: ['temp_data/**'], dest: 'dist/'},
271+
{src: ['avUi/**/*.less'], dest: 'dist/less/'},
272+
{src: ['themes/**'], dest: 'dist/'},
273+
{
274+
expand: true,
275+
cwd: 'node_modules/bootstrap/fonts/',
276+
src: ['**'],
277+
dest: 'dist/themes/fonts/'
278+
},
279+
{
280+
expand: true,
281+
cwd: 'node_modules/bootstrap/fonts/',
282+
src: ['**'],
283+
dest: 'dist/themes/fonts/'
284+
},
285+
{
286+
expand: true,
287+
cwd: 'node_modules/font-awesome/fonts/',
288+
src: ['**'],
289+
dest: 'dist/fonts/'
290+
}
291+
//{src: ['node_modules/angular-ui-utils/ui-utils-ieshiv.min.js'], dest: 'dist/'},
292+
//{src: ['node_modules/select2/*.png','node_modules/select2/*.gif'], dest:'dist/css/',flatten:true,expand:true},
293+
//{src: ['node_modules/angular-mocks/angular-mocks.js'], dest: 'dist/'}
294+
]
295+
}
296+
},
274297
htmlmin: {
275298
main: {
276299
options: {
@@ -307,7 +330,7 @@ module.exports = function (grunt) {
307330
'avWidgets.js',
308331
'<%= dom_munger.data.appjs %>',
309332
'<%= ngtemplates.main.dest %>',
310-
'bower_components/angular-mocks/angular-mocks.js',
333+
'node_modules/angular-mocks/angular-mocks.js',
311334
createFolderGlobs('*-spec.js')
312335
],
313336
logLevel:'ERROR',
@@ -329,20 +352,40 @@ module.exports = function (grunt) {
329352
noColor: false, // If true, protractor will not use colors in its output.
330353
args: {
331354
// Arguments passed to the command
332-
}
333-
},
334-
//your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
335-
all: {
336-
options: {
337-
configFile: "e2e.conf.js", // Target-specific config file
338-
args: {} // Target-specific arguments
339-
}
340-
},
341-
},
342-
355+
}
356+
},
357+
//your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
358+
all: {
359+
options: {
360+
configFile: "e2e.conf.js", // Target-specific config file
361+
args: {} // Target-specific arguments
362+
}
363+
},
364+
}
343365
});
344366

345-
grunt.registerTask('build',['check_config', 'jshint','clean:before','less','autoprefixer','dom_munger','ngtemplates','cssmin','concat','merge-json','ngAnnotate','uglify','copy','htmlmin','imagemin','clean:after']);
367+
grunt.registerTask(
368+
'build',
369+
[
370+
'check_config',
371+
'jshint',
372+
'clean:before',
373+
'copy:temp',
374+
'less',
375+
'autoprefixer',
376+
'dom_munger',
377+
'ngtemplates',
378+
'cssmin',
379+
'concat',
380+
'merge-json',
381+
'ngAnnotate',
382+
'uglify',
383+
'copy:main',
384+
'htmlmin',
385+
'imagemin',
386+
'clean:after'
387+
]
388+
);
346389
grunt.registerTask('serve', ['dom_munger:read','jshint','connect', 'watch']);
347390
grunt.registerTask('test',['dom_munger:read','karma:all_tests']);
348391

@@ -368,7 +411,7 @@ module.exports = function (grunt) {
368411
if (grunt.file.exists(spec)) {
369412
var files = [].concat(grunt.config('dom_munger.data.libnocompatjs'));
370413
files.concat(grunt.config('dom_munger.data.libjs'));
371-
files.push('bower_components/angular-mocks/angular-mocks.js');
414+
files.push('node_modules/angular-mocks/angular-mocks.js');
372415
files.push('avConfig.js');
373416
files.push('avThemes.js');
374417
files.push('avWidgets.js');

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ example) or install it from the web and follow the instructions in the README
1616
./configure && make && sudo make install
1717
sudo chown -R `whoami` ~/.npm
1818

19-
You need also to install globally grunt and bower:
19+
You need also to install globally grunt and yarn:
2020

21-
sudo npm install -g grunt-cli grunt bower
21+
sudo npm install -g grunt-cli grunt yarn
2222

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

25-
npm install && bower install
25+
yarn
2626

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

app.js

+16
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@ angular.module('agora-gui-common').run(function($http, $rootScope) {
8383
});
8484
});
8585

86+
/*
87+
This directive will trigger a click if the user presses space or enter
88+
*/
89+
angular.module('agora-gui-common').directive('ngSpaceClick', function ($timeout) {
90+
return function (scope, element, attrs) {
91+
element.bind("keydown", function (event) {
92+
switch (event.which) {
93+
case 13: // ENTER
94+
case 32: { // SPACE
95+
$timeout(function() {event.currentTarget.click();},0);
96+
event.stopPropagation();
97+
}
98+
}
99+
});
100+
};
101+
});
86102

87103
/*
88104
This directive allows us to pass a function in on an enter key to do what we want.

app.less

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/* avRegistration */
2323
@import "avRegistration/login-controller/login-controller.less";
2424
@import "avRegistration/login-directive/login-directive.less";
25+
@import "avRegistration/openid-connect-directive/openid-connect-directive.less";
2526
@import "avRegistration/register-directive/register-directive.less";
2627
@import "avRegistration/field-directive/field-directive.less";
2728
@import "avRegistration/fields/email-field-directive/email-field-directive.less";
@@ -30,13 +31,17 @@
3031
@import "avRegistration/fields/dni-field-directive/dni-field-directive.less";
3132
@import "avRegistration/fields/tel-field-directive/tel-field-directive.less";
3233
@import "avRegistration/fields/code-field-directive/code-field-directive.less";
34+
@import "avRegistration/fields/date-field-directive/date-field-directive.less";
3335
@import "avRegistration/fields/bool-field-directive/bool-field-directive.less";
3436
@import "avRegistration/fields/image-field-directive/image-field-directive.less";
3537

38+
@import "../../intlTelInput.css";
39+
3640
/* avUi */
3741
@import "avUi/simple-error-directive/simple-error-directive.less";
3842
@import "avUi/change-lang-directive/change-lang-directive.less";
3943
@import "avUi/foot-directive/foot-directive.less";
44+
@import "avUi/documentation-directive/documentation-directive.less";
4045

4146
/* Add Component LESS Above */
4247
@import "../../app.less";

avConfig.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* in this same file, which you might want to edit and tune if needed.
2121
*/
2222

23-
var AV_CONFIG_VERSION = '17.04';
23+
var AV_CONFIG_VERSION = '20.2.0';
2424

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

40+
// Configurable Sign Up link
41+
signupLink: "/admin/signup",
42+
4043
// AuthApi base url
4144
authAPI: "https://agora/authapi/api/",
4245
dnieUrl: "https://agora.dev/authapi/api/authmethod/dnie/auth/",
@@ -136,6 +139,9 @@ var avConfigData = {
136139
// if we are in debug mode or not
137140
debug: true,
138141

142+
// Information regarding OpenID Connect authentication
143+
openIDConnectProviders: [],
144+
139145
// contact data where users can reach to a human when they need it
140146
contact: {
141147
// Support contact email displayed in the footer links

0 commit comments

Comments
 (0)