Skip to content
Open
7 changes: 6 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,12 @@ module.exports = function (grunt) {
keepAlive: false,
// If true, protractor will not use colors in its output
noColor: false,
args: {}
args: (
(
process.env.PROTRACTOR_ARGS &&
JSON.parse(process.env.PROTRACTOR_ARGS)
) || {}
)
},
all: {
options: {
Expand Down
4 changes: 2 additions & 2 deletions avAdmin/admin-controller/admin-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ angular
$scope,
$state,
$stateParams,
$timeout,
$interval,
$q,
$window,
$modal
Expand Down Expand Up @@ -336,7 +336,7 @@ angular
$scope.has_draft = false;

function updateDraft(el) {
$timeout(function () {
$interval(function () {
$scope.draft = el;
$scope.has_draft = ("{}" !== JSON.stringify(el));
});
Expand Down
6 changes: 3 additions & 3 deletions avAdmin/admin-directives/activity-log/activity-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ angular.module('avAdmin')
ElectionsApi,
ConfigService,
NextButtonService,
$timeout,
$interval,
$stateParams
) {
// we use it as something similar to a controller here
Expand Down Expand Up @@ -108,8 +108,8 @@ angular.module('avAdmin')

// debounced reloading
function reloadActivityDebounce() {
$timeout.cancel(scope.filterTimeout);
scope.filterTimeout = $timeout(function() {
$interval.cancel(scope.filterTimeout);
scope.filterTimeout = $interval(function() {
scope.reloadActivity();
}, 500);
}
Expand Down
6 changes: 3 additions & 3 deletions avAdmin/admin-directives/ballot-box/ballot-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ angular.module('avAdmin')
Authmethod,
ConfigService,
NextButtonService,
$timeout,
$interval,
$i18next,
$modal,
$location,
Expand Down Expand Up @@ -105,8 +105,8 @@ angular.module('avAdmin')

// debounced reloading
function reloadDebounce() {
$timeout.cancel(scope.filterTimeout);
scope.filterTimeout = $timeout(function() {
$interval.cancel(scope.filterTimeout);
scope.filterTimeout = $interval(function() {
scope.reload();
}, 500);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ angular.module('avAdmin')
function(
ConfigService,
$location,
$timeout,
$interval,
$scope,
$modalInstance,
$i18next,
Expand Down Expand Up @@ -192,7 +192,7 @@ angular.module('avAdmin')
});

// use a click to an element with a specific class to close the dialog
$timeout(function() {
$interval(function() {
$(".av-plugin-modal-close").click(function()
{
var data = $(this).data("response");
Expand Down
6 changes: 3 additions & 3 deletions avAdmin/admin-directives/elcensus/elcensus.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ angular.module('avAdmin')
$filter,
$stateParams,
$state,
$timeout,
$interval,
ConfigService,
CsvLoad,
NextButtonService)
Expand Down Expand Up @@ -1116,8 +1116,8 @@ angular.module('avAdmin')
}

function reloadCensusDebounce() {
$timeout.cancel(scope.filterTimeout);
scope.filterTimeout = $timeout(function() {
$interval.cancel(scope.filterTimeout);
scope.filterTimeout = $interval(function() {
scope.reloadCensus();
}, 500);
}
Expand Down
10 changes: 8 additions & 2 deletions avAdmin/admin-directives/elections/elections.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@
angular.module('avAdmin')
.directive(
'avAdminElections',
function(Authmethod, ElectionsApi, DraftElection, AdminProfile, OnboardingTourService, $state, Plugins, $modal, $timeout, $window)
{
function(
Authmethod,
ElectionsApi,
AdminProfile,
OnboardingTourService,
Plugins,
$window
) {
// we use it as something similar to a controller here
function link(scope, element, attrs) {
scope.page = 1;
Expand Down
12 changes: 6 additions & 6 deletions avAdmin/admin-directives/tasks/view-task-logs-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ angular
function(
$scope,
$modalInstance,
$timeout,
$interval,
Authmethod,
AnsiUpService,
task
Expand Down Expand Up @@ -73,10 +73,10 @@ angular
task.status
)) {
if ($scope.taskUpdateTimeout) {
$timeout.cancel($scope.taskUpdateTimeout);
$interval.cancel($scope.taskUpdateTimeout);
}
} else {
$scope.taskUpdateTimeout = $timeout(
$scope.taskUpdateTimeout = $interval(
function ()
{
$scope.taskUpdateFunc();
Expand All @@ -86,7 +86,7 @@ angular
$scope.updateTask();
}
};
$scope.taskUpdateTimeout = $timeout(
$scope.taskUpdateTimeout = $interval(
function ()
{
$scope.taskUpdateFunc();
Expand All @@ -103,7 +103,7 @@ angular
{
return;
}
$timeout(
$interval(
function ()
{
$('.modal-body.view-task-logs-modal .console .end-marker')[0]
Expand Down Expand Up @@ -204,7 +204,7 @@ angular
$scope.updateLogs();

// scroll into the bottom of the modal on start
$timeout(
$interval(
function ()
{
$('.modal-body.view-task-logs-modal .autoscroll-span')[0]
Expand Down
4 changes: 2 additions & 2 deletions avAdmin/admin-directives/tasks/view-task-logs-modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}

.ansi-red-fg {
color: #DD948E;
color: #f00b0b;
}

.ansi-green-fg {
Expand Down Expand Up @@ -134,7 +134,7 @@
}

.ansi-red-bg {
background-color: #DD948E;
background-color: #f00b0b;
}

.ansi-green-bg {
Expand Down
6 changes: 3 additions & 3 deletions avAdmin/csv-load-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ angular.module('avAdmin')
'CsvLoad',
function (
$q,
$timeout,
$interval,
ConfigService,
Plugins,
Authmethod)
Expand Down Expand Up @@ -190,7 +190,7 @@ angular.module('avAdmin')
if (_.isFunction(csvLoadService.scope.processBatchPlugin)) {
csvLoadService.scope.processBatchPlugin(processed)
.then(function (ret) {
$timeout(function () {
$interval(function () {
csvLoadService.scope.percent = ret.percent;
csvLoadService.scope.exportListIndex = ret.exportListIndex;

Expand All @@ -205,7 +205,7 @@ angular.module('avAdmin')
});
});
} else {
$timeout(function () {
$interval(function () {
csvLoadService.scope.percent = processed.percent;
csvLoadService.scope.exportListIndex = processed.exportListIndex;

Expand Down
8 changes: 4 additions & 4 deletions avAdmin/draft-election.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ angular.module('avAdmin')
ElectionsApi,
$i18next,
$http,
$timeout,
$interval,
$modal,
$state,
$stateParams,
Expand Down Expand Up @@ -85,7 +85,7 @@ angular.module('avAdmin')
if (!draft_election.isEditingDraft()) {
election = undefined;
if (!_.isUndefined(promise)) {
$timeout.cancel(promise);
$interval.cancel(promise);
}
return;
}
Expand All @@ -104,14 +104,14 @@ angular.module('avAdmin')
console.log("error uploading draft: " + response.data);
}
);
promise = $timeout(draft_election.updateDraft, 60000);
promise = $interval(draft_election.updateDraft, 60000);
};

draft_election.eraseDraft = function () {
var deferred = $q.defer();
election = undefined;
if (!_.isUndefined(promise)) {
$timeout.cancel(promise);
$interval.cancel(promise);
}
Authmethod
.uploadUserDraft({})
Expand Down
126 changes: 0 additions & 126 deletions avAdmin/new-election-send-webspec.js

This file was deleted.

Loading