Changeset 5823

Show
Ignore:
Timestamp:
06/30/08 12:52:12 (2 months ago)
Author:
kinoshita
Message:

5007

Files:

Legend:

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

    r5810 r5823  
    941941var _116=(_113.edit==undefined||_113.edit); 
    942942var item=Builder.node("DIV",{id:id}); 
    943 var _118=DateUtil.toDate(_113.start); 
    944 var _119=DateUtil.toDate(_113.finish); 
     943var _118=Builder.node("DIV",{id:id+"_container"}); 
     944item.appendChild(_118); 
     945var _119=DateUtil.toDate(_113.start); 
     946var _11a=DateUtil.toDate(_113.finish); 
    945947if(_113.finish.hour==0&&_113.finish.min==0){ 
    946 _119=_119.advance({days:-1}); 
    947 } 
    948 var _11a=this.calendar.options.noEvent; 
    949 var _11b={}; 
     948_11a=_11a.advance({days:-1}); 
     949} 
     950var _11b=this.calendar.options.noEvent; 
     951var _11c={}; 
    950952if(!UserAgent.isIE()){ 
    951 _11b.whiteSpace="nowrap"; 
    952 } 
    953 if(_11a){ 
    954 _11b.cursor="default"; 
    955 } 
    956 if(_118.sameDate(_119)){ 
     953_11c.whiteSpace="nowrap"; 
     954} 
     955if(_11b){ 
     956_11c.cursor="default"; 
     957} 
     958if(_119.sameDate(_11a)){ 
    957959this.calendar.css.addClassNames(item,"scheduleItemNoBorder"); 
    958960}else{ 
    959961if(_113.frame_color){ 
    960 _11b.border="2px solid "+_113.frame_color; 
    961 _11b.backgroundColor=_113.frame_color; 
     962_11c.border="2px solid "+_113.frame_color; 
     963_11c.backgroundColor=_113.frame_color; 
    962964} 
    963965this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    964966} 
    965 Element.setStyle(item,_11b); 
    966 var _11c=[]; 
    967 var _11d=(_113.removable==undefined||_113.removable); 
    968 if(_116&&_11d){ 
    969 var _11e=Builder.node("DIV",{id:"scheduleDeleteImg_"+_113.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
    970 _11c.push(_11e); 
    971 item.appendChild(_11e); 
    972 if(!_11a){ 
    973 Event.observe(_11e,"click",this.clickDeleteImage.bind(this,_113)); 
    974 
    975 
    976 if(_113.copiable){ 
    977 var _11f="display: none;"; 
    978 if(_11c.length>0){ 
    979 _11f+="right: 17px;"; 
    980 
    981 var _120=Builder.node("DIV",{id:"scheduleCopyImg_"+_113.id,className:this.calendar.css.joinClassNames("copyImg"),style:_11f}); 
    982 _11c.push(_120); 
    983 item.appendChild(_120); 
    984 if(!_11a){ 
    985 Event.observe(_120,"click",this.clickCopyImage.bind(this,_113)); 
    986 
    987 
    988 if(!_11a&&this.calendar.options.dblclickSchedule){ 
     967Element.setStyle(item,_11c); 
     968var _11d=[]; 
     969var _11e=(_113.removable==undefined||_113.removable); 
     970if(_116&&_11e){ 
     971var _11f=Builder.node("DIV",{id:"scheduleDeleteImg_"+_113.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
     972_11d.push(_11f); 
     973_118.appendChild(_11f); 
     974if(!_11b){ 
     975Event.observe(_11f,"click",this.clickDeleteImage.bind(this,_113)); 
     976
     977
     978if(!_11b&&this.calendar.options.dblclickSchedule){ 
    989979Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_113)); 
    990980} 
     
    992982if(_113.icon){ 
    993983icon=Builder.node("IMG",{id:"private_img_"+_113.id,src:_113.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
    994 item.appendChild(icon); 
     984_118.appendChild(icon); 
    995985}else{ 
    996986if(Calendar.defaultIconPath){ 
    997987icon=Builder.node("IMG",{id:"private_img_"+_113.id,src:Calendar.defaultIconPath,alt:"icon",style:"float: left;",width:16,height:16}); 
    998 item.appendChild(icon); 
    999 } 
    1000 } 
    1001 var _122=null; 
     988_118.appendChild(icon); 
     989} 
     990} 
     991var _121=null; 
    1002992if(!_113.publicity){ 
    1003993if(Calendar.privateImgPath){ 
    1004 _122=Builder.node("IMG",{src:Calendar.privateImgPath,alt:"private",style:"position: absolute; right: 0px; display: block;",width:16,height:16}); 
    1005 item.appendChild(_122); 
    1006 }else{ 
    1007 _122=Builder.node("DIV",{id:"private_img_"+_113.id}); 
    1008 this.calendar.css.addClassNames(_122,"privateImg"); 
    1009 item.appendChild(_122); 
    1010 } 
    1011 } 
    1012 if(!_11a&&(_11c.length>0)){ 
    1013 Event.observe(item,"mouseover",this.showImage.bind(this,_11c,_122)); 
    1014 Event.observe(item,"mouseout",this.hideImage.bind(this,_11c,_122)); 
     994_121=Builder.node("IMG",{src:Calendar.privateImgPath,alt:"private",style:"position: absolute; right: 0px; display: block;",width:16,height:16}); 
     995_118.appendChild(_121); 
     996}else{ 
     997_121=Builder.node("DIV",{id:"private_img_"+_113.id}); 
     998this.calendar.css.addClassNames(_121,"privateImg"); 
     999_118.appendChild(_121); 
     1000} 
     1001} 
     1002if(!_11b&&(_11d.length>0)){ 
     1003Event.observe(item,"mouseover",this.showImage.bind(this,_11d,_121)); 
     1004Event.observe(item,"mouseout",this.hideImage.bind(this,_11d,_121)); 
    10151005} 
    10161006var body=Builder.node("DIV"); 
    10171007var text=this.getTimeText((_114)?_113.start:{hour:"0",min:"0"},_113.finish); 
    1018 var _125=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]); 
    1019 this.calendar.css.addClassNames(_125,"scheduleTimeAreaMonth"); 
    1020 item.appendChild(_125); 
    1021 var _126=_113.description.unescapeHTML(); 
    1022 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_126])); 
    1023 item.title=text+"-"+this.calendar.formatTime(_113.finish)+" "+_126
     1008var _124=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]); 
     1009this.calendar.css.addClassNames(_124,"scheduleTimeAreaMonth"); 
     1010_118.appendChild(_124); 
     1011var _125=_113.description.unescapeHTML(); 
     1012_118.appendChild(Builder.node("DIV",{id:id+"_description"},[_125])); 
     1013item.title=text+"-"+this.calendar.formatTime(_113.finish)+" "+_125
    10241014item.schedule=_113; 
    1025 return [item]; 
    1026 },adjustScheduleStyle:function(item,_128,_129,_12a){ 
     1015return [item,_118]; 
     1016},adjustScheduleStyle:function(item,_127,_128,_129){ 
    10271017var self=this; 
    1028 var _12c=parseInt(Element.getStyle(item,"height"),10); 
     1018var _12b=parseInt(Element.getStyle(item,"height"),10); 
    10291019var top=parseInt(Element.getStyle(item,"top"),10); 
    1030 var _12e=this.getScheduleRange(item); 
     1020var _12d=this.getScheduleRange(item); 
    10311021var tops=[]; 
    1032 var _130=3; 
    1033 _12a.each(function(_131){ 
    1034 var _132=self.getScheduleRange(_131); 
    1035 if(_12e.any(function(r){ 
    1036 return _132.include(r); 
     1022var _12f=3; 
     1023_129.each(function(_130){ 
     1024var _131=self.getScheduleRange(_130); 
     1025if(_12d.any(function(r){ 
     1026return _131.include(r); 
    10371027})){ 
    1038 tops.push(_131.topIndex); 
    1039 } 
    1040 }); 
    1041 var _134=$R(0,tops.length,true).detect(function(i){ 
     1028tops.push(_130.topIndex); 
     1029} 
     1030}); 
     1031var _133=$R(0,tops.length,true).detect(function(i){ 
    10421032return !tops.include(i); 
    10431033}); 
    1044 if(isNaN(_134)){ 
    1045 _134=tops.length; 
    1046 } 
    1047 item.topIndex=_134
    1048 Element.setStyle(item,{top:top+(_12c+2)*_134+"px"}); 
    1049 if(_134>=_130){ 
     1034if(isNaN(_133)){ 
     1035_133=tops.length; 
     1036} 
     1037item.topIndex=_133
     1038Element.setStyle(item,{top:top+(_12b+2)*_133+"px"}); 
     1039if(_133>=_12f){ 
    10501040Element.hide(item); 
    1051 var node=this.buildSkipSchedule(_128+"_"+_129,item); 
     1041var node=this.buildSkipSchedule(_127+"_"+_128,item); 
    10521042if(node){ 
    10531043var left=Element.getStyle(item,"left"); 
    1054 Element.setStyle(node,{top:top+(_12c+2)*_134+"px",left:left}); 
     1044Element.setStyle(node,{top:top+(_12b+2)*_133+"px",left:left}); 
    10551045} 
    10561046return node; 
    10571047} 
    1058 },buildSkipSchedule:function(_138,item){ 
    1059 var id=this.calendar.element.id.appendSuffix(_138); 
     1048},buildSkipSchedule:function(_137,item){ 
     1049var id=this.calendar.element.id.appendSuffix(_137); 
    10601050if(!this.skipNode[id]){ 
    1061 var _13b=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
    1062 var _13c=this.column.width+_13b-1+"px"; 
    1063 var node=Builder.node("a",{id:id,style:"display: block; z-index: 1000; cursor: pointer; width: "+_13c+";",href:"javascript:void(0);"},["more"]); 
     1051var _13a=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
     1052var _13b=this.column.width+_13a-1+"px"; 
     1053var node=Builder.node("a",{id:id,style:"display: block; z-index: 1000; cursor: pointer; width: "+_13b+";",href:"javascript:void(0);"},["more"]); 
    10641054this.calendar.css.addClassNames(node,"skipNode"); 
    10651055node.skipId=id; 
     
    10731063return item.cellIndex+i; 
    10741064}); 
    1075 },setScheduleBaseStyle:function(item,_141,_142,_143){ 
    1076 var _144=this.column.height; 
    1077 var top=_144*_141+this.column.dateTextHeight; 
    1078 var _146=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
    1079 Element.setStyle(item,{top:top+"px",width:this.column.width*_143+_146*(_143-1)+"px",left:this.column.width*_142+_142*_146+"px"}); 
     1065},setScheduleBaseStyle:function(item,_140,_141,_142){ 
     1066var _143=this.column.height; 
     1067var top=_143*_140+this.column.dateTextHeight; 
     1068var _145=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 
     1069Element.setStyle(item,{top:top+"px",width:this.column.width*_142+_145*(_142-1)+"px",left:this.column.width*_141+_141*_145+"px"}); 
    10801070},afterBuild:function(){ 
    10811071this.calendar.options.startAfterBuild(); 
    1082 var _147=this.getTooltipId(); 
    1083 if($(_147)){ 
    1084 Element.appendToBody(_147); 
     1072var _146=this.getTooltipId(); 
     1073if($(_146)){ 
     1074Element.appendToBody(_146); 
    10851075} 
    10861076this.scheduleNodes=[]; 
     
    10951085this.setSelector(); 
    10961086var self=this; 
    1097 var _149=this.calendar.options.displayIndexes; 
    1098 var _14a=this.getDragDistance(); 
    1099 var _14b=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 
     1087var _148=this.calendar.options.displayIndexes; 
     1088var _149=this.getDragDistance(); 
     1089var _14a=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 
    11001090return []; 
    11011091}); 
    11021092var date=this.calendar.date; 
    1103 var _14d=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 
    1104 var _14e=_14d.days(); 
    1105 var _14f=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 
    1106 self.calendar.options.schedules.each(function(_150,_151){ 
    1107 var _152=self.toDate(_150.start); 
    1108 var _153=_152.days(); 
    1109 var _154=self.toDate(_150.finish); 
    1110 var _155=_154.days(); 
    1111 var days=self.getDayDiff(_150); 
    1112 if(_150.finish.hour==0&&_150.finish.min==0){ 
     1093var _14c=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 
     1094var _14d=_14c.days(); 
     1095var _14e=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 
     1096self.calendar.options.schedules.each(function(_14f,_150){ 
     1097var _151=self.toDate(_14f.start); 
     1098var _152=_151.days(); 
     1099var _153=self.toDate(_14f.finish); 
     1100var _154=_153.days(); 
     1101var days=self.getDayDiff(_14f); 
     1102if(_14f.finish.hour==0&&_14f.finish.min==0){ 
    11131103days--; 
    11141104} 
    1115 if((_153>=_14e&&_153<=_14f)||(_155>=_14e&&_155<=_14f)){ 
    1116 if(!_14d.sameMonth(_152)){ 
    1117 _152=_14d
    1118 } 
    1119 self.setSchedule(_150,_14b,_14a,days); 
     1105if((_152>=_14d&&_152<=_14e)||(_154>=_14d&&_154<=_14e)){ 
     1106if(!_14c.sameMonth(_151)){ 
     1107_151=_14c
     1108} 
     1109self.setSchedule(_14f,_14a,_149,days); 
    11201110} 
    11211111}); 
     
    11421132} 
    11431133} 
    1144 },setSchedule:function(_159,_15a,_15b,days){ 
    1145 var _15d=[]; 
    1146 var _15e=6; 
    1147 var _15f=DateUtil.toDate(_159.start); 
    1148 var date=_15f
    1149 var _161=this.calendar.options.displayIndexes; 
    1150 var _162=this.calendar.date; 
    1151 var _163=this.calendar.options.noEvent; 
    1152 var _164=this.calendar.options.clickSkipNode; 
     1134},setSchedule:function(_158,_159,_15a,days){ 
     1135var _15c=[]; 
     1136var _15d=6; 
     1137var _15e=DateUtil.toDate(_158.start); 
     1138var date=_15e
     1139var _160=this.calendar.options.displayIndexes; 
     1140var _161=this.calendar.date; 
     1141var _162=this.calendar.options.noEvent; 
     1142var _163=this.calendar.options.clickSkipNode; 
    11531143while(days>=0){ 
    1154 var _165=this.getLastWday(date); 
    1155 var _166=days+1; 
    1156 var _167=date.getDay(); 
    1157 var _168=date.advance({days:_166-1}); 
    1158 if(_168.getTime()>_165.getTime()){ 
    1159 _168=_165
    1160 _166=_168.days()-date.days()+1; 
    1161 } 
    1162 var _169=_168.getDay(); 
    1163 var _16a=null; 
    1164 if(_167<=_169){ 
    1165 _16a=$R(_167,_169,false); 
    1166 }else{ 
    1167 _16a=$R(0,_169,false).toArray().concat($R(_167,_15e,false).toArray()); 
    1168 } 
    1169 var _16b=_16a.findAll(function(day){ 
    1170 return _161.include(day); 
     1144var _164=this.getLastWday(date); 
     1145var _165=days+1; 
     1146var _166=date.getDay(); 
     1147var _167=date.advance({days:_165-1}); 
     1148if(_167.getTime()>_164.getTime()){ 
     1149_167=_164
     1150_165=_167.days()-date.days()+1; 
     1151} 
     1152var _168=_167.getDay(); 
     1153var _169=null; 
     1154if(_166<=_168){ 
     1155_169=$R(_166,_168,false); 
     1156}else{ 
     1157_169=$R(0,_168,false).toArray().concat($R(_166,_15d,false).toArray()); 
     1158} 
     1159var _16a=_169.findAll(function(day){ 
     1160return _160.include(day); 
    11711161}).length; 
    1172 var _16d=new Date(date.getTime()); 
    1173 while(_16d.days()<=_168.days()){ 
    1174 if(_16d.getMonth()==_162.getMonth()){ 
    1175 var _16e=this.getCellPosition(_16d.getDate()); 
    1176 if(_16e){ 
    1177 var _16f=_16e.rowIndex; 
    1178 var _170=_16e.cellIndex; 
    1179 var _171=this.buildSchedule(_159,_15f.sameDate(_16d)); 
    1180 var item=_171.first(); 
    1181 item.length=_16b
    1182 item.cellIndex=_170
    1183 item.cellDate=_16d
     1162var _16c=new Date(date.getTime()); 
     1163while(_16c.days()<=_167.days()){ 
     1164if(_16c.getMonth()==_161.getMonth()){ 
     1165var _16d=this.getCellPosition(_16c.getDate()); 
     1166if(_16d){ 
     1167var _16e=_16d.rowIndex; 
     1168var _16f=_16d.cellIndex; 
     1169var _170=this.buildSchedule(_158,_15e.sameDate(_16c)); 
     1170var item=_170.first(); 
     1171item.length=_16a
     1172item.cellIndex=_16f
     1173item.cellDate=_16c
    11841174this.container.appendChild(item); 
    1185 this.setScheduleBaseStyle(item,_16f,_170,_16b); 
    1186 var _173=this.adjustScheduleStyle(item,_16f,_170,_15a[_16f]); 
    1187 if(_173){ 
    1188 this.container.appendChild(_173); 
    1189 Event.observe(_173,"click",this.clickSkipNode.bindAsEventListener(this,_16d)); 
    1190 Event.observe(_173,"mouseover",this.showTooltip.bindAsEventListener(this,_173.skipId,_16d)); 
    1191 Event.observe(_173,"mouseout",this.hideTooltip.bindAsEventListener(this)); 
    1192 } 
    1193 if(!_163&&((_159.edit==undefined)||_159.edit)){ 
    1194 this.setDraggable(item,_171.last(),_15b); 
     1175this.setScheduleBaseStyle(item,_16e,_16f,_16a); 
     1176var _172=this.adjustScheduleStyle(item,_16e,_16f,_159[_16e]); 
     1177if(_172){ 
     1178this.container.appendChild(_172); 
     1179Event.observe(_172,"click",this.clickSkipNode.bindAsEventListener(this,_16c)); 
     1180Event.observe(_172,"mouseover",this.showTooltip.bindAsEventListener(this,_172.skipId,_16c)); 
     1181Event.observe(_172,"mouseout",this.hideTooltip.bindAsEventListener(this)); 
     1182} 
     1183if(!_162&&((_158.edit==undefined)||_158.edit)){ 
     1184this.setDraggable(item,_170.last(),_15a); 
    11951185this.setResize(item); 
    11961186} 
    1197 _15a[_16f].push(item); 
     1187_159[_16e].push(item); 
    11981188this.scheduleNodes.push(item); 
    11991189break; 
    12001190}else{ 
    1201 if(_161.include(_16d.getDay())){ 
    1202 _16b--; 
     1191if(_160.include(_16c.getDay())){ 
     1192_16a--; 
    12031193}else{ 
    12041194this.hasInvisibleSchedule=true; 
     
    12061196} 
    12071197}else{ 
    1208 if(_161.include(_16d.getDay())){ 
    1209 _16b--; 
    1210 } 
    1211 } 
    1212 _16d=_16d.advance({days:1}); 
    1213 } 
    1214 if(_15d.length==0){ 
    1215 days-=_166
     1198if(_160.include(_16c.getDay())){ 
     1199_16a--; 
     1200} 
     1201} 
     1202_16c=_16c.advance({days:1}); 
     1203} 
     1204if(_15c.length==0){ 
     1205days-=_165
    12161206}else{ 
    12171207days-=7; 
    12181208} 
    1219 var date=_168.advance({days:1}); 
     1209var date=_167.advance({days:1}); 
    12201210if(item){ 
    1221 _15d.push(item); 
     1211_15c.push(item); 
    12221212} 
    12231213} 
    12241214var self=this; 
    1225 if(!_163){ 
    1226 _15d.each(function(item){ 
    1227 Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_15d)); 
    1228 Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_15d)); 
     1215if(!_162){ 
     1216_15c.each(function(item){ 
     1217Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_15c)); 
     1218Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_15c)); 
    12291219}); 
    12301220} 
     
    12331223this.calendar.setIndex(); 
    12341224} 
    1235 var _177=this.calendar.wdays.indexOf(date.getDay())+1; 
    1236 return date.advance({days:this.calendar.wdays.length-_177}); 
     1225var _176=this.calendar.wdays.indexOf(date.getDay())+1; 
     1226return date.advance({days:this.calendar.wdays.length-_176}); 
    12371227},setSelector:function(){ 
    1238 var _178=$(this.getSelectorId()); 
    1239 Element.setStyle(_178,{width:this.column.width+"px",height:this.column.height-2+"px"}); 
    1240 Element.setOpacity(_178,0.6); 
    1241 },setDraggable:function(item,_17a,_17b){ 
     1228var _177=$(this.getSelectorId()); 
     1229Element.setStyle(_177,{width:this.column.width+"px",height:this.column.height-2+"px"}); 
     1230Element.setOpacity(_177,0.6); 
     1231},setDraggable:function(item,_179,_17a){ 
    12421232var self=this; 
    1243 var _17d=Position.cumulativeOffset(this.container); 
    1244 var _17e=$(this.getSelectorId()); 
    1245 var _17f=this.column.width+(UserAgent.isIE()?0.5:0); 
    1246 var _180=this.column.height+(UserAgent.isIE()?1:0); 
    1247 var _181=this.rowMax||$(this.getCalendarTableId()).rows.length; 
    1248 var _182=this.calendar.options.displayIndexes.length-1; 
    1249 var _183=this.getAdjustSize(); 
    1250 new Draggable(item,{handle:_17a,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_184){ 
    1251 Element.show(_17e); 
    1252 },onDrag:function(_185,_186){ 
    1253 var _187=_185.element; 
    1254 var top=parseInt(Element.getStyle(_187,"top"),10)+_185.offset[1]; 
    1255 var _189=Math.floor(top/_180); 
    1256 var left=parseInt(Element.getStyle(_187,"left"),10)+_185.offset[0]; 
    1257 var _18b=Math.floor(left/_17f); 
    1258 if((_18b>=0&&_189>=0)&&(_18b<=_182&&_189<=_181)){ 
    1259 Element.setStyle(_17e,{left:_17f*_18b+_183*_18b+"px",top:_180*_189+"px"}); 
    1260 } 
    1261 },onEnd:function(_18c){ 
    1262 Element.hide(_17e); 
    1263 self.changeSchedule(_18c); 
     1233var _17c=Position.cumulativeOffset(this.container); 
     1234var _17d=$(this.getSelectorId()); 
     1235var _17e=this.column.width+(UserAgent.isIE()?0.5:0); 
     1236var _17f=this.column.height+(UserAgent.isIE()?1:0); 
     1237var _180=this.rowMax||$(this.getCalendarTableId()).rows.length; 
     1238var _181=this.calendar.options.displayIndexes.length-1; 
     1239var _182=this.getAdjustSize(); 
     1240new Draggable(item,{handle:_179,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_183){ 
     1241Element.show(_17d); 
     1242},onDrag:function(_184,_185){ 
     1243var _186=_184.element; 
     1244var top=parseInt(Element.getStyle(_186,"top"),10)+_184.offset[1]; 
     1245var _188=Math.floor(top/_17f); 
     1246var left=parseInt(Element.getStyle(_186,"left"),10)+_184.offset[0]; 
     1247var _18a=Math.floor(left/_17e); 
     1248if((_18a>=0&&_188>=0)&&(_18a<=_181&&_188<=_180)){ 
     1249Element.setStyle(_17d,{left:_17e*_18a+_182*_18a+"px",top:_17f*_188+"px"}); 
     1250} 
     1251},onEnd:function(_18b){ 
     1252Element.hide(_17d); 
     1253self.changeSchedule(_18b); 
    12641254}}); 
    12651255},setResize:function(item){ 
    12661256var self=this; 
    1267 new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_18f){ 
    1268 self.updateTirm(_18f); 
     1257new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_18e){ 
     1258self.updateTirm(_18e); 
    12691259}}); 
    1270 },getDate:function(_190){ 
     1260},getDate:function(_18f){ 
    12711261var date=this.calendar.date; 
    1272 if(_190.constructor==String){ 
    1273 return new Date(date.getFullYear(),date.getMonth(),_190); 
    1274 }else{ 
    1275 return new Date(date.getFullYear(),date.getMonth(),_190.id.getSuffix()); 
    1276 } 
    1277 },abstractSelect:function(_192,_193){ 
    1278 var _194=null; 
     1262if(_18f.constructor==String){ 
     1263return new Date(date.getFullYear(),date.getMonth(),_18f); 
     1264}else{ 
     1265return new Date(date.getFullYear(),date.getMonth(),_18f.id.getSuffix()); 
     1266} 
     1267},abstractSelect:function(_191,_192){ 
     1268var _193=null; 
    12791269if(this.calendar.options.size=="large"){ 
    1280 _194=this.findClickedElement(_192); 
    1281 }else{ 
    1282 _194=Event.element(_192); 
    1283 if(_194.tagName!="TD"){ 
    1284 _194=Element.getParentByTagName(["TD"],_194); 
    1285 } 
    1286 } 
    1287 if(_194&&_194.id&&!_194.id.match(/emptyRow/)){ 
    1288 var date=this.getDate(_194); 
    1289 _193(date,_194); 
     1270_193=this.findClickedElement(_191); 
     1271}else{ 
     1272_193=Event.element(_191); 
     1273if(_193.tagName!="TD"){ 
     1274_193=Element.getParentByTagName(["TD"],_193); 
     1275} 
     1276} 
     1277if(_193&&_193.id&&!_193.id.match(/emptyRow/)){ 
     1278var date=this.getDate(_193); 
     1279_192(date,_193); 
    12901280} 
    12911281},getSelectedTerm:function(){ 
    12921282var self=this; 
    1293 var _197=this.calendar.getSelected(); 
    1294 return [_197.first(),_197.last()].map(function(e){ 
     1283var _196=this.calendar.getSelected(); 
     1284return [_196.first(),_196.last()].map(function(e){ 
    12951285return self.getDate(e); 
    12961286}); 
    1297 },selectDay:function(_199){ 
    1298 var _19a=this.calendar; 
    1299 var th=Event.element(_199); 
     1287},selectDay:function(_198){ 
     1288var _199=this.calendar; 
     1289var th=Event.element(_198); 
    13001290if(th.tagName!="TH"){ 
    13011291th=Element.getParentByTagName("TH",th); 
     
    13031293this.iterateTable({doCell:function(cell){ 
    13041294if((cell.cellIndex==th.cellIndex)&&cell.id){ 
    1305 _19a.addSelectedClass(cell); 
     1295_199.addSelectedClass(cell); 
    13061296} 
    13071297}}); 
    1308 },inspectArgument:function(_19d,time){ 
     1298},inspectArgument:function(_19c,time){ 
    13091299var self=this; 
    1310 var _1a0=this.calendar.getSelected(); 
    1311 var _1a1=[]; 
    1312 self.calendar.recurrence(_19d,function(o){ 
     1300var _19f=this.calendar.getSelected(); 
     1301var _1a0=[]; 
     1302self.calendar.recurrence(_19c,function(o){ 
    13131303if(!o.date){ 
    1314 _1a0.each(function(d){ 
    1315 var _1a4={}; 
     1304_19f.each(function(d){ 
     1305var _1a3={}; 
    13161306if(!o.date){ 
    1317 _1a4={date:self.getDate(d)}; 
     1307_1a3={date:self.getDate(d)}; 
    13181308if(time){ 
    1319 _1a4.start={hour:0,min:0}; 
    1320 _1a4.finish={hour:0,min:0}; 
    1321 } 
    1322 } 
    1323 Object.extend(_1a4,o); 
    1324 _1a1.push(_1a4); 
     1309_1a3.start={hour:0,min:0}; 
     1310_1a3.finish={hour:0,min:0}; 
     1311} 
     1312} 
     1313Object.extend(_1a3,o); 
     1314_1a0.push(_1a3); 
    13251315}); 
    13261316}else{ 
    13271317if(o.date.constructor==Object){ 
    13281318o.date=new Date(o.date.year,o.date.month,o.date.day); 
    1329 _1a1.push(o); 
    1330 }else{ 
    1331 _1a1.push(o); 
    1332 } 
    1333 } 
    1334 }); 
    1335 return _1a1
     1319_1a0.push(o); 
     1320}else{ 
     1321_1a0.push(o); 
     1322} 
     1323} 
     1324}); 
     1325return _1a0
    13361326},inspectDateArgument:function(date){ 
    13371327if(date){ 
     
    13461336return map; 
    13471337}else{ 
    1348 var _1a7=this; 
    1349 var _1a8=this.calendar.getSelected(); 
    1350 if(_1a8.length==0){ 
     1338var _1a6=this; 
     1339var _1a7=this.calendar.getSelected(); 
     1340if(_1a7.length==0){ 
    13511341return null; 
    13521342} 
    1353 return _1a8.collect(function(d){ 
    1354 return _1a7.getDate(d); 
    1355 }); 
    1356 } 
    1357 },findClickedElement:function(_1aa){ 
    1358 var _1ab=$(this.getScheduleContainerId()); 
    1359 var _1ac=Position.cumulativeOffset(_1ab); 
    1360 var _1ad=Position.realOffset(_1ab).last(); 
    1361 _1ad-=document.documentElement.scrollTop||document.body.scrollTop; 
    1362 var x=Event.pointerX(_1aa)-_1ac[0]; 
    1363 var y=Event.pointerY(_1aa)-_1ac[1]+_1ad
    1364 var _1b0=Math.floor(y/this.column.height); 
    1365 var _1b1=Math.floor(x/this.column.width); 
    1366 return $(this.calendarTable.rows[_1b0].cells[_1b1]); 
    1367 },multipleSelection:function(_1b2){ 
     1343return _1a7.collect(function(d){ 
     1344return _1a6.getDate(d); 
     1345}); 
     1346} 
     1347},findClickedElement:function(_1a9){ 
     1348var _1aa=$(this.getScheduleContainerId()); 
     1349var _1ab=Position.cumulativeOffset(_1aa); 
     1350var _1ac=Position.realOffset(_1aa).last(); 
     1351_1ac-=document.documentElement.scrollTop||document.body.scrollTop; 
     1352var x=Event.pointerX(_1a9)-_1ab[0]; 
     1353var y=Event.pointerY(_1a9)-_1ab[1]+_1ac
     1354var _1af=Math.floor(y/this.column.height); 
     1355var _1b0=Math.floor(x/this.column.width); 
     1356return $(this.calendarTable.rows[_1af].cells[_1b0]); 
     1357},multipleSelection:function(_1b1){ 
    13681358if(!this.calendar.selectedBase||!this.calendar.mouseDown){ 
    13691359return; 
    13701360} 
    13711361var self=this; 
    1372 var _1b4=this.calendar; 
    1373 var _1b5=this.calendar.selectedBase; 
    1374 this.abstractSelect(_1b2,function(date,_1b7){ 
    1375 var _1b8=$(_1b5.id); 
    1376 var _1b9=_1b4.createRange(parseInt(_1b8.id.getSuffix()),parseInt(_1b7.id.getSuffix())); 
     1362var _1b3=this.calendar; 
     1363var _1b4=this.calendar.selectedBase; 
     1364this.abstractSelect(_1b1,function(date,_1b6){ 
     1365var _1b7=$(_1b4.id); 
     1366var _1b8=_1b3.createRange(parseInt(_1b7.id.getSuffix()),parseInt(_1b6.id.getSuffix())); 
    13771367self.iterateTable({doCell:function(cell){ 
    13781368if(cell.tagName!="TD"||!cell.id){ 
     
    13801370} 
    13811371var id=parseInt(cell.id.getSuffix(),10); 
    1382 if(_1b9.include(id)){ 
    1383 _1b4.addSelectedClass(cell); 
    1384 }else{ 
    1385 _1b4.removeSelectedClass(cell); 
     1372if(_1b8.include(id)){ 
     1373_1b3.addSelectedClass(cell); 
     1374}else{ 
     1375_1b3.removeSelectedClass(cell); 
    13861376} 
    13871377}}); 
    13881378}); 
    13891379},iterateTable:function(){ 
    1390 var _1bc=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
    1391 var _1bd=$(this.getCalendarTableId()); 
    1392 if(_1bc.doTable){ 
    1393 _1bc.doTable(_1bd); 
    1394 } 
    1395 $A(_1bd.rows).each(function(row){ 
    1396 if(_1bc.doRow){ 
    1397 _1bc.doRow(row); 
     1380var _1bb=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
     1381var _1bc=$(this.getCalendarTableId()); 
     1382if(_1bb.doTable){ 
     1383_1bb.doTable(_1bc); 
     1384} 
     1385$A(_1bc.rows).each(function(row){ 
     1386if(_1bb.doRow){ 
     1387_1bb.doRow(row); 
    13981388} 
    13991389$A(row.cells).each(function(cell){ 
    1400 if(_1bc.doCell){ 
    1401 _1bc.doCell(cell); 
    1402 } 
    1403 }); 
    1404 }); 
    1405 },findRow:function(_1c0){ 
    1406 var _1c1=$(this.getCalendarTableId()); 
    1407 return $A(_1c1.rows).detect(function(row){ 
    1408 return row.rowIndex==_1c0
    1409 }); 
    1410 },findCell:function(_1c3,_1c4){ 
    1411 return $A(this.findRow(_1c3).cells).detect(function(cell){ 
    1412 return cell.cellIndex==_1c4
     1390if(_1bb.doCell){ 
     1391_1bb.doCell(cell); 
     1392} 
     1393}); 
     1394}); 
     1395},findRow:function(_1bf){ 
     1396var _1c0=$(this.getCalendarTableId()); 
     1397return $A(_1c0.rows).detect(function(row){ 
     1398return row.rowIndex==_1bf
     1399}); 
     1400},findCell:function(_1c2,_1c3){ 
     1401return $A(this.findRow(_1c2).cells).detect(function(cell){ 
     1402return cell.cellIndex==_1c3
    14131403}); 
    14141404},getDateId:function(date){ 
     
    14281418return {cellIndex:cell.cellIndex,rowIndex:row.rowIndex}; 
    14291419} 
    1430 },changeSchedule:function(_1cc){ 
    1431 var _1cd=_1cc.element; 
    1432 var _1ce=_1cd.schedule; 
    1433 this.calendar.cacheSchedule(_1ce); 
    1434 var _1cf=$(this.getSelectorId()); 
    1435 var top=parseInt(Element.getStyle(_1cf,"top"),10); 
    1436 var _1d1=Math.floor(top/this.column.height); 
    1437 var left=parseInt(Element.getStyle(_1cf,"left"),10); 
    1438 var _1d3=Math.floor(left/this.column.width); 
    1439 var _1d4=$(this.getCalendarTableId()); 
    1440 var _1d5=_1d4.rows.length-1; 
    1441 var _1d6=this.calendar.options.displayIndexes.length-1; 
    1442 if((_1d3>=0&&_1d1>=0)&&(_1d3<=_1d6&&_1d1<=_1d5)){ 
    1443 var cell=this.findCell(_1d1,_1d3); 
     1420},changeSchedule:function(_1cb){ 
     1421var _1cc=_1cb.element; 
     1422var _1cd=_1cc.schedule; 
     1423this.calendar.cacheSchedule(_1cd); 
     1424var _1ce=$(this.getSelectorId()); 
     1425var top=parseInt(Element.getStyle(_1ce,"top"),10); 
     1426var _1d0=Math.floor(top/this.column.height); 
     1427var left=parseInt(Element.getStyle(_1ce,"left"),10); 
     1428var _1d2=Math.floor(left/this.column.width); 
     1429var _1d3=$(this.getCalendarTableId()); 
     1430var _1d4=_1d3.rows.length-1; 
     1431var _1d5=this.calendar.options.displayIndexes.length-1; 
     1432if((_1d2>=0&&_1d0>=0)&&(_1d2<=_1d5&&_1d0<=_1d4)){ 
     1433var cell=this.findCell(_1d0,_1d2); 
    14441434var date=new Date(this.calendar.date.getTime()); 
    1445 var _1d9=_1cd.cellDate.days()-DateUtil.toDate(_1ce.start).days(); 
    1446 date.setDate(parseInt(cell.id.getSuffix(),10)-_1d9); 
    1447 var diff=this.getDayDiff(_1ce); 
    1448 var _1db=date.advance({days:diff}); 
    1449 if(_1ce.start.month==date.getMonth()&&_1ce.start.day==date.getDate()&&_1ce.finish.month==_1db.getMonth()&&_1ce.finish.day==_1db.getDate()){ 
     1435var _1d8=_1cc.cellDate.days()-DateUtil.toDate(_1cd.start).days(); 
     1436date.setDate(parseInt(cell.id.getSuffix(),10)-_1d8); 
     1437var diff=this.getDayDiff(_1cd); 
     1438var _1da=date.advance({days:diff}); 
     1439if(_1cd.start.month==date.getMonth()&&_1cd.start.day==date.getDate()&&_1cd.finish.month==_1da.getMonth()&&_1cd.finish.day==_1da.getDate()){ 
    14501440this.calendar.refreshSchedule(); 
    14511441return; 
    14521442} 
    1453 _1ce.start.year=date.getFullYear(); 
    1454 _1ce.start.month=date.getMonth(); 
    1455 _1ce.start.day=date.getDate(); 
    1456 _1ce.finish.year=_1db.getFullYear(); 
    1457 _1ce.finish.month=_1db.getMonth(); 
    1458 _1ce.finish.day=_1db.getDate(); 
     1443_1cd.start.year=date.getFullYear(); 
     1444_1cd.start.month=date.getMonth(); 
     1445_1cd.start.day=date.getDate(); 
     1446_1cd.finish.year=_1da.getFullYear(); 
     1447_1cd.finish.month=_1da.getMonth(); 
     1448_1cd.finish.day=_1da.getDate(); 
    14591449this.calendar.refreshSchedule(); 
    1460 this.calendar.options.changeSchedule(_1ce); 
     1450this.calendar.options.changeSchedule(_1cd); 
    14611451}else{ 
    14621452this.calendar.refreshSchedule(); 
    14631453} 
    1464 },updateTirm:function(_1dc){ 
    1465 var _1dd=_1dc.schedule; 
    1466 var _1de=parseInt(Element.getStyle(_1dc,"width")); 
    1467 var top=parseInt(Element.getStyle(_1dc,"top")); 
    1468 var left=parseInt(Element.getStyle(_1dc,"left")); 
    1469 var _1e1=Math.round((left+_1de)/this.column.width)-1; 
    1470 var _1e2=Math.round(top/this.column.height); 
    1471 var cell=this.findCell(_1e2,_1e1); 
    1472 var _1e4=_1dd.finish; 
    1473 var _1e5=null; 
     1454},updateTirm:function(_1db){ 
     1455var _1dc=_1db.schedule; 
     1456var _1dd=parseInt(Element.getStyle(_1db,"width")); 
     1457var top=parseInt(Element.getStyle(_1db,"top")); 
     1458var left=parseInt(Element.getStyle(_1db,"left")); 
     1459var _1e0=Math.round((left+_1dd)/this.column.width)-1; 
     1460var _1e1=Math.round(top/this.column.height); 
     1461var cell=this.findCell(_1e1,_1e0); 
     1462var _1e3=_1dc.finish; 
     1463var _1e4=null; 
    14741464if(this.dateMap){ 
    1475 _1e5=this.dateMap[cell.id].toHash(); 
    1476 }else{ 
    1477 _1e5=new Date(this.calendar.date.getTime()); 
    1478 _1e5.setDate(parseInt(cell.id.getSuffix(),10)); 
    1479 _1e5=_1e5.toHash(); 
    1480 } 
    1481 _1e5.hour=_1e4.hour; 
    1482 _1e5.min=_1e4.min; 
    1483 if(DateUtil.toDate(_1dd.start).getTime()>=DateUtil.toDate(_1e5).getTime()){ 
    1484 var _1e6=23; 
    1485 var _1e7=55; 
    1486 if(_1dd.start.hour==_1e6&&_1dd.start.min==_1e7){ 
     1465_1e4=this.dateMap[cell.id].toHash(); 
     1466}else{ 
     1467_1e4=new Date(this.calendar.date.getTime()); 
     1468_1e4.setDate(parseInt(cell.id.getSuffix(),10)); 
     1469_1e4=_1e4.toHash(); 
     1470} 
     1471_1e4.hour=_1e3.hour; 
     1472_1e4.min=_1e3.min; 
     1473if(DateUtil.toDate(_1dc.start).getTime()>=DateUtil.toDate(_1e4).getTime()){ 
     1474var _1e5=23; 
     1475var _1e6=55; 
     1476if(_1dc.start.hour==_1e5&&_1dc.start.min==_1e6){ 
    14871477this.calendar.refreshSchedule(); 
    14881478this.calendar.options.updateTirm(); 
    14891479return; 
    14901480}else{ 
    1491 _1e5.hour=_1e6
    1492 _1e5.min=_1e7
    1493 } 
    1494 } 
    1495 _1dd.finish=_1e5
     1481_1e4.hour=_1e5
     1482_1e4.min=_1e6
     1483} 
     1484} 
     1485_1dc.finish=_1e4
    14961486this.calendar.refreshSchedule(); 
    1497 this.calendar.options.updateTirm(_1dd); 
    1498 },getTimeText:function(_1e8,_1e9){ 
    1499 var _1ea=this.calendar; 
    1500 return _1ea.formatTime(_1e8); 
    1501 },getDayDiff:function(_1eb){ 
    1502 return DateUtil.numberOfDays(this.toDate(_1eb.start),this.toDate(_1eb.finish)); 
     1487this.calendar.options.updateTirm(_1dc); 
     1488},getTimeText:function(_1e7,_1e8){ 
     1489var _1e9=this.calendar; 
     1490return _1e9.formatTime(_1e7); 
     1491},getDayDiff:function(_1ea){ 
     1492return DateUtil.numberOfDays(this.toDate(_1ea.start),this.toDate(_1ea.finish)); 
    15031493}}); 
    15041494var CalendarWeek=Class.create(); 
    15051495CalendarWeek.id=["calTable","columnContainer","columnHeader","column","next","pre","headerText"]; 
    15061496Object.extend(CalendarWeek.prototype,AbstractCalendar.prototype); 
    1507 Object.extend(CalendarWeek.prototype,{initialize:function(_1ec){ 
    1508 this.calendar=_1ec
    1509 var _1ed=this.getWeek(); 
    1510 this.week=_1ed[0]; 
    1511 this.invisibleWeek=_1ed[1]; 
     1497Object.extend(CalendarWeek.prototype,{initialize:function(_1eb){ 
     1498this.calendar=_1eb
     1499var _1ec=this.getWeek(); 
     1500this.week=_1ec[0]; 
     1501this.invisibleWeek=_1ec[1]; 
    15121502this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarWeek.id); 
    15131503this.setDisplayTime(); 
     
    15151505return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.pre+"' class='"+this.calendar.classNames.preWeekMark+"'></div>"+"</td>"; 
    15161506},buildHeaderCenter:function(){ 
    1517 var _1ee=[]; 
     1507var _1ed=[]; 
    15181508if(this.calendar.options.weekHeaderFormat){ 
    1519 _1ee=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
    1520 } 
    1521 return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ee[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ee[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ee[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
     1509_1ed=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
     1510} 
     1511return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ed[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ed[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1ed[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
    15221512},formatHeaderDate:function(date){ 
    15231513if(this.calendar.options.weekHeaderFormat){ 
     
    15281518return "<td class='"+this.calendar.classNames.nextYears+"' align='right'>"+"<div id='"+this.ids.next+"' class='"+this.calendar.classNames.nextWeekMark+"'></div>"+"</td>"; 
    15291519},buildCalendar:function(){ 
    1530 var _1f0=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
    1531 _1f0+=this.buildCalendarContainer(); 
    1532 return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1f0+"</tr>"+"</table>"; 
     1520var _1ef=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
     1521_1ef+=this.buildCalendarContainer(); 
     1522return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1ef+"</tr>"+"</table>"; 
    15331523},buildTimeLine:function(){ 
    15341524var time=new Date(); 
    1535 var hour=0,_1f3=24; 
     1525var hour=0,_1f2=24; 
    15361526time.setHours(hour); 
    15371527time.setMinutes(0); 
    1538 var _1f4=this.buildTimeLineTop(); 
     1528var _1f3=this.buildTimeLineTop(); 
    15391529var now=new Date().getHours(); 
    1540 while(hour<_1f3){ 
     1530while(hour<_1f2){ 
    15411531if(this.includeDisplayTime(hour)){ 
    1542 var _1f6="pointer: default;"; 
    1543 if(_1f4.length==0){ 
    1544 _1f6+="border-top: none;"; 
    1545 } 
    1546 var _1f7=this.calendar.classNames.timeLineTime; 
     1532var _1f5="pointer: default;"; 
     1533if(_1f3.length==0){ 
     1534_1f5+="border-top: none;"; 
     1535} 
     1536var _1f6=this.calendar.classNames.timeLineTime; 
    15471537if(hour==now){ 
    1548 _1f7+=" "+this.calendar.classNames.highlightTime; 
    1549 } 
    1550 _1f4+="<div class='"+_1f7+"' style='"+_1f6+"'>"+this.formatTime(time)+"</div>"; 
     1538_1f6+=" "+this.calendar.classNames.highlightTime; 
     1539} 
     1540_1f3+="<div class='"+_1f6+"' style='"+_1f5+"'>"+this.formatTime(time)+"</div>"; 
    15511541} 
    15521542hour++; 
    15531543time.setHours(hour); 
    15541544} 
    1555 return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1f4+"</td>"; 
     1545return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1f3+"</td>"; 
    15561546},buildTimeLineTop:function(){ 
    15571547return "<div class='"+this.calendar.classNames.timeLineTimeTop+"'></div>"; 
     
    15591549return "<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+this.buildCalendarHeader()+this.buildCalendarMain()+"</table>"+"</td>"; 
    15601550},buildCalendarHeader:function(){ 
    1561 var _1f8=this.calendar.options.displayIndexes; 
     1551var _1f7=this.calendar.options.displayIndexes; 
    15621552var ths=""; 
    1563 var _1fa=new Date().days(); 
    1564 var _1fb=100/_1f8.length+"%"; 
    1565 var _1fc=this.calendar.element.id.appendSuffix(this.ids.column); 
    1566 var _1fd=this.calendar.element.id.appendSuffix(this.ids.headerText); 
     1553var _1f9=new Date().days(); 
     1554var _1fa=100/_1f7.length+"%"; 
     1555var _1fb=this.calendar.element.id.appendSuffix(this.ids.column); 
     1556var _1fc=this.calendar.element.id.appendSuffix(this.ids.headerText); 
    15671557this.headers=[]; 
    1568 var _1fe=this.calendar.options.noEvent; 
    1569 var _1ff=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
    1570 this.week.each(function(w,_201){ 
     1558var _1fd=this.calendar.options.noEvent; 
     1559var _1fe=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
     1560this.week.each(function(w,_200){ 
    15711561var text=null; 
    1572 if(_1ff){ 
    1573 text=_1ff.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
     1562if(_1fe){ 
     1563text=_1fe.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
    15741564}else{ 
    15751565text=w.toDateString().split(" "); 
     
    15771567text=text.join(" "); 
    15781568} 
    1579 var _203=(w.days()==_1fa)?this.calendar.classNames.highlightDay:""; 
    1580 var _204=_1fd.appendSuffix(_201); 
     1569var _202=(w.days()==_1f9)?this.calendar.classNames.highlightDay:""; 
     1570var _203=_1fc.appendSuffix(_200); 
    15811571var node="<div class='"+this.calendar.classNames.headerColumn+"'>"; 
    1582 if(_1fe){ 
    1583 node+="<span='#' id='"+_204+"' class='"+_203+"' style='cursor: default;'>"+text+"</a>"; 
    1584 }else{ 
    1585 node+="<a href='#' id='"+_204+"' class='"+_203+"'>"+text+"</a>"; 
     1572if(_1fd){ 
     1573node+="<span='#' id='"+_203+"' class='"+_202+"' style='cursor: default;'>"+text+"</a>"; 
     1574}else{ 
     1575node+="<a href='#' id='"+_203+"' class='"+_202+"'>"+text+"</a>"; 
    15861576} 
    15871577node+="</div>"; 
    1588 this.headers.push({id:_204,wday:w}); 
    1589 ths+="<th id='"+_1fc.appendSuffix(_201)+"' width='"+_1fb+"'>"+node+"</th>"; 
     1578this.headers.push({id:_203,wday:w}); 
     1579ths+="<th id='"+_1fb.appendSuffix(_200)+"' width='"+_1fa+"'>"+node+"</th>"; 
    15901580}.bind(this)); 
    15911581return "<tr>"+"<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+"<tr>"+ths+"</tr>"+"</table>"+"</td>"+"</tr>"; 
    15921582},buildCalendarMain:function(){ 
    1593 var _206=this.calendar.options.displayIndexes; 
     1583var _205=this.calendar.options.displayIndexes; 
    15941584var tds=""; 
    1595 var _208=100/_206.length+"%"; 
     1585var _207=100/_205.length+"%"; 
    15961586this.dateMap={}; 
    1597 this.week.each(function(w,_20a){ 
    1598 var _20b=this.calendar.options.schedules[w.toDateString()]; 
    1599 var _20c=""; 
     1587this.week.each(function(w,_209){ 
     1588var _20a=this.calendar.options.schedules[w.toDateString()]; 
     1589var _20b=""; 
    16001590var i=0,j=0; 
    16011591while(i<24){ 
    16021592if(this.includeDisplayTime(i)){ 
    1603 var _20f=""; 
    1604 if(_20c.length==0){ 
    1605 _20f=this.calendar.classNames.columnTopDate; 
     1593var _20e=""; 
     1594if(_20b.length==0){ 
     1595_20e=this.calendar.classNames.columnTopDate; 
    16061596}else{ 
    16071597if(i%1==0){ 
    1608 _20f=this.calendar.classNames.columnDate; 
    1609 }else{ 
    1610 _20f=this.calendar.classNames.columnDateOdd; 
    1611 } 
    1612 } 
    1613 var id=this.getDateId(w,i,_20a); 
     1598_20e=this.calendar.classNames.columnDate; 
     1599}else{ 
     1600_20e=this.calendar.classNames.columnDateOdd; 
     1601} 
     1602} 
     1603var id=this.getDateId(w,i,_209); 
    16141604var hour=i/1; 
    16151605var min=i%1*60; 
    16161606this.dateMap[id]=new Date(w.getFullYear(),w.getMonth(),w.getDate(),hour,min,0); 
    1617 _20c+="<div id='"+id+"' class='"+_20f+"'></div>"; 
     1607_20b+="<div id='"+id+"' class='"+_20e+"'></div>"; 
    16181608} 
    16191609i+=0.5; 
    16201610} 
    1621 tds+="<td width='"+_208+"'>"+_20c+"</td>"; 
     1611tds+="<td width='"+_207+"'>"+_20b+"</td>"; 
    16221612}.bind(this)); 
    16231613return "<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>"; 
     
    16271617var rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.columnDate); 
    16281618this.column.height=parseInt(rule.style["height"],10)+1; 
    1629 },buildSchedule:function(_215){ 
    1630 var id="scheduleItem_"+_215.id; 
    1631 var _217=(_215.edit==undefined||_215.edit); 
     1619},buildSchedule:function(_214){ 
     1620var id="scheduleItem_"+_214.id; 
     1621var _216=(_214.edit==undefined||_214.edit); 
    16321622var item=Builder.node("DIV",{id:id}); 
    16331623this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    1634 var _219=this.calendar.options.noEvent; 
    1635 var term=DateUtil.toDate(_215.finish).minutes()-DateUtil.toDate(_215.start).minutes(); 
    1636 var _21b={}; 
    1637 if(_215.background_color){ 
    1638 _21b.backgroundColor=_215.background_color; 
    1639 } 
    1640 if(_215.frame_color){ 
    1641 _21b.borderTop="2px solid "+_215.frame_color; 
    1642 _21b.borderLeft="1px solid "+_215.frame_color; 
    1643 _21b.borderRight="1px solid "+_215.frame_color; 
    1644 _21b.borderBottom="2px solid "+_215.frame_color; 
     1624var _218=this.calendar.options.noEvent; 
     1625var term=DateUtil.toDate(_214.finish).minutes()-DateUtil.toDate(_214.start).minutes(); 
     1626var _21a={}; 
     1627if(_214.background_color){ 
     1628_21a.backgroundColor=_214.background_color; 
     1629} 
     1630if(_214.frame_color){ 
     1631_21a.borderTop="2px solid "+_214.frame_color; 
     1632_21a.borderLeft="1px solid "+_214.frame_color; 
     1633_21a.borderRight="1px solid "+_214.frame_color; 
     1634_21a.borderBottom="2px solid "+_214.frame_color; 
    16451635if(term<=30){ 
    1646 _21b.backgroundColor=_215.frame_color; 
    1647 
    1648 
    1649 if(_219){ 
    1650 _21b.cursor="default"; 
    1651 
    1652 Element.setStyle(item,_21b); 
    1653 var _21c=[]; 
    1654 if(_217){ 
    1655 var _21d=Builder.node("DIV",{id:"scheduleDeleteImg_"+_215.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
    1656 _21c.push(_21d); 
    1657 item.appendChild(_21d); 
    1658 if(!_219){ 
    1659 Event.observe(_21d,"click",this.clickDeleteImage.bind(this,_215)); 
    1660 
    1661 
    1662 if(_215.copiable){ 
    1663 var _21e="display: none;"; 
    1664 if(_21c.length>0){ 
    1665 _21e+="right: 17px;"; 
    1666 
    1667 var _21f=Builder.node("DIV",{id:"scheduleCopyImg_"+_215.id,className:this.calendar.css.joinClassNames("copyImg"),style:_21e}); 
    1668 _21c.push(_21f); 
    1669 item.appendChild(_21f); 
    1670 if(!_219){ 
    1671 Event.observe(_21f,"click",this.clickCopyImage.bind(this,_215)); 
    1672 
    1673 
    1674 if(!_219&&this.calendar.options.dblclickSchedule){ 
    1675 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_215)); 
     1636_21a.backgroundColor=_214.frame_color; 
     1637
     1638
     1639if(_218){ 
     1640_21a.cursor="default"; 
     1641
     1642Element.setStyle(item,_21a); 
     1643var _21b=[]; 
     1644if(_216){ 
     1645var _21c=Builder.node("DIV",{id:"scheduleDeleteImg_"+_214.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
     1646_21b.push(_21c); 
     1647item.appendChild(_21c); 
     1648if(!_218){ 
     1649Event.observe(_21c,"click",this.clickDeleteImage.bind(this,_214)); 
     1650