forked from damiengarbarino/dojo-calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LabelRenderer.js
44 lines (34 loc) · 1.05 KB
/
LabelRenderer.js
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
define(["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin",
"./_RendererMixin", "dojo/text!./templates/LabelRenderer.html"],
function(declare, _WidgetBase, _TemplatedMixin, _RendererMixin, template){
return declare("dojox.calendar.LabelRenderer", [_WidgetBase, _TemplatedMixin, _RendererMixin], {
// summary:
// The default item label renderer.
templateString: template,
_orientation: "horizontal",
resizeEnabled: false,
visibilityLimits: {
resizeStartHandle: 50,
resizeEndHandle: -1,
summaryLabel: 15,
startTimeLabel: 45,
endTimeLabel: 30
},
_isElementVisible: function(elt, startHidden, endHidden, size){
switch(elt){
case "startTimeLabel":
// hide hour part of all day events on subsequent days
if(this.item.allDay && this.item.range[0].getTime() !== this.item.startTime.getTime()){
return false;
}
break;
}
return this.inherited(arguments);
},
_displayValue: "inline",
postCreate: function() {
this.inherited(arguments);
this._applyAttributes();
}
});
});