Skip to content

Commit

Permalink
Dep updates (#99)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
edulix and Findeton authored Feb 27, 2020
1 parent 1eb31ba commit 7c9e689
Show file tree
Hide file tree
Showing 111 changed files with 25,689 additions and 14,329 deletions.
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

0 comments on commit 7c9e689

Please sign in to comment.