-
Notifications
You must be signed in to change notification settings - Fork 17
/
DecorationRenderer.js
49 lines (41 loc) · 1.09 KB
/
DecorationRenderer.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
45
46
47
48
49
define([
"dojo/_base/declare",
"dojo/dom-class",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin"],
function(declare, domClass, _WidgetBase, _TemplatedMixin, template){
return declare("dojox.calendar.DecorationRenderer", [_WidgetBase, _TemplatedMixin], {
// summary:
// The default item vertical renderer.
templateString: "<div class=\"dojoxCalendarDecoration\"></div>",
_setItemAttr: function(value){
if(value == null){
if(this.item && this.item.cssClass){
domClass.remove(this.domNode, this.item.cssClass);
}
this.item = null;
}else{
if(this.item != null){
if(this.item.cssClass != value.cssClass){
if(this.item.cssClass){
domClass.remove(this.domNode, this.item.cssClass);
}
}
this.item = lang.mixin(this.item, value);
if(value.cssClass){
domClass.add(this.domNode, value.cssClass);
}
}else{
this.item = value;
if(value.cssClass){
domClass.add(this.domNode, value.cssClass);
}
}
}
},
postCreate: function() {
this.inherited(arguments);
this._applyAttributes();
}
});
});