mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
fixes and improvements after coffeescript migration
This commit is contained in:
parent
636e89f2e9
commit
c1b1b701ae
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user