Skip to content

Commit

Permalink
Merge pull request #81 from agoravoting/go-v8
Browse files Browse the repository at this point in the history
Go v8
  • Loading branch information
Findeton committed Nov 6, 2017
2 parents c825c6b + 0d46158 commit 8c89b23
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 16 deletions.
22 changes: 11 additions & 11 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.7';
var AV_CONFIG_VERSION = '103111.8';

//Using exclusion patterns slows down Grunt significantly
//instead of creating a set of patterns like '**/*.js' and '!**/node_modules/**'
Expand Down Expand Up @@ -195,10 +195,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-v103111.7.js"></script><![endif]--><!--[if gte IE 9]><script src="/libnocompat-v103111.7.js"></script><![endif]--><!--[if !IE]><!--><script src="/libnocompat-v103111.7.js"></script><!--<![endif]-->'},
{selector:'body',html:'<!--[if lte IE 8]><script src="/libcompat-v103111.8.js"></script><![endif]--><!--[if gte IE 9]><script src="/libnocompat-v103111.8.js"></script><![endif]--><!--[if !IE]><!--><script src="/libnocompat-v103111.8.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-v103111.7.js"></script>'},
{selector:'body',html:'<script src="/avPlugins-v103111.7.js"></script>'},
{selector:'body',html:'<script src="/appCommon-v103111.8.js"></script>'},
{selector:'body',html:'<script src="/avPlugins-v103111.8.js"></script>'},
{selector:'head',html:'<link rel="stylesheet" id="theme" href="/themes/default/app.min.css">'}
]
},
Expand Down Expand Up @@ -228,9 +228,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-v103111.7.js': ['avConfig.js'],
'dist/avThemes-v103111.7.js': ['avThemes.js'],
'dist/avPlugins-v103111.7.js': ['plugins/**/*.js']
'dist/avConfig-v103111.8.js': ['avConfig.js'],
'dist/avThemes-v103111.8.js': ['avThemes.js'],
'dist/avPlugins-v103111.8.js': ['plugins/**/*.js']
}
}
},
Expand Down Expand Up @@ -262,10 +262,10 @@ module.exports = function (grunt) {
beautify: true
},
files: {
'dist/appCommon-v103111.7.js': 'temp/app.js',
'dist/libCommon-v103111.7.js': 'temp/lib.js',
'dist/libnocompat-v103111.7.js': 'temp/libnocompat.js',
'dist/libcompat-v103111.7.js': 'temp/libcompat.js',
'dist/appCommon-v103111.8.js': 'temp/app.js',
'dist/libCommon-v103111.8.js': 'temp/lib.js',
'dist/libnocompat-v103111.8.js': 'temp/libnocompat.js',
'dist/libcompat-v103111.8.js': 'temp/libcompat.js',
'dist/avWidgets.js': 'avWidgets.js',

"dist/locales/moment/es.js": "bower_components/moment/lang/es.js",
Expand Down
2 changes: 1 addition & 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 = '103111.7';
var AV_CONFIG_VERSION = '103111.8';

var avConfigData = {
// the base url path for ajax requests, for example for sending ballots or
Expand Down
35 changes: 35 additions & 0 deletions avRegistration/auth-method-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,41 @@ angular.module('avRegistration')
});
};

authmethod.getUserDraft = function () {
if (!authmethod.isLoggedIn()) {
var data = {
success: function () { return data; },
error: function (func) {
setTimeout(function() {
func({message:"not-logged-in"});
}, 0);
return data;
}
};
return data;
}
return $http.get(backendUrl + 'user/draft/', {});
};

authmethod.uploadUserDraft = function (draft) {
if (!authmethod.isLoggedIn()) {
var data = {
success: function () { return data; },
error: function (func) {
setTimeout(function() {
func({message:"not-logged-in"});
}, 0);
return data;
}
};
return data;
}
var draft_data = {
'draft_election': draft
};
return $http.post(backendUrl + 'user/draft/', draft_data);
};

return authmethod;
});

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": "avCommon",
"version" : "103111.7",
"version" : "103111.8",
"main": "index.html",
"ignore": [
"tests",
Expand Down
37 changes: 37 additions & 0 deletions dist/appCommon-v103111.7.js → dist/appCommon-v103111.8.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,43 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
$cookies["isAdmin" + postfix] && authmethod.ping().success(function(data) {
$cookies["auth" + postfix] = data["auth-token"], authmethod.setAuth($cookies["auth" + postfix], $cookies["isAdmin" + postfix], autheventid);
});
}, authmethod.getUserDraft = function() {
if (!authmethod.isLoggedIn()) {
var data = {
success: function() {
return data;
},
error: function(func) {
return setTimeout(function() {
func({
message: "not-logged-in"
});
}, 0), data;
}
};
return data;
}
return $http.get(backendUrl + "user/draft/", {});
}, authmethod.uploadUserDraft = function(draft) {
if (!authmethod.isLoggedIn()) {
var data = {
success: function() {
return data;
},
error: function(func) {
return setTimeout(function() {
func({
message: "not-logged-in"
});
}, 0), data;
}
};
return data;
}
var draft_data = {
draft_election: draft
};
return $http.post(backendUrl + "user/draft/", draft_data);
}, authmethod;
} ]), angular.module("avRegistration").controller("LoginController", [ "$scope", "$stateParams", "$filter", "ConfigService", "$i18next", function($scope, $stateParams, $filter, ConfigService, $i18next) {
$scope.event_id = $stateParams.id, $scope.code = $stateParams.code, $scope.email = $stateParams.email;
Expand Down
2 changes: 1 addition & 1 deletion dist/avConfig-v103111.7.js → dist/avConfig-v103111.8.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 = '103111.7';
var AV_CONFIG_VERSION = '103111.8';

var avConfigData = {
// the base url path for ajax requests, for example for sending ballots or
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html><html id="ng-app" ng-app="agora-gui-common"><head><title>Agora Voting</title><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><base href="/"><meta charset="utf-8"><link rel="stylesheet" id="theme" href="/themes/default/app.min.css"></head><body><!-- Livereload script for development only (stripped during dist build) --><!-- IE8 bind workaround (needed for less) --><!-- JS from Bower Components --><!-- Add New Bower Component JS Above --><!-- JS from Vendor Components --><!-- Add New Vendor Component JS Above --><!-- Configuration file JS --><!-- Themes JS --><!-- Main App JS --><!-- registration --><!-- ui --><!-- for security, we do not include the dynamic directive in the app,
so in the compiled app e2e tests are not expected work. --><!-- IE10 viewport hack for Surface/desktop Windows 8 bug --><!-- IE9 console workaround --><!-- Add New Component JS Above --><div id="no-js">Page is taking some time to load, wait a moment please. If it takes too long, please check that you have javascript activated, try with another browser or contact us.</div><div id="unsupported-browser">For security reasons, your browser is unsupported. Please use a newer web browser (if you are using Internet Explorer, use version 9 or newer).</div><div><!-- Shown while loading --><div id="angular-preloading" class="avb-start-loading"></div><!-- Main content --><div id="content"><!-- This is where angular injects its content --><div ui-view=""></div></div></div><!--[if lte IE 8]><script src="/libcompat-v103111.7.js"></script><![endif]--><!--[if gte IE 9]><script src="/libnocompat-v103111.7.js"></script><![endif]--><!--[if !IE]><!--><script src="/libnocompat-v103111.7.js"></script><!--<![endif]--><!--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 --><script src="/appCommon-v103111.7.js"></script><script src="/avPlugins-v103111.7.js"></script></body></html>
so in the compiled app e2e tests are not expected work. --><!-- IE10 viewport hack for Surface/desktop Windows 8 bug --><!-- IE9 console workaround --><!-- Add New Component JS Above --><div id="no-js">Page is taking some time to load, wait a moment please. If it takes too long, please check that you have javascript activated, try with another browser or contact us.</div><div id="unsupported-browser">For security reasons, your browser is unsupported. Please use a newer web browser (if you are using Internet Explorer, use version 9 or newer).</div><div><!-- Shown while loading --><div id="angular-preloading" class="avb-start-loading"></div><!-- Main content --><div id="content"><!-- This is where angular injects its content --><div ui-view=""></div></div></div><!--[if lte IE 8]><script src="/libcompat-v103111.8.js"></script><![endif]--><!--[if gte IE 9]><script src="/libnocompat-v103111.8.js"></script><![endif]--><!--[if !IE]><!--><script src="/libnocompat-v103111.8.js"></script><!--<![endif]--><!--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 --><script src="/appCommon-v103111.8.js"></script><script src="/avPlugins-v103111.8.js"></script></body></html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
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-common",
"version" : "103111.7.0",
"version" : "103111.8.0",
"devDependencies": {
"grunt": "~0.4",
"grunt-angular-templates": "~0.5",
Expand Down

0 comments on commit 8c89b23

Please sign in to comment.