mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
fix events page + fix disableAnimation directive
This commit is contained in:
parent
a4b3bfb4ba
commit
8a03b0b4f2
@ -111,7 +111,11 @@ Application.Controllers.controller('EventsController', ['$scope', '$state', 'Eve
|
||||
*/
|
||||
const groupEvents = function (events) {
|
||||
if (events.length > 0) {
|
||||
const eventsGroupedByMonth = _.groupBy(function(events, obj) { _.map(['month_id', 'year'], function(key) { return obj[key]; }); })
|
||||
const eventsGroupedByMonth = _.groupBy(events, function(obj) {
|
||||
return _.map(['month_id', 'year'], function(key) {
|
||||
return obj[key];
|
||||
});
|
||||
})
|
||||
$scope.eventsGroupByMonth = Object.assign($scope.eventsGroupByMonth, eventsGroupedByMonth)
|
||||
return $scope.monthOrder = Object.keys($scope.eventsGroupByMonth)
|
||||
}
|
||||
|
@ -81,14 +81,14 @@ Application.Directives.directive('publishProject', [ () =>
|
||||
|
||||
])
|
||||
|
||||
Application.Directives.directive('disableAnimation', $animate =>
|
||||
Application.Directives.directive('disableAnimation', ['$animate', ($animate) =>
|
||||
({
|
||||
restrict: 'A',
|
||||
link (scope, elem, attrs) {
|
||||
return attrs.$observe('disableAnimation', value => $animate.enabled(!value, elem))
|
||||
}
|
||||
})
|
||||
)
|
||||
])
|
||||
|
||||
// #
|
||||
// Isolate a form's scope from its parent : no nested validation
|
||||
|
Loading…
x
Reference in New Issue
Block a user