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

feat(dayView): add tooltip to day view events

BREAKING CHANGE:

Tooltips are now added to all day view events by default. To disable them do:

```
calendarEventTitle.dayViewTooltip = angular.noop;
```

Closes #476
  • Loading branch information...
Matt Lewis
Matt Lewis committed Oct 24, 2016
1 parent e323cb8 commit ba859e26f24f11a6c3b13cc6433a635f519c508d
Showing with 13 additions and 3 deletions.
  1. +6 −1 src/services/calendarEventTitle.js
  2. +7 −2 src/templates/calendarDayView.html
@@ -30,13 +30,18 @@ angular
return event.allDay ? event.title : calendarTruncateEventTitleFilter(event.title, 20, event.height);
}

function dayViewTooltip(event) {
return event.title;
}

return {
yearView: yearView,
monthView: monthView,
monthViewTooltip: monthViewTooltip,
weekView: weekView,
weekViewTooltip: weekViewTooltip,
dayView: dayView
dayView: dayView,
dayViewTooltip: dayViewTooltip
};

});
@@ -61,13 +61,18 @@
mwl-resizable="dayEvent.event.resizable === true && dayEvent.event.endsAt"
resize-edges="{top: true, bottom: true}"
on-resize="vm.eventResized(dayEvent.event, edge, y / 30)"
on-resize-end="vm.eventResizeComplete(dayEvent.event, edge, y / 30)">
on-resize-end="vm.eventResizeComplete(dayEvent.event, edge, y / 30)"
uib-tooltip-html="vm.calendarEventTitle.dayViewTooltip(dayEvent.event) | calendarTrustAsHtml"
tooltip-append-to-body="true">

<span class="cal-hours">
<span ng-show="dayEvent.top == 0"><span ng-bind="(dayEvent.event.tempStartsAt || dayEvent.event.startsAt) | calendarDate:'day':true"></span>, </span>
<span ng-bind="(dayEvent.event.tempStartsAt || dayEvent.event.startsAt) | calendarDate:'time':true"></span>
</span>
<a href="javascript:;" class="event-item" ng-click="vm.onEventClick({calendarEvent: dayEvent.event})">
<a
href="javascript:;"
class="event-item"
ng-click="vm.onEventClick({calendarEvent: dayEvent.event})">
<span ng-bind-html="vm.calendarEventTitle.dayView(dayEvent.event) | calendarTrustAsHtml"></span>
</a>

0 comments on commit ba859e2

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