Rev | Line | |
---|
[483] | 1 | define(["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", |
---|
| 2 | "dojox/calendar/_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 | // summary: |
---|
| 9 | // The default item label renderer. |
---|
| 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 | var d = this.item.startTime; |
---|
| 29 | if(this.item.isAllDay || d.getHours() == 0 && d.getMinutes() == 0 && d.getSeconds() == 0 && d.getMilliseconds() == 0){ |
---|
| 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 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.