| 1 |
define(["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", |
| 2 |
"./_RendererMixin", "dojo/text!./templates/LabelRenderer.html"], |
| 3 |
|
| 4 |
function(declare, _WidgetBase, _TemplatedMixin, _RendererMixin, template){ |
| 5 |
|
| 6 |
return declare("dojox.calendar.LabelRenderer", [_WidgetBase, _TemplatedMixin, _RendererMixin], { |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
templateString: template, |
| 12 |
|
| 13 |
_orientation: "horizontal", |
| 14 |
|
| 15 |
resizeEnabled: false, |
| 16 |
|
| 17 |
visibilityLimits: { |
| 18 |
resizeStartHandle: 50, |
| 19 |
resizeEndHandle: -1, |
| 20 |
summaryLabel: 15, |
| 21 |
startTimeLabel: 45, |
| 22 |
endTimeLabel: 30 |
| 23 |
}, |
| 24 |
|
| 25 |
_isElementVisible: function(elt, startHidden, endHidden, size){ |
| 26 |
switch(elt){ |
| 27 |
case "startTimeLabel": |
| 28 |
|
| 29 |
if(this.item.allDay && this.item.range[0].getTime() !== this.item.startTime.getTime()){ |
| 30 |
return false; |
| 31 |
} |
| 32 |
break; |
| 33 |
} |
| 34 |
return this.inherited(arguments); |
| 35 |
}, |
| 36 |
|
| 37 |
_displayValue: "inline", |
| 38 |
|
| 39 |
postCreate: function() { |
| 40 |
this.inherited(arguments); |
| 41 |
this._applyAttributes(); |
| 42 |
} |
| 43 |
}); |
| 44 |
}); |