Skip to content

Commit

Permalink
Merge pull request #19 from agoravoting/copyright
Browse files Browse the repository at this point in the history
Release 3.2.0
  • Loading branch information
edulix committed Jun 22, 2016
2 parents a808e67 + 22d7b8a commit 0e0f64e
Show file tree
Hide file tree
Showing 112 changed files with 3,715 additions and 152 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Eduardo Robles Elvira <edulix AT agoravoting DOT com>
Javier Llorente Isidoro <javier AT agoravoting DOT com>
Daniel García Moreno <danigm AT agoravoting DOT com>
Victor Ramírez de la Corte <victor AT agoravoting DOT com>
Victor Ramírez de la Corte <victor AT agoravoting DOT com>
Félix Robles Elvira <felix AT agoravoting DOT com>
19 changes: 18 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

/*jslint node: true */
'use strict';

var pkg = require('./package.json');
var AV_CONFIG_VERSION = '3.1.0';
var AV_CONFIG_VERSION = '3.2.0';

//Using exclusion patterns slows down Grunt significantly
//instead of creating a set of patterns like '**/*.js' and '!**/node_modules/**'
Expand Down
18 changes: 0 additions & 18 deletions Makefile

This file was deleted.

25 changes: 21 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

angular.module(
'agora-core-view',
'agora-gui-common',
['ui.bootstrap',
'ui.utils',
'ui.router',
Expand Down Expand Up @@ -41,7 +58,7 @@ angular.module('jm.i18next').config(function ($i18nextProvider, ConfigServicePro
ConfigServiceProvider.i18nextInitOptions);
});

angular.module('agora-core-view').run(function($http, $rootScope) {
angular.module('agora-gui-common').run(function($http, $rootScope) {

$rootScope.safeApply = function(fn) {
var phase = $rootScope.$$phase;
Expand Down Expand Up @@ -70,7 +87,7 @@ angular.module('agora-core-view').run(function($http, $rootScope) {
/*
This directive allows us to pass a function in on an enter key to do what we want.
*/
angular.module('agora-core-view').directive('ngEnter', function () {
angular.module('agora-gui-common').directive('ngEnter', function () {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
if(event.which === 13) {
Expand All @@ -91,7 +108,7 @@ angular.module('agora-core-view').directive('ngEnter', function () {
* @Param end, default is "..."
* @return string
*/
angular.module('agora-core-view').filter('truncate', function () {
angular.module('agora-gui-common').filter('truncate', function () {
return function (text, length, end) {
if (isNaN(length)) {
length = 10;
Expand Down
17 changes: 17 additions & 0 deletions app.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

@import "avb-start-loading.less";
@import "avUi/global.less";
Expand All @@ -15,6 +31,7 @@
@import "avRegistration/fields/tel-field-directive/tel-field-directive.less";
@import "avRegistration/fields/code-field-directive/code-field-directive.less";
@import "avRegistration/fields/bool-field-directive/bool-field-directive.less";
@import "avRegistration/fields/image-field-directive/image-field-directive.less";

/* avUi */
@import "avUi/simple-error-directive/simple-error-directive.less";
Expand Down
84 changes: 81 additions & 3 deletions avConfig.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,65 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

/*
* ConfigService is a function that returns the configuration that exists
* in this same file, which you might want to edit and tune if needed.
*/

var AV_CONFIG_VERSION = '3.1.0';
var AV_CONFIG_VERSION = '3.2.0';

var avConfigData = {
// the base url path for ajax requests, for example for sending ballots or
// getting info about an election. This url is usually in the form of
// 'https://foo/api/v3/' and always ends in '/'.
base: '',
theme: "default",
baseUrl: "https://agora/elections/api/",
freeAuthId: 1,

// Webpage title
webTitle: "Agora Voting",

// Show 'Success Action' tab in admin agora_gui
showSuccessAction: false,

// AuthApi base url
authAPI: "https://agora/authapi/api/",
dnieUrl: "https://agora.dev/authapi/api/authmethod/dnie/auth/",
// Agora Elections base url
electionsAPI: "https://agora/elections/api/",

// Agora Admin help url
helpUrl: "https://agoravoting.com/help",

authorities: ['local-auth2'],
director: "local-auth1",

resourceUrlWhitelist: [
// Allow same origin resource loads.
'self',

// Allow loading from our assets domain. Notice the difference between * and **.
// Uncomment the following to allow youtube videos
//
// 'https://www.youtube.com/**',
// 'https://youtube.com/**'
],

// i18next language options, see http://i18next.com/pages/doc_init.html for
// details
i18nextInitOptions: {
Expand Down Expand Up @@ -91,11 +129,51 @@ var avConfigData = {

// contact data where users can reach to a human when they need it
contact: {
// Support contact email displayed in the footer links
email: "[email protected]",
twitter: "twitter",
// Sales contact email displayed in the footer links
sales: "[email protected]",
tlf: "-no tlf-"
},

// social networks footer links
social: {
facebook: "https://www.facebook.com/AgoraVoting",
twitter: "https://twitter.com/agoravoting",
twitterHandle: "agoravoting",
googleplus: "https://plus.google.com/101939665794445172389/posts",
youtube: "https://www.youtube.com/results?search_query=Agora+Voting",
github: "https://github.com/agoravoting/"
},

// technology footer links
technology: {
aboutus: "https://agoravoting.com/#aboutus",
pricing: "https://agoravoting.com/#pricing",
overview: "https://agoravoting.com/overview/",
solutions: "https://agoravoting.com/solutions/",
admin_manual: "https://bit.ly/avguiadeuso"
},

// legality footer links
legal: {
terms_of_service: "https://agoravoting.com/tos/",
cookies: "https://agoravoting.com/cookies/",
privacy: "https://agoravoting.com/privacy/",
security_contact: "https://agoravoting.com/security_contact/",
community_website: "https://agoravoting.org"
},

// Details pertaining to the organization that runs the software
organization: {
// Name of the organization, appears in the logo mouse hover, in the login
// page ("Login into __NAME__ admin account"), in the poweredBy, etc
orgName: 'Agora Voting',

// URL that the logo links to
orgUrl: 'https://agoravoting.com'
},

verifier: {
link: "",
hash: ""
Expand All @@ -111,7 +189,7 @@ var avConfigData = {

tos: {
text:"",
tile: ""
title: ""
}
};

Expand Down
30 changes: 27 additions & 3 deletions avRegistration/auth-method-service.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

angular.module('avRegistration')

.factory('Authmethod', function($http, $cookies, ConfigService, $interval) {
Expand Down Expand Up @@ -59,6 +76,10 @@ angular.module('avRegistration')
return $http.get(backendUrl + 'auth-event/'+authId+'/ping/');
};

authmethod.getImage = function(ev, uid) {
return $http.get(backendUrl + 'auth-event/'+ev+'/census/img/'+uid+'/');
};

authmethod.login = function(data, authevent) {
var eid = authevent || authId;
delete data['authevent'];
Expand Down Expand Up @@ -222,7 +243,7 @@ angular.module('avRegistration')
return $http.get(backendUrl + 'acl/mine/?object_type=AuthEvent&perm=edit&order=-pk&page='+page);
};

authmethod.sendAuthCodes = function(eid, election, user_ids) {
authmethod.sendAuthCodes = function(eid, election, user_ids, extra) {
var url = backendUrl + 'auth-event/'+eid+'/census/send_auth/';
var data = {};
if (angular.isDefined(election)) {
Expand All @@ -234,6 +255,9 @@ angular.module('avRegistration')
if (angular.isDefined(user_ids)) {
data["user-ids"] = user_ids;
}
if (extra) {
data["extra"] = extra;
}
return $http.post(url, data);
};

Expand Down Expand Up @@ -279,7 +303,7 @@ angular.module('avRegistration')
/**
* Caching http response error to deauthenticate
*/
//angular.module('agora-core-view').config(
//angular.module('avRegistration').config(
// function($httpProvider) {
// $httpProvider.interceptors.push(function($q, $injector) {
// return {
Expand All @@ -301,7 +325,7 @@ angular.module('avRegistration')
/**
* IF the cookie is there we make the autologin
*/
//angular.module('agora-core-view').run(function($cookies, $http, Authmethod) {
//angular.module('avRegistration').run(function($cookies, $http, Authmethod) {
// if ($cookies.auth) {
// Authmethod.setAuth($cookies.auth, $cookies.isAdmin);
// }
Expand Down
1 change: 1 addition & 0 deletions avRegistration/field-directive/field-directive.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
<div avr-bool-field ng-switch-when="bool"></div>
<div avr-captcha-field ng-switch-when="captcha"></div>
<div avr-textarea-field ng-switch-when="textarea"></div>
<div avr-image-field ng-switch-when="image"></div>
</div>
17 changes: 17 additions & 0 deletions avRegistration/field-directive/field-directive.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

/**
* Shows a field
*/
Expand Down
17 changes: 17 additions & 0 deletions avRegistration/fields/bool-field-directive/bool-field-directive.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* agora-gui-common is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with agora-gui-common. If not, see <http://www.gnu.org/licenses/>.
**/

angular.module('avRegistration')
.directive('avrBoolField', function($state) {
return {
Expand Down
Loading

0 comments on commit 0e0f64e

Please sign in to comment.