Changeset 5774

Show
Ignore:
Timestamp:
05/29/08 17:10:07 (6 months ago)
Author:
kinoshita
Message:

4271

Files:

Legend:

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

    <
    r5765 r5774  
    962962var body=Builder.node("DIV"); 
    963963var text=this.getTimeText((_105)?_104.start:{hour:"0",min:"0"},_104.finish); 
    964 text=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]); 
    965 this.calendar.css.addClassNames(text,"scheduleTimeArea"); 
    966 item.appendChild(text); 
    967 var _112=_104.description.unescapeHTML(); 
    968 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_112])); 
    969 item.title=_112
     964var _112=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]); 
     965this.calendar.css.addClassNames(_112,"scheduleTimeArea"); 
     966item.appendChild(_112); 
     967var _113=_104.description.unescapeHTML(); 
     968item.appendChild(Builder.node("DIV",{id:id+"_description"},[_113])); 
     969item.title=text+"-"+this.calendar.formatTime(_104.finish)+" "+_113
    970970item.schedule=_104; 
    971971return [item,_10e]; 
    972 },adjustScheduleStyle:function(item,_114,_115,_116){ 
     972},adjustScheduleStyle:function(item,_115,_116,_117){ 
    973973var self=this; 
    974 var _118=parseInt(Element.getStyle(item,"height"),10); 
     974var _119=parseInt(Element.getStyle(item,"height"),10); 
    975975var top=parseInt(Element.getStyle(item,"top"),10); 
    976 var _11a=this.getScheduleRange(item); 
     976var _11b=this.getScheduleRange(item); 
    977977var tops=[]; 
    978 var _11c=3; 
    979 _116.each(function(_11d){ 
    980 var _11e=self.getScheduleRange(_11d); 
    981 if(_11a.any(function(r){ 
    982 return _11e.include(r); 
     978var _11d=3; 
     979_117.each(function(_11e){ 
     980var _11f=self.getScheduleRange(_11e); 
     981if(_11b.any(function(r){ 
     982return _11f.include(r); 
    983983})){ 
    984 tops.push(_11d.topIndex); 
    985 } 
    986 }); 
    987 var _120=$R(0,tops.length,true).detect(function(i){ 
     984tops.push(_11e.topIndex); 
     985} 
     986}); 
     987var _121=$R(0,tops.length,true).detect(function(i){ 
    988988return !tops.include(i); 
    989989}); 
    990 if(isNaN(_120)){ 
    991 _120=tops.length; 
    992 } 
    993 item.topIndex=_120
    994 Element.setStyle(item,{top:top+(_118+2)*_120+"px"}); 
    995 if(_120>=_11c){ 
     990if(isNaN(_121)){ 
     991_121=tops.length; 
     992} 
     993item.topIndex=_121
     994Element.setStyle(item,{top:top+(_119+2)*_121+"px"}); 
     995if(_121>=_11d){ 
    996996Element.hide(item); 
    997 var node=this.buildSkipSchedule(_114+"_"+_115); 
     997var node=this.buildSkipSchedule(_115+"_"+_116); 
    998998if(node){ 
    999999var left=Element.getStyle(item,"left"); 
    1000 Element.setStyle(node,{top:top+(_118+2)*_120+"px",left:left}); 
     1000Element.setStyle(node,{top:top+(_119+2)*_121+"px",left:left}); 
    10011001} 
    10021002return node; 
    10031003} 
    1004 },buildSkipSchedule:function(_124){ 
    1005 var id=this.calendar.element.id.appendSuffix(_124); 
     1004},buildSkipSchedule:function(_125){ 
     1005var id=this.calendar.element.id.appendSuffix(_125); 
    10061006if(!this.skipNode[id]){ 
    10071007var node=Builder.node("a",{id:id,style:"display: block; z-index: 1000; cursor: pointer;",href:"javascript:void(0);"},[this.calendar.options.skipString]); 
     
    10141014return item.cellIndex+i; 
    10151015}); 
    1016 },setScheduleBaseStyle:function(item,_12a,_12b,_12c){ 
    1017 var _12d=this.column.height; 
    1018 var top=_12d*_12a+this.column.dateTextHeight; 
    1019 var _12f=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
    1020 Element.setStyle(item,{top:top+"px",width:this.column.width*_12c+_12f*(_12c-1)+"px",left:this.column.width*_12b+_12b*_12f+"px"}); 
     1016},setScheduleBaseStyle:function(item,_12b,_12c,_12d){ 
     1017var _12e=this.column.height; 
     1018var top=_12e*_12b+this.column.dateTextHeight; 
     1019var _130=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
     1020Element.setStyle(item,{top:top+"px",width:this.column.width*_12d+_130*(_12d-1)+"px",left:this.column.width*_12c+_12c*_130+"px"}); 
    10211021},afterBuild:function(){ 
    10221022this.scheduleNodes=[]; 
     
    10301030this.setSelector(); 
    10311031var self=this; 
    1032 var _131=this.calendar.options.displayIndexes; 
    1033 var _132=this.getDragDistance(); 
    1034 var _133=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 
     1032var _132=this.calendar.options.displayIndexes; 
     1033var _133=this.getDragDistance(); 
     1034var _134=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 
    10351035return []; 
    10361036}); 
    10371037var date=this.calendar.date; 
    1038 var _135=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 
    1039 var _136=_135.days(); 
    1040 var _137=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 
    1041 self.calendar.options.schedules.each(function(_138,_139){ 
    1042 var _13a=self.toDate(_138.start); 
    1043 var _13b=_13a.days(); 
    1044 var _13c=self.toDate(_138.finish); 
    1045 var _13d=_13c.days(); 
    1046 var days=self.getDayDiff(_138); 
    1047 if(_138.finish.hour==0&&_138.finish.min==0){ 
     1038var _136=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 
     1039var _137=_136.days(); 
     1040var _138=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 
     1041self.calendar.options.schedules.each(function(_139,_13a){ 
     1042var _13b=self.toDate(_139.start); 
     1043var _13c=_13b.days(); 
     1044var _13d=self.toDate(_139.finish); 
     1045var _13e=_13d.days(); 
     1046var days=self.getDayDiff(_139); 
     1047if(_139.finish.hour==0&&_139.finish.min==0){ 
    10481048days--; 
    10491049} 
    1050 if((_13b>=_136&&_13b<=_137)||(_13d>=_136&&_13d<=_137)){ 
    1051 if(!_135.sameMonth(_13a)){ 
    1052 _13a=_135
    1053 } 
    1054 self.setSchedule(_138,_133,_132,days); 
     1050if((_13c>=_137&&_13c<=_138)||(_13e>=_137&&_13e<=_138)){ 
     1051if(!_136.sameMonth(_13b)){ 
     1052_13b=_136
     1053} 
     1054self.setSchedule(_139,_134,_133,days); 
    10551055} 
    10561056}); 
     
    10761076} 
    10771077} 
    1078 },setSchedule:function(_141,_142,_143,days){ 
    1079 var _145=[]; 
    1080 var _146=6; 
    1081 var _147=DateUtil.toDate(_141.start); 
    1082 var date=_147
    1083 var _149=this.calendar.options.displayIndexes; 
    1084 var _14a=this.calendar.date; 
    1085 var _14b=this.calendar.options.noEvent; 
    1086 var _14c=this.calendar.options.clickSkipNode; 
     1078},setSchedule:function(_142,_143,_144,days){ 
     1079var _146=[]; 
     1080var _147=6; 
     1081var _148=DateUtil.toDate(_142.start); 
     1082var date=_148
     1083var _14a=this.calendar.options.displayIndexes; 
     1084var _14b=this.calendar.date; 
     1085var _14c=this.calendar.options.noEvent; 
     1086var _14d=this.calendar.options.clickSkipNode; 
    10871087while(days>=0){ 
    1088 var _14d=this.getLastWday(date); 
    1089 var _14e=days+1; 
    1090 var _14f=date.getDay(); 
    1091 var _150=date.advance({days:_14e-1}); 
    1092 if(_150.getTime()>_14d.getTime()){ 
    1093 _150=_14d
    1094 _14e=_150.days()-date.days()+1; 
    1095 } 
    1096 var _151=_150.getDay(); 
    1097 var _152=null; 
    1098 if(_14f<=_151){ 
    1099 _152=$R(_14f,_151,false); 
    1100 }else{ 
    1101 _152=$R(0,_151,false).toArray().concat($R(_14f,_146,false).toArray()); 
    1102 } 
    1103 var _153=_152.findAll(function(day){ 
    1104 return _149.include(day); 
     1088var _14e=this.getLastWday(date); 
     1089var _14f=days+1; 
     1090var _150=date.getDay(); 
     1091var _151=date.advance({days:_14f-1}); 
     1092if(_151.getTime()>_14e.getTime()){ 
     1093_151=_14e
     1094_14f=_151.days()-date.days()+1; 
     1095} 
     1096var _152=_151.getDay(); 
     1097var _153=null; 
     1098if(_150<=_152){ 
     1099_153=$R(_150,_152,false); 
     1100}else{ 
     1101_153=$R(0,_152,false).toArray().concat($R(_150,_147,false).toArray()); 
     1102} 
     1103var _154=_153.findAll(function(day){ 
     1104return _14a.include(day); 
    11051105}).length; 
    1106 var _155=new Date(date.getTime()); 
    1107 while(_155.days()<=_150.days()){ 
    1108 if(_155.getMonth()==_14a.getMonth()){ 
    1109 var _156=this.getCellPosition(_155.getDate()); 
    1110 if(_156){ 
    1111 var _157=_156.rowIndex; 
    1112 var _158=_156.cellIndex; 
    1113 var _159=this.buildSchedule(_141,_147.sameDate(_155)); 
    1114 var item=_159.first(); 
    1115 item.length=_153
    1116 item.cellIndex=_158
    1117 item.cellDate=_155
     1106var _156=new Date(date.getTime()); 
     1107while(_156.days()<=_151.days()){ 
     1108if(_156.getMonth()==_14b.getMonth()){ 
     1109var _157=this.getCellPosition(_156.getDate()); 
     1110if(_157){ 
     1111var _158=_157.rowIndex; 
     1112var _159=_157.cellIndex; 
     1113var _15a=this.buildSchedule(_142,_148.sameDate(_156)); 
     1114var item=_15a.first(); 
     1115item.length=_154
     1116item.cellIndex=_159
     1117item.cellDate=_156
    11181118this.container.appendChild(item); 
    1119 this.setScheduleBaseStyle(item,_157,_158,_153); 
    1120 var _15b=this.adjustScheduleStyle(item,_157,_158,_142[_157]); 
    1121 if(_15b){ 
    1122 this.container.appendChild(_15b); 
    1123 Event.observe(_15b,"click",_14c.bindAsEventListener(this,_155)); 
    1124 } 
    1125 if(!_14b&&((_141.edit==undefined)||_141.edit)){ 
    1126 this.setDraggable(item,_159.last(),_143); 
     1119this.setScheduleBaseStyle(item,_158,_159,_154); 
     1120var _15c=this.adjustScheduleStyle(item,_158,_159,_143[_158]); 
     1121if(_15c){ 
     1122this.container.appendChild(_15c); 
     1123Event.observe(_15c,"click",_14d.bindAsEventListener(this,_156)); 
     1124} 
     1125if(!_14c&&((_142.edit==undefined)||_142.edit)){ 
     1126this.setDraggable(item,_15a.last(),_144); 
    11271127this.setResize(item); 
    11281128} 
    1129 _142[_157].push(item); 
     1129_143[_158].push(item); 
    11301130this.scheduleNodes.push(item); 
    11311131break; 
    11321132}else{ 
    1133 if(_149.include(_155.getDay())){ 
    1134 _153--; 
     1133if(_14a.include(_156.getDay())){ 
     1134_154--; 
    11351135}else{ 
    11361136this.hasInvisibleSchedule=true; 
     
    11381138} 
    11391139}else{ 
    1140 if(_149.include(_155.getDay())){ 
    1141 _153--; 
    1142 } 
    1143 } 
    1144 _155=_155.advance({days:1}); 
    1145 } 
    1146 if(_145.length==0){ 
    1147 days-=_14e
     1140if(_14a.include(_156.getDay())){ 
     1141_154--; 
     1142} 
     1143} 
     1144_156=_156.advance({days:1}); 
     1145} 
     1146if(_146.length==0){ 
     1147days-=_14f
    11481148}else{ 
    11491149days-=7; 
    11501150} 
    1151 var date=_150.advance({days:1}); 
     1151var date=_151.advance({days:1}); 
    11521152if(item){ 
    1153 _145.push(item); 
     1153_146.push(item); 
    11541154} 
    11551155} 
    11561156var self=this; 
    1157 if(!_14b){ 
    1158 _145.each(function(item){ 
    1159 Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_145)); 
    1160 Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_145)); 
     1157if(!_14c){ 
     1158_146.each(function(item){ 
     1159Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_146)); 
     1160Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_146)); 
    11611161}); 
    11621162} 
     
    11651165this.calendar.setIndex(); 
    11661166} 
    1167 var _15f=this.calendar.wdays.indexOf(date.getDay())+1; 
    1168 return date.advance({days:this.calendar.wdays.length-_15f}); 
     1167var _160=this.calendar.wdays.indexOf(date.getDay())+1; 
     1168return date.advance({days:this.calendar.wdays.length-_160}); 
    11691169},setSelector:function(){ 
    1170 var _160=$(this.getSelectorId()); 
    1171 Element.setStyle(_160,{width:this.column.width+"px",height:this.column.height-2+"px"}); 
    1172 Element.setOpacity(_160,0.6); 
    1173 },setDraggable:function(item,_162,_163){ 
     1170var _161=$(this.getSelectorId()); 
     1171Element.setStyle(_161,{width:this.column.width+"px",height:this.column.height-2+"px"}); 
     1172Element.setOpacity(_161,0.6); 
     1173},setDraggable:function(item,_163,_164){ 
    11741174var self=this; 
    1175 var _165=Position.cumulativeOffset(this.container); 
    1176 var _166=$(this.getSelectorId()); 
    1177 var _167=this.column.width+(UserAgent.isIE()?0.5:0); 
    1178 var _168=this.column.height+(UserAgent.isIE()?1:0); 
    1179 var _169=this.rowMax||$(this.getCalendarTableId()).rows.length; 
    1180 var _16a=this.calendar.options.displayIndexes.length-1; 
    1181 var _16b=this.getAdjustSize(); 
    1182 new Draggable(item,{handle:_162,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_16c){ 
    1183 Element.show(_166); 
    1184 },onDrag:function(_16d,_16e){ 
    1185 var _16f=_16d.element; 
    1186 var top=parseInt(Element.getStyle(_16f,"top"),10); 
    1187 var _171=Math.floor(top/_168); 
    1188 var left=parseInt(Element.getStyle(_16f,"left"),10); 
    1189 var _173=Math.floor(left/_167); 
    1190 if((_173>=0&&_171>=0)&&(_173<=_16a&&_171<=_169)){ 
    1191 Element.setStyle(_166,{left:_167*_173+_16b*_173+"px",top:_168*_171+"px"}); 
    1192 } 
    1193 },onEnd:function(_174){ 
    1194 Element.hide(_166); 
    1195 self.changeSchedule(_174); 
     1175var _166=Position.cumulativeOffset(this.container); 
     1176var _167=$(this.getSelectorId()); 
     1177var _168=this.column.width+(UserAgent.isIE()?0.5:0); 
     1178var _169=this.column.height+(UserAgent.isIE()?1:0); 
     1179var _16a=this.rowMax||$(this.getCalendarTableId()).rows.length; 
     1180var _16b=this.calendar.options.displayIndexes.length-1; 
     1181var _16c=this.getAdjustSize(); 
     1182new Draggable(item,{handle:_163,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_16d){ 
     1183Element.show(_167); 
     1184},onDrag:function(_16e,_16f){ 
     1185var _170=_16e.element; 
     1186var top=parseInt(Element.getStyle(_170,"top"),10); 
     1187var _172=Math.floor(top/_169); 
     1188var left=parseInt(Element.getStyle(_170,"left"),10); 
     1189var _174=Math.floor(left/_168); 
     1190if((_174>=0&&_172>=0)&&(_174<=_16b&&_172<=_16a)){ 
     1191Element.setStyle(_167,{left:_168*_174+_16c*_174+"px",top:_169*_172+"px"}); 
     1192} 
     1193},onEnd:function(_175){ 
     1194Element.hide(_167); 
     1195self.changeSchedule(_175); 
    11961196}}); 
    11971197},setResize:function(item){ 
    11981198var self=this; 
    1199 new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_177){ 
    1200 self.updateTirm(_177); 
     1199new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_178){ 
     1200self.updateTirm(_178); 
    12011201}}); 
    1202 },getDate:function(_178){ 
     1202},getDate:function(_179){ 
    12031203var date=this.calendar.date; 
    1204 if(_178.constructor==String){ 
    1205 return new Date(date.getFullYear(),date.getMonth(),_178); 
    1206 }else{ 
    1207 return new Date(date.getFullYear(),date.getMonth(),_178.id.getSuffix()); 
    1208 } 
    1209 },abstractSelect:function(_17a,_17b){ 
    1210 var _17c=null; 
     1204if(_179.constructor==String){ 
     1205return new Date(date.getFullYear(),date.getMonth(),_179); 
     1206}else{ 
     1207return new Date(date.getFullYear(),date.getMonth(),_179.id.getSuffix()); 
     1208} 
     1209},abstractSelect:function(_17b,_17c){ 
     1210var _17d=null; 
    12111211if(this.calendar.options.size=="large"){ 
    1212 _17c=this.findClickedElement(_17a); 
    1213 }else{ 
    1214 _17c=Event.element(_17a); 
    1215 if(_17c.tagName!="TD"){ 
    1216 _17c=Element.getParentByTagName(["TD"],_17c); 
    1217 } 
    1218 } 
    1219 if(_17c&&_17c.id&&!_17c.id.match(/emptyRow/)){ 
    1220 var date=this.getDate(_17c); 
    1221 _17b(date,_17c); 
     1212_17d=this.findClickedElement(_17b); 
     1213}else{ 
     1214_17d=Event.element(_17b); 
     1215if(_17d.tagName!="TD"){ 
     1216_17d=Element.getParentByTagName(["TD"],_17d); 
     1217} 
     1218} 
     1219if(_17d&&_17d.id&&!_17d.id.match(/emptyRow/)){ 
     1220var date=this.getDate(_17d); 
     1221_17c(date,_17d); 
    12221222} 
    12231223},getSelectedTerm:function(){ 
    12241224var self=this; 
    1225 var _17f=this.calendar.getSelected(); 
    1226 return [_17f.first(),_17f.last()].map(function(e){ 
     1225var _180=this.calendar.getSelected(); 
     1226return [_180.first(),_180.last()].map(function(e){ 
    12271227return self.getDate(e); 
    12281228}); 
    1229 },selectDay:function(_181){ 
    1230 var _182=this.calendar; 
    1231 var th=Event.element(_181); 
     1229},selectDay:function(_182){ 
     1230var _183=this.calendar; 
     1231var th=Event.element(_182); 
    12321232if(th.tagName!="TH"){ 
    12331233th=Element.getParentByTagName("TH",th); 
     
    12351235this.iterateTable({doCell:function(cell){ 
    12361236if((cell.cellIndex==th.cellIndex)&&cell.id){ 
    1237 _182.addSelectedClass(cell); 
     1237_183.addSelectedClass(cell); 
    12381238} 
    12391239}}); 
    1240 },inspectArgument:function(_185,time){ 
     1240},inspectArgument:function(_186,time){ 
    12411241var self=this; 
    1242 var _188=this.calendar.getSelected(); 
    1243 var _189=[]; 
    1244 self.calendar.recurrence(_185,function(o){ 
     1242var _189=this.calendar.getSelected(); 
     1243var _18a=[]; 
     1244self.calendar.recurrence(_186,function(o){ 
    12451245if(!o.date){ 
    1246 _188.each(function(d){ 
    1247 var _18c={}; 
     1246_189.each(function(d){ 
     1247var _18d={}; 
    12481248if(!o.date){ 
    1249 _18c={date:self.getDate(d)}; 
     1249_18d={date:self.getDate(d)}; 
    12501250if(time){ 
    1251 _18c.start={hour:0,min:0}; 
    1252 _18c.finish={hour:0,min:0}; 
    1253 } 
    1254 } 
    1255 Object.extend(_18c,o); 
    1256 _189.push(_18c); 
     1251_18d.start={hour:0,min:0}; 
     1252_18d.finish={hour:0,min:0}; 
     1253} 
     1254} 
     1255Object.extend(_18d,o); 
     1256_18a.push(_18d); 
    12571257}); 
    12581258}else{ 
    12591259if(o.date.constructor==Object){ 
    12601260o.date=new Date(o.date.year,o.date.month,o.date.day); 
    1261 _189.push(o); 
    1262 }else{ 
    1263 _189.push(o); 
    1264 } 
    1265 } 
    1266 }); 
    1267 return _189
     1261_18a.push(o); 
     1262}else{ 
     1263_18a.push(o); 
     1264} 
     1265} 
     1266}); 
     1267return _18a
    12681268},inspectDateArgument:function(date){ 
    12691269if(date){ 
     
    12781278return map; 
    12791279}else{ 
    1280 var _18f=this; 
    1281 var _190=this.calendar.getSelected(); 
    1282 if(_190.length==0){ 
     1280var _190=this; 
     1281var _191=this.calendar.getSelected(); 
     1282if(_191.length==0){ 
    12831283return null; 
    12841284} 
    1285 return _190.collect(function(d){ 
    1286 return _18f.getDate(d); 
    1287 }); 
    1288 } 
    1289 },findClickedElement:function(_192){ 
    1290 var _193=$(this.getScheduleContainerId()); 
    1291 var _194=Position.cumulativeOffset(_193); 
    1292 var _195=Position.realOffset(_193).last(); 
    1293 _195-=document.documentElement.scrollTop||document.body.scrollTop; 
    1294 var x=Event.pointerX(_192)-_194[0]; 
    1295 var y=Event.pointerY(_192)-_194[1]+_195
    1296 var _198=Math.floor(y/this.column.height); 
    1297 var _199=Math.floor(x/this.column.width); 
    1298 return $(this.calendarTable.rows[_198].cells[_199]); 
    1299 },multipleSelection:function(_19a){ 
     1285return _191.collect(function(d){ 
     1286return _190.getDate(d); 
     1287}); 
     1288} 
     1289},findClickedElement:function(_193){ 
     1290var _194=$(this.getScheduleContainerId()); 
     1291var _195=Position.cumulativeOffset(_194); 
     1292var _196=Position.realOffset(_194).last(); 
     1293_196-=document.documentElement.scrollTop||document.body.scrollTop; 
     1294var x=Event.pointerX(_193)-_195[0]; 
     1295var y=Event.pointerY(_193)-_195[1]+_196
     1296var _199=Math.floor(y/this.column.height); 
     1297var _19a=Math.floor(x/this.column.width); 
     1298return $(this.calendarTable.rows[_199].cells[_19a]); 
     1299},multipleSelection:function(_19b){ 
    13001300if(!this.calendar.selectedBase||!this.calendar.mouseDown){ 
    13011301return; 
    13021302} 
    13031303var self=this; 
    1304 var _19c=this.calendar; 
    1305 var _19d=this.calendar.selectedBase; 
    1306 this.abstractSelect(_19a,function(date,_19f){ 
    1307 var _1a0=$(_19d.id); 
    1308 var _1a1=_19c.createRange(parseInt(_1a0.id.getSuffix()),parseInt(_19f.id.getSuffix())); 
     1304var _19d=this.calendar; 
     1305var _19e=this.calendar.selectedBase; 
     1306this.abstractSelect(_19b,function(date,_1a0){ 
     1307var _1a1=$(_19e.id); 
     1308var _1a2=_19d.createRange(parseInt(_1a1.id.getSuffix()),parseInt(_1a0.id.getSuffix())); 
    13091309self.iterateTable({doCell:function(cell){ 
    13101310if(cell.tagName!="TD"||!cell.id){ 
     
    13121312} 
    13131313var id=parseInt(cell.id.getSuffix(),10); 
    1314 if(_1a1.include(id)){ 
    1315 _19c.addSelectedClass(cell); 
    1316 }else{ 
    1317 _19c.removeSelectedClass(cell); 
     1314if(_1a2.include(id)){ 
     1315_19d.addSelectedClass(cell); 
     1316}else{ 
     1317_19d.removeSelectedClass(cell); 
    13181318} 
    13191319}}); 
    13201320}); 
    13211321},iterateTable:function(){ 
    1322 var _1a4=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
    1323 var _1a5=$(this.getCalendarTableId()); 
    1324 if(_1a4.doTable){ 
    1325 _1a4.doTable(_1a5); 
    1326 } 
    1327 $A(_1a5.rows).each(function(row){ 
    1328 if(_1a4.doRow){ 
    1329 _1a4.doRow(row); 
     1322var _1a5=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
     1323var _1a6=$(this.getCalendarTableId()); 
     1324if(_1a5.doTable){ 
     1325_1a5.doTable(_1a6); 
     1326} 
     1327$A(_1a6.rows).each(function(row){ 
     1328if(_1a5.doRow){ 
     1329_1a5.doRow(row); 
    13301330} 
    13311331$A(row.cells).each(function(cell){ 
    1332 if(_1a4.doCell){ 
    1333 _1a4.doCell(cell); 
    1334 } 
    1335 }); 
    1336 }); 
    1337 },findRow:function(_1a8){ 
    1338 var _1a9=$(this.getCalendarTableId()); 
    1339 return $A(_1a9.rows).detect(function(row){ 
    1340 return row.rowIndex==_1a8
    1341 }); 
    1342 },findCell:function(_1ab,_1ac){ 
    1343 return $A(this.findRow(_1ab).cells).detect(function(cell){ 
    1344 return cell.cellIndex==_1ac
     1332if(_1a5.doCell){ 
     1333_1a5.doCell(cell); 
     1334} 
     1335}); 
     1336}); 
     1337},findRow:function(_1a9){ 
     1338var _1aa=$(this.getCalendarTableId()); 
     1339return $A(_1aa.rows).detect(function(row){ 
     1340return row.rowIndex==_1a9
     1341}); 
     1342},findCell:function(_1ac,_1ad){ 
     1343return $A(this.findRow(_1ac).cells).detect(function(cell){ 
     1344return cell.cellIndex==_1ad
    13451345}); 
    13461346},getDateId:function(date){ 
     
    13601360return {cellIndex:cell.cellIndex,rowIndex:row.rowIndex}; 
    13611361} 
    1362 },changeSchedule:function(_1b4){ 
    1363 var _1b5=_1b4.element; 
    1364 var _1b6=_1b5.schedule; 
    1365 this.calendar.cacheSchedule(_1b6); 
    1366 var top=parseInt(Element.getStyle(_1b5,"top"),10); 
    1367 var _1b8=Math.floor(top/this.column.height); 
    1368 var left=parseInt(Element.getStyle(_1b5,"left"),10); 
    1369 var _1ba=Math.floor(left/this.column.width); 
    1370 var _1bb=$(this.getCalendarTableId()); 
    1371 var _1bc=_1bb.rows.length-1; 
    1372 var _1bd=this.calendar.options.displayIndexes.length-1; 
    1373 if((_1ba>=0&&_1b8>=0)&&(_1ba<=_1bd&&_1b8<=_1bc)){ 
    1374 var cell=this.findCell(_1b8,_1ba); 
     1362},changeSchedule:function(_1b5){ 
     1363var _1b6=_1b5.element; 
     1364var _1b7=_1b6.schedule; 
     1365this.calendar.cacheSchedule(_1b7); 
     1366var top=parseInt(Element.getStyle(_1b6,"top"),10); 
     1367var _1b9=Math.floor(top/this.column.height); 
     1368var left=parseInt(Element.getStyle(_1b6,"left"),10); 
     1369var _1bb=Math.floor(left/this.column.width); 
     1370var _1bc=$(this.getCalendarTableId()); 
     1371var _1bd=_1bc.rows.length-1; 
     1372var _1be=this.calendar.options.displayIndexes.length-1; 
     1373if((_1bb>=0&&_1b9>=0)&&(_1bb<=_1be&&_1b9<=_1bd)){ 
     1374var cell=this.findCell(_1b9,_1bb); 
    13751375var date=new Date(this.calendar.date.getTime()); 
    1376 var _1c0=_1b5.cellDate.days()-DateUtil.toDate(_1b6.start).days(); 
    1377 date.setDate(parseInt(cell.id.getSuffix(),10)-_1c0); 
    1378 var diff=this.getDayDiff(_1b6); 
    1379 var _1c2=date.advance({days:diff}); 
    1380 if(_1b6.start.month==date.getMonth()&&_1b6.start.day==date.getDate()&&_1b6.finish.month==_1c2.getMonth()&&_1b6.finish.day==_1c2.getDate()){ 
     1376var _1c1=_1b6.cellDate.days()-DateUtil.toDate(_1b7.start).days(); 
     1377date.setDate(parseInt(cell.id.getSuffix(),10)-_1c1); 
     1378var diff=this.getDayDiff(_1b7); 
     1379var _1c3=date.advance({days:diff}); 
     1380if(_1b7.start.month==date.getMonth()&&_1b7.start.day==date.getDate()&&_1b7.finish.month==_1c3.getMonth()&&_1b7.finish.day==_1c3.getDate()){ 
    13811381this.calendar.refreshSchedule(); 
    13821382return; 
    13831383} 
    1384 _1b6.start.year=date.getFullYear(); 
    1385 _1b6.start.month=date.getMonth(); 
    1386 _1b6.start.day=date.getDate(); 
    1387 _1b6.finish.year=_1c2.getFullYear(); 
    1388 _1b6.finish.month=_1c2.getMonth(); 
    1389 _1b6.finish.day=_1c2.getDate(); 
     1384_1b7.start.year=date.getFullYear(); 
     1385_1b7.start.month=date.getMonth(); 
     1386_1b7.start.day=date.getDate(); 
     1387_1b7.finish.year=_1c3.getFullYear(); 
     1388_1b7.finish.month=_1c3.getMonth(); 
     1389_1b7.finish.day=_1c3.getDate(); 
    13901390this.calendar.refreshSchedule(); 
    1391 this.calendar.options.changeSchedule(_1b6); 
     1391this.calendar.options.changeSchedule(_1b7); 
    13921392}else{ 
    13931393this.calendar.refreshSchedule(); 
    13941394} 
    1395 },updateTirm:function(_1c3){ 
    1396 var _1c4=_1c3.schedule; 
    1397 var _1c5=parseInt(Element.getStyle(_1c3,"width")); 
    1398 var top=parseInt(Element.getStyle(_1c3,"top")); 
    1399 var left=parseInt(Element.getStyle(_1c3,"left")); 
    1400 var _1c8=Math.round((left+_1c5)/this.column.width)-1; 
    1401 var _1c9=Math.round(top/this.column.height); 
    1402 var cell=this.findCell(_1c9,_1c8); 
    1403 var _1cb=_1c4.finish; 
    1404 var _1cc=null; 
     1395},updateTirm:function(_1c4){ 
     1396var _1c5=_1c4.schedule; 
     1397var _1c6=parseInt(Element.getStyle(_1c4,"width")); 
     1398var top=parseInt(Element.getStyle(_1c4,"top")); 
     1399var left=parseInt(Element.getStyle(_1c4,"left")); 
     1400var _1c9=Math.round((left+_1c6)/this.column.width)-1; 
     1401var _1ca=Math.round(top/this.column.height); 
     1402var cell=this.findCell(_1ca,_1c9); 
     1403var _1cc=_1c5.finish; 
     1404var _1cd=null; 
    14051405if(this.dateMap){ 
    1406 _1cc=this.dateMap[cell.id].toHash(); 
    1407 }else{ 
    1408 _1cc=new Date(this.calendar.date.getTime()); 
    1409 _1cc.setDate(parseInt(cell.id.getSuffix(),10)); 
    1410 _1cc=_1cc.toHash(); 
    1411 } 
    1412 _1cc.hour=_1cb.hour; 
    1413 _1cc.min=_1cb.min; 
    1414 if(DateUtil.toDate(_1c4.start).getTime()>=DateUtil.toDate(_1cc).getTime()){ 
    1415 var _1cd=23; 
    1416 var _1ce=55; 
    1417 if(_1c4.start.hour==_1cd&&_1c4.start.min==_1ce){ 
     1406_1cd=this.dateMap[cell.id].toHash(); 
     1407}else{ 
     1408_1cd=new Date(this.calendar.date.getTime()); 
     1409_1cd.setDate(parseInt(cell.id.getSuffix(),10)); 
     1410_1cd=_1cd.toHash(); 
     1411} 
     1412_1cd.hour=_1cc.hour; 
     1413_1cd.min=_1cc.min; 
     1414if(DateUtil.toDate(_1c5.start).getTime()>=DateUtil.toDate(_1cd).getTime()){ 
     1415var _1ce=23; 
     1416var _1cf=55; 
     1417if(_1c5.start.hour==_1ce&&_1c5.start.min==_1cf){ 
    14181418this.calendar.refreshSchedule(); 
    14191419this.calendar.options.updateTirm(); 
    14201420return; 
    14211421}else{ 
    1422 _1cc.hour=_1cd
    1423 _1cc.min=_1ce
    1424 } 
    1425 } 
    1426 _1c4.finish=_1cc
     1422_1cd.hour=_1ce
     1423_1cd.min=_1cf
     1424} 
     1425} 
     1426_1c5.finish=_1cd
    14271427this.calendar.refreshSchedule(); 
    1428 this.calendar.options.updateTirm(_1c4); 
    1429 },getTimeText:function(_1cf,_1d0){ 
    1430 var _1d1=this.calendar; 
    1431 return _1d1.formatTime(_1cf); 
    1432 },getDayDiff:function(_1d2){ 
    1433 return DateUtil.numberOfDays(this.toDate(_1d2.start),this.toDate(_1d2.finish)); 
     1428this.calendar.options.updateTirm(_1c5); 
     1429},getTimeText:function(_1d0,_1d1){ 
     1430var _1d2=this.calendar; 
     1431return _1d2.formatTime(_1d0); 
     1432},getDayDiff:function(_1d3){ 
     1433return DateUtil.numberOfDays(this.toDate(_1d3.start),this.toDate(_1d3.finish)); 
    14341434}}); 
    14351435var CalendarWeek=Class.create(); 
    14361436CalendarWeek.id=["calTable","columnContainer","columnHeader","column","next","pre","headerText"]; 
    14371437Object.extend(CalendarWeek.prototype,AbstractCalendar.prototype); 
    1438 Object.extend(CalendarWeek.prototype,{initialize:function(_1d3){ 
    1439 this.calendar=_1d3
    1440 var _1d4=this.getWeek(); 
    1441 this.week=_1d4[0]; 
    1442 this.invisibleWeek=_1d4[1]; 
     1438Object.extend(CalendarWeek.prototype,{initialize:function(_1d4){ 
     1439this.calendar=_1d4
     1440var _1d5=this.getWeek(); 
     1441this.week=_1d5[0]; 
     1442this.invisibleWeek=_1d5[1]; 
    14431443this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarWeek.id); 
    14441444this.setDisplayTime(); 
     
    14461446return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.pre+"' class='"+this.calendar.classNames.preWeekMark+"'></div>"+"</td>"; 
    14471447},buildHeaderCenter:function(){ 
    1448 var _1d5=[]; 
     1448var _1d6=[]; 
    14491449if(this.calendar.options.weekHeaderFormat){ 
    1450 _1d5=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
    1451 } 
    1452 return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d5[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d5[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d5[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
     1450_1d6=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
     1451} 
     1452return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d6[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d6[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d6[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
    14531453},formatHeaderDate:function(date){ 
    14541454if(this.calendar.options.weekHeaderFormat){ 
     
    14591459return "<td class='"+this.calendar.classNames.nextYears+"' align='right'>"+"<div id='"+this.ids.next+"' class='"+this.calendar.classNames.nextWeekMark+"'></div>"+"</td>"; 
    14601460},buildCalendar:function(){ 
    1461 var _1d7=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
    1462 _1d7+=this.buildCalendarContainer(); 
    1463 return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1d7+"</tr>"+"</table>"; 
     1461var _1d8=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
     1462_1d8+=this.buildCalendarContainer(); 
     1463return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1d8+"</tr>"+"</table>"; 
    14641464},buildTimeLine:function(){ 
    14651465var time=new Date(); 
    1466 var hour=0,_1da=24; 
     1466var hour=0,_1db=24; 
    14671467time.setHours(hour); 
    14681468time.setMinutes(0); 
    1469 var _1db=this.buildTimeLineTop(); 
     1469var _1dc=this.buildTimeLineTop(); 
    14701470var now=new Date().getHours(); 
    1471 while(hour<_1da){ 
     1471while(hour<_1db){ 
    14721472if(this.includeDisplayTime(hour)){ 
    1473 var _1dd="pointer: default;"; 
    1474 if(_1db.length==0){ 
    1475 _1dd+="border-top: none;"; 
    1476 } 
    1477 var _1de=this.calendar.classNames.timeLineTime; 
     1473var _1de="pointer: default;"; 
     1474if(_1dc.length==0){ 
     1475_1de+="border-top: none;"; 
     1476} 
     1477var _1df=this.calendar.classNames.timeLineTime; 
    14781478if(hour==now){ 
    1479 _1de+=" "+this.calendar.classNames.highlightTime; 
    1480 } 
    1481 _1db+="<div class='"+_1de+"' style='"+_1dd+"'>"+this.formatTime(time)+"</div>"; 
     1479_1df+=" "+this.calendar.classNames.highlightTime; 
     1480} 
     1481_1dc+="<div class='"+_1df+"' style='"+_1de+"'>"+this.formatTime(time)+"</div>"; 
    14821482} 
    14831483hour++; 
    14841484time.setHours(hour); 
    14851485} 
    1486 return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1db+"</td>"; 
     1486return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1dc+"</td>"; 
    14871487},buildTimeLineTop:function(){ 
    14881488return "<div class='"+this.calendar.classNames.timeLineTimeTop+"'></div>"; 
     
    14901490return "<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+this.buildCalendarHeader()+this.buildCalendarMain()+"</table>"+"</td>"; 
    14911491},buildCalendarHeader:function(){ 
    1492 var _1df=this.calendar.options.displayIndexes; 
     1492var _1e0=this.calendar.options.displayIndexes; 
    14931493var ths=""; 
    1494 var _1e1=new Date().days(); 
    1495 var _1e2=100/_1df.length+"%"; 
    1496 var _1e3=this.calendar.element.id.appendSuffix(this.ids.column); 
    1497 var _1e4=this.calendar.element.id.appendSuffix(this.ids.headerText); 
     1494var _1e2=new Date().days(); 
     1495var _1e3=100/_1e0.length+"%"; 
     1496var _1e4=this.calendar.element.id.appendSuffix(this.ids.column); 
     1497var _1e5=this.calendar.element.id.appendSuffix(this.ids.headerText); 
    14981498this.headers=[]; 
    1499 var _1e5=this.calendar.options.noEvent; 
    1500 var _1e6=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
    1501 this.week.each(function(w,_1e8){ 
     1499var _1e6=this.calendar.options.noEvent; 
     1500var _1e7=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
     1501this.week.each(function(w,_1e9){ 
    15021502var text=null; 
    1503 if(_1e6){ 
    1504 text=_1e6.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
     1503if(_1e7){ 
     1504text=_1e7.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
    15051505}else{ 
    15061506text=w.toDateString().split(" "); 
     
    15081508text=text.join(" "); 
    15091509} 
    1510 var _1ea=(w.days()==_1e1)?this.calendar.classNames.highlightDay:""; 
    1511 var _1eb=_1e4.appendSuffix(_1e8); 
     1510var _1eb=(w.days()==_1e2)?this.calendar.classNames.highlightDay:""; 
     1511var _1ec=_1e5.appendSuffix(_1e9); 
    15121512var node="<div class='"+this.calendar.classNames.headerColumn+"'>"; 
    1513 if(_1e5){ 
    1514 node+="<span='#' id='"+_1eb+"' class='"+_1ea+"' style='cursor: default;'>"+text+"</a>"; 
    1515 }else{ 
    1516 node+="<a href='#' id='"+_1eb+"' class='"+_1ea+"'>"+text+"</a>"; 
     1513if(_1e6){ 
     1514node+="<span='#' id='"+_1ec+"' class='"+_1eb+"' style='cursor: default;'>"+text+"</a>"; 
     1515}else{ 
     1516node+="<a href='#' id='"+_1ec+"' class='"+_1eb+"'>"+text+"</a>"; 
    15171517} 
    15181518node+="</div>"; 
    1519 this.headers.push({id:_1eb,wday:w}); 
    1520 ths+="<th id='"+_1e3.appendSuffix(_1e8)+"' width='"+_1e2+"'>"+node+"</th>"; 
     1519this.headers.push({id:_1ec,wday:w}); 
     1520ths+="<th id='"+_1e4.appendSuffix(_1e9)+"' width='"+_1e3+"'>"+node+"</th>"; 
    15211521}.bind(this)); 
    15221522return "<tr>"+"<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+"<tr>"+ths+"</tr>"+"</table>"+"</td>"+"</tr>"; 
    15231523},buildCalendarMain:function(){ 
    1524 var _1ed=this.calendar.options.displayIndexes; 
     1524var _1ee=this.calendar.options.displayIndexes; 
    15251525var tds=""; 
    1526 var _1ef=100/_1ed.length+"%"; 
     1526var _1f0=100/_1ee.length+"%"; 
    15271527this.dateMap={}; 
    1528 this.week.each(function(w,_1f1){ 
    1529 var _1f2=this.calendar.options.schedules[w.toDateString()]; 
    1530 var _1f3=""; 
     1528this.week.each(function(w,_1f2){ 
     1529var _1f3=this.calendar.options.schedules[w.toDateString()]; 
     1530var _1f4=""; 
    15311531var i=0,j=0; 
    15321532while(i<24){ 
    15331533if(this.includeDisplayTime(i)){ 
    1534 var _1f6=""; 
    1535 if(_1f3.length==0){ 
    1536 _1f6=this.calendar.classNames.columnTopDate; 
     1534var _1f7=""; 
     1535if(_1f4.length==0){ 
     1536_1f7=this.calendar.classNames.columnTopDate; 
    15371537}else{ 
    15381538if(i%1==0){ 
    1539 _1f6=this.calendar.classNames.columnDate; 
    1540 }else{ 
    1541 _1f6=this.calendar.classNames.columnDateOdd; 
    1542 } 
    1543 } 
    1544 var id=this.getDateId(w,i,_1f1); 
     1539_1f7=this.calendar.classNames.columnDate; 
     1540}else{ 
     1541_1f7=this.calendar.classNames.columnDateOdd; 
     1542} 
     1543} 
     1544var id=this.getDateId(w,i,_1f2); 
    15451545var hour=i/1; 
    15461546var min=i%1*60; 
    15471547this.dateMap[id]=new Date(w.getFullYear(),w.getMonth(),w.getDate(),hour,min,0); 
    1548 _1f3+="<div id='"+id+"' class='"+_1f6+"'></div>"; 
     1548_1f4+="<div id='"+id+"' class='"+_1f7+"'></div>"; 
    15491549} 
    15501550i+=0.5; 
    15511551} 
    1552 tds+="<td width='"+_1ef+"'>"+_1f3+"</td>"; 
     1552tds+="<td width='"+_1f0+"'>"+_1f4+"</td>"; 
    15531553}.bind(this)); 
    15541554return "<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>"; 
     
    15581558var rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.columnDate); 
    15591559this.column.height=parseInt(rule.style["height"],10)+1; 
    1560 },buildSchedule:function(_1fc){ 
    1561 var id="scheduleItem_"+_1fc.id; 
    1562 var _1fe=(_1fc.edit==undefined||_1fc.edit); 
     1560},buildSchedule:function(_1fd){ 
     1561var id="scheduleItem_"+_1fd.id; 
     1562var _1ff=(_1fd.edit==undefined||_1fd.edit); 
    15631563var item=Builder.node("DIV",{id:id}); 
    15641564this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    1565 var _200=this.calendar.options.noEvent; 
    1566 var _201={}; 
    1567 if(_1fc.background_color){ 
    1568 _201.backgroundColor=_1fc.background_color; 
    1569 
    1570 if(_1fc.frame_color){ 
    1571 _201.border="2px solid "+_1fc.frame_color; 
    1572 
    1573 if(_200){ 
    1574 _201.cursor="default"; 
    1575 
    1576 Element.setStyle(item,_201); 
    1577 if(_1fe){ 
    1578 var _202=Builder.node("DIV",{id:"scheduleDeleteImg_"+_1fc.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    1579 Element.hide(_202); 
    1580 item.appendChild(_202); 
    1581 if(!_200){ 
    1582 Event.observe(_202,"click",this.clickDeleteImage.bind(this,_1fc)); 
    1583 Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_202)); 
    1584 Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_202)); 
    1585 
    1586 
    1587 if(!_200&&this.calendar.options.dblclickSchedule){ 
    1588 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_1fc)); 
    1589 
    1590 var _203=null; 
    1591 if(_1fe){ 
    1592 _203=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
    1593 if(_200){ 
     1565var _201=this.calendar.options.noEvent; 
     1566var _202={}; 
     1567if(_1fd.background_color){ 
     1568_202.backgroundColor=_1fd.background_color; 
     1569
     1570if(_1fd.frame_color){ 
     1571_202.border="2px solid "+_1fd.frame_color; 
     1572
     1573if(_201){ 
     1574_202.cursor="default"; 
     1575
     1576Element.setStyle(item,_202); 
     1577if(_1ff){ 
     1578var _203=Builder.node("DIV",{id:"scheduleDeleteImg_"+_1fd.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    15941579Element.hide(_203); 
    1595 } 
    15961580item.appendChild(_203); 
     1581if(!_201){ 
     1582Event.observe(_203,"click",this.clickDeleteImage.bind(this,_1fd)); 
     1583Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_203)); 
     1584Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_203)); 
     1585} 
     1586} 
     1587if(!_201&&this.calendar.options.dblclickSchedule){ 
     1588Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_1fd)); 
     1589} 
     1590var _204=null; 
     1591if(_1ff){ 
     1592_204=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
     1593if(_201){ 
     1594Element.hide(_204); 
     1595} 
     1596item.appendChild(_204); 
    15971597} 
    15981598var icon=null; 
    1599 if(_1fc.icon){ 
    1600 icon=Builder.node("IMG",{src:_1fc.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
     1599if(_1fd.icon){ 
     1600icon=Builder.node("IMG",{src:_1fd.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
    16011601item.appendChild(icon); 
    16021602} 
    1603 if(!_1fc.publicity){ 
     1603if(!_1fd.publicity){ 
    16041604if(Calendar.privateImgPath){ 
    16051605icon=Builder.node("IMG",{src:Calendar.privateImgPath,alt:"private",style:"float: left;",width:16,height:16}); 
    16061606item.appendChild(icon); 
    16071607}else{ 
    1608 icon=Builder.node("DIV",{id:"private_img_"+_1fc.id}); 
     1608icon=Builder.node("DIV",{id:"private_img_"+_1fd.id}); 
    16091609this.calendar.css.addClassNames(icon,"privateImg"); 
    16101610item.appendChild(icon); 
    16111611} 
    16121612} 
    1613 var text=this.getTimeText(_1fc.start,_1fc.finish); 
    1614 text=Builder.node("DIV",{id:id+"_text"},[text]); 
    1615 this.calendar.css.addClassNames(text,"scheduleTimeArea"); 
    1616 item.appendChild(text); 
    1617 var _206=_1fc.description.unescapeHTML(); 
    1618 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_206])); 
    1619 item.title=_206
    1620 item.schedule=_1fc
    1621 return [item,_203]; 
    1622 },adjustScheduleStyle:function(item,_208,_209){ 
    1623 var _20a=item.schedule; 
    1624 var time=this.convertHours(_20a); 
    1625 var _20c=time[0]; 
    1626 var _20d=time[1]; 
     1613var text=this.getTimeText(_1fd.start,_1fd.finish); 
     1614var _207=Builder.node("DIV",{id:id+"_text"},[text]); 
     1615this.calendar.css.addClassNames(_207,"scheduleTimeArea"); 
     1616item.appendChild(_207); 
     1617var _208=_1fd.description.unescapeHTML(); 
     1618item.appendChild(Builder.node("DIV",{id:id+"_description"},[_208])); 
     1619item.title=text.replace(/ /g,"")+" "+_208
     1620item.schedule=_1fd
     1621return [item,_204]; 
     1622},adjustScheduleStyle:function(item,_20a,_20b){ 
     1623var _20c=item.schedule; 
     1624var time=this.convertHours(_20c); 
     1625var _20e=time[0]; 
     1626var _20f=time[1]; 
    16271627var same=[]; 
    16281628var self=this; 
    1629 _209.each(function(h){ 
    1630 var _211=self.convertHours(h.schedule); 
    1631 var _212=_211[0]; 
    1632 var _213=_211[1]; 
    1633 if(((_212<=_20c)&&(_213>_20c))||((_212<_20d)&&(_213>=_20d))||((_20c<=_212)&&(_20d>_212))||((_20c<_213)&&(_20d>=_213))){ 
     1629_20b.each(function(h){ 
     1630var _213=self.convertHours(h.schedule); 
     1631var _214=_213[0]; 
     1632var _215=_213[1]; 
     1633if(((_214<=_20e)&&(_215>_20e))||((_214<_20f)&&(_215>=_20f))||((_20e<=_214)&&(_20f>_214))||((_20e<_215)&&(_20f>=_215))){ 
    16341634same.push(h); 
    16351635} 
    16361636}); 
    1637 var _214=_208*this.getAdjustSize(); 
     1637var _216=_20a*this.getAdjustSize(); 
    16381638if(UserAgent.isIE()||this.calendar.options.noEvent){ 
    1639 _214+=1; 
    1640 } 
    1641 var left=this.column.width*_208+_214
     1639_216+=1; 
     1640} 
     1641var left=this.column.width*_20a+_216
    16421642if(same.length==0){ 
    16431643Element.setStyle(item,{left:left+"px"}); 
    16441644}else{ 
    16451645same.push(item); 
    1646 var _216=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
     1646var _218=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
    16471647same.each(function(s,i){ 
    1648 var _219=left+_216*i+(2*i); 
    1649 Element.setStyle(s,{width:_216+"px",left:_219+"px"}); 
     1648var _21b=left+_218*i+(2*i); 
     1649Element.setStyle(s,{width:_218+"px",left:_21b+"px"}); 
    16501650}); 
    16511651} 
    16521652return left; 
    16531653},setScheduleBaseStyle:function(item){ 
    1654 var _21b=item.schedule; 
    1655 if(!this.calendar.isSameDate(_21b.start,_21b.finish)){ 
    1656 _21b.finish.hour=24; 
    1657 _21b.finish.min=0; 
    1658 } 
    1659 var time=this.convertHours(_21b); 
    1660 var _21d=time.first(); 
    1661 var _21e=time.last(); 
    1662 var _21f=this.column.height*2; 
    1663 var diff=this.calendar.getTimeDiff(_21b.start,_21b.finish); 
     1654var _21d=item.schedule; 
     1655if(!this.calendar.isSameDate(_21d.start,_21d.finish)){ 
     1656_21d.finish.hour=24; 
     1657_21d.finish.min=0; 
     1658} 
     1659var time=this.convertHours(_21d); 
     1660var _21f=time.first(); 
     1661var _220=time.last(); 
     1662var _221=this.column.height*2; 
     1663var diff=this.calendar.getTimeDiff(_21d.start,_21d.finish); 
    16641664var rate=(diff.hour+(diff.min/60))||1; 
    16651665var over=0; 
    16661666var top=0; 
    1667 var _224=0; 
    1668 var _225=this.includeDisplayTime(_21d); 
    1669 var _226=this.includeDisplayTime(_21e,true); 
    1670 if(!_225&&!_226){ 
    1671 if((this.startTime<=_21d&&this.startTime<=_21e)||(_21d<this.finishTime&&_21e<this.finishTime)){ 
    1672 top=_224=0; 
     1667var _226=0; 
     1668var _227=this.includeDisplayTime(_21f); 
     1669var _228=this.includeDisplayTime(_220,true); 
     1670if(!_227&&!_228){ 
     1671if((this.startTime<=_21f&&this.startTime<=_220)||(_21f<this.finishTime&&_220<this.finishTime)){ 
     1672top=_226=0; 
    16731673Element.hide(item); 
    16741674this.hasInvisibleSchedule=true; 
    16751675}else{ 
    16761676top=0; 
    1677 _224=_21f*(this.finishTime-this.startTime)-3; 
    1678 } 
    1679 }else{ 
    1680 if(_225){ 
    1681 top=_21f*(_21d-this.startTime); 
    1682 _224=_21f*rate-3; 
     1677_226=_221*(this.finishTime-this.startTime)-3; 
     1678} 
     1679}else{ 
     1680if(_227){ 
     1681top=_221*(_21f-this.startTime); 
     1682_226=_221*rate-3; 
    16831683}else{ 
    16841684top=0; 
    1685 over=this.startTime-_21d
    1686 _224=_21f*(rate-over); 
    1687 } 
    1688 if(_226){ 
    1689 }else{ 
    1690 over=_21e-this.finishTime; 
    1691