This repository has been archived by the owner on Jun 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 367
/
calendarWeekView.html
99 lines (91 loc) · 4.51 KB
/
calendarWeekView.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<div class="cal-week-box" ng-class="[{'cal-day-box': vm.showTimes}, 'cal-grid-' + vm.view.days.length]">
<div class="cal-row-fluid cal-row-head"
mwl-element-dimensions="vm.dayColumnDimensions">
<div
class="cal-cell1"
ng-repeat="day in vm.view.days track by $index"
ng-class="{
'cal-day-weekend': day.isWeekend,
'cal-day-past': day.isPast,
'cal-day-today': day.isToday,
'cal-day-future': day.isFuture}"
mwl-droppable
on-drop="vm.eventDropped(dropData.event, day.date)">
<span ng-bind="day.weekDayLabel"></span>
<br>
<small>
<span
data-cal-date
ng-click="vm.calendarCtrl.dateClicked(day.date)"
class="pointer"
ng-bind="day.dayLabel">
</span>
</small>
</div>
</div>
<div class="cal-day-panel clearfix" ng-style="{height: vm.showTimes ? (vm.dayViewHeight + 'px') : 'auto'}">
<mwl-calendar-hour-list
day-view-start="vm.dayViewStart"
day-view-end="vm.dayViewEnd"
day-view-split="vm.dayViewSplit"
day-width="(vm.dayColumnDimensions.width - 60) / vm.view.days.length"
view-date="vm.viewDate"
on-timespan-click="vm.onTimespanClick"
on-date-range-select="vm.onDateRangeSelect"
custom-template-urls="vm.customTemplateUrls"
cell-modifier="vm.cellModifier"
template-scope="vm.templateScope"
view="week"
ng-if="vm.showTimes">
</mwl-calendar-hour-list>
<div class="row" ng-repeat="row in vm.view.eventRows track by $index">
<div class="col-xs-12">
<div class="cal-row-fluid">
<div
ng-repeat="eventRow in row.row track by eventRow.event.calendarEventId"
ng-class="'cal-cell' + (vm.showTimes ? 1 : eventRow.span) + (vm.showTimes ? '' : ' cal-offset' + eventRow.offset)"
ng-style="{
top: vm.showTimes ? ((eventRow.top) + 'px') : 'auto',
position: vm.showTimes ? 'absolute' : 'inherit',
width: vm.showTimes ? ((vm.dayColumnDimensions.width - 60) / vm.view.days.length + 'px') : '',
left: vm.showTimes ? (((vm.dayColumnDimensions.width - 60) / vm.view.days.length) * eventRow.offset) + 15 + 'px' : ''
}">
<div
class="day-highlight"
ng-class="[eventRow.event.cssClass, !vm.showTimes && eventRow.startsBeforeWeek ? '' : 'border-left-rounded', !vm.showTimes && eventRow.endsAfterWeek ? '' : 'border-right-rounded']"
ng-style="{backgroundColor: eventRow.event.color.secondary}"
data-event-class
mwl-draggable="eventRow.event.draggable === true"
axis="vm.showTimes ? 'xy' : 'x'"
snap-grid="vm.showTimes ? {x: (vm.dayColumnDimensions.width - 60) / vm.view.days.length, y: vm.dayViewEventChunkSize || 30} : {x: vm.dayColumnDimensions.width / vm.view.days.length}"
auto-scroll="vm.draggableAutoScroll"
on-drag="vm.tempTimeChanged(eventRow.event, y / 30)"
on-drag-end="vm.weekDragged(eventRow.event, x / ((vm.dayColumnDimensions.width - (vm.showTimes ? 60 : 0)) / vm.view.days.length), y / 30)"
mwl-resizable="eventRow.event.resizable === true && eventRow.event.endsAt && !vm.showTimes"
resize-edges="{left: true, right: true}"
on-resize-end="vm.weekResized(eventRow.event, edge, x / ((vm.dayColumnDimensions.width - (vm.showTimes ? 60 : 0)) / vm.view.days.length))">
<strong ng-bind="(eventRow.event.tempStartsAt || eventRow.event.startsAt) | calendarDate:'time':true" ng-show="vm.showTimes"></strong>
<a
href="javascript:;"
ng-click="vm.onEventClick({calendarEvent: eventRow.event})"
class="event-item"
ng-bind-html="vm.calendarEventTitle.weekView(eventRow.event) | calendarTrustAsHtml"
uib-tooltip-html="vm.calendarEventTitle.weekViewTooltip(eventRow.event) | calendarTrustAsHtml"
tooltip-placement="left"
tooltip-append-to-body="true">
</a>
<a
href="javascript:;"
class="event-item-action"
ng-class="action.cssClass"
ng-repeat="action in eventRow.event.actions track by $index"
ng-bind-html="action.label | calendarTrustAsHtml"
ng-click="action.onClick({calendarEvent: eventRow.event})">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>