diff --git a/SequentConfig.js b/SequentConfig.js index 26a29709..abe2d16d 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -20,15 +20,16 @@ * in this same file, which you might want to edit and tune if needed. */ -var SEQUENT_CONFIG_VERSION = '8.0.0'; +var SEQUENT_CONFIG_VERSION = "8.0.0"; var SequentConfigData = { // 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: '', + base: "", theme: "default", - baseUrl: "https://sequent/elections/api/", + + baseUrl: "/elections/api/", freeAuthId: 1, // Webpage title @@ -38,15 +39,15 @@ var SequentConfigData = { showSuccessAction: false, // AuthApi base url - authAPI: "https://sequent/iam/api/", - dnieUrl: "https://sequent.dev/iam/api/authmethod/dnie/auth/", + authAPI: "/iam/api/", + dnieUrl: "/iam/api/authmethod/dnie/auth/", // Agora Elections base url - electionsAPI: "https://sequent/elections/api/", + electionsAPI: "/elections/api/", // Agora Admin help url helpUrl: "https://sequentech.io/help", - authorities: ['local-auth2'], + authorities: ["local-auth2"], director: "local-auth1", // For admins: @@ -68,7 +69,7 @@ var SequentConfigData = { resourceUrlWhitelist: [ // Allow same origin resource loads. - 'self', + "self", // Allow loading from our assets domain. Notice the difference between * and **. // Uncomment the following to allow youtube videos @@ -86,20 +87,17 @@ var SequentConfigData = { // language: "es", - // Forces a specific language. // // Default: not set // lng: "es", - // specifies the set language query string. // // Default: "lang" // - detectLngQS: 'lang', - + detectLngQS: "lang", // Specifies what translations will be available. // @@ -116,8 +114,6 @@ var SequentConfigData = { // Default: 360 // // expires: 360, - - // Cookie domain // // Default: not set @@ -135,11 +131,11 @@ var SequentConfigData = { // If no Route is set, this is the route that will be loaded // // Default: '/admin/login' - defaultRoute: '/admin/login', + defaultRoute: "/admin/login", timeoutSeconds: 3600, - publicURL: "https://sequent/elections/public/", + publicURL: "/elections/public/", // if we are in debug mode or not debug: true, @@ -150,17 +146,17 @@ var SequentConfigData = { email: "contact@example.com", // Sales contact email displayed in the footer links sales: "sales@example.com", - tlf: "-no tlf-" + tlf: "-no tlf-", }, // social networks footer links social: { - facebook: "https://www.facebook.com/AgoraVoting", - twitter: "https://twitter.com/sequent", - twitterHandle: "sequent", - googleplus: "https://plus.google.com/101939665794445172389/posts", - youtube: "https://www.youtube.com/results?search_query=Agora+Voting", - github: "https://github.com/sequent/" + facebook: "https://www.facebook.com/AgoraVoting", + twitter: "https://twitter.com/sequent", + twitterHandle: "sequent", + googleplus: "https://plus.google.com/101939665794445172389/posts", + youtube: "https://www.youtube.com/results?search_query=Agora+Voting", + github: "https://github.com/sequent/", }, // technology footer links @@ -169,7 +165,7 @@ var SequentConfigData = { pricing: "https://sequentech.io/#pricing", overview: "https://sequentech.io/overview/", solutions: "https://sequentech.io/solutions/", - documentation: "https://bit.ly/avguiadeuso" + documentation: "https://bit.ly/avguiadeuso", }, // legality footer links @@ -178,65 +174,76 @@ var SequentConfigData = { cookies: "https://sequentech.io/cookies/", privacy: "https://sequentech.io/privacy/", security_contact: "https://sequentech.io/security_contact/", - community_website: "https://sequent.org" + community_website: "https://sequent.org", }, documentation: { show_help: true, - faq: 'https://sequentech.io/doc/en/', - overview: 'https://sequentech.io/overview/', - technical: 'https://sequentech.io/static/generic_tech_overview_20_08_15.pdf', - security_contact: "https://sequentech.io/security_contact/" + faq: "https://sequentech.io/doc/en/", + overview: "https://sequentech.io/overview/", + technical: + "https://sequentech.io/static/generic_tech_overview_20_08_15.pdf", + security_contact: "https://sequentech.io/security_contact/", }, - documentation_html_include: '', + documentation_html_include: "", - legal_html_include: '', + legal_html_include: "", // 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: 'Sequent Tech', + orgName: "Sequent Tech", // Subtitle of the organization, used in the ballot ticket PDF - orgSubtitle: '', + orgSubtitle: "", // Big logo of the organization, used in the ballot ticket PDF - orgBigLogo: '', + orgBigLogo: "", // URL that the logo links to - orgUrl: 'https://sequentech.io' + orgUrl: "https://sequentech.io", }, verifier: { link: "", - hash: "" + hash: "", }, success: { - text: "" + text: "", }, tos: { - text:"", - title: "" + text: "", + title: "", }, - mainVersion: '8.0.0', - repoVersions: [] + mainVersion: "8.0.0", + repoVersions: [], }; -angular.module('SequentConfig', []) - .factory('ConfigService', function() { +angular + .module("SequentConfig", []) + .factory("ConfigService", function ($location) { + var baseUrl = $location.protocol() + "://" + $location.host; + SequentConfigData.publicURL = baseUrl + SequentConfigData.publicURL; + SequentConfigData.electionsAPI = baseUrl + SequentConfigData.electionsAPI; + SequentConfigData.dnieUrl = baseUrl + SequentConfigData.dnieUrl; + SequentConfigData.authAPI = baseUrl + SequentConfigData.authAPI; + SequentConfigData.baseUrl = baseUrl + SequentConfigData.baseUrl; return SequentConfigData; }); -angular.module('SequentConfig') - .provider('ConfigService', function ConfigServiceProvider() { +angular + .module("SequentConfig") + .provider("ConfigService", function ConfigServiceProvider() { _.extend(this, SequentConfigData); - this.$get = [function ConfigServiceProviderFactory() { - return new ConfigServiceProvider(); - }]; + this.$get = [ + function ConfigServiceProviderFactory() { + return new ConfigServiceProvider(); + }, + ]; }); diff --git a/avBooth/booth.js b/avBooth/booth.js index 815e4e25..113fbbc4 100644 --- a/avBooth/booth.js +++ b/avBooth/booth.js @@ -15,41 +15,39 @@ * along with voting-booth. If not, see . **/ -angular.module( - 'avBooth', - [ - 'ui.bootstrap', - 'ui.utils', - 'ui.router', - 'ngAnimate', - 'avUi' - ] -); +angular.module("avBooth", [ + "ui.bootstrap", + "ui.utils", + "ui.router", + "ngAnimate", + "avUi", +]); -angular.module('avBooth').config(function($stateProvider) { - /* Add New States Above */ +angular.module("avBooth").config(function ($stateProvider) { + /* Add New States Above */ }); angular - .module('avBooth') + .module("avBooth") .controller( - 'BoothController', - function( - $scope, - $stateParams, - $filter, - ConfigService, - $i18next, + "BoothController", + function ( + $scope, + $stateParams, + $filter, + ConfigService, + $i18next, $cookies, $location, InsideIframeService ) { $scope.isDemo = $stateParams.isDemo || false; - var previewElectionParam = ($location.search())['preview-election']; - $scope.previewElection = previewElectionParam && decodeURIComponent(previewElectionParam); + var previewElectionParam = $location.search()["preview-election"]; + $scope.previewElection = + previewElectionParam && decodeURIComponent(previewElectionParam); $scope.isPreview = $stateParams.isPreview || false; $scope.electionId = $stateParams.id; $scope.baseUrl = ConfigService.baseUrl; - $scope.config = $filter('json')(ConfigService); + $scope.config = $filter("json")(ConfigService); } ); diff --git a/node-v0.10.31.tar.gz b/node-v0.10.31.tar.gz new file mode 100644 index 00000000..24c41f11 Binary files /dev/null and b/node-v0.10.31.tar.gz differ diff --git a/yarn.lock b/yarn.lock index bd742c00..82e87338 100644 --- a/yarn.lock +++ b/yarn.lock @@ -696,9 +696,9 @@ commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -"common-ui@https://github.com/sequentech/common-ui.git#master": - version "6.0.0" - resolved "https://github.com/sequentech/common-ui.git#9bef1b3c120e6a5f7c7d8e48082ad12c361a99cc" +"common-ui@https://github.com/sequentech/common-ui.git#8.0.0": + version "8.0.0" + resolved "https://github.com/sequentech/common-ui.git#95531243c03cc44563efde2133d7c80d1ba2ae0a" dependencies: browser-update "^3.3.28" karma-ng-html2js-preprocessor "^1.0.0"