vendor/assets/javascripts/dojox/calendar/StoreMixin.js in dojox-rails-0.13.0 vs vendor/assets/javascripts/dojox/calendar/StoreMixin.js in dojox-rails-0.14.0
- old
+ new
@@ -2,11 +2,11 @@
define("dojox/calendar/StoreMixin",["dojo/_base/declare","dojo/_base/array","dojo/_base/html","dojo/_base/lang","dojo/dom-class","dojo/Stateful","dojo/when"],function(_1,_2,_3,_4,_5,_6,_7){
return _1("dojox.calendar.StoreMixin",_6,{store:null,query:{},startTimeAttr:"startTime",endTimeAttr:"endTime",summaryAttr:"summary",allDayAttr:"allDay",cssClassFunc:null,decodeDate:null,encodeDate:null,displayedItemsInvalidated:false,itemToRenderItem:function(_8,_9){
if(this.owner){
return this.owner.itemToRenderItem(_8,_9);
}
-return {id:_9.getIdentity(_8),summary:_8[this.summaryAttr],startTime:(this.decodeDate&&this.decodeDate(_8[this.startTimeAttr]))||this.newDate(_8[this.startTimeAttr]),endTime:(this.decodeDate&&this.decodeDate(_8[this.endTimeAttr]))||this.newDate(_8[this.endTimeAttr]),allDay:_8[this.allDayAttr]!=null?_8[this.allDayAttr]:false,cssClass:this.cssClassFunc?this.cssClassFunc(_8):null};
+return {id:_9.getIdentity(_8),summary:_8[this.summaryAttr],startTime:(this.decodeDate&&this.decodeDate(_8[this.startTimeAttr]))||this.newDate(_8[this.startTimeAttr],this.dateClassObj),endTime:(this.decodeDate&&this.decodeDate(_8[this.endTimeAttr]))||this.newDate(_8[this.endTimeAttr],this.dateClassObj),allDay:_8[this.allDayAttr]!=null?_8[this.allDayAttr]:false,cssClass:this.cssClassFunc?this.cssClassFunc(_8):null};
},renderItemToItem:function(_a,_b){
if(this.owner){
return this.owner.renderItemToItem(_a,_b);
}
var _c={};
@@ -55,13 +55,17 @@
this.updateRenderers(_17);
}
},_setStoreAttr:function(_19){
this.displayedItemsInvalidated=true;
var r;
+if(this._observeHandler){
+this._observeHandler.remove();
+this._observeHandler=null;
+}
if(_19){
var _1a=_19.query(this.query);
if(_1a.observe){
-_1a.observe(_4.hitch(this,this._updateItems),true);
+this._observeHandler=_1a.observe(_4.hitch(this,this._updateItems),true);
}
_1a=_1a.map(_4.hitch(this,function(_1b){
return this.itemToRenderItem(_1b,_19);
}));
r=_7(_1a,_4.hitch(this,this._initItems));