Changeset 5658

Show
Ignore:
Timestamp:
02/22/08 20:34:16 (9 months ago)
Author:
kinoshita
Message:

2112

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinelz/trunk/compress/javascripts/spinelz/calendar.js

    r5566 r5658  
    885885_ff=CssUtil.getCssRuleBySelectorText("."+Calendar.className.dateContainer); 
    886886this.column.dateTextHeight=parseInt(_ff.style["height"],10); 
    887 },buildSchedule:function(_100){ 
     887},buildSchedule:function(_100,_101){ 
    888888var id="scheduleItem_"+_100.id; 
    889 var _102=(_100.edit==undefined||_100.edit); 
     889var _103=(_100.edit==undefined||_100.edit); 
    890890var item=Builder.node("DIV",{id:id}); 
    891 var _104=DateUtil.toDate(_100.start); 
    892 var _105=DateUtil.toDate(_100.finish); 
     891var _105=DateUtil.toDate(_100.start); 
     892var _106=DateUtil.toDate(_100.finish); 
    893893if(_100.finish.hour==0&&_100.finish.min==0){ 
    894 _105=_105.advance({days:-1}); 
    895 } 
    896 var _106=this.calendar.options.noEvent; 
    897 var _107={}; 
    898 if(_106){ 
    899 _107.cursor="default"; 
    900 } 
    901 if(_104.sameDate(_105)){ 
     894_106=_106.advance({days:-1}); 
     895} 
     896var _107=this.calendar.options.noEvent; 
     897var _108={}; 
     898if(_107){ 
     899_108.cursor="default"; 
     900} 
     901if(_105.sameDate(_106)){ 
    902902this.calendar.css.addClassNames(item,"scheduleItemNoBorder"); 
    903903}else{ 
    904904if(_100.background_color){ 
    905 _107.backgroundColor=_100.background_color; 
     905_108.backgroundColor=_100.background_color; 
    906906} 
    907907if(_100.frame_color){ 
    908 _107.border="2px solid "+_100.frame_color; 
     908_108.border="2px solid "+_100.frame_color; 
    909909} 
    910910this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    911911} 
    912 Element.setStyle(item,_107); 
    913 if(_102){ 
    914 var _108=Builder.node("DIV",{id:"scheduleDeleteImg_"+_100.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    915 Element.hide(_108); 
    916 item.appendChild(_108); 
    917 if(!_106){ 
    918 Event.observe(_108,"click",this.clickDeleteImage.bind(this,_100)); 
    919 Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_108)); 
    920 Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_108)); 
    921 } 
    922 } 
    923 if(!_106&&this.calendar.options.dblclickSchedule){ 
     912Element.setStyle(item,_108); 
     913if(_103){ 
     914var _109=Builder.node("DIV",{id:"scheduleDeleteImg_"+_100.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
     915Element.hide(_109); 
     916item.appendChild(_109); 
     917if(!_107){ 
     918Event.observe(_109,"click",this.clickDeleteImage.bind(this,_100)); 
     919Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_109)); 
     920Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_109)); 
     921} 
     922} 
     923if(!_107&&this.calendar.options.dblclickSchedule){ 
    924924Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_100)); 
    925925} 
    926 var _109=null; 
    927 if(_102){ 
    928 _109=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
    929 if(_106){ 
    930 Element.hide(_109); 
    931 } 
    932 item.appendChild(_109); 
     926var _10a=null; 
     927if(_103){ 
     928_10a=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
     929if(_107){ 
     930Element.hide(_10a); 
     931} 
     932item.appendChild(_10a); 
    933933} 
    934934var icon=null; 
     
    943943} 
    944944var body=Builder.node("DIV"); 
    945 var text=this.getTimeText(_100.start,_100.finish); 
     945var text=this.getTimeText((_101)?_100.start:{hour:"0",min:"0"},_100.finish); 
    946946text=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]); 
    947947this.calendar.css.addClassNames(text,"scheduleTimeArea"); 
    948948item.appendChild(text); 
    949 var _10d=_100.description.unescapeHTML(); 
    950 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_10d])); 
    951 item.title=_10d
     949var _10e=_100.description.unescapeHTML(); 
     950item.appendChild(Builder.node("DIV",{id:id+"_description"},[_10e])); 
     951item.title=_10e
    952952item.schedule=_100; 
    953 return [item,_109]; 
    954 },adjustScheduleStyle:function(item,_10f,_110,_111){ 
     953return [item,_10a]; 
     954},adjustScheduleStyle:function(item,_110,_111,_112){ 
    955955var self=this; 
    956 var _113=parseInt(Element.getStyle(item,"height"),10); 
     956var _114=parseInt(Element.getStyle(item,"height"),10); 
    957957var top=parseInt(Element.getStyle(item,"top"),10); 
    958 var _115=this.getScheduleRange(item); 
     958var _116=this.getScheduleRange(item); 
    959959var tops=[]; 
    960 var _117=3; 
    961 _111.each(function(_118){ 
    962 var _119=self.getScheduleRange(_118); 
    963 if(_115.any(function(r){ 
    964 return _119.include(r); 
     960var _118=3; 
     961_112.each(function(_119){ 
     962var _11a=self.getScheduleRange(_119); 
     963if(_116.any(function(r){ 
     964return _11a.include(r); 
    965965})){ 
    966 tops.push(_118.topIndex); 
    967 } 
    968 }); 
    969 var _11b=$R(0,tops.length,true).detect(function(i){ 
     966tops.push(_119.topIndex); 
     967} 
     968}); 
     969var _11c=$R(0,tops.length,true).detect(function(i){ 
    970970return !tops.include(i); 
    971971}); 
    972 if(isNaN(_11b)){ 
    973 _11b=tops.length; 
    974 } 
    975 item.topIndex=_11b
    976 Element.setStyle(item,{top:top+(_113+2)*_11b+"px"}); 
    977 if(_11b>=_117){ 
     972if(isNaN(_11c)){ 
     973_11c=tops.length; 
     974} 
     975item.topIndex=_11c
     976Element.setStyle(item,{top:top+(_114+2)*_11c+"px"}); 
     977if(_11c>=_118){ 
    978978Element.hide(item); 
    979 var node=this.buildSkipSchedule(_10f+"_"+_110); 
     979var node=this.buildSkipSchedule(_110+"_"+_111); 
    980980if(node){ 
    981981var left=Element.getStyle(item,"left"); 
    982 Element.setStyle(node,{top:top+(_113+2)*_11b+"px",left:left}); 
     982Element.setStyle(node,{top:top+(_114+2)*_11c+"px",left:left}); 
    983983} 
    984984return node; 
    985985} 
    986 },buildSkipSchedule:function(_11f){ 
    987 var id=this.calendar.element.id.appendSuffix(_11f); 
     986},buildSkipSchedule:function(_120){ 
     987var id=this.calendar.element.id.appendSuffix(_120); 
    988988if(!this.skipNode[id]){ 
    989989var node=Builder.node("a",{id:id,style:"display: block; z-index: 1000; cursor: pointer;",href:"javascript:void(0);"},[this.calendar.options.skipString]); 
     
    996996return item.cellIndex+i; 
    997997}); 
    998 },setScheduleBaseStyle:function(item,_125,_126,_127){ 
    999 var _128=this.column.height; 
    1000 var top=_128*_125+this.column.dateTextHeight; 
    1001 var _12a=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
    1002 Element.setStyle(item,{top:top+"px",width:this.column.width*_127+_12a*(_127-1)+"px",left:this.column.width*_126+_126*_12a+"px"}); 
     998},setScheduleBaseStyle:function(item,_126,_127,_128){ 
     999var _129=this.column.height; 
     1000var top=_129*_126+this.column.dateTextHeight; 
     1001var _12b=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
     1002Element.setStyle(item,{top:top+"px",width:this.column.width*_128+_12b*(_128-1)+"px",left:this.column.width*_127+_127*_12b+"px"}); 
    10031003},afterBuild:function(){ 
    10041004this.scheduleNodes=[]; 
     
    10111011this.setSelector(); 
    10121012var self=this; 
    1013 var _12c=this.calendar.options.displayIndexes; 
    1014 var _12d=this.getDragDistance(); 
    1015 var _12e=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 
     1013var _12d=this.calendar.options.displayIndexes; 
     1014var _12e=this.getDragDistance(); 
     1015var _12f=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 
    10161016return []; 
    10171017}); 
    10181018var date=this.calendar.date; 
    1019 var _130=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 
    1020 var _131=_130.days(); 
    1021 var _132=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 
    1022 self.calendar.options.schedules.each(function(_133,_134){ 
    1023 var _135=self.toDate(_133.start); 
    1024 var _136=_135.days(); 
    1025 var _137=self.toDate(_133.finish); 
    1026 var _138=_137.days(); 
    1027 var days=self.getDayDiff(_133); 
    1028 if(_133.finish.hour==0&&_133.finish.min==0){ 
     1019var _131=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 
     1020var _132=_131.days(); 
     1021var _133=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 
     1022self.calendar.options.schedules.each(function(_134,_135){ 
     1023var _136=self.toDate(_134.start); 
     1024var _137=_136.days(); 
     1025var _138=self.toDate(_134.finish); 
     1026var _139=_138.days(); 
     1027var days=self.getDayDiff(_134); 
     1028if(_134.finish.hour==0&&_134.finish.min==0){ 
    10291029days--; 
    10301030} 
    1031 if((_136>=_131&&_136<=_132)||(_138>=_131&&_138<=_132)){ 
    1032 if(!_130.sameMonth(_135)){ 
    1033 _135=_130
    1034 } 
    1035 self.setSchedule(_133,_12e,_12d,days); 
     1031if((_137>=_132&&_137<=_133)||(_139>=_132&&_139<=_133)){ 
     1032if(!_131.sameMonth(_136)){ 
     1033_136=_131
     1034} 
     1035self.setSchedule(_134,_12f,_12e,days); 
    10361036} 
    10371037}); 
     
    10571057} 
    10581058} 
    1059 },setSchedule:function(_13c,_13d,_13e,days){ 
    1060 var _140=[]; 
    1061 var _141=6; 
    1062 var _142=DateUtil.toDate(_13c.start); 
    1063 var date=_142
    1064 var _144=this.calendar.options.displayIndexes; 
    1065 var _145=this.calendar.date; 
    1066 var _146=this.calendar.options.noEvent; 
    1067 var _147=this.calendar.options.clickSkipNode; 
     1059},setSchedule:function(_13d,_13e,_13f,days){ 
     1060var _141=[]; 
     1061var _142=6; 
     1062var _143=DateUtil.toDate(_13d.start); 
     1063var date=_143
     1064var _145=this.calendar.options.displayIndexes; 
     1065var _146=this.calendar.date; 
     1066var _147=this.calendar.options.noEvent; 
     1067var _148=this.calendar.options.clickSkipNode; 
    10681068while(days>=0){ 
    1069 var _148=this.getLastWday(date); 
    1070 var _149=days+1; 
    1071 var _14a=date.getDay(); 
    1072 var _14b=date.advance({days:_149-1}); 
    1073 if(_14b.getTime()>_148.getTime()){ 
    1074 _14b=_148
    1075 _149=_14b.days()-date.days()+1; 
    1076 } 
    1077 var _14c=_14b.getDay(); 
    1078 var _14d=null; 
    1079 if(_14a<=_14c){ 
    1080 _14d=$R(_14a,_14c,false); 
    1081 }else{ 
    1082 _14d=$R(0,_14c,false).toArray().concat($R(_14a,_141,false).toArray()); 
    1083 } 
    1084 var _14e=_14d.findAll(function(day){ 
    1085 return _144.include(day); 
     1069var _149=this.getLastWday(date); 
     1070var _14a=days+1; 
     1071var _14b=date.getDay(); 
     1072var _14c=date.advance({days:_14a-1}); 
     1073if(_14c.getTime()>_149.getTime()){ 
     1074_14c=_149
     1075_14a=_14c.days()-date.days()+1; 
     1076} 
     1077var _14d=_14c.getDay(); 
     1078var _14e=null; 
     1079if(_14b<=_14d){ 
     1080_14e=$R(_14b,_14d,false); 
     1081}else{ 
     1082_14e=$R(0,_14d,false).toArray().concat($R(_14b,_142,false).toArray()); 
     1083} 
     1084var _14f=_14e.findAll(function(day){ 
     1085return _145.include(day); 
    10861086}).length; 
    1087 var _150=new Date(date.getTime()); 
    1088 while(_150.days()<=_14b.days()){ 
    1089 if(_150.getMonth()==_145.getMonth()){ 
    1090 var _151=this.getCellPosition(_150.getDate()); 
    1091 if(_151){ 
    1092 var _152=_151.rowIndex; 
    1093 var _153=_151.cellIndex; 
    1094 var _154=this.buildSchedule(_13c); 
    1095 var item=_154.first(); 
    1096 item.length=_14e
    1097 item.cellIndex=_153
     1087var _151=new Date(date.getTime()); 
     1088while(_151.days()<=_14c.days()){ 
     1089if(_151.getMonth()==_146.getMonth()){ 
     1090var _152=this.getCellPosition(_151.getDate()); 
     1091if(_152){ 
     1092var _153=_152.rowIndex; 
     1093var _154=_152.cellIndex; 
     1094var _155=this.buildSchedule(_13d,_143.sameDate(_151)); 
     1095var item=_155.first(); 
     1096item.length=_14f
     1097item.cellIndex=_154
    10981098this.container.appendChild(item); 
    1099 this.setScheduleBaseStyle(item,_152,_153,_14e); 
    1100 var _156=this.adjustScheduleStyle(item,_152,_153,_13d[_152]); 
    1101 if(_156){ 
    1102 this.container.appendChild(_156); 
    1103 Event.observe(_156,"click",_147.bindAsEventListener(this,_150)); 
    1104 } 
    1105 if(!_146&&((_13c.edit==undefined)||_13c.edit)){ 
    1106 this.setDraggable(item,_154.last(),_13e); 
     1099this.setScheduleBaseStyle(item,_153,_154,_14f); 
     1100var _157=this.adjustScheduleStyle(item,_153,_154,_13e[_153]); 
     1101if(_157){ 
     1102this.container.appendChild(_157); 
     1103Event.observe(_157,"click",_148.bindAsEventListener(this,_151)); 
     1104} 
     1105if(!_147&&((_13d.edit==undefined)||_13d.edit)){ 
     1106this.setDraggable(item,_155.last(),_13f); 
    11071107this.setResize(item); 
    11081108} 
    1109 _13d[_152].push(item); 
     1109_13e[_153].push(item); 
    11101110this.scheduleNodes.push(item); 
    11111111break; 
    11121112}else{ 
    1113 if(_144.include(_150.getDay())){ 
    1114 _14e--; 
    1115 } 
    1116 } 
    1117 }else{ 
    1118 if(_144.include(_150.getDay())){ 
    1119 _14e--; 
    1120 } 
    1121 } 
    1122 _150=_150.advance({days:1}); 
    1123 } 
    1124 if(_140.length==0){ 
    1125 days-=_149
     1113if(_145.include(_151.getDay())){ 
     1114_14f--; 
     1115} 
     1116} 
     1117}else{ 
     1118if(_145.include(_151.getDay())){ 
     1119_14f--; 
     1120} 
     1121} 
     1122_151=_151.advance({days:1}); 
     1123} 
     1124if(_141.length==0){ 
     1125days-=_14a
    11261126}else{ 
    11271127days-=7; 
    11281128} 
    1129 var date=_14b.advance({days:1}); 
     1129var date=_14c.advance({days:1}); 
    11301130if(item){ 
    1131 _140.push(item); 
     1131_141.push(item); 
    11321132} 
    11331133} 
    11341134var self=this; 
    1135 if(!_146){ 
    1136 _140.each(function(item){ 
    1137 Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_140)); 
    1138 Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_140)); 
     1135if(!_147){ 
     1136_141.each(function(item){ 
     1137Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_141)); 
     1138Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_141)); 
    11391139}); 
    11401140} 
     
    11431143this.calendar.setIndex(); 
    11441144} 
    1145 var _15a=this.calendar.wdays.indexOf(date.getDay())+1; 
    1146 return date.advance({days:this.calendar.wdays.length-_15a}); 
     1145var _15b=this.calendar.wdays.indexOf(date.getDay())+1; 
     1146return date.advance({days:this.calendar.wdays.length-_15b}); 
    11471147},setSelector:function(){ 
    1148 var _15b=$(this.getSelectorId()); 
    1149 Element.setStyle(_15b,{width:this.column.width+"px",height:this.column.height-2+"px"}); 
    1150 Element.setOpacity(_15b,0.6); 
    1151 },setDraggable:function(item,_15d,_15e){ 
     1148var _15c=$(this.getSelectorId()); 
     1149Element.setStyle(_15c,{width:this.column.width+"px",height:this.column.height-2+"px"}); 
     1150Element.setOpacity(_15c,0.6); 
     1151},setDraggable:function(item,_15e,_15f){ 
    11521152var self=this; 
    1153 var _160=Position.cumulativeOffset(this.container); 
    1154 var _161=$(this.getSelectorId()); 
    1155 var _162=this.column.width+(UserAgent.isIE()?0.5:0); 
    1156 var _163=this.column.height+(UserAgent.isIE()?1:0); 
    1157 var _164=this.rowMax||$(this.getCalendarTableId()).rows.length; 
    1158 var _165=this.calendar.options.displayIndexes.length-1; 
    1159 var _166=this.getAdjustSize(); 
    1160 new Draggable(item,{handle:_15d,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_167){ 
    1161 Element.show(_161); 
    1162 },onDrag:function(_168,_169){ 
    1163 var _16a=_168.element; 
    1164 var top=parseInt(Element.getStyle(_16a,"top"),10); 
    1165 var _16c=Math.floor(top/_163); 
    1166 var left=parseInt(Element.getStyle(_16a,"left"),10); 
    1167 var _16e=Math.floor(left/_162); 
    1168 if((_16e>=0&&_16c>=0)&&(_16e<=_165&&_16c<=_164)){ 
    1169 Element.setStyle(_161,{left:_162*_16e+_166*_16e+"px",top:_163*_16c+"px"}); 
    1170 } 
    1171 },onEnd:function(_16f){ 
    1172 Element.hide(_161); 
    1173 self.changeSchedule(_16f); 
     1153var _161=Position.cumulativeOffset(this.container); 
     1154var _162=$(this.getSelectorId()); 
     1155var _163=this.column.width+(UserAgent.isIE()?0.5:0); 
     1156var _164=this.column.height+(UserAgent.isIE()?1:0); 
     1157var _165=this.rowMax||$(this.getCalendarTableId()).rows.length; 
     1158var _166=this.calendar.options.displayIndexes.length-1; 
     1159var _167=this.getAdjustSize(); 
     1160new Draggable(item,{handle:_15e,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_168){ 
     1161Element.show(_162); 
     1162},onDrag:function(_169,_16a){ 
     1163var _16b=_169.element; 
     1164var top=parseInt(Element.getStyle(_16b,"top"),10); 
     1165var _16d=Math.floor(top/_164); 
     1166var left=parseInt(Element.getStyle(_16b,"left"),10); 
     1167var _16f=Math.floor(left/_163); 
     1168if((_16f>=0&&_16d>=0)&&(_16f<=_166&&_16d<=_165)){ 
     1169Element.setStyle(_162,{left:_163*_16f+_167*_16f+"px",top:_164*_16d+"px"}); 
     1170} 
     1171},onEnd:function(_170){ 
     1172Element.hide(_162); 
     1173self.changeSchedule(_170); 
    11741174}}); 
    11751175},setResize:function(item){ 
    11761176var self=this; 
    1177 new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_172){ 
    1178 self.updateTirm(_172); 
     1177new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_173){ 
     1178self.updateTirm(_173); 
    11791179}}); 
    1180 },getDate:function(_173){ 
     1180},getDate:function(_174){ 
    11811181var date=this.calendar.date; 
    1182 if(_173.constructor==String){ 
    1183 return new Date(date.getFullYear(),date.getMonth(),_173); 
    1184 }else{ 
    1185 return new Date(date.getFullYear(),date.getMonth(),_173.id.getSuffix()); 
    1186 } 
    1187 },abstractSelect:function(_175,_176){ 
    1188 var _177=null; 
     1182if(_174.constructor==String){ 
     1183return new Date(date.getFullYear(),date.getMonth(),_174); 
     1184}else{ 
     1185return new Date(date.getFullYear(),date.getMonth(),_174.id.getSuffix()); 
     1186} 
     1187},abstractSelect:function(_176,_177){ 
     1188var _178=null; 
    11891189if(this.calendar.options.size=="large"){ 
    1190 _177=this.findClickedElement(_175); 
    1191 }else{ 
    1192 _177=Event.element(_175); 
    1193 if(_177.tagName!="TD"){ 
    1194 _177=Element.getParentByTagName(["TD"],_177); 
    1195 } 
    1196 } 
    1197 if(_177&&_177.id&&!_177.id.match(/emptyRow/)){ 
    1198 var date=this.getDate(_177); 
    1199 _176(date,_177); 
     1190_178=this.findClickedElement(_176); 
     1191}else{ 
     1192_178=Event.element(_176); 
     1193if(_178.tagName!="TD"){ 
     1194_178=Element.getParentByTagName(["TD"],_178); 
     1195} 
     1196} 
     1197if(_178&&_178.id&&!_178.id.match(/emptyRow/)){ 
     1198var date=this.getDate(_178); 
     1199_177(date,_178); 
    12001200} 
    12011201},getSelectedTerm:function(){ 
    12021202var self=this; 
    1203 var _17a=this.calendar.getSelected(); 
    1204 return [_17a.first(),_17a.last()].map(function(e){ 
     1203var _17b=this.calendar.getSelected(); 
     1204return [_17b.first(),_17b.last()].map(function(e){ 
    12051205return self.getDate(e); 
    12061206}); 
    1207 },selectDay:function(_17c){ 
    1208 var _17d=this.calendar; 
    1209 var th=Event.element(_17c); 
     1207},selectDay:function(_17d){ 
     1208var _17e=this.calendar; 
     1209var th=Event.element(_17d); 
    12101210if(th.tagName!="TH"){ 
    12111211th=Element.getParentByTagName("TH",th); 
     
    12131213this.iterateTable({doCell:function(cell){ 
    12141214if((cell.cellIndex==th.cellIndex)&&cell.id){ 
    1215 _17d.addSelectedClass(cell); 
     1215_17e.addSelectedClass(cell); 
    12161216} 
    12171217}}); 
    1218 },inspectArgument:function(_180,time){ 
     1218},inspectArgument:function(_181,time){ 
    12191219var self=this; 
    1220 var _183=this.calendar.getSelected(); 
    1221 var _184=[]; 
    1222 self.calendar.recurrence(_180,function(o){ 
     1220var _184=this.calendar.getSelected(); 
     1221var _185=[]; 
     1222self.calendar.recurrence(_181,function(o){ 
    12231223if(!o.date){ 
    1224 _183.each(function(d){ 
    1225 var _187={}; 
     1224_184.each(function(d){ 
     1225var _188={}; 
    12261226if(!o.date){ 
    1227 _187={date:self.getDate(d)}; 
     1227_188={date:self.getDate(d)}; 
    12281228if(time){ 
    1229 _187.start={hour:0,min:0}; 
    1230 _187.finish={hour:0,min:0}; 
    1231 } 
    1232 } 
    1233 Object.extend(_187,o); 
    1234 _184.push(_187); 
     1229_188.start={hour:0,min:0}; 
     1230_188.finish={hour:0,min:0}; 
     1231} 
     1232} 
     1233Object.extend(_188,o); 
     1234_185.push(_188); 
    12351235}); 
    12361236}else{ 
    12371237if(o.date.constructor==Object){ 
    12381238o.date=new Date(o.date.year,o.date.month,o.date.day); 
    1239 _184.push(o); 
    1240 }else{ 
    1241 _184.push(o); 
    1242 } 
    1243 } 
    1244 }); 
    1245 return _184
     1239_185.push(o); 
     1240}else{ 
     1241_185.push(o); 
     1242} 
     1243} 
     1244}); 
     1245return _185
    12461246},inspectDateArgument:function(date){ 
    12471247if(date){ 
     
    12561256return map; 
    12571257}else{ 
    1258 var _18a=this; 
    1259 var _18b=this.calendar.getSelected(); 
    1260 if(_18b.length==0){ 
     1258var _18b=this; 
     1259var _18c=this.calendar.getSelected(); 
     1260if(_18c.length==0){ 
    12611261return null; 
    12621262} 
    1263 return _18b.collect(function(d){ 
    1264 return _18a.getDate(d); 
    1265 }); 
    1266 } 
    1267 },findClickedElement:function(_18d){ 
    1268 var _18e=$(this.getScheduleContainerId()); 
    1269 var _18f=Position.cumulativeOffset(_18e); 
    1270 var _190=Position.realOffset(_18e).last(); 
    1271 _190-=document.documentElement.scrollTop||document.body.scrollTop; 
    1272 var x=Event.pointerX(_18d)-_18f[0]; 
    1273 var y=Event.pointerY(_18d)-_18f[1]+_190
    1274 var _193=Math.floor(y/this.column.height); 
    1275 var _194=Math.floor(x/this.column.width); 
    1276 return $(this.calendarTable.rows[_193].cells[_194]); 
    1277 },multipleSelection:function(_195){ 
     1263return _18c.collect(function(d){ 
     1264return _18b.getDate(d); 
     1265}); 
     1266} 
     1267},findClickedElement:function(_18e){ 
     1268var _18f=$(this.getScheduleContainerId()); 
     1269var _190=Position.cumulativeOffset(_18f); 
     1270var _191=Position.realOffset(_18f).last(); 
     1271_191-=document.documentElement.scrollTop||document.body.scrollTop; 
     1272var x=Event.pointerX(_18e)-_190[0]; 
     1273var y=Event.pointerY(_18e)-_190[1]+_191
     1274var _194=Math.floor(y/this.column.height); 
     1275var _195=Math.floor(x/this.column.width); 
     1276return $(this.calendarTable.rows[_194].cells[_195]); 
     1277},multipleSelection:function(_196){ 
    12781278if(!this.calendar.selectedBase||!this.calendar.mouseDown){ 
    12791279return; 
    12801280} 
    12811281var self=this; 
    1282 var _197=this.calendar; 
    1283 var _198=this.calendar.selectedBase; 
    1284 this.abstractSelect(_195,function(date,_19a){ 
    1285 var _19b=$(_198.id); 
    1286 var _19c=_197.createRange(parseInt(_19b.id.getSuffix()),parseInt(_19a.id.getSuffix())); 
     1282var _198=this.calendar; 
     1283var _199=this.calendar.selectedBase; 
     1284this.abstractSelect(_196,function(date,_19b){ 
     1285var _19c=$(_199.id); 
     1286var _19d=_198.createRange(parseInt(_19c.id.getSuffix()),parseInt(_19b.id.getSuffix())); 
    12871287self.iterateTable({doCell:function(cell){ 
    12881288if(cell.tagName!="TD"||!cell.id){ 
     
    12901290} 
    12911291var id=parseInt(cell.id.getSuffix(),10); 
    1292 if(_19c.include(id)){ 
    1293 _197.addSelectedClass(cell); 
    1294 }else{ 
    1295 _197.removeSelectedClass(cell); 
     1292if(_19d.include(id)){ 
     1293_198.addSelectedClass(cell); 
     1294}else{ 
     1295_198.removeSelectedClass(cell); 
    12961296} 
    12971297}}); 
    12981298}); 
    12991299},iterateTable:function(){ 
    1300 var _19f=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
    1301 var _1a0=$(this.getCalendarTableId()); 
    1302 if(_19f.doTable){ 
    1303 _19f.doTable(_1a0); 
    1304 } 
    1305 $A(_1a0.rows).each(function(row){ 
    1306 if(_19f.doRow){ 
    1307 _19f.doRow(row); 
     1300var _1a0=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
     1301var _1a1=$(this.getCalendarTableId()); 
     1302if(_1a0.doTable){ 
     1303_1a0.doTable(_1a1); 
     1304} 
     1305$A(_1a1.rows).each(function(row){ 
     1306if(_1a0.doRow){ 
     1307_1a0.doRow(row); 
    13081308} 
    13091309$A(row.cells).each(function(cell){ 
    1310 if(_19f.doCell){ 
    1311 _19f.doCell(cell); 
    1312 } 
    1313 }); 
    1314 }); 
    1315 },findRow:function(_1a3){ 
    1316 var _1a4=$(this.getCalendarTableId()); 
    1317 return $A(_1a4.rows).detect(function(row){ 
    1318 return row.rowIndex==_1a3
    1319 }); 
    1320 },findCell:function(_1a6,_1a7){ 
    1321 return $A(this.findRow(_1a6).cells).detect(function(cell){ 
    1322 return cell.cellIndex==_1a7
     1310if(_1a0.doCell){ 
     1311_1a0.doCell(cell); 
     1312} 
     1313}); 
     1314}); 
     1315},findRow:function(_1a4){ 
     1316var _1a5=$(this.getCalendarTableId()); 
     1317return $A(_1a5.rows).detect(function(row){ 
     1318return row.rowIndex==_1a4
     1319}); 
     1320},findCell:function(_1a7,_1a8){ 
     1321return $A(this.findRow(_1a7).cells).detect(function(cell){ 
     1322return cell.cellIndex==_1a8
    13231323}); 
    13241324},getDateId:function(date){ 
     
    13381338return {cellIndex:cell.cellIndex,rowIndex:row.rowIndex}; 
    13391339} 
    1340 },changeSchedule:function(_1af){ 
    1341 var _1b0=_1af.element; 
    1342 var _1b1=_1b0.schedule; 
    1343 this.calendar.cacheSchedule(_1b1); 
    1344 var top=parseInt(Element.getStyle(_1b0,"top"),10); 
    1345 var _1b3=Math.floor(top/this.column.height); 
    1346 var left=parseInt(Element.getStyle(_1b0,"left"),10); 
    1347 var _1b5=Math.floor(left/this.column.width); 
    1348 var _1b6=$(this.getCalendarTableId()); 
    1349 var _1b7=_1b6.rows.length-1; 
    1350 var _1b8=this.calendar.options.displayIndexes.length-1; 
    1351 if((_1b5>=0&&_1b3>=0)&&(_1b5<=_1b8&&_1b3<=_1b7)){ 
    1352 var cell=this.findCell(_1b3,_1b5); 
     1340},changeSchedule:function(_1b0){ 
     1341var _1b1=_1b0.element; 
     1342var _1b2=_1b1.schedule; 
     1343this.calendar.cacheSchedule(_1b2); 
     1344var top=parseInt(Element.getStyle(_1b1,"top"),10); 
     1345var _1b4=Math.floor(top/this.column.height); 
     1346var left=parseInt(Element.getStyle(_1b1,"left"),10); 
     1347var _1b6=Math.floor(left/this.column.width); 
     1348var _1b7=$(this.getCalendarTableId()); 
     1349var _1b8=_1b7.rows.length-1; 
     1350var _1b9=this.calendar.options.displayIndexes.length-1; 
     1351if((_1b6>=0&&_1b4>=0)&&(_1b6<=_1b9&&_1b4<=_1b8)){ 
     1352var cell=this.findCell(_1b4,_1b6); 
    13531353var date=new Date(this.calendar.date.getTime()); 
    13541354date.setDate(parseInt(cell.id.getSuffix(),10)); 
    1355 var diff=this.getDayDiff(_1b1); 
    1356 var _1bc=date.advance({days:diff}); 
    1357 if(_1b1.start.month==date.getMonth()&&_1b1.start.day==date.getDate()&&_1b1.finish.month==_1bc.getMonth()&&_1b1.finish.day==_1bc.getDate()){ 
     1355var diff=this.getDayDiff(_1b2); 
     1356var _1bd=date.advance({days:diff}); 
     1357if(_1b2.start.month==date.getMonth()&&_1b2.start.day==date.getDate()&&_1b2.finish.month==_1bd.getMonth()&&_1b2.finish.day==_1bd.getDate()){ 
    13581358this.calendar.refreshSchedule(); 
    13591359return; 
    13601360} 
    1361 _1b1.start.year=date.getFullYear(); 
    1362 _1b1.start.month=date.getMonth(); 
    1363 _1b1.start.day=date.getDate(); 
    1364 _1b1.finish.year=_1bc.getFullYear(); 
    1365 _1b1.finish.month=_1bc.getMonth(); 
    1366 _1b1.finish.day=_1bc.getDate(); 
     1361_1b2.start.year=date.getFullYear(); 
     1362_1b2.start.month=date.getMonth(); 
     1363_1b2.start.day=date.getDate(); 
     1364_1b2.finish.year=_1bd.getFullYear(); 
     1365_1b2.finish.month=_1bd.getMonth(); 
     1366_1b2.finish.day=_1bd.getDate(); 
    13671367this.calendar.refreshSchedule(); 
    1368 this.calendar.options.changeSchedule(_1b1); 
     1368this.calendar.options.changeSchedule(_1b2); 
    13691369}else{ 
    13701370this.calendar.refreshSchedule(); 
    13711371} 
    1372 },updateTirm:function(_1bd){ 
    1373 var _1be=_1bd.schedule; 
    1374 var _1bf=parseInt(Element.getStyle(_1bd,"width")); 
    1375 var top=parseInt(Element.getStyle(_1bd,"top")); 
    1376 var left=parseInt(Element.getStyle(_1bd,"left")); 
    1377 var _1c2=Math.round((left+_1bf)/this.column.width)-1; 
    1378 var _1c3=Math.round(top/this.column.height); 
    1379 var cell=this.findCell(_1c3,_1c2); 
    1380 var _1c5=_1be.finish; 
    1381 var _1c6=null; 
     1372},updateTirm:function(_1be){ 
     1373var _1bf=_1be.schedule; 
     1374var _1c0=parseInt(Element.getStyle(_1be,"width")); 
     1375var top=parseInt(Element.getStyle(_1be,"top")); 
     1376var left=parseInt(Element.getStyle(_1be,"left")); 
     1377var _1c3=Math.round((left+_1c0)/this.column.width)-1; 
     1378var _1c4=Math.round(top/this.column.height); 
     1379var cell=this.findCell(_1c4,_1c3); 
     1380var _1c6=_1bf.finish; 
     1381var _1c7=null; 
    13821382if(this.dateMap){ 
    1383 _1c6=this.dateMap[cell.id].toHash(); 
    1384 }else{ 
    1385 _1c6=new Date(this.calendar.date.getTime()); 
    1386 _1c6.setDate(parseInt(cell.id.getSuffix(),10)); 
    1387 _1c6=_1c6.toHash(); 
    1388 } 
    1389 _1c6.hour=_1c5.hour; 
    1390 _1c6.min=_1c5.min; 
    1391 if(DateUtil.toDate(_1be.start).getTime()>=DateUtil.toDate(_1c6).getTime()){ 
    1392 var _1c7=23; 
    1393 var _1c8=55; 
    1394 if(_1be.start.hour==_1c7&&_1be.start.min==_1c8){ 
     1383_1c7=this.dateMap[cell.id].toHash(); 
     1384}else{ 
     1385_1c7=new Date(this.calendar.date.getTime()); 
     1386_1c7.setDate(parseInt(cell.id.getSuffix(),10)); 
     1387_1c7=_1c7.toHash(); 
     1388} 
     1389_1c7.hour=_1c6.hour; 
     1390_1c7.min=_1c6.min; 
     1391if(DateUtil.toDate(_1bf.start).getTime()>=DateUtil.toDate(_1c7).getTime()){ 
     1392var _1c8=23; 
     1393var _1c9=55; 
     1394if(_1bf.start.hour==_1c8&&_1bf.start.min==_1c9){ 
    13951395this.calendar.refreshSchedule(); 
    13961396this.calendar.options.updateTirm(); 
    13971397return; 
    13981398}else{ 
    1399 _1c6.hour=_1c7
    1400 _1c6.min=_1c8
    1401 } 
    1402 } 
    1403 _1be.finish=_1c6
     1399_1c7.hour=_1c8
     1400_1c7.min=_1c9
     1401} 
     1402} 
     1403_1bf.finish=_1c7
    14041404this.calendar.refreshSchedule(); 
    1405 this.calendar.options.updateTirm(_1be); 
    1406 },getTimeText:function(_1c9,_1ca){ 
    1407 var _1cb=this.calendar; 
    1408 return _1cb.formatTime(_1c9); 
    1409 },getDayDiff:function(_1cc){ 
    1410 return DateUtil.numberOfDays(this.toDate(_1cc.start),this.toDate(_1cc.finish)); 
     1405this.calendar.options.updateTirm(_1bf); 
     1406},getTimeText:function(_1ca,_1cb){ 
     1407var _1cc=this.calendar; 
     1408return _1cc.formatTime(_1ca); 
     1409},getDayDiff:function(_1cd){ 
     1410return DateUtil.numberOfDays(this.toDate(_1cd.start),this.toDate(_1cd.finish)); 
    14111411}}); 
    14121412var CalendarWeek=Class.create(); 
    14131413CalendarWeek.id=["calTable","columnContainer","columnHeader","column","next","pre","headerText"]; 
    14141414Object.extend(CalendarWeek.prototype,AbstractCalendar.prototype); 
    1415 Object.extend(CalendarWeek.prototype,{initialize:function(_1cd){ 
    1416 this.calendar=_1cd
     1415Object.extend(CalendarWeek.prototype,{initialize:function(_1ce){ 
     1416this.calendar=_1ce
    14171417this.week=this.getWeek(); 
    14181418this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarWeek.id); 
     
    14211421return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.pre+"' class='"+this.calendar.classNames.preWeekMark+"'></div>"+"</td>"; 
    14221422},buildHeaderCenter:function(){ 
    1423 var _1ce=[]; 
     1423var _1cf=[]; 
    14241424if(this.calendar.options.weekHeaderFormat){ 
    1425 _1ce=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
    1426 } 
    1427 return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ce[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ce[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ce[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
     1425_1cf=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
     1426} 
     1427return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1cf[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1cf[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1cf[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
    14281428},formatHeaderDate:function(date){ 
    14291429if(this.calendar.options.weekHeaderFormat){ 
     
    14341434return "<td class='"+this.calendar.classNames.nextYears+"' align='right'>"+"<div id='"+this.ids.next+"' class='"+this.calendar.classNames.nextWeekMark+"'></div>"+"</td>"; 
    14351435},buildCalendar:function(){ 
    1436 var _1d0=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
    1437 _1d0+=this.buildCalendarContainer(); 
    1438 return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1d0+"</tr>"+"</table>"; 
     1436var _1d1=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
     1437_1d1+=this.buildCalendarContainer(); 
     1438return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1d1+"</tr>"+"</table>"; 
    14391439},buildTimeLine:function(){ 
    14401440var time=new Date(); 
    1441 var hour=0,_1d3=24; 
     1441var hour=0,_1d4=24; 
    14421442time.setHours(hour); 
    14431443time.setMinutes(0); 
    1444 var _1d4=this.buildTimeLineTop(); 
     1444var _1d5=this.buildTimeLineTop(); 
    14451445var now=new Date().getHours(); 
    1446 while(hour<_1d3){ 
     1446while(hour<_1d4){ 
    14471447if(this.includeDisplayTime(hour)){ 
    1448 var _1d6="pointer: default;"; 
    1449 if(_1d4.length==0){ 
    1450 _1d6+="border-top: none;"; 
    1451 } 
    1452 var _1d7=this.calendar.classNames.timeLineTime; 
     1448var _1d7="pointer: default;"; 
     1449if(_1d5.length==0){ 
     1450_1d7+="border-top: none;"; 
     1451} 
     1452var _1d8=this.calendar.classNames.timeLineTime; 
    14531453if(hour==now){ 
    1454 _1d7+=" "+this.calendar.classNames.highlightTime; 
    1455 } 
    1456 _1d4+="<div class='"+_1d7+"' style='"+_1d6+"'>"+this.formatTime(time)+"</div>"; 
     1454_1d8+=" "+this.calendar.classNames.highlightTime; 
     1455} 
     1456_1d5+="<div class='"+_1d8+"' style='"+_1d7+"'>"+this.formatTime(time)+"</div>"; 
    14571457} 
    14581458hour++; 
    14591459time.setHours(hour); 
    14601460} 
    1461 return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1d4+"</td>"; 
     1461return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1d5+"</td>"; 
    14621462},buildTimeLineTop:function(){ 
    14631463return "<div class='"+this.calendar.classNames.timeLineTimeTop+"'></div>"; 
     
    14651465return "<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+this.buildCalendarHeader()+this.buildCalendarMain()+"</table>"+"</td>"; 
    14661466},buildCalendarHeader:function(){ 
    1467 var _1d8=this.calendar.options.displayIndexes; 
     1467var _1d9=this.calendar.options.displayIndexes; 
    14681468var ths=""; 
    1469 var _1da=new Date().days(); 
    1470 var _1db=100/_1d8.length+"%"; 
    1471 var _1dc=this.calendar.element.id.appendSuffix(this.ids.column); 
    1472 var _1dd=this.calendar.element.id.appendSuffix(this.ids.headerText); 
     1469var _1db=new Date().days(); 
     1470var _1dc=100/_1d9.length+"%"; 
     1471var _1dd=this.calendar.element.id.appendSuffix(this.ids.column); 
     1472var _1de=this.calendar.element.id.appendSuffix(this.ids.headerText); 
    14731473this.headers=[]; 
    1474 var _1de=this.calendar.options.noEvent; 
    1475 var _1df=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
    1476 this.week.each(function(w,_1e1){ 
     1474var _1df=this.calendar.options.noEvent; 
     1475var _1e0=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
     1476this.week.each(function(w,_1e2){ 
    14771477var text=null; 
    1478 if(_1df){ 
    1479 text=_1df.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
     1478if(_1e0){ 
     1479text=_1e0.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
    14801480}else{ 
    14811481text=w.toDateString().split(" "); 
     
    14831483text=text.join(" "); 
    14841484} 
    1485 var _1e3=(w.days()==_1da)?this.calendar.classNames.highlightDay:""; 
    1486 var _1e4=_1dd.appendSuffix(_1e1); 
     1485var _1e4=(w.days()==_1db)?this.calendar.classNames.highlightDay:""; 
     1486var _1e5=_1de.appendSuffix(_1e2); 
    14871487var node="<div class='"+this.calendar.classNames.headerColumn+"'>"; 
    1488 if(_1de){ 
    1489 node+="<span='#' id='"+_1e4+"' class='"+_1e3+"' style='cursor: default;'>"+text+"</a>"; 
    1490 }else{ 
    1491 node+="<a href='#' id='"+_1e4+"' class='"+_1e3+"'>"+text+"</a>"; 
     1488if(_1df){ 
     1489node+="<span='#' id='"+_1e5+"' class='"+_1e4+"' style='cursor: default;'>"+text+"</a>"; 
     1490}else{ 
     1491node+="<a href='#' id='"+_1e5+"' class='"+_1e4+"'>"+text+"</a>"; 
    14921492} 
    14931493node+="</div>"; 
    1494 this.headers.push({id:_1e4,wday:w}); 
    1495 ths+="<th id='"+_1dc.appendSuffix(_1e1)+"' width='"+_1db+"'>"+node+"</th>"; 
     1494this.headers.push({id:_1e5,wday:w}); 
     1495ths+="<th id='"+_1dd.appendSuffix(_1e2)+"' width='"+_1dc+"'>"+node+"</th>"; 
    14961496}.bind(this)); 
    14971497return "<tr>"+"<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+"<tr>"+ths+"</tr>"+"</table>"+"</td>"+"</tr>"; 
    14981498},buildCalendarMain:function(){ 
    1499 var _1e6=this.calendar.options.displayIndexes; 
     1499var _1e7=this.calendar.options.displayIndexes; 
    15001500var tds=""; 
    1501 var _1e8=100/_1e6.length+"%"; 
     1501var _1e9=100/_1e7.length+"%"; 
    15021502this.dateMap={}; 
    1503 this.week.each(function(w,_1ea){ 
    1504 var _1eb=this.calendar.options.schedules[w.toDateString()]; 
    1505 var _1ec=""; 
     1503this.week.each(function(w,_1eb){ 
     1504var _1ec=this.calendar.options.schedules[w.toDateString()]; 
     1505var _1ed=""; 
    15061506var i=0,j=0; 
    15071507while(i<24){ 
    15081508if(this.includeDisplayTime(i)){ 
    1509 var _1ef=""; 
    1510 if(_1ec.length==0){ 
    1511 _1ef=this.calendar.classNames.columnTopDate; 
     1509var _1f0=""; 
     1510if(_1ed.length==0){ 
     1511_1f0=this.calendar.classNames.columnTopDate; 
    15121512}else{ 
    15131513if(i%1==0){ 
    1514 _1ef=this.calendar.classNames.columnDate; 
    1515 }else{ 
    1516 _1ef=this.calendar.classNames.columnDateOdd; 
    1517 } 
    1518 } 
    1519 var id=this.getDateId(w,i,_1ea); 
     1514_1f0=this.calendar.classNames.columnDate; 
     1515}else{ 
     1516_1f0=this.calendar.classNames.columnDateOdd; 
     1517} 
     1518} 
     1519var id=this.getDateId(w,i,_1eb); 
    15201520var hour=i/1; 
    15211521var min=i%1*60; 
    15221522this.dateMap[id]=new Date(w.getFullYear(),w.getMonth(),w.getDate(),hour,min,0); 
    1523 _1ec+="<div id='"+id+"' class='"+_1ef+"'></div>"; 
     1523_1ed+="<div id='"+id+"' class='"+_1f0+"'></div>"; 
    15241524} 
    15251525i+=0.5; 
    15261526} 
    1527 tds+="<td width='"+_1e8+"'>"+_1ec+"</td>"; 
     1527tds+="<td width='"+_1e9+"'>"+_1ed+"</td>"; 
    15281528}.bind(this)); 
    15291529return "<tr>"+"<td>"+"<div id='"+this.getScheduleContainerId()+"' class='"+this.calendar.classNames.scheduleContainer+"' style='position: relative;'>"+"<table id='"+this.getCalendarTableId()+"' class='"+this.calendar.classNames.weekMainTable+"' style='position: relative;'>"+"<tr>"+tds+"</tr>"+"</table>"+"</div>"+"</td>"+"</tr>"; 
     
    15331533var rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.columnDate); 
    15341534this.column.height=parseInt(rule.style["height"],10)+1; 
    1535 },buildSchedule:function(_1f5){ 
    1536 var id="scheduleItem_"+_1f5.id; 
    1537 var _1f7=(_1f5.edit==undefined||_1f5.edit); 
     1535},buildSchedule:function(_1f6){ 
     1536var id="scheduleItem_"+_1f6.id; 
     1537var _1f8=(_1f6.edit==undefined||_1f6.edit); 
    15381538var item=Builder.node("DIV",{id:id}); 
    15391539this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    1540 var _1f9=this.calendar.options.noEvent; 
    1541 var _1fa={}; 
    1542 if(_1f5.background_color){ 
    1543 _1fa.backgroundColor=_1f5.background_color; 
    1544 
    1545 if(_1f5.frame_color){ 
    1546 _1fa.border="2px solid "+_1f5.frame_color; 
    1547 
    1548 if(_1f9){ 
    1549 _1fa.cursor="default"; 
    1550 
    1551 Element.setStyle(item,_1fa); 
    1552 if(_1f7){ 
    1553 var _1fb=Builder.node("DIV",{id:"scheduleDeleteImg_"+_1f5.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    1554 Element.hide(_1fb); 
    1555 item.appendChild(_1fb); 
    1556 if(!_1f9){ 
    1557 Event.observe(_1fb,"click",this.clickDeleteImage.bind(this,_1f5)); 
    1558 Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_1fb)); 
    1559 Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_1fb)); 
    1560 
    1561 
    1562 if(!_1f9&&this.calendar.options.dblclickSchedule){ 
    1563 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_1f5)); 
    1564 
    1565 var _1fc=null; 
    1566 if(_1f7){ 
    1567 _1fc=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
    1568 if(_1f9){ 
     1540var _1fa=this.calendar.options.noEvent; 
     1541var _1fb={}; 
     1542if(_1f6.background_color){ 
     1543_1fb.backgroundColor=_1f6.background_color; 
     1544
     1545if(_1f6.frame_color){ 
     1546_1fb.border="2px solid "+_1f6.frame_color; 
     1547
     1548if(_1fa){ 
     1549_1fb.cursor="default"; 
     1550
     1551Element.setStyle(item,_1fb); 
     1552if(_1f8){ 
     1553var _1fc=Builder.node("DIV",{id:"scheduleDeleteImg_"+_1f6.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    15691554Element.hide(_1fc); 
    1570 } 
    15711555item.appendChild(_1fc); 
     1556if(!_1fa){ 
     1557Event.observe(_1fc,"click",this.clickDeleteImage.bind(this,_1f6)); 
     1558Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_1fc)); 
     1559Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_1fc)); 
     1560} 
     1561} 
     1562if(!_1fa&&this.calendar.options.dblclickSchedule){ 
     1563Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_1f6)); 
     1564} 
     1565var _1fd=null; 
     1566if(_1f8){ 
     1567_1fd=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
     1568if(_1fa){ 
     1569Element.hide(_1fd); 
     1570} 
     1571item.appendChild(_1fd); 
    15721572} 
    15731573var icon=null; 
    1574 if(_1f5.icon){ 
    1575 icon=Builder.node("IMG",{src:_1f5.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
     1574if(_1f6.icon){ 
     1575icon=Builder.node("IMG",{src:_1f6.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
    15761576item.appendChild(icon); 
    15771577} 
    1578 if(!_1f5.publicity){ 
    1579 icon=Builder.node("DIV",{id:"private_img_"+_1f5.id}); 
     1578if(!_1f6.publicity){ 
     1579icon=Builder.node("DIV",{id:"private_img_"+_1f6.id}); 
    15801580this.calendar.css.addClassNames(icon,"privateImg"); 
    15811581item.appendChild(icon); 
    15821582} 
    1583 var text=this.getTimeText(_1f5.start,_1f5.finish); 
     1583var text=this.getTimeText(_1f6.start,_1f6.finish); 
    15841584text=Builder.node("DIV",{id:id+"_text"},[text]); 
    15851585this.calendar.css.addClassNames(text,"scheduleTimeArea"); 
    15861586item.appendChild(text); 
    1587 var _1ff=_1f5.description.unescapeHTML(); 
    1588 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_1ff])); 
    1589 item.title=_1ff
    1590 item.schedule=_1f5
    1591 return [item,_1fc]; 
    1592 },adjustScheduleStyle:function(item,_201,_202){ 
    1593 var _203=item.schedule; 
    1594 var time=this.convertHours(_203); 
    1595 var _205=time[0]; 
    1596 var _206=time[1]; 
     1587var _200=_1f6.description.unescapeHTML(); 
     1588item.appendChild(Builder.node("DIV",{id:id+"_description"},[_200])); 
     1589item.title=_200
     1590item.schedule=_1f6
     1591return [item,_1fd]; 
     1592},adjustScheduleStyle:function(item,_202,_203){ 
     1593var _204=item.schedule; 
     1594var time=this.convertHours(_204); 
     1595var _206=time[0]; 
     1596var _207=time[1]; 
    15971597var same=[]; 
    15981598var self=this; 
    1599 _202.each(function(h){ 
    1600 var _20a=self.convertHours(h.schedule); 
    1601 var _20b=_20a[0]; 
    1602 var _20c=_20a[1]; 
    1603 if(((_20b<=_205)&&(_20c>_205))||((_20b<_206)&&(_20c>=_206))||((_205<=_20b)&&(_206>_20b))||((_205<_20c)&&(_206>=_20c))){ 
     1599_203.each(function(h){ 
     1600var _20b=self.convertHours(h.schedule); 
     1601var _20c=_20b[0]; 
     1602var _20d=_20b[1]; 
     1603if(((_20c<=_206)&&(_20d>_206))||((_20c<_207)&&(_20d>=_207))||((_206<=_20c)&&(_207>_20c))||((_206<_20d)&&(_207>=_20d))){ 
    16041604same.push(h); 
    16051605} 
    16061606}); 
    1607 var _20d=_201*this.getAdjustSize(); 
     1607var _20e=_202*this.getAdjustSize(); 
    16081608if(UserAgent.isIE()||this.calendar.options.noEvent){ 
    1609 _20d+=1; 
    1610 } 
    1611 var left=this.column.width*_201+_20d
     1609_20e+=1; 
     1610} 
     1611var left=this.column.width*_202+_20e
    16121612if(same.length==0){ 
    16131613Element.setStyle(item,{left:left+"px"}); 
    16141614}else{ 
    16151615same.push(item); 
    1616 var _20f=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
     1616var _210=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
    16171617same.each(function(s,i){