Skip to content
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

Go v5 #68

Merged
merged 6 commits into from
Sep 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'use strict';

var pkg = require('./package.json');
var AV_CONFIG_VERSION = '103111.4';
var AV_CONFIG_VERSION = '103111.5';

//Using exclusion patterns slows down Grunt significantly
//instead of creating a set of patterns like '**/*.js' and '!**/node_modules/**'
Expand Down Expand Up @@ -204,13 +204,13 @@ module.exports = function (grunt) {
remove: ['script[data-remove!="false"]','link[data-remove!="false"]'],
append: [
{selector:'body',html:'<%= variables.booth_html_body_include %>'},
{selector:'body',html:'<!--[if lte IE 8]><script src="/booth/libcompat-v103111.4.min.js"></script><![endif]--><!--[if gte IE 9]><script src="/booth/libnocompat-v103111.4.min.js"></script><![endif]--><!--[if !IE]><!--><script src="/booth/libnocompat-v103111.4.min.js"></script><!--<![endif]-->'},
{selector:'body',html:'<!--[if lte IE 8]><script src="/booth/libcompat-v103111.5.min.js"></script><![endif]--><!--[if gte IE 9]><script src="/booth/libnocompat-v103111.5.min.js"></script><![endif]--><!--[if !IE]><!--><script src="/booth/libnocompat-v103111.5.min.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="/booth/lib-v103111.4.min.js"></script>'},
{selector:'body',html:'<script src="/booth/avConfig-v103111.4.js"></script>'},
{selector:'body',html:'<script src="/booth/avThemes-v103111.4.js"></script>'},
{selector:'body',html:'<script src="/booth/app-v103111.4.min.js"></script>'},
{selector:'body',html:'<script src="/booth/avPlugins-v103111.4.js"></script>'},
{selector:'body',html:'<script src="/booth/lib-v103111.5.min.js"></script>'},
{selector:'body',html:'<script src="/booth/avConfig-v103111.5.js"></script>'},
{selector:'body',html:'<script src="/booth/avThemes-v103111.5.js"></script>'},
{selector:'body',html:'<script src="/booth/app-v103111.5.min.js"></script>'},
{selector:'body',html:'<script src="/booth/avPlugins-v103111.5.js"></script>'},
{selector:'head',html:'<link rel="stylesheet" id="theme" data-base="/booth/" href="/booth/themes/default/app.min.css">'}
]
},
Expand Down Expand Up @@ -243,9 +243,9 @@ module.exports = function (grunt) {
],
'temp/lib.js': ['<%= dom_munger.data.libjs %>'],
'temp/app.js': ['<%= dom_munger.data.appjs %>','<%= ngtemplates.main.dest %>'],
'dist/avConfig-v103111.4.js': ['avConfig.js'],
'dist/avThemes-v103111.4.js': ['bower_components/avCommon/dist/avThemes-v103111.4.js'],
'dist/avPlugins-v103111.4.js': ['plugins/**/*.js']
'dist/avConfig-v103111.5.js': ['avConfig.js'],
'dist/avThemes-v103111.5.js': ['bower_components/avCommon/dist/avThemes-v103111.5.js'],
'dist/avPlugins-v103111.5.js': ['plugins/**/*.js']
}
}
},
Expand Down Expand Up @@ -277,10 +277,10 @@ module.exports = function (grunt) {
beautify: true
},
files: {
'dist/app-v103111.4.min.js': 'temp/app.js',
'dist/lib-v103111.4.min.js': 'temp/lib.js',
'dist/libnocompat-v103111.4.min.js': 'temp/libnocompat.js',
'dist/libcompat-v103111.4.min.js': 'temp/libcompat.js',
'dist/app-v103111.5.min.js': 'temp/app.js',
'dist/lib-v103111.5.min.js': 'temp/lib.js',
'dist/libnocompat-v103111.5.min.js': 'temp/libnocompat.js',
'dist/libcompat-v103111.5.min.js': 'temp/libcompat.js',
'dist/avWidgets.min.js': 'avWidgets.js',

"dist/locales/moment/en.js": "bower_components/moment/lang/en-gb.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ angular.module('avBooth')
{
return;
},
"desborda3": function()
{
return Math.max(1, Math.floor(scope.question.num_winners * 1.3) - scope.option.selected);
},
"desborda2": function()
{
return Math.max(1, Math.floor(scope.question.num_winners * 1.3) - scope.option.selected);
Expand Down
5 changes: 5 additions & 0 deletions avBooth/booth-directive/booth-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ angular.module('avBooth')
sorted: true,
ordered: true
},
"desborda3": {
state: stateEnum.multiQuestion,
sorted: true,
ordered: true
},
"desborda2": {
state: stateEnum.multiQuestion,
sorted: true,
Expand Down
4 changes: 4 additions & 0 deletions avBooth/review-ballot-directive/review-ballot-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ angular.module('avBooth')
{
return;
},
"desborda3": function()
{
return Math.max(1, Math.floor(question.num_winners * 1.3) - answer.selected);
},
"desborda2": function()
{
return Math.max(1, Math.floor(question.num_winners * 1.3) - answer.selected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ angular.module('avBooth')
var message = p.social_message;
message = message.replace(
'__URL__',
window.location.protocol + '//' + window.location.host + '/election/' + scope.election.id + '/public/login'
window.location.protocol + '//' + window.location.host + '/election/' + scope.election.id + '/public/home'
);

if('Facebook' === p.network) {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agoraGuiBooth",
"version" : "103111.4",
"version" : "103111.5",
"main": "index.html",
"ignore": [
"**/.*",
Expand Down
2 changes: 1 addition & 1 deletion crypto/answer-encoder-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ angular.module('avCrypto')

return function (requestedCodec, numAvailableOptions) {
var multi = {
validCodecs: ["plurality-at-large", "borda-nauru", "borda", "desborda2", "desborda"],
validCodecs: ["plurality-at-large", "borda-nauru", "borda", "desborda3", "desborda2", "desborda"],
numAvailableOptions: numAvailableOptions,

/**
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<script src="/ie8-bind-workaround.js"></script>

<!-- JS from Bower Components -->
<script src="bower_components/avCommon/dist/libnocompat-v103111.4.js" class="libnocompat"></script>
<script src="bower_components/avCommon/dist/libCommon-v103111.4.js" class="lib"></script>
<script src="bower_components/avCommon/dist/libnocompat-v103111.5.js" class="libnocompat"></script>
<script src="bower_components/avCommon/dist/libCommon-v103111.5.js" class="lib"></script>
<script src="bower_components/is_js/is.min.js" class="lib"></script>
<script src="bower_components/dragdroptouch/DragDropTouch.js" class="lib"></script>

Expand All @@ -34,7 +34,7 @@
<script src="avConfig.js"></script>

<!-- avCommon -->
<script src="bower_components/avCommon/dist/appCommon-v103111.4.js" class="app"></script>
<script src="bower_components/avCommon/dist/appCommon-v103111.5.js" class="app"></script>

<script src="crypto/crypto.js" class="app"></script>
<script src="crypto/random-service.js" class="app"></script>
Expand Down
2 changes: 1 addition & 1 deletion locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"poweredBy": "Funciona amb <strong>__name__</strong>",
"shareLink": "¡Tuitgeu aquesta votació!",
"votingSystem": "Sistema de votació",
"votings": {"plurality-at-large": "Plurality at large", "borda-nauru": "Nauru's Borda Count or Borda Dowdall (1/n)", "borda": "Borda Count (traditional)", "pairwise-beta": "Pairwise (beta-distribution)", "desborda2": "DesBorda2", "desborda": "DesBorda"}
"votings": {"plurality-at-large": "Plurality at large", "borda-nauru": "Nauru's Borda Count or Borda Dowdall (1/n)", "borda": "Borda Count (traditional)", "pairwise-beta": "Pairwise (beta-distribution)", "desborda3": "DesBorda3", "desborda2": "DesBorda2", "desborda": "DesBorda"}
},
"avBooth": {
"legal": {
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"poweredBy": "Powered by <strong><a href=\"__url__\" target=\"_blank\">__name__</a></strong>",
"shareLink": "¡Tweet this election!",
"votingSystem": "Voting System",
"votings": {"plurality-at-large": "Plurality at large", "borda-nauru": "Nauru's Borda Count or Borda Dowdall (1/n)", "borda": "Borda Count (traditional)", "pairwise-beta": "Pairwise (beta-distribution)", "desborda2": "DesBorda2", "desborda": "DesBorda"}
"votings": {"plurality-at-large": "Plurality at large", "borda-nauru": "Nauru's Borda Count or Borda Dowdall (1/n)", "borda": "Borda Count (traditional)", "pairwise-beta": "Pairwise (beta-distribution)", "desborda3": "DesBorda3", "desborda2": "DesBorda2", "desborda": "DesBorda"}
},
"avBooth": {
"legal": {
Expand Down
2 changes: 1 addition & 1 deletion locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"poweredBy": "Funciona con <strong><a href=\"__url__\" target=\"_blank\">__name__</a></strong>",
"shareLink": "¡Twittea esta votación!",
"votingSystem": "Sistema de Voto",
"votings": {"plurality-at-large": "Voto en bloque o Escrutinio Mayoritario Plurinominal", "borda-nauru": "Borda de Nauru o Borda Dowdall (1/n)", "borda": "Borda Count (tradicional)", "pairwise-beta": "Comparación de pares (distribución beta)", "desborda2": "DesBorda2", "desborda": "DesBorda"}
"votings": {"plurality-at-large": "Voto en bloque o Escrutinio Mayoritario Plurinominal", "borda-nauru": "Borda de Nauru o Borda Dowdall (1/n)", "borda": "Borda Count (tradicional)", "pairwise-beta": "Comparación de pares (distribución beta)", "desborda3": "DesBorda3", "desborda2": "DesBorda2", "desborda": "DesBorda"}
},
"avBooth": {
"legal": {
Expand Down
2 changes: 1 addition & 1 deletion locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"poweredBy": "Funciona amb <strong><a href=\"__url__\" target=\"_blank\">__name__</a></strong>",
"shareLink": "Comparte en Twitter que xa votaches nas primarias de En Marea",
"votingSystem": "Voting System",
"votings": {"plurality-at-large": "Plurality at large", "borda-nauru": "Nauru's Borda Count or Borda Dowdall (1/n)", "borda": "Borda Count (traditional)", "pairwise-beta": "Pairwise (beta-distribution)", "desborda2": "DesBorda2", "desborda": "DesBorda"}
"votings": {"plurality-at-large": "Plurality at large", "borda-nauru": "Nauru's Borda Count or Borda Dowdall (1/n)", "borda": "Borda Count (traditional)", "pairwise-beta": "Pairwise (beta-distribution)", "desborda3": "DesBorda3", "desborda2": "DesBorda2", "desborda": "DesBorda"}
},
"avBooth": {
"legal": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agora-gui-booth",
"version" : "103111.4.0",
"version" : "103111.5.0",
"devDependencies": {
"grunt": "~0.4",
"grunt-angular-templates": "~0.5",
Expand Down