Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

feat(dayView): add edit and delete actions to day view events

Closes #351
  • Loading branch information...
Matt Lewis
Matt Lewis committed Jun 26, 2016
1 parent 12d99a2 commit 08c429235cc4448dafd0fffe7951ffb960cfa52a
Showing with 25 additions and 1 deletion.
  1. +5 −1 src/directives/mwlCalendarDay.js
  2. +4 −0 src/templates/calendar.html
  3. +16 −0 src/templates/calendarDayView.html
@@ -104,7 +104,11 @@ angular
dayViewStart: '=',
dayViewEnd: '=',
dayViewSplit: '=',
dayViewEventChunkSize: '='
dayViewEventChunkSize: '=',
onEditEventClick: '=',
onDeleteEventClick: '=',
editEventHtml: '=',
deleteEventHtml: '='
},
controller: 'MwlCalendarDayCtrl as vm',
bindToController: true
@@ -63,6 +63,10 @@
day-view-end="vm.dayViewEnd"
day-view-split="vm.dayViewSplit"
day-view-event-chunk-size="vm.dayViewEventChunkSize"
on-edit-event-click="vm.onEditEventClick"
on-delete-event-click="vm.onDeleteEventClick"
edit-event-html="vm.editEventHtml"
delete-event-html="vm.deleteEventHtml"
ng-switch-when="day">
</mwl-calendar-day>
</div>
@@ -61,6 +61,22 @@
<span ng-bind-html="vm.$sce.trustAsHtml(event.title) | calendarTruncateEventTitle:20:event.height"></span>
</a>

<a
href="javascript:;"
class="event-item-edit"
ng-if="vm.editEventHtml && event.editable !== false"
ng-bind-html="vm.$sce.trustAsHtml(vm.editEventHtml)"
ng-click="vm.onEditEventClick({calendarEvent: event})">
</a>

<a
href="javascript:;"
class="event-item-delete"
ng-if="vm.deleteEventHtml && event.deletable !== false"
ng-bind-html="vm.$sce.trustAsHtml(vm.deleteEventHtml)"
ng-click="vm.onDeleteEventClick({calendarEvent: event})">
</a>

</div>

</div>

0 comments on commit 08c4292

Please sign in to comment.
You can’t perform that action at this time.