Changeset 5826

Show
Ignore:
Timestamp:
07/01/08 16:36:20 (2 months ago)
Author:
kinoshita
Message:

5041

Files:

Legend:

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

    r5825 r5826  
    12421242var _182=this.calendar.options.displayIndexes.length-1; 
    12431243var _183=this.getAdjustSize(); 
    1244 new Draggable(item,{handle:_17a,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_184){ 
     1244new Draggable(item,{handle:_17a,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,onStart:function(_184,_185){ 
    12451245Element.show(_17e); 
    1246 },onDrag:function(_185,_186){ 
    1247 var _187=_185.element; 
    1248 var top=parseInt(Element.getStyle(_187,"top"),10)+_185.offset[1]; 
    1249 var _189=Math.floor(top/_180); 
    1250 var left=parseInt(Element.getStyle(_187,"left"),10)+_185.offset[0]; 
    1251 var _18b=Math.floor(left/_17f); 
    1252 if((_18b>=0&&_189>=0)&&(_18b<=_182&&_189<=_181)){ 
    1253 Element.setStyle(_17e,{left:_17f*_18b+_183*_18b+"px",top:_180*_189+"px"}); 
    1254 
    1255 },onEnd:function(_18c){ 
     1246},onDrag:function(_186,_187){ 
     1247var _188=_186.element; 
     1248var top=parseInt(Element.getStyle(_188,"top"),10)+_186.offset[1]; 
     1249var _18a=Math.floor(top/_180); 
     1250var left=parseInt(Element.getStyle(_188,"left"),10)+_186.offset[0]; 
     1251var _18c=Math.floor(left/_17f); 
     1252if((_18c>=0&&_18a>=0)&&(_18c<=_182&&_18a<=_181)){ 
     1253Element.setStyle(_17e,{left:_17f*_18c+_183*_18c+"px",top:_180*_18a+"px"}); 
     1254
     1255},onEnd:function(_18d,_18e){ 
     1256var _18f=_18d.currentDelta(); 
    12561257Element.hide(_17e); 
    1257 self.changeSchedule(_18c); 
     1258if(_18f[0]==_18d.delta[0]&&_18f[1]==_18d.delta[1]){ 
     1259self.calendar.refreshSchedule(); 
     1260}else{ 
     1261self.changeSchedule(_18d); 
     1262
    12581263}}); 
    12591264},setResize:function(item){ 
    12601265var self=this; 
    1261 new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_18f){ 
    1262 self.updateTirm(_18f); 
     1266new CalendarResizeableEx(item,{left:0,top:0,bottom:0,distance:this.column.width,restriction:true,resize:function(_192){ 
     1267self.updateTirm(_192); 
    12631268}}); 
    1264 },getDate:function(_190){ 
     1269},getDate:function(_193){ 
    12651270var date=this.calendar.date; 
    1266 if(_190.constructor==String){ 
    1267 return new Date(date.getFullYear(),date.getMonth(),_190); 
    1268 }else{ 
    1269 return new Date(date.getFullYear(),date.getMonth(),_190.id.getSuffix()); 
    1270 } 
    1271 },abstractSelect:function(_192,_193){ 
    1272 var _194=null; 
     1271if(_193.constructor==String){ 
     1272return new Date(date.getFullYear(),date.getMonth(),_193); 
     1273}else{ 
     1274return new Date(date.getFullYear(),date.getMonth(),_193.id.getSuffix()); 
     1275} 
     1276},abstractSelect:function(_195,_196){ 
     1277var _197=null; 
    12731278if(this.calendar.options.size=="large"){ 
    1274 _194=this.findClickedElement(_192); 
    1275 }else{ 
    1276 _194=Event.element(_192); 
    1277 if(_194.tagName!="TD"){ 
    1278 _194=Element.getParentByTagName(["TD"],_194); 
    1279 } 
    1280 } 
    1281 if(_194&&_194.id&&!_194.id.match(/emptyRow/)){ 
    1282 var date=this.getDate(_194); 
    1283 _193(date,_194); 
     1279_197=this.findClickedElement(_195); 
     1280}else{ 
     1281_197=Event.element(_195); 
     1282if(_197.tagName!="TD"){ 
     1283_197=Element.getParentByTagName(["TD"],_197); 
     1284} 
     1285} 
     1286if(_197&&_197.id&&!_197.id.match(/emptyRow/)){ 
     1287var date=this.getDate(_197); 
     1288_196(date,_197); 
    12841289} 
    12851290},getSelectedTerm:function(){ 
    12861291var self=this; 
    1287 var _197=this.calendar.getSelected(); 
    1288 return [_197.first(),_197.last()].map(function(e){ 
     1292var _19a=this.calendar.getSelected(); 
     1293return [_19a.first(),_19a.last()].map(function(e){ 
    12891294return self.getDate(e); 
    12901295}); 
    1291 },selectDay:function(_199){ 
    1292 var _19a=this.calendar; 
    1293 var th=Event.element(_199); 
     1296},selectDay:function(_19c){ 
     1297var _19d=this.calendar; 
     1298var th=Event.element(_19c); 
    12941299if(th.tagName!="TH"){ 
    12951300th=Element.getParentByTagName("TH",th); 
     
    12971302this.iterateTable({doCell:function(cell){ 
    12981303if((cell.cellIndex==th.cellIndex)&&cell.id){ 
    1299 _19a.addSelectedClass(cell); 
     1304_19d.addSelectedClass(cell); 
    13001305} 
    13011306}}); 
    1302 },inspectArgument:function(_19d,time){ 
     1307},inspectArgument:function(_1a0,time){ 
    13031308var self=this; 
    1304 var _1a0=this.calendar.getSelected(); 
    1305 var _1a1=[]; 
    1306 self.calendar.recurrence(_19d,function(o){ 
     1309var _1a3=this.calendar.getSelected(); 
     1310var _1a4=[]; 
     1311self.calendar.recurrence(_1a0,function(o){ 
    13071312if(!o.date){ 
    1308 _1a0.each(function(d){ 
    1309 var _1a4={}; 
     1313_1a3.each(function(d){ 
     1314var _1a7={}; 
    13101315if(!o.date){ 
    1311 _1a4={date:self.getDate(d)}; 
     1316_1a7={date:self.getDate(d)}; 
    13121317if(time){ 
    1313 _1a4.start={hour:0,min:0}; 
    1314 _1a4.finish={hour:0,min:0}; 
    1315 } 
    1316 } 
    1317 Object.extend(_1a4,o); 
    1318 _1a1.push(_1a4); 
     1318_1a7.start={hour:0,min:0}; 
     1319_1a7.finish={hour:0,min:0}; 
     1320} 
     1321} 
     1322Object.extend(_1a7,o); 
     1323_1a4.push(_1a7); 
    13191324}); 
    13201325}else{ 
    13211326if(o.date.constructor==Object){ 
    13221327o.date=new Date(o.date.year,o.date.month,o.date.day); 
    1323 _1a1.push(o); 
    1324 }else{ 
    1325 _1a1.push(o); 
    1326 } 
    1327 } 
    1328 }); 
    1329 return _1a1
     1328_1a4.push(o); 
     1329}else{ 
     1330_1a4.push(o); 
     1331} 
     1332} 
     1333}); 
     1334return _1a4
    13301335},inspectDateArgument:function(date){ 
    13311336if(date){ 
     
    13401345return map; 
    13411346}else{ 
    1342 var _1a7=this; 
    1343 var _1a8=this.calendar.getSelected(); 
    1344 if(_1a8.length==0){ 
     1347var _1aa=this; 
     1348var _1ab=this.calendar.getSelected(); 
     1349if(_1ab.length==0){ 
    13451350return null; 
    13461351} 
    1347 return _1a8.collect(function(d){ 
    1348 return _1a7.getDate(d); 
    1349 }); 
    1350 } 
    1351 },findClickedElement:function(_1aa){ 
    1352 var _1ab=$(this.getScheduleContainerId()); 
    1353 var _1ac=Position.cumulativeOffset(_1ab); 
    1354 var _1ad=Position.realOffset(_1ab).last(); 
    1355 _1ad-=document.documentElement.scrollTop||document.body.scrollTop; 
    1356 var x=Event.pointerX(_1aa)-_1ac[0]; 
    1357 var y=Event.pointerY(_1aa)-_1ac[1]+_1ad
    1358 var _1b0=Math.floor(y/this.column.height); 
    1359 var _1b1=Math.floor(x/this.column.width); 
    1360 return $(this.calendarTable.rows[_1b0].cells[_1b1]); 
    1361 },multipleSelection:function(_1b2){ 
     1352return _1ab.collect(function(d){ 
     1353return _1aa.getDate(d); 
     1354}); 
     1355} 
     1356},findClickedElement:function(_1ad){ 
     1357var _1ae=$(this.getScheduleContainerId()); 
     1358var _1af=Position.cumulativeOffset(_1ae); 
     1359var _1b0=Position.realOffset(_1ae).last(); 
     1360_1b0-=document.documentElement.scrollTop||document.body.scrollTop; 
     1361var x=Event.pointerX(_1ad)-_1af[0]; 
     1362var y=Event.pointerY(_1ad)-_1af[1]+_1b0
     1363var _1b3=Math.floor(y/this.column.height); 
     1364var _1b4=Math.floor(x/this.column.width); 
     1365return $(this.calendarTable.rows[_1b3].cells[_1b4]); 
     1366},multipleSelection:function(_1b5){ 
    13621367if(!this.calendar.selectedBase||!this.calendar.mouseDown){ 
    13631368return; 
    13641369} 
    13651370var self=this; 
    1366 var _1b4=this.calendar; 
    1367 var _1b5=this.calendar.selectedBase; 
    1368 this.abstractSelect(_1b2,function(date,_1b7){ 
    1369 var _1b8=$(_1b5.id); 
    1370 var _1b9=_1b4.createRange(parseInt(_1b8.id.getSuffix()),parseInt(_1b7.id.getSuffix())); 
     1371var _1b7=this.calendar; 
     1372var _1b8=this.calendar.selectedBase; 
     1373this.abstractSelect(_1b5,function(date,_1ba){ 
     1374var _1bb=$(_1b8.id); 
     1375var _1bc=_1b7.createRange(parseInt(_1bb.id.getSuffix()),parseInt(_1ba.id.getSuffix())); 
    13711376self.iterateTable({doCell:function(cell){ 
    13721377if(cell.tagName!="TD"||!cell.id){ 
     
    13741379} 
    13751380var id=parseInt(cell.id.getSuffix(),10); 
    1376 if(_1b9.include(id)){ 
    1377 _1b4.addSelectedClass(cell); 
    1378 }else{ 
    1379 _1b4.removeSelectedClass(cell); 
     1381if(_1bc.include(id)){ 
     1382_1b7.addSelectedClass(cell); 
     1383}else{ 
     1384_1b7.removeSelectedClass(cell); 
    13801385} 
    13811386}}); 
    13821387}); 
    13831388},iterateTable:function(){ 
    1384 var _1bc=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
    1385 var _1bd=$(this.getCalendarTableId()); 
    1386 if(_1bc.doTable){ 
    1387 _1bc.doTable(_1bd); 
    1388 } 
    1389 $A(_1bd.rows).each(function(row){ 
    1390 if(_1bc.doRow){ 
    1391 _1bc.doRow(row); 
     1389var _1bf=Object.extend({doTable:null,doRow:null,doCell:null},arguments[0]); 
     1390var _1c0=$(this.getCalendarTableId()); 
     1391if(_1bf.doTable){ 
     1392_1bf.doTable(_1c0); 
     1393} 
     1394$A(_1c0.rows).each(function(row){ 
     1395if(_1bf.doRow){ 
     1396_1bf.doRow(row); 
    13921397} 
    13931398$A(row.cells).each(function(cell){ 
    1394 if(_1bc.doCell){ 
    1395 _1bc.doCell(cell); 
    1396 } 
    1397 }); 
    1398 }); 
    1399 },findRow:function(_1c0){ 
    1400 var _1c1=$(this.getCalendarTableId()); 
    1401 return $A(_1c1.rows).detect(function(row){ 
    1402 return row.rowIndex==_1c0
    1403 }); 
    1404 },findCell:function(_1c3,_1c4){ 
    1405 return $A(this.findRow(_1c3).cells).detect(function(cell){ 
    1406 return cell.cellIndex==_1c4
     1399if(_1bf.doCell){ 
     1400_1bf.doCell(cell); 
     1401} 
     1402}); 
     1403}); 
     1404},findRow:function(_1c3){ 
     1405var _1c4=$(this.getCalendarTableId()); 
     1406return $A(_1c4.rows).detect(function(row){ 
     1407return row.rowIndex==_1c3
     1408}); 
     1409},findCell:function(_1c6,_1c7){ 
     1410return $A(this.findRow(_1c6).cells).detect(function(cell){ 
     1411return cell.cellIndex==_1c7
    14071412}); 
    14081413},getDateId:function(date){ 
     
    14221427return {cellIndex:cell.cellIndex,rowIndex:row.rowIndex}; 
    14231428} 
    1424 },changeSchedule:function(_1cc){ 
    1425 var _1cd=_1cc.element; 
    1426 var _1ce=_1cd.schedule; 
    1427 this.calendar.cacheSchedule(_1ce); 
    1428 var _1cf=$(this.getSelectorId()); 
    1429 var top=parseInt(Element.getStyle(_1cf,"top"),10); 
    1430 var _1d1=Math.floor(top/this.column.height); 
    1431 var left=parseInt(Element.getStyle(_1cf,"left"),10); 
    1432 var _1d3=Math.floor(left/this.column.width); 
    1433 var _1d4=$(this.getCalendarTableId()); 
    1434 var _1d5=_1d4.rows.length-1; 
    1435 var _1d6=this.calendar.options.displayIndexes.length-1; 
    1436 if((_1d3>=0&&_1d1>=0)&&(_1d3<=_1d6&&_1d1<=_1d5)){ 
    1437 var cell=this.findCell(_1d1,_1d3); 
     1429},changeSchedule:function(_1cf){ 
     1430var _1d0=_1cf.element; 
     1431var _1d1=_1d0.schedule; 
     1432this.calendar.cacheSchedule(_1d1); 
     1433var _1d2=$(this.getSelectorId()); 
     1434var top=parseInt(Element.getStyle(_1d2,"top"),10); 
     1435var _1d4=Math.floor(top/this.column.height); 
     1436var left=parseInt(Element.getStyle(_1d2,"left"),10); 
     1437var _1d6=Math.floor(left/this.column.width); 
     1438var _1d7=$(this.getCalendarTableId()); 
     1439var _1d8=_1d7.rows.length-1; 
     1440var _1d9=this.calendar.options.displayIndexes.length-1; 
     1441if((_1d6>=0&&_1d4>=0)&&(_1d6<=_1d9&&_1d4<=_1d8)){ 
     1442var cell=this.findCell(_1d4,_1d6); 
    14381443var date=new Date(this.calendar.date.getTime()); 
    1439 var _1d9=_1cd.cellDate.days()-DateUtil.toDate(_1ce.start).days(); 
    1440 date.setDate(parseInt(cell.id.getSuffix(),10)-_1d9); 
    1441 var diff=this.getDayDiff(_1ce); 
    1442 var _1db=date.advance({days:diff}); 
    1443 if(_1ce.start.month==date.getMonth()&&_1ce.start.day==date.getDate()&&_1ce.finish.month==_1db.getMonth()&&_1ce.finish.day==_1db.getDate()){ 
     1444var _1dc=_1d0.cellDate.days()-DateUtil.toDate(_1d1.start).days(); 
     1445date.setDate(parseInt(cell.id.getSuffix(),10)-_1dc); 
     1446var diff=this.getDayDiff(_1d1); 
     1447var _1de=date.advance({days:diff}); 
     1448if(_1d1.start.month==date.getMonth()&&_1d1.start.day==date.getDate()&&_1d1.finish.month==_1de.getMonth()&&_1d1.finish.day==_1de.getDate()){ 
    14441449this.calendar.refreshSchedule(); 
    14451450return; 
    14461451} 
    1447 _1ce.start.year=date.getFullYear(); 
    1448 _1ce.start.month=date.getMonth(); 
    1449 _1ce.start.day=date.getDate(); 
    1450 _1ce.finish.year=_1db.getFullYear(); 
    1451 _1ce.finish.month=_1db.getMonth(); 
    1452 _1ce.finish.day=_1db.getDate(); 
     1452_1d1.start.year=date.getFullYear(); 
     1453_1d1.start.month=date.getMonth(); 
     1454_1d1.start.day=date.getDate(); 
     1455_1d1.finish.year=_1de.getFullYear(); 
     1456_1d1.finish.month=_1de.getMonth(); 
     1457_1d1.finish.day=_1de.getDate(); 
    14531458this.calendar.refreshSchedule(); 
    1454 this.calendar.options.changeSchedule(_1ce); 
     1459this.calendar.options.changeSchedule(_1d1); 
    14551460}else{ 
    14561461this.calendar.refreshSchedule(); 
    14571462} 
    1458 },updateTirm:function(_1dc){ 
    1459 var _1dd=_1dc.schedule; 
    1460 var _1de=parseInt(Element.getStyle(_1dc,"width")); 
    1461 var top=parseInt(Element.getStyle(_1dc,"top")); 
    1462 var left=parseInt(Element.getStyle(_1dc,"left")); 
    1463 var _1e1=Math.round((left+_1de)/this.column.width)-1; 
    1464 var _1e2=Math.round(top/this.column.height); 
    1465 var cell=this.findCell(_1e2,_1e1); 
    1466 var _1e4=_1dd.finish; 
    1467 var _1e5=null; 
     1463},updateTirm:function(_1df){ 
     1464var _1e0=_1df.schedule; 
     1465var _1e1=parseInt(Element.getStyle(_1df,"width")); 
     1466var top=parseInt(Element.getStyle(_1df,"top")); 
     1467var left=parseInt(Element.getStyle(_1df,"left")); 
     1468var _1e4=Math.round((left+_1e1)/this.column.width)-1; 
     1469var _1e5=Math.round(top/this.column.height); 
     1470var cell=this.findCell(_1e5,_1e4); 
     1471var _1e7=_1e0.finish; 
     1472var _1e8=null; 
    14681473if(this.dateMap){ 
    1469 _1e5=this.dateMap[cell.id].toHash(); 
    1470 }else{ 
    1471 _1e5=new Date(this.calendar.date.getTime()); 
    1472 _1e5.setDate(parseInt(cell.id.getSuffix(),10)); 
    1473 _1e5=_1e5.toHash(); 
    1474 } 
    1475 _1e5.hour=_1e4.hour; 
    1476 _1e5.min=_1e4.min; 
    1477 if(DateUtil.toDate(_1dd.start).getTime()>=DateUtil.toDate(_1e5).getTime()){ 
    1478 var _1e6=23; 
    1479 var _1e7=55; 
    1480 if(_1dd.start.hour==_1e6&&_1dd.start.min==_1e7){ 
     1474_1e8=this.dateMap[cell.id].toHash(); 
     1475}else{ 
     1476_1e8=new Date(this.calendar.date.getTime()); 
     1477_1e8.setDate(parseInt(cell.id.getSuffix(),10)); 
     1478_1e8=_1e8.toHash(); 
     1479} 
     1480_1e8.hour=_1e7.hour; 
     1481_1e8.min=_1e7.min; 
     1482if(DateUtil.toDate(_1e0.start).getTime()>=DateUtil.toDate(_1e8).getTime()){ 
     1483var _1e9=23; 
     1484var _1ea=55; 
     1485if(_1e0.start.hour==_1e9&&_1e0.start.min==_1ea){ 
    14811486this.calendar.refreshSchedule(); 
    1482 if(!((_1e5.year==_1e4.year)&&(_1e5.month==_1e4.month)&&(_1e5.day==_1e4.day))){ 
     1487if(!((_1e8.year==_1e7.year)&&(_1e8.month==_1e7.month)&&(_1e8.day==_1e7.day))){ 
    14831488this.calendar.options.updateTirm(); 
    14841489} 
    14851490return; 
    14861491}else{ 
    1487 _1e5.hour=_1e6
    1488 _1e5.min=_1e7
    1489 } 
    1490 } 
    1491 _1dd.finish=_1e5
     1492_1e8.hour=_1e9
     1493_1e8.min=_1ea
     1494} 
     1495} 
     1496_1e0.finish=_1e8
    14921497this.calendar.refreshSchedule(); 
    1493 if(!((_1e5.year==_1e4.year)&&(_1e5.month==_1e4.month)&&(_1e5.day==_1e4.day))){ 
    1494 this.calendar.options.updateTirm(_1dd); 
    1495 } 
    1496 },getTimeText:function(_1e8,_1e9){ 
    1497 var _1ea=this.calendar; 
    1498 return _1ea.formatTime(_1e8); 
    1499 },getDayDiff:function(_1eb){ 
    1500 return DateUtil.numberOfDays(this.toDate(_1eb.start),this.toDate(_1eb.finish)); 
     1498if(!((_1e8.year==_1e7.year)&&(_1e8.month==_1e7.month)&&(_1e8.day==_1e7.day))){ 
     1499this.calendar.options.updateTirm(_1e0); 
     1500} 
     1501},getTimeText:function(_1eb,_1ec){ 
     1502var _1ed=this.calendar; 
     1503return _1ed.formatTime(_1eb); 
     1504},getDayDiff:function(_1ee){ 
     1505return DateUtil.numberOfDays(this.toDate(_1ee.start),this.toDate(_1ee.finish)); 
    15011506}}); 
    15021507var CalendarWeek=Class.create(); 
    15031508CalendarWeek.id=["calTable","columnContainer","columnHeader","column","next","pre","headerText"]; 
    15041509Object.extend(CalendarWeek.prototype,AbstractCalendar.prototype); 
    1505 Object.extend(CalendarWeek.prototype,{initialize:function(_1ec){ 
    1506 this.calendar=_1ec
    1507 var _1ed=this.getWeek(); 
    1508 this.week=_1ed[0]; 
    1509 this.invisibleWeek=_1ed[1]; 
     1510Object.extend(CalendarWeek.prototype,{initialize:function(_1ef){ 
     1511this.calendar=_1ef
     1512var _1f0=this.getWeek(); 
     1513this.week=_1f0[0]; 
     1514this.invisibleWeek=_1f0[1]; 
    15101515this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarWeek.id); 
    15111516this.setDisplayTime(); 
     
    15131518return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.pre+"' class='"+this.calendar.classNames.preWeekMark+"'></div>"+"</td>"; 
    15141519},buildHeaderCenter:function(){ 
    1515 var _1ee=[]; 
     1520var _1f1=[]; 
    15161521if(this.calendar.options.weekHeaderFormat){ 
    1517 _1ee=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
    1518 } 
    1519 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>"; 
     1522_1f1=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
     1523} 
     1524return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1f1[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1f1[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1f1[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
    15201525},formatHeaderDate:function(date){ 
    15211526if(this.calendar.options.weekHeaderFormat){ 
     
    15261531return "<td class='"+this.calendar.classNames.nextYears+"' align='right'>"+"<div id='"+this.ids.next+"' class='"+this.calendar.classNames.nextWeekMark+"'></div>"+"</td>"; 
    15271532},buildCalendar:function(){ 
    1528 var _1f0=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
    1529 _1f0+=this.buildCalendarContainer(); 
    1530 return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1f0+"</tr>"+"</table>"; 
     1533var _1f3=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
     1534_1f3+=this.buildCalendarContainer(); 
     1535return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1f3+"</tr>"+"</table>"; 
    15311536},buildTimeLine:function(){ 
    15321537var time=new Date(); 
    1533 var hour=0,_1f3=24; 
     1538var hour=0,_1f6=24; 
    15341539time.setHours(hour); 
    15351540time.setMinutes(0); 
    1536 var _1f4=this.buildTimeLineTop(); 
     1541var _1f7=this.buildTimeLineTop(); 
    15371542var now=new Date().getHours(); 
    1538 while(hour<_1f3){ 
     1543while(hour<_1f6){ 
    15391544if(this.includeDisplayTime(hour)){ 
    1540 var _1f6="pointer: default;"; 
    1541 if(_1f4.length==0){ 
    1542 _1f6+="border-top: none;"; 
    1543 } 
    1544 var _1f7=this.calendar.classNames.timeLineTime; 
     1545var _1f9="pointer: default;"; 
     1546if(_1f7.length==0){ 
     1547_1f9+="border-top: none;"; 
     1548} 
     1549var _1fa=this.calendar.classNames.timeLineTime; 
    15451550if(hour==now){ 
    1546 _1f7+=" "+this.calendar.classNames.highlightTime; 
    1547 } 
    1548 _1f4+="<div class='"+_1f7+"' style='"+_1f6+"'>"+this.formatTime(time)+"</div>"; 
     1551_1fa+=" "+this.calendar.classNames.highlightTime; 
     1552} 
     1553_1f7+="<div class='"+_1fa+"' style='"+_1f9+"'>"+this.formatTime(time)+"</div>"; 
    15491554} 
    15501555hour++; 
    15511556time.setHours(hour); 
    15521557} 
    1553 return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1f4+"</td>"; 
     1558return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1f7+"</td>"; 
    15541559},buildTimeLineTop:function(){ 
    15551560return "<div class='"+this.calendar.classNames.timeLineTimeTop+"'></div>"; 
     
    15571562return "<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+this.buildCalendarHeader()+this.buildCalendarMain()+"</table>"+"</td>"; 
    15581563},buildCalendarHeader:function(){ 
    1559 var _1f8=this.calendar.options.displayIndexes; 
     1564var _1fb=this.calendar.options.displayIndexes; 
    15601565var ths=""; 
    1561 var _1fa=new Date().days(); 
    1562 var _1fb=100/_1f8.length+"%"; 
    1563 var _1fc=this.calendar.element.id.appendSuffix(this.ids.column); 
    1564 var _1fd=this.calendar.element.id.appendSuffix(this.ids.headerText); 
     1566var _1fd=new Date().days(); 
     1567var _1fe=100/_1fb.length+"%"; 
     1568var _1ff=this.calendar.element.id.appendSuffix(this.ids.column); 
     1569var _200=this.calendar.element.id.appendSuffix(this.ids.headerText); 
    15651570this.headers=[]; 
    1566 var _1fe=this.calendar.options.noEvent; 
    1567 var _1ff=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
    1568 this.week.each(function(w,_201){ 
     1571var _201=this.calendar.options.noEvent; 
     1572var _202=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
     1573this.week.each(function(w,_204){ 
    15691574var text=null; 
    1570 if(_1ff){ 
    1571 text=_1ff.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
     1575if(_202){ 
     1576text=_202.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
    15721577}else{ 
    15731578text=w.toDateString().split(" "); 
     
    15751580text=text.join(" "); 
    15761581} 
    1577 var _203=(w.days()==_1fa)?this.calendar.classNames.highlightDay:""; 
    1578 var _204=_1fd.appendSuffix(_201); 
     1582var _206=(w.days()==_1fd)?this.calendar.classNames.highlightDay:""; 
     1583var _207=_200.appendSuffix(_204); 
    15791584var node="<div class='"+this.calendar.classNames.headerColumn+"'>"; 
    1580 if(_1fe){ 
    1581 node+="<span='#' id='"+_204+"' class='"+_203+"' style='cursor: default;'>"+text+"</a>"; 
    1582 }else{ 
    1583 node+="<a href='#' id='"+_204+"' class='"+_203+"'>"+text+"</a>"; 
     1585if(_201){ 
     1586node+="<span='#' id='"+_207+"' class='"+_206+"' style='cursor: default;'>"+text+"</a>"; 
     1587}else{ 
     1588node+="<a href='#' id='"+_207+"' class='"+_206+"'>"+text+"</a>"; 
    15841589} 
    15851590node+="</div>"; 
    1586 this.headers.push({id:_204,wday:w}); 
    1587 ths+="<th id='"+_1fc.appendSuffix(_201)+"' width='"+_1fb+"'>"+node+"</th>"; 
     1591this.headers.push({id:_207,wday:w}); 
     1592ths+="<th id='"+_1ff.appendSuffix(_204)+"' width='"+_1fe+"'>"+node+"</th>"; 
    15881593}.bind(this)); 
    15891594return "<tr>"+"<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+"<tr>"+ths+"</tr>"+"</table>"+"</td>"+"</tr>"; 
    15901595},buildCalendarMain:function(){ 
    1591 var _206=this.calendar.options.displayIndexes; 
     1596var _209=this.calendar.options.displayIndexes; 
    15921597var tds=""; 
    1593 var _208=100/_206.length+"%"; 
     1598var _20b=100/_209.length+"%"; 
    15941599this.dateMap={}; 
    1595 this.week.each(function(w,_20a){ 
    1596 var _20b=this.calendar.options.schedules[w.toDateString()]; 
    1597 var _20c=""; 
     1600this.week.each(function(w,_20d){ 
     1601var _20e=this.calendar.options.schedules[w.toDateString()]; 
     1602var _20f=""; 
    15981603var i=0,j=0; 
    15991604while(i<24){ 
    16001605if(this.includeDisplayTime(i)){ 
    1601 var _20f=""; 
    1602 if(_20c.length==0){ 
    1603 _20f=this.calendar.classNames.columnTopDate; 
     1606var _212=""; 
     1607if(_20f.length==0){ 
     1608_212=this.calendar.classNames.columnTopDate; 
    16041609}else{ 
    16051610if(i%1==0){ 
    1606 _20f=this.calendar.classNames.columnDate; 
    1607 }else{ 
    1608 _20f=this.calendar.classNames.columnDateOdd; 
    1609 } 
    1610 } 
    1611 var id=this.getDateId(w,i,_20a); 
     1611_212=this.calendar.classNames.columnDate; 
     1612}else{ 
     1613_212=this.calendar.classNames.columnDateOdd; 
     1614} 
     1615} 
     1616var id=this.getDateId(w,i,_20d); 
    16121617var hour=i/1; 
    16131618var min=i%1*60; 
    16141619this.dateMap[id]=new Date(w.getFullYear(),w.getMonth(),w.getDate(),hour,min,0); 
    1615 _20c+="<div id='"+id+"' class='"+_20f+"'></div>"; 
     1620_20f+="<div id='"+id+"' class='"+_212+"'></div>"; 
    16161621} 
    16171622i+=0.5; 
    16181623} 
    1619 tds+="<td width='"+_208+"'>"+_20c+"</td>"; 
     1624tds+="<td width='"+_20b+"'>"+_20f+"</td>"; 
    16201625}.bind(this)); 
    16211626return "<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>"; 
     
    16251630var rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.columnDate); 
    16261631this.column.height=parseInt(rule.style["height"],10)+1; 
    1627 },buildSchedule:function(_215){ 
    1628 var id="scheduleItem_"+_215.id; 
    1629 var _217=(_215.edit==undefined||_215.edit); 
     1632},buildSchedule:function(_218){ 
     1633var id="scheduleItem_"+_218.id; 
     1634var _21a=(_218.edit==undefined||_218.edit); 
    16301635var item=Builder.node("DIV",{id:id}); 
    16311636this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    1632 var _219=this.calendar.options.noEvent; 
    1633 var term=DateUtil.toDate(_215.finish).minutes()-DateUtil.toDate(_215.start).minutes(); 
    1634 var _21b={}; 
    1635 if(_215.background_color){ 
    1636 _21b.backgroundColor=_215.background_color; 
    1637 } 
    1638 if(_215.frame_color){ 
    1639 _21b.borderTop="2px solid "+_215.frame_color; 
    1640 _21b.borderLeft="1px solid "+_215.frame_color; 
    1641 _21b.borderRight="1px solid "+_215.frame_color; 
    1642 _21b.borderBottom="2px solid "+_215.frame_color; 
     1637var _21c=this.calendar.options.noEvent; 
     1638var term=DateUtil.toDate(_218.finish).minutes()-DateUtil.toDate(_218.start).minutes(); 
     1639var _21e={}; 
     1640if(_218.background_color){ 
     1641_21e.backgroundColor=_218.background_color; 
     1642} 
     1643if(_218.frame_color){ 
     1644_21e.borderTop="2px solid "+_218.frame_color; 
     1645_21e.borderLeft="1px solid "+_218.frame_color; 
     1646_21e.borderRight="1px solid "+_218.frame_color; 
     1647_21e.borderBottom="2px solid "+_218.frame_color; 
    16431648if(term<=30){ 
    1644 _21b.backgroundColor=_215.frame_color; 
    1645 } 
    1646 } 
    1647 if(_219){ 
    1648 _21b.cursor="default"; 
    1649 } 
    1650 Element.setStyle(item,_21b); 
    1651 var _21c=[]; 
    1652 if(_217){ 
    1653 var _21d=Builder.node("DIV",{id:"scheduleDeleteImg_"+_215.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
    1654 _21c.push(_21d); 
    1655 item.appendChild(_21d); 
    1656 if(!_219){ 
    1657 Event.observe(_21d,"click",this.clickDeleteImage.bind(this,_215)); 
    1658 } 
    1659 } 
    1660 if(!_219&&this.calendar.options.dblclickSchedule){ 
    1661 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_215)); 
     1649_21e.backgroundColor=_218.frame_color; 
     1650} 
     1651} 
     1652if(_21c){ 
     1653_21e.cursor="default"; 
     1654} 
     1655Element.setStyle(item,_21e); 
     1656var _21f=[]; 
     1657if(_21a){ 
     1658var _220=Builder.node("DIV",{id:"scheduleDeleteImg_"+_218.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
     1659_21f.push(_220); 
     1660item.appendChild(_220); 
     1661if(!_21c){ 
     1662Event.observe(_220,"click",this.clickDeleteImage.bind(this,_218)); 
     1663} 
     1664} 
     1665if(!_21c&&this.calendar.options.dblclickSchedule){ 
     1666Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_218)); 
    16621667} 
    16631668var icon=null; 
    1664 if(_215.icon){ 
    1665 icon=Builder.node("IMG",{src:_215.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
     1669if(_218.icon){ 
     1670icon=Builder.node("IMG",{src:_218.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
    16661671}else{ 
    16671672if(Calendar.defaultIconPath){ 
     
    16691674} 
    16701675} 
    1671 var _21f=null; 
    1672 if(!_215.publicity){ 
     1676var _222=null; 
     1677if(!_218.publicity){ 
    16731678if(Calendar.privateImgPath){ 
    1674 _21f=Builder.node("IMG",{id:"private_img_"+_215.id,src:Calendar.privateImgPath,alt:"private",style:"position: absolute; right: 0px; display: block;",width:16,height:16}); 
    1675 item.appendChild(_21f); 
    1676 }else{ 
    1677 _21f=Builder.node("DIV",{id:"private_img_"+_215.id}); 
    1678 this.calendar.css.addClassNames(_21f,"privateImg"); 
    1679 item.appendChild(_21f); 
    1680 } 
    1681 } 
    1682 if(!_219&&(_21c.length>0)){ 
    1683 Event.observe(item,"mouseover",this.showImage.bind(this,_21c,_21f)); 
    1684 Event.observe(item,"mouseout",this.hideImage.bind(this,_21c,_21f)); 
    1685 } 
    1686 var text=this.getTimeText(_215.start,_215.finish); 
    1687 var _221=_215.description.unescapeHTML(); 
    1688 var _222={id:id+"_text"}; 
    1689 if(_215.frame_color){ 
    1690 _222.style="background-color:"+_215.frame_color+";"; 
    1691 } 
    1692 if(!_219&&_217){ 
    1693 _222.style+="cursor: move;"; 
     1679_222=Builder.node("IMG",{id:"private_img_"+_218.id,src:Calendar.privateImgPath,alt:"private",style:"position: absolute; right: 0px; display: block;",width:16,height:16}); 
     1680item.appendChild(_222); 
     1681}else{ 
     1682_222=Builder.node("DIV",{id:"private_img_"+_218.id}); 
     1683this.calendar.css.addClassNames(_222,"privateImg"); 
     1684item.appendChild(_222); 
     1685} 
     1686} 
     1687if(!_21c&&(_21f.length>0)){ 
     1688Event.observe(item,"mouseover",this.showImage.bind(this,_21f,_222)); 
     1689Event.observe(item,"mouseout",this.hideImage.bind(this,_21f,_222)); 
     1690} 
     1691var text=this.getTimeText(_218.start,_218.finish); 
     1692var _224=_218.description.unescapeHTML(); 
     1693var _225={id:id+"_text"}; 
     1694if(_218.frame_color){ 
     1695_225.style="background-color:"+_218.frame_color+";"; 
     1696} 
     1697if(!_21c&&_21a){ 
     1698_225.style+="cursor: move;"; 
    16941699} 
    16951700if(term<=15){ 
    1696 var _223=this.calendar.formatTime(_215.start); 
    1697 _222.style+="line-height: 12px;"; 
     1701var _226=this.calendar.formatTime(_218.start); 
     1702_225.style+="line-height: 12px;"; 
    16981703if(UserAgent.isFF()){ 
    1699 _222.style+="white-space: nowrap;"; 
    1700 } 
    1701 var _224=Builder.node("DIV",_222,[icon,_223+" "+_221]); 
    1702 this.calendar.css.addClassNames(_224,"scheduleTimeArea"); 
    1703 item.appendChild(_224); 
     1704_225.style+="white-space: nowrap;"; 
     1705} 
     1706var _227=Builder.node("DIV",_225,[icon,_226+" "+_224]); 
     1707this.calendar.css.addClassNames(_227,"scheduleTimeArea"); 
     1708item.appendChild(_227); 
    17041709}else{ 
    17051710if(term<=30){ 
    1706 var _223=this.calendar.formatTime(_215.start); 
     1711var _226=this.calendar.formatTime(_218.start); 
    17071712if(UserAgent.isIE()){ 
    1708 _222.style+="line-height: 20px;"; 
    1709 }else{ 
    1710 _222.style+="line-height: 18px; white-space: nowrap;"; 
    1711 } 
    1712 var _224=Builder.node("DIV",_222,[icon,_223+" "+_221]); 
    1713 this.calendar.css.addClassNames(_224,"scheduleTimeArea"); 
    1714 item.appendChild(_224); 
    1715 }else{ 
    1716 _222.style+="line-height: 18px;"; 
    1717 var _224=Builder.node("DIV",_222,[icon,text]); 
    1718 this.calendar.css.addClassNames(_224,"scheduleTimeArea"); 
    1719 item.appendChild(_224); 
    1720 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_221])); 
    1721 } 
    1722 } 
    1723 item.title=text.replace(/ /g,"")+" "+_221
    1724 item.schedule=_215
    1725 return [item,_224]; 
    1726 },adjustScheduleStyle:function(item,_226,_227){ 
    1727 var _228=item.schedule; 
    1728 var time=this.convertHours(_228); 
    1729 var _22a=time[0]; 
    1730 var _22b=time[1]; 
     1713_225.style+="line-height: 20px;"; 
     1714}else{ 
     1715_225.style+="line-height: 18px; white-space: nowrap;"; 
     1716} 
     1717var _227=Builder.node("DIV",_225,[icon,_226+" "+_224]); 
     1718this.calendar.css.addClassNames(_227,"scheduleTimeArea"); 
     1719item.appendChild(_227); 
     1720}else{ 
     1721_225.style+="line-height: 18px;"; 
     1722var _227=Builder.node("DIV",_225,[icon,text]); 
     1723this.calendar.css.addClassNames(_227,"scheduleTimeArea"); 
     1724item.appendChild(_227); 
     1725item.appendChild(Builder.node("DIV",{id:id+"_description"},[_224])); 
     1726} 
     1727} 
     1728item.title=text.replace(/ /g,"")+" "+_224
     1729item.schedule=_218
     1730return [item,_227]; 
     1731},adjustScheduleStyle:function(item,_229,_22a){ 
     1732var _22b=item.schedule; 
     1733var time=this.convertHours(_22b); 
     1734var _22d=time[0]; 
     1735var _22e=time[1]; 
    17311736var same=[]; 
    17321737var self=this; 
    1733 _227.each(function(h){ 
    1734 var _22f=self.convertHours(h.schedule); 
    1735 var _230=_22f[0]; 
    1736 var _231=_22f[1]; 
    1737 if(((_230<=_22a)&&(_231>_22a))||((_230<_22b)&&(_231>=_22b))||((_22a<=_230)&&(_22b>_230))||((_22a<_231)&&(_22b>=_231))){ 
     1738_22a.each(function(h){ 
     1739var _232=self.convertHours(h.schedule); 
     1740var _233=_232[0]; 
     1741var _234=_232[1]; 
     1742if(((_233<=_22d)&&(_234>_22d))||((_233<_22e)&&(_234>=_22e))||((_22d<=_233)&&(_22e>_233))||((_22d<_234)&&(_22e>=_234))){ 
    17381743same.push(h); 
    17391744} 
    17401745}); 
    1741 var _232=_226*this.getAdjustSize(); 
     1746var _235=_229*this.getAdjustSize(); 
    17421747if(UserAgent.isIE()||this.calendar.options.noEvent){ 
    1743 _232+=1; 
    1744 } 
    1745 var left=this.column.width*_226+_232
     1748_235+=1; 
     1749} 
     1750var left=this.column.width*_229+_235
    17461751if(same.length==0){ 
    17471752Element.setStyle(item,{left:left+"px"}); 
    17481753}else{ 
    17491754same.push(item); 
    1750 var _234=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
     1755var _237=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
    17511756same.each(function(s,i){ 
    1752 var _237=left+_234*i+(2*i); 
    1753 Element.setStyle(s,{width:_234+"px",left:_237+"px"}); 
     1757var _23a=left+_237*i+(2*i); 
     1758Element.setStyle(s,{width:_237+"px",left:_23a+"px"}); 
    17541759}); 
    17551760} 
    17561761return left; 
    17571762},setScheduleBaseStyle:function(item){ 
    1758 var _239=item.schedule; 
    1759 if(!this.calendar.isSameDate(_239.start,_239.finish)){ 
    1760 _239.finish.hour=24; 
    1761 _239.finish.min=0; 
    1762 } 
    1763 var time=this.convertHours(_239); 
    1764 var _23b=time.first(); 
    1765 var _23c=time.last(); 
    1766 var _23d=this.column.height*2; 
    1767 var diff=this.calendar.getTimeDiff(_239.start,_239.finish); 
     1763var _23c=item.schedule; 
     1764if(!this.calendar.isSameDate(_23c.start,_23c.finish)){ 
     1765_23c.finish.hour=24; 
     1766_23c.finish.min=0; 
     1767} 
     1768var time=this.convertHours(_23c); 
     1769var _23e=time.first(); 
     1770var _23f=time.last(); 
     1771var _240=this.column.height*2; 
     1772var diff=this.calendar.getTimeDiff(_23c.start,_23c.finish); 
    17681773var rate=(diff.hour+(diff.min/60))||1; 
    17691774var over=0; 
    17701775var top=0; 
    1771 var _242=0; 
    1772 var _243=this.includeDisplayTime(_23b); 
    1773 var _244=this.includeDisplayTime(_23c,true); 
    1774 if(!_243&&!_244){ 
    1775 if((this.startTime<=_23b&&this.startTime<=_23c)||(_23b<this.finishTime&&_23c<this.finishTime)){ 
    1776 top=_242=0; 
     1776var _245=0; 
     1777var _246=this.includeDisplayTime(_23e); 
     1778var _247=this.includeDisplayTime(_23f,true); 
     1779if(!_246&&!_247){ 
     1780if((this.startTime<=_23e&&this.startTime<=_23f)||(_23e<this.finishTime&&_23f<this.finishTime)){ 
     1781top=_245=0; 
    17771782Element.hide(item); 
    17781783this.hasInvisibleSchedule=true; 
    17791784}else{ 
    17801785top=0; 
    1781 _242=_23d*(this.finishTime-this.startTime)-3; 
    1782 } 
    1783 }else{ 
    1784 if(_243){ 
    1785 top=_23d*(_23b-this.startTime); 
    1786 _242=_23d*rate-3; 
     1786_245=_240*(this.finishTime-this.startTime)-3; 
     1787} 
     1788}else{ 
     1789if(_246){ 
     1790top=_240*(_23e-this.startTime); 
     1791_245=_240*rate-3; 
    17871792}else{ 
    17881793top=0; 
    1789 over=this.startTime-_23b
    1790 _242=_23d*(rate-over); 
    1791 } 
    1792 if(_244){ 
    1793 }else{ 
    1794 over=_23c-this.finishTime; 
    1795 _242-=_23d*over; 
     1794over=this.startTime-_23e
     1795_245=_240*(rate-over); 
     1796} 
     1797if(_247){ 
     1798}else{ 
     1799over=_23f-this.finishTime; 
     1800_245-=_240*over; 
    17961801} 
    17971802} 
    17981803try{ 
    1799 Element.setStyle(item,{top:top+"px",width:this.column.width+"px",height:_242+"px"}); 
     1804Element.setStyle(item,{top:top+"px",width:this.column.width+"px",height:_245+"px"}); 
    18001805} 
    18011806catch(e){ 
     
    18091814this.setCover(); 
    18101815var self=this; 
    1811 var _246=$(this.getScheduleContainerId()); 
    1812 var _247=this.getDragDistance(); 
     1816var _249=$(this.getScheduleContainerId()); 
     1817var _24a=this.getDragDistance(); 
    18131818this.scheduleNodes=[]; 
    1814 var _248=this.week.map(function(){ 
     1819var _24b=this.week.map(function(){ 
    18151820return []; 
    18161821}); 
    1817 var _249=this.week.legth-1; 
    1818 var _24a=this.calendar.options.noEvent; 
    1819 this.calendar.options.schedules.each(function(_24b){ 
    1820 var _24c=[]; 
    1821 var sub,_24e,_24f=null; 
    1822 self.week.each(function(date,_251){ 
    1823 if(self.calendar.betweenDate(_24b,date)){ 
    1824 if(self.isSameStartDate(_24b,date)&&self.isSameFinishDate(_24b,date)){ 
    1825 _24f=self.setSchedule(_24b,_251,_248,_246,_247); 
    1826 _24f.cellDate=date; 
    1827 _24c.push(_24f); 
    1828 }else{ 
    1829 sub=self.copyOneDaySchedule(_24b,date); 
     1822var _24c=this.week.legth-1; 
     1823var _24d=this.calendar.options.noEvent; 
     1824this.calendar.options.schedules.each(function(_24e){ 
     1825var _24f=[]; 
     1826var sub,_251,_252=null; 
     1827self.week.each(function(date,_254){ 
     1828if(self.calendar.betweenDate(_24e,date)){ 
     1829if(self.isSameStartDate(_24e,date)&&self.isSameFinishDate(_24e,date)){ 
     1830_252=self.setSchedule(_24e,_254,_24b,_249,_24a); 
     1831_252.cellDate=date; 
     1832_24f.push(_252); 
     1833}else{ 
     1834sub=self.copyOneDaySchedule(_24e,date); 
    18301835if(sub.finish.hour==0&&sub.finish.min==0){ 
    18311836throw $continue; 
    18321837} 
    1833 _24e=self.setSchedule(sub,_251,_248,_246,_247); 
    1834 _24e.originalSchedule=_24b
    1835 _24e.cellDate=date; 
    1836 _24c.push(_24e); 
     1838_251=self.setSchedule(sub,_254,_24b,_249,_24a); 
     1839_251.originalSchedule=_24e
     1840_251.cellDate=date; 
     1841_24f.push(_251); 
    18371842} 
    18381843}else{ 
     
    18441849if(!self.hasInvisibleSchedule){ 
    18451850(self.invisibleWeek||[]).each(function(date){ 
    1846 if(self.calendar.betweenDate(_24b,date)){ 
     1851if(self.calendar.betweenDate(_24e,date)){ 
    18471852self.hasInvisibleSchedule=true; 
    18481853throw $break; 
     
    18501855}); 
    18511856} 
    1852 if(!_24a){ 
    1853 _24c.each(function(item){ 
    1854 Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_24c)); 
    1855 Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_24c)); 
    1856 }); 
    1857 } 
    1858 if(!self.hasInvisibleSchedule&&(_24c.length==0)){ 
     1857if(!_24d){ 
     1858_24f.each(function(item){ 
     1859Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_24f)); 
     1860Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_24f)); 
     1861}); 
     1862} 
     1863if(!self.hasInvisibleSchedule&&(_24f.length==0)){ 
    18591864self.hasInvisibleSchedule=true; 
    18601865} 
     
    18671872new Hover(this.ids.pre); 
    18681873new Hover(this.ids.next); 
    1869 var _254=this.calendar.options.clickDateText||this.clickDateText; 
     1874var _257=this.calendar.options.clickDateText||this.clickDateText; 
    18701875if(this.headers){ 
    1871 this.headers.each(function(_255){ 
    1872 Event.observe(_255.id,"mousedown",_254.bindAsEventListener(this,_255.wday)); 
     1876this.headers.each(function(_258){ 
     1877Event.observe(_258.id,"mousedown",_257.bindAsEventListener(this,_258.wday)); 
    18731878}.bind(this)); 
    18741879} 
    18751880} 
    1876 },copyOneDaySchedule:function(_256,date){ 
     1881},copyOneDaySchedule:function(_259,date){ 
    18771882var sub=null; 
    1878 if(this.isSameStartDate(_256,date)){ 
    1879 sub=this.copySchedule(_256,date); 
     1883if(this.isSameStartDate(_259,date)){ 
     1884sub=this.copySchedule(_259,date); 
    18801885sub.finish.hour=24; 
    18811886sub.finish.min=0; 
    18821887}else{ 
    1883 if(this.isSameFinishDate(_256,date)){ 
    1884 sub=this.copySchedule(_256,date); 
     1888if(this.isSameFinishDate(_259,date)){ 
     1889sub=this.copySchedule(_259,date); 
    18851890sub.start.hour=0; 
    18861891sub.start.min=0; 
    18871892}else{ 
    1888 sub=this.copySchedule(_256,date); 
     1893sub=this.copySchedule(_259,date); 
    18891894sub.start.hour=0; 
    18901895sub.start.min=0; 
     
    18941899} 
    18951900return sub; 
    1896 },copySchedule:function(_259,date){ 
    1897 sub=Object.extend({},_259); 
    1898 sub.start={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_259.start.hour,min:_259.start.min}; 
    1899 sub.finish={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_259.finish.hour,min:_259.finish.min}; 
     1901},copySchedule:function(_25c,date){ 
     1902sub=Object.extend({},_25c); 
     1903sub.start={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_25c.start.hour,min:_25c.start.min}; 
     1904sub.finish={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_25c.finish.hour,min:_25c.finish.min}; 
    19001905return sub; 
    1901 },setSchedule:function(_25b,_25c,_25d,_25e,_25f){ 
    1902 var _260=this.buildSchedule(_25b); 
    1903 var item=_260.first(); 
    1904 _25e.appendChild(item); 
     1906},setSchedule:function(_25e,_25f,_260,_261,_262){ 
     1907var _263=this.buildSchedule(_25e); 
     1908var item=_263.first(); 
     1909_261.appendChild(item); 
    19051910this.setScheduleBaseStyle(item); 
    1906 var left=this.adjustScheduleStyle(item,_25c,_25d[_25c]); 
    1907 var _263=_25c*this.getAdjustSize(); 
    1908 var _264=this.column.width+_263+"px"; 
    1909 if(!this.calendar.options.noEvent&&((_25b.edit==undefined)||_25b.edit)){ 
    1910 this.setDraggable(item,_260.last(),_25e,_25f); 
     1911var left=this.adjustScheduleStyle(item,_25f,_260[_25f]); 
     1912var _266=_25f*this.getAdjustSize(); 
     1913var _267=this.column.width+_266+"px"; 
     1914if(!this.calendar.options.noEvent&&((_25e.edit==undefined)||_25e.edit)){ 
     1915this.setDraggable(item,_263.last(),_261,_262); 
    19111916this.setResize(item); 
    19121917} 
    1913 _25d[_25c].push(item); 
     1918_260[_25f].push(item); 
    19141919this.scheduleNodes.push(item); 
    19151920return item; 
    19161921},getDragDistance:function(){ 
    1917 var _265=this.getAdjustSize(); 
    1918 return [this.column.width+_265,this.column.height/2]; 
    1919 },setDraggable:function(item,_267,_268,_269){ 
     1922var _268=this.getAdjustSize(); 
     1923return [this.column.width+_268,this.column.height/2]; 
     1924},setDraggable:function(item,_26a,_26b,_26c){ 
    19201925var self=this; 
    1921 new Draggable(item,{handle:_267,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,snap:function(x,y,_26d){ 
    1922 var _26e=Element.getDimensions(item); 
    1923 var _26f=Element.getDimensions(_268); 
    1924 var _270=(self.column.height/2); 
    1925 var _271=_26d.offset; 
     1926new Draggable(item,{handle:_26a,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,snap:function(x,y,_270){ 
     1927var _271=Element.getDimensions(item); 
     1928var _272=Element.getDimensions(_26b); 
     1929var _273=(self.column.height/2); 
     1930var _274=_270.offset; 
    19261931var xy=[x,y].map(function(v,i){ 
    1927 return Math.floor((v+_271[i])/_269[i])*_269[i]; 
    1928 }); 
    1929 xy=[self._constrain(xy[0],0,_26f.width-_26e.width),self._constrain(xy[1],0-(_26e.height-_270),_26f.height-_270)]; 
     1932return Math.floor((v+_274[i])/_26c[i])*_26c[i]; 
     1933}); 
     1934xy=[self._constrain(xy[0],0,_272.width-_271.width),self._constrain(xy[1],0-(_271.height-_273),_272.height-_273)]; 
    19301935return xy; 
    1931 },onEnd:function(_275,_276){ 
    1932 self.changeSchedule(_275,_276); 
    1933 },change:function(_277){ 
    1934 self.changeTimeDisplay(_277.element); 
     1936},onEnd:function(_278,_279){ 
     1937self.changeSchedule(_278,_279); 
     1938},change:function(_27a){ 
     1939self.changeTimeDisplay(_27a.element); 
    19351940}}); 
    19361941},setResize:function(item){ 
    1937 new CalendarResizeableEx(item,{left:0,right:0,top:0,distance:this.column.height/2,restriction:true,resize:function(_279){ 
    1938 this.updateTirm(_279); 
    1939 }.bind(this),change:function(_27a){ 
    1940 this.changeTimeDisplay(_27a); 
     1942new CalendarResizeableEx(item,{left:0,right:0,top:0,distance:this.column.height/2,restriction:true,resize:function(_27c){ 
     1943this.updateTirm(_27c); 
     1944}.bind(this),change:function(_27d){ 
     1945this.changeTimeDisplay(_27d); 
    19411