diff --git a/app/assets/javascripts/controllers/home.js b/app/assets/javascripts/controllers/home.js index 99ef84b01..1bd6ac15f 100644 --- a/app/assets/javascripts/controllers/home.js +++ b/app/assets/javascripts/controllers/home.js @@ -10,7 +10,8 @@ */ 'use strict' -Application.Controllers.controller('HomeController', ['$scope', '$stateParams', 'Twitter', 'lastMembersPromise', 'lastProjectsPromise', 'upcomingEventsPromise', 'homeBlogpostPromise', 'twitterNamePromise', function ($scope, $stateParams, Twitter, lastMembersPromise, lastProjectsPromise, upcomingEventsPromise, homeBlogpostPromise, twitterNamePromise) { +Application.Controllers.controller('HomeController', ['$scope', '$stateParams', 'Twitter', 'lastMembersPromise', 'lastProjectsPromise', 'upcomingEventsPromise', 'homeBlogpostPromise', 'twitterNamePromise', + function ($scope, $stateParams, Twitter, lastMembersPromise, lastProjectsPromise, upcomingEventsPromise, homeBlogpostPromise, twitterNamePromise) { /* PUBLIC SCOPE */ // # The last registered members who confirmed their addresses diff --git a/app/assets/javascripts/controllers/machines.js.erb b/app/assets/javascripts/controllers/machines.js.erb index cf42f6bd0..91aa78c92 100644 --- a/app/assets/javascripts/controllers/machines.js.erb +++ b/app/assets/javascripts/controllers/machines.js.erb @@ -180,7 +180,8 @@ const _reserveMachine = function (machine, e) { /** * Controller used in the public listing page, allowing everyone to see the list of machines */ -Application.Controllers.controller('MachinesController', ['$scope', '$state', '_t', 'Machine', '$uibModal', 'machinesPromise', function ($scope, $state, _t, Machine, $uibModal, machinesPromise) { +Application.Controllers.controller('MachinesController', ['$scope', '$state', '_t', 'Machine', '$uibModal', 'machinesPromise', + function ($scope, $state, _t, Machine, $uibModal, machinesPromise) { // Retrieve the list of machines $scope.machines = machinesPromise @@ -236,7 +237,8 @@ Application.Controllers.controller('NewMachineController', ['$scope', '$state', /** * Controller used in the machine edition page (admin) */ -Application.Controllers.controller('EditMachineController', ['$scope', '$state', '$stateParams', 'machinePromise', 'CSRF', function ($scope, $state, $stateParams, machinePromise, CSRF) { +Application.Controllers.controller('EditMachineController', ['$scope', '$state', '$stateParams', 'machinePromise', 'CSRF', + function ($scope, $state, $stateParams, machinePromise, CSRF) { /* PUBLIC SCOPE */ // API URL where the form will be posted diff --git a/app/assets/javascripts/controllers/projects.js.erb b/app/assets/javascripts/controllers/projects.js.erb index 21be54b59..b5fc4cd75 100644 --- a/app/assets/javascripts/controllers/projects.js.erb +++ b/app/assets/javascripts/controllers/projects.js.erb @@ -46,7 +46,7 @@ class ProjectsController { // Retrieve the list of machines from the server Machine.query().$promise.then(function (data) { $scope.machines = data.map(function (d) { - ({ + return ({ id: d.id, name: d.name }) @@ -56,7 +56,7 @@ class ProjectsController { // Retrieve the list of components from the server Component.query().$promise.then(function (data) { $scope.components = data.map(function (d) { - ({ + return ({ id: d.id, name: d.name }) @@ -66,7 +66,7 @@ class ProjectsController { // Retrieve the list of themes from the server Theme.query().$promise.then(function (data) { $scope.themes = data.map(function (d) { - ({ + return ({ id: d.id, name: d.name }) @@ -76,7 +76,7 @@ class ProjectsController { // Retrieve the list of licences from the server Licence.query().$promise.then(function (data) { $scope.licences = data.map(function (d) { - ({ + return ({ id: d.id, name: d.name }) diff --git a/app/assets/javascripts/controllers/spaces.js.erb b/app/assets/javascripts/controllers/spaces.js.erb index 54f720bf8..d5b67595b 100644 --- a/app/assets/javascripts/controllers/spaces.js.erb +++ b/app/assets/javascripts/controllers/spaces.js.erb @@ -146,7 +146,8 @@ Application.Controllers.controller('NewSpaceController', ['$scope', '$state', 'C /** * Controller used in the space edition page (admin) */ -Application.Controllers.controller('EditSpaceController', ['$scope', '$state', '$stateParams', 'spacePromise', 'CSRF', function ($scope, $state, $stateParams, spacePromise, CSRF) { +Application.Controllers.controller('EditSpaceController', ['$scope', '$state', '$stateParams', 'spacePromise', 'CSRF', + function ($scope, $state, $stateParams, spacePromise, CSRF) { CSRF.setMetaTags() // API URL where the form will be posted @@ -162,7 +163,8 @@ Application.Controllers.controller('EditSpaceController', ['$scope', '$state', ' return new SpacesController($scope, $state) }]) -Application.Controllers.controller('ShowSpaceController', ['$scope', '$state', 'spacePromise', '_t', 'dialogs', 'growl', function ($scope, $state, spacePromise, _t, dialogs, growl) { +Application.Controllers.controller('ShowSpaceController', ['$scope', '$state', 'spacePromise', '_t', 'dialogs', 'growl', + function ($scope, $state, spacePromise, _t, dialogs, growl) { // Details of the space witch id/slug is provided in the URL $scope.space = spacePromise diff --git a/app/assets/javascripts/controllers/trainings.js.erb b/app/assets/javascripts/controllers/trainings.js.erb index 1278e9f94..d997da505 100644 --- a/app/assets/javascripts/controllers/trainings.js.erb +++ b/app/assets/javascripts/controllers/trainings.js.erb @@ -17,7 +17,8 @@ /** * Public listing of the trainings */ -Application.Controllers.controller('TrainingsController', ['$scope', '$state', 'trainingsPromise', function ($scope, $state, trainingsPromise) { +Application.Controllers.controller('TrainingsController', ['$scope', '$state', 'trainingsPromise', + function ($scope, $state, trainingsPromise) { // List of trainings $scope.trainings = trainingsPromise @@ -29,13 +30,14 @@ Application.Controllers.controller('TrainingsController', ['$scope', '$state', ' /** * Callback for the 'show' button */ - return $scope.showTraining = function (training) { $state.go('app.public.training_show', { id: training.slug }) } + $scope.showTraining = function (training) { $state.go('app.public.training_show', { id: training.slug }) } }]) /** * Public view of a specific training */ -Application.Controllers.controller('ShowTrainingController', ['$scope', '$state', 'trainingPromise', 'growl', '_t', 'dialogs', function ($scope, $state, trainingPromise, growl, _t, dialogs) { +Application.Controllers.controller('ShowTrainingController', ['$scope', '$state', 'trainingPromise', 'growl', '_t', 'dialogs', + function ($scope, $state, trainingPromise, growl, _t, dialogs) { // Current training $scope.training = trainingPromise diff --git a/app/assets/javascripts/controllers/wallet.js b/app/assets/javascripts/controllers/wallet.js index 41afc4f8a..b3e802234 100644 --- a/app/assets/javascripts/controllers/wallet.js +++ b/app/assets/javascripts/controllers/wallet.js @@ -11,7 +11,8 @@ */ 'use strict' -Application.Controllers.controller('WalletController', ['$scope', 'walletPromise', 'transactionsPromise', function ($scope, walletPromise, transactionsPromise) { +Application.Controllers.controller('WalletController', ['$scope', 'walletPromise', 'transactionsPromise', + function ($scope, walletPromise, transactionsPromise) { /* PUBLIC SCOPE */ // # current user wallet