-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from agoravoting/copyright
Release 3.2.0
- Loading branch information
Showing
112 changed files
with
3,715 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/**' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
|
@@ -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; | ||
|
@@ -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) { | ||
|
@@ -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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
@@ -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"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: { | ||
|
@@ -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: "" | ||
|
@@ -111,7 +189,7 @@ var avConfigData = { | |
|
||
tos: { | ||
text:"", | ||
tile: "" | ||
title: "" | ||
} | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { | ||
|
@@ -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']; | ||
|
@@ -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)) { | ||
|
@@ -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); | ||
}; | ||
|
||
|
@@ -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 { | ||
|
@@ -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); | ||
// } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
*/ | ||
|
17 changes: 17 additions & 0 deletions
17
avRegistration/fields/bool-field-directive/bool-field-directive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
|
Oops, something went wrong.