47 lines
1.6 KiB
JavaScript
47 lines
1.6 KiB
JavaScript
require({cache:{
|
|
'url:dojox/calendar/templates/LabelRenderer.html':"<div class=\"dojoxCalendarEvent dojoxCalendarLabel\" onselectstart=\"return false;\">\t\n\t<div class=\"labels\">\n\t\t<span data-dojo-attach-point=\"startTimeLabel\" class=\"startTime\"></span>\n\t\t<span data-dojo-attach-point=\"summaryLabel\" class=\"summary\"></span>\n\t\t<span data-dojo-attach-point=\"endTimeLabel\" class=\"endTime\"></span>\n\t</div>\t\n\t<div data-dojo-attach-point=\"moveHandle\" class=\"handle moveHandle\" ></div>\n</div>\n"}});
|
|
define("dojox/calendar/LabelRenderer", ["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin",
|
|
"dojox/calendar/_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":
|
|
var d = this.item.startTime;
|
|
if(this.item.isAllDay || d.getHours() == 0 && d.getMinutes() == 0 && d.getSeconds() == 0 && d.getMilliseconds() == 0){
|
|
return false;
|
|
}
|
|
break;
|
|
}
|
|
return this.inherited(arguments);
|
|
},
|
|
|
|
_displayValue: "inline",
|
|
|
|
postCreate: function() {
|
|
this.inherited(arguments);
|
|
this._applyAttributes();
|
|
}
|
|
});
|
|
});
|