mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
Create machine availabilities: select all/none in a click
This commit is contained in:
parent
939b4e3851
commit
45e4b5c4bc
@ -19,6 +19,7 @@
|
||||
- Improved notification email to the member when a rolling subscription is taken
|
||||
- Notify all admins on the creation of a refund invoice
|
||||
- Calendar management: improved legend display and visual behavior
|
||||
- Create machine availabilities: select all/none in a click
|
||||
- Prevent event reservation in the past [Taiga#127]
|
||||
- Removed the need of twitter API keys to display the last tweet on the home page
|
||||
- Handle Ctrl^C in upgrade scripts
|
||||
|
@ -416,6 +416,7 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui
|
||||
|
||||
// machines associated with the created slot
|
||||
$scope.selectedMachines = [];
|
||||
$scope.selectedMachinesBinding = {};
|
||||
|
||||
// training associated with the created slot
|
||||
$scope.selectedTraining = null;
|
||||
@ -475,6 +476,21 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Select/unselect all the machines
|
||||
*/
|
||||
$scope.toggleAll = function() {
|
||||
const count = $scope.selectedMachines.length;
|
||||
$scope.selectedMachines = [];
|
||||
$scope.selectedMachinesBinding = {};
|
||||
if (count == 0) {
|
||||
$scope.machines.forEach(function (machine) {
|
||||
$scope.selectedMachines.push(machine);
|
||||
$scope.selectedMachinesBinding[machine.id] = true;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for the modal window validation: save the slot and closes the modal
|
||||
*/
|
||||
|
@ -32,8 +32,9 @@
|
||||
<p class="text-center font-sbold m-t-sm">{{ 'app.admin.calendar.select_some_machines' | translate }}</p>
|
||||
|
||||
<div class="form-group m-l-xl">
|
||||
<button class="btn btn-default pull-right m-t-n-xl" ng-click="toggleAll()" translate>{{ selectedMachines.length == 0 ? 'app.admin.calendar.select_all' : 'app.admin.calendar.select_none' }}</button>
|
||||
<label class="checkbox" ng-repeat="machine in machines">
|
||||
<input type="checkbox" ng-click="toggleSelection(machine)"> {{machine.name}} <span class="text-xs">(id {{machine.id}})</span>
|
||||
<input type="checkbox" ng-click="toggleSelection(machine)" ng-model="selectedMachinesBinding[machine.id]"> {{machine.name}} <span class="text-xs">(id {{machine.id}})</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,6 +40,8 @@ en:
|
||||
next: "Next >"
|
||||
previous: "< Previous"
|
||||
select_some_machines: "Select some machines"
|
||||
select_all: "All"
|
||||
select_none: "None"
|
||||
number_of_tickets: "Number of tickets: "
|
||||
adjust_the_opening_hours: "Adjust the opening hours"
|
||||
to_time: "to" # context: time. eg. 'from 18:00 to 21:00'
|
||||
|
@ -40,6 +40,8 @@ es:
|
||||
next: "Siguiente >"
|
||||
previous: "< Anterior"
|
||||
select_some_machines: "Seleccione algunas máquinas"
|
||||
select_all: "Todas"
|
||||
select_none: "No"
|
||||
number_of_tickets: "Número de tickets: "
|
||||
adjust_the_opening_hours: "Ajustar el horario de apertura"
|
||||
to_time: "to" # context: hora. ej. 'de 18:00 a 21:00'
|
||||
|
@ -40,6 +40,8 @@ fr:
|
||||
next: "Suivant >"
|
||||
previous: "< Précédent"
|
||||
select_some_machines: "Sélectionnez des machines"
|
||||
select_all: "Toutes"
|
||||
select_none: "Aucune"
|
||||
number_of_tickets: "Nombre de places : "
|
||||
adjust_the_opening_hours: "Ajuster l'horaire"
|
||||
to_time: "à" # context: time. eg. 'from 18:00 to 21:00'
|
||||
|
@ -40,6 +40,8 @@ pt:
|
||||
next: "Próximo >"
|
||||
previous: "< Voltar"
|
||||
select_some_machines: "Selecionar algumas máquinas"
|
||||
select_all: "Tudo"
|
||||
select_none: "Não"
|
||||
number_of_tickets: "Número de vagas: "
|
||||
adjust_the_opening_hours: "Ajustar o horário de funcionamento"
|
||||
to_time: "ás" # context: time. eg. 'from 18:00 to 21:00'
|
||||
|
Loading…
x
Reference in New Issue
Block a user