").append(tree).html();
- };
-}), angular.module("avUi").filter("htmlToText", function() {
- return function(text) {
- return angular.element("
" + text + "
").text();
- };
-}), angular.module("avUi").config([ "$provide", function($provide) {
- $provide.decorator("ngModelDirective", [ "$delegate", function($delegate) {
- var ngModel = $delegate[0], controller = ngModel.controller;
- return ngModel.controller = [ "$scope", "$element", "$attrs", "$injector", function(scope, element, attrs, $injector) {
- var $interpolate = $injector.get("$interpolate");
- attrs.$set("name", $interpolate(attrs.name || "")(scope)), $injector.invoke(controller, this, {
- $scope: scope,
- $element: element,
- $attrs: attrs
- });
- } ], $delegate;
- } ]), $provide.decorator("formDirective", [ "$delegate", function($delegate) {
- var form = $delegate[0], controller = form.controller;
- return form.controller = [ "$scope", "$element", "$attrs", "$injector", function(scope, element, attrs, $injector) {
- var $interpolate = $injector.get("$interpolate");
- attrs.$set("name", $interpolate(attrs.name || attrs.ngForm || "")(scope)), $injector.invoke(controller, this, {
- $scope: scope,
- $element: element,
- $attrs: attrs
- });
- } ], $delegate;
- } ]);
-} ]), angular.module("avUi").controller("DocumentationUiController", [ "$state", "$stateParams", "$http", "$scope", "$i18next", "ConfigService", "InsideIframeService", "Authmethod", function($state, $stateParams, $http, $scope, $i18next, ConfigService, InsideIframeService, Authmethod) {
- $scope.inside_iframe = InsideIframeService(), $scope.documentation = ConfigService.documentation,
- $scope.documentation.security_contact = ConfigService.legal.security_contact, $scope.documentation_html_include = ConfigService.documentation_html_include,
- $scope.auths_url = "/election/" + $stateParams.id + "/public/authorities", $scope.legal_url = "/election/" + $stateParams.id + "/public/legal",
- Authmethod.viewEvent($stateParams.id).success(function(data) {
- "ok" === data.status && ($scope.authEvent = data.events);
- });
-} ]), angular.module("avUi").directive("documentationDirective", function() {
- return {
- restrict: "AE",
- templateUrl: "avUi/documentation-directive/documentation-directive.html",
- controller: "DocumentationUiController"
- };
-}), angular.module("avUi").directive("avFoot", [ "ConfigService", function(ConfigService) {
- function link(scope, element, attrs) {
- scope.contact = ConfigService.contact, scope.social = ConfigService.social, scope.technology = ConfigService.technology,
- scope.legal = ConfigService.legal;
- }
- return {
- restrict: "AE",
- scope: {},
- link: link,
- templateUrl: "avUi/foot-directive/foot-directive.html"
- };
-} ]), angular.module("agora-gui-common", [ "ui.bootstrap", "ui.utils", "ui.router", "ngAnimate", "ngResource", "ngCookies", "ipCookie", "ngSanitize", "infinite-scroll", "angularMoment", "avConfig", "jm.i18next", "avRegistration", "avUi", "avTest", "angularFileUpload", "dndLists", "angularLoad", "angular-date-picker-polyfill", "ng-autofocus" ]),
-angular.module("jm.i18next").config([ "$i18nextProvider", "ConfigServiceProvider", function($i18nextProvider, ConfigServiceProvider) {
- $("#no-js").hide(), $i18nextProvider.options = _.extend({
- useCookie: !0,
- useLocalStorage: !1,
- fallbackLng: "en",
- cookieName: "lang",
- detectLngQS: "lang",
- lngWhitelist: [ "en", "es", "gl", "ca" ],
- resGetPath: "/locales/__lng__.json",
- defaultLoadingValue: ""
- }, ConfigServiceProvider.i18nextInitOptions);
-} ]), angular.module("agora-gui-common").run([ "$http", "$rootScope", function($http, $rootScope) {
- $rootScope.safeApply = function(fn) {
- var phase = $rootScope.$$phase;
- "$apply" === phase || "$digest" === phase ? fn && "function" == typeof fn && fn() : this.$apply(fn);
- }, $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams) {
- console.log("change start from " + fromState.name + " to " + toState.name), $("#angular-preloading").show();
- }), $rootScope.$on("$stateChangeSuccess", function(event, toState, toParams, fromState, fromParams) {
- console.log("change success"), $("#angular-preloading").hide();
- });
-} ]), angular.module("agora-gui-common").directive("ngEnter", function() {
- return function(scope, element, attrs) {
- element.bind("keydown keypress", function(event) {
- 13 === event.which && (scope.$apply(function() {
- scope.$eval(attrs.ngEnter);
- }), event.preventDefault());
- });
- };
-}), angular.module("agora-gui-common").filter("truncate", function() {
- return function(text, length, end) {
- return isNaN(length) && (length = 10), void 0 === end && (end = "..."), text.length <= length || text.length - end.length <= length ? text : String(text).substring(0, length - end.length) + end;
- };
-}), angular.module("avTest", []), angular.module("avTest").controller("UnitTestE2EController", [ "$scope", "$location", "ConfigService", function($scope, $location, ConfigService) {
- ConfigService.debug && ($scope.html = $location.search().html, console.log($location.search()));
-} ]), angular.module("agora-gui-common").run([ "$templateCache", function($templateCache) {
- "use strict";
- $templateCache.put("avRegistration/error.html", '
'),
- $templateCache.put("avRegistration/field-directive/field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/bool-field-directive/bool-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/captcha-field-directive/captcha-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/code-field-directive/code-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/dni-field-directive/dni-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/email-field-directive/email-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/image-field-directive/image-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/int-field-directive/int-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/password-field-directive/password-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/tel-field-directive/tel-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/text-field-directive/text-field-directive.html", '
'),
- $templateCache.put("avRegistration/fields/textarea-field-directive/textarea-field-directive.html", '
'),
- $templateCache.put("avRegistration/loading.html", '
'),
- $templateCache.put("avRegistration/login-controller/login-controller.html", '
'),
- $templateCache.put("avRegistration/login-directive/login-directive.html", '
'),
- $templateCache.put("avRegistration/register-controller/register-controller.html", '
'),
- $templateCache.put("avRegistration/register-directive/register-directive.html", '
'),
- $templateCache.put("avRegistration/success.html", '
'),
- $templateCache.put("avUi/change-lang-directive/change-lang-directive.html", '
{{ deflang }} '),
- $templateCache.put("avUi/documentation-directive/documentation-directive.html", '
'),
- $templateCache.put("avUi/foot-directive/foot-directive.html", ''),
- $templateCache.put("avUi/simple-error-directive/simple-error-directive.html", '
'),
- $templateCache.put("test/test_booth_widget.html", '
Test frame