From 052bc76a8e5db779c6c7aff61faad10a1c1733df Mon Sep 17 00:00:00 2001 From: Findeton Date: Thu, 26 Oct 2017 13:56:56 -0500 Subject: [PATCH 1/4] add get/save draft el --- avRegistration/auth-method-service.js | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/avRegistration/auth-method-service.js b/avRegistration/auth-method-service.js index 23aacc5b..6ce77f46 100644 --- a/avRegistration/auth-method-service.js +++ b/avRegistration/auth-method-service.js @@ -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 data = { + 'draft_election': draft + }; + return $http.post(backendUrl + 'user/draft/', data); + }; + return authmethod; }); From 690d1904d8efc8590c11428907ac4779d2051eb2 Mon Sep 17 00:00:00 2001 From: Findeton Date: Thu, 26 Oct 2017 13:59:02 -0500 Subject: [PATCH 2/4] grunt build --- avRegistration/auth-method-service.js | 4 +-- dist/appCommon-v103111.7.js | 37 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/avRegistration/auth-method-service.js b/avRegistration/auth-method-service.js index 6ce77f46..e5b0bc31 100644 --- a/avRegistration/auth-method-service.js +++ b/avRegistration/auth-method-service.js @@ -411,10 +411,10 @@ angular.module('avRegistration') }; return data; } - var data = { + var draft_data = { 'draft_election': draft }; - return $http.post(backendUrl + 'user/draft/', data); + return $http.post(backendUrl + 'user/draft/', draft_data); }; return authmethod; diff --git a/dist/appCommon-v103111.7.js b/dist/appCommon-v103111.7.js index 6cf3c395..f65699f5 100644 --- a/dist/appCommon-v103111.7.js +++ b/dist/appCommon-v103111.7.js @@ -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; From 8626e6bff0487b69fd2b6f2e456aed3dec2afee9 Mon Sep 17 00:00:00 2001 From: Findeton Date: Sun, 5 Nov 2017 09:49:10 -0500 Subject: [PATCH 3/4] change version to go v8 --- Gruntfile.js | 22 +++++++++++----------- avConfig.js | 2 +- bower.json | 2 +- package.json | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 41cad943..1122e542 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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/**' @@ -195,10 +195,10 @@ module.exports = function (grunt) { options: { remove: ['script[data-remove!="false"]','link[data-remove!="false"]'], append: [ - {selector:'body',html:''}, + {selector:'body',html:''}, {selector:'body',html:''}, - {selector:'body',html:''}, - {selector:'body',html:''}, + {selector:'body',html:''}, + {selector:'body',html:''}, {selector:'head',html:''} ] }, @@ -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'] } } }, @@ -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", diff --git a/avConfig.js b/avConfig.js index 872154b6..7ffa5c94 100644 --- a/avConfig.js +++ b/avConfig.js @@ -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 diff --git a/bower.json b/bower.json index 98e47140..0042cd66 100755 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "avCommon", - "version" : "103111.7", + "version" : "103111.8", "main": "index.html", "ignore": [ "tests", diff --git a/package.json b/package.json index a8d13bcf..5afb4bb8 100644 --- a/package.json +++ b/package.json @@ -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", From 0d461581a2ed61095323e6e776d91653f05c06d3 Mon Sep 17 00:00:00 2001 From: Findeton Date: Sun, 5 Nov 2017 09:50:15 -0500 Subject: [PATCH 4/4] grunt build --- dist/{appCommon-v103111.7.js => appCommon-v103111.8.js} | 0 dist/{avConfig-v103111.7.js => avConfig-v103111.8.js} | 2 +- dist/{avPlugins-v103111.7.js => avPlugins-v103111.8.js} | 0 dist/{avThemes-v103111.7.js => avThemes-v103111.8.js} | 0 dist/index.html | 2 +- dist/{libCommon-v103111.7.js => libCommon-v103111.8.js} | 0 dist/{libcompat-v103111.7.js => libcompat-v103111.8.js} | 0 dist/{libnocompat-v103111.7.js => libnocompat-v103111.8.js} | 0 8 files changed, 2 insertions(+), 2 deletions(-) rename dist/{appCommon-v103111.7.js => appCommon-v103111.8.js} (100%) rename dist/{avConfig-v103111.7.js => avConfig-v103111.8.js} (99%) rename dist/{avPlugins-v103111.7.js => avPlugins-v103111.8.js} (100%) rename dist/{avThemes-v103111.7.js => avThemes-v103111.8.js} (100%) rename dist/{libCommon-v103111.7.js => libCommon-v103111.8.js} (100%) rename dist/{libcompat-v103111.7.js => libcompat-v103111.8.js} (100%) rename dist/{libnocompat-v103111.7.js => libnocompat-v103111.8.js} (100%) diff --git a/dist/appCommon-v103111.7.js b/dist/appCommon-v103111.8.js similarity index 100% rename from dist/appCommon-v103111.7.js rename to dist/appCommon-v103111.8.js diff --git a/dist/avConfig-v103111.7.js b/dist/avConfig-v103111.8.js similarity index 99% rename from dist/avConfig-v103111.7.js rename to dist/avConfig-v103111.8.js index 872154b6..7ffa5c94 100644 --- a/dist/avConfig-v103111.7.js +++ b/dist/avConfig-v103111.8.js @@ -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 diff --git a/dist/avPlugins-v103111.7.js b/dist/avPlugins-v103111.8.js similarity index 100% rename from dist/avPlugins-v103111.7.js rename to dist/avPlugins-v103111.8.js diff --git a/dist/avThemes-v103111.7.js b/dist/avThemes-v103111.8.js similarity index 100% rename from dist/avThemes-v103111.7.js rename to dist/avThemes-v103111.8.js diff --git a/dist/index.html b/dist/index.html index 260968fe..74d28d2e 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,2 +1,2 @@ Agora Voting
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.
For security reasons, your browser is unsupported. Please use a newer web browser (if you are using Internet Explorer, use version 9 or newer).
\ No newline at end of file + so in the compiled app e2e tests are not expected work. -->
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.
For security reasons, your browser is unsupported. Please use a newer web browser (if you are using Internet Explorer, use version 9 or newer).
\ No newline at end of file diff --git a/dist/libCommon-v103111.7.js b/dist/libCommon-v103111.8.js similarity index 100% rename from dist/libCommon-v103111.7.js rename to dist/libCommon-v103111.8.js diff --git a/dist/libcompat-v103111.7.js b/dist/libcompat-v103111.8.js similarity index 100% rename from dist/libcompat-v103111.7.js rename to dist/libcompat-v103111.8.js diff --git a/dist/libnocompat-v103111.7.js b/dist/libnocompat-v103111.8.js similarity index 100% rename from dist/libnocompat-v103111.7.js rename to dist/libnocompat-v103111.8.js