mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
(front) add is-empty class to the calendar-admin-info side panel if no events are selected
This commit is contained in:
parent
78be7bb276
commit
c77e6c8a65
@ -494,6 +494,9 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
|
||||
$scope.availability = event;
|
||||
$scope.availability.plans = availabilityPlans();
|
||||
|
||||
// mark the side panel as available to be opened
|
||||
$('label.calendar-admin-info').removeClass('is-empty');
|
||||
|
||||
if ($scope.availabilityDom) {
|
||||
$scope.availabilityDom.classList.remove('fc-selected');
|
||||
}
|
||||
@ -546,6 +549,9 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
|
||||
// we unselect the current event to keep consistency
|
||||
$scope.availability = null;
|
||||
$scope.availabilityDom = null;
|
||||
|
||||
// mark the side panel as available to hide because no event is selected anymore
|
||||
$('label.calendar-admin-info').addClass('is-empty');
|
||||
};
|
||||
|
||||
// !!! MUST BE CALLED AT THE END of the controller
|
||||
|
@ -58,10 +58,10 @@
|
||||
<div ui-calendar="calendarConfig" ng-model="eventSources" calendar="calendar" class="wrapper-lg"></div>
|
||||
</div>
|
||||
|
||||
<label class="calendar-admin-info">
|
||||
<label class="calendar-admin-info is-empty">
|
||||
<input type="checkbox">
|
||||
<div class="content">
|
||||
<p class="placeholder">Veuillez sélectionner un créneau</p>
|
||||
<p class="placeholder" translate>{{ 'app.admin.calendar.select_a_slot' }}</p>
|
||||
<div class="widget panel b-a" ng-if="availability" ng-show="(availability.slot_duration || availability.tags.length > 0) && availability.available_type !== 'event'">
|
||||
<div class="panel-heading b-b small">
|
||||
<h3><i class="fa fa-info-circle m-r" aria-hidden="true"></i><span translate>{{ 'app.admin.calendar.info' }}</span></h3>
|
||||
|
@ -18,6 +18,7 @@ en:
|
||||
events: "Events"
|
||||
availabilities: "Availabilities"
|
||||
availabilities_notice: "Export to an Excel workbook every slots available for reservation, and their occupancy rate."
|
||||
select_a_slot: "Please select a slot"
|
||||
info: "Info"
|
||||
tags: "Tags"
|
||||
slot_duration: "Slot duration: {DURATION} minutes"
|
||||
|
Loading…
Reference in New Issue
Block a user