Changeset 5764

Show
Ignore:
Timestamp:
05/27/08 13:14:25 (6 months ago)
Author:
kinoshita
Message:

3677

Files:

Legend:

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

    r5763 r5764  
    11051105item.length=_14f; 
    11061106item.cellIndex=_154; 
     1107item.cellDate=_151; 
    11071108this.container.appendChild(item); 
    11081109this.setScheduleBaseStyle(item,_153,_154,_14f); 
     
    13611362var cell=this.findCell(_1b4,_1b6); 
    13621363var date=new Date(this.calendar.date.getTime()); 
    1363 date.setDate(parseInt(cell.id.getSuffix(),10)); 
     1364var _1bc=_1b1.cellDate.days()-DateUtil.toDate(_1b2.start).days(); 
     1365date.setDate(parseInt(cell.id.getSuffix(),10)-_1bc); 
    13641366var diff=this.getDayDiff(_1b2); 
    1365 var _1bd=date.advance({days:diff}); 
    1366 if(_1b2.start.month==date.getMonth()&&_1b2.start.day==date.getDate()&&_1b2.finish.month==_1bd.getMonth()&&_1b2.finish.day==_1bd.getDate()){ 
     1367var _1be=date.advance({days:diff}); 
     1368if(_1b2.start.month==date.getMonth()&&_1b2.start.day==date.getDate()&&_1b2.finish.month==_1be.getMonth()&&_1b2.finish.day==_1be.getDate()){ 
    13671369this.calendar.refreshSchedule(); 
    13681370return; 
     
    13711373_1b2.start.month=date.getMonth(); 
    13721374_1b2.start.day=date.getDate(); 
    1373 _1b2.finish.year=_1bd.getFullYear(); 
    1374 _1b2.finish.month=_1bd.getMonth(); 
    1375 _1b2.finish.day=_1bd.getDate(); 
     1375_1b2.finish.year=_1be.getFullYear(); 
     1376_1b2.finish.month=_1be.getMonth(); 
     1377_1b2.finish.day=_1be.getDate(); 
    13761378this.calendar.refreshSchedule(); 
    13771379this.calendar.options.changeSchedule(_1b2); 
     
    13791381this.calendar.refreshSchedule(); 
    13801382} 
    1381 },updateTirm:function(_1be){ 
    1382 var _1bf=_1be.schedule; 
    1383 var _1c0=parseInt(Element.getStyle(_1be,"width")); 
    1384 var top=parseInt(Element.getStyle(_1be,"top")); 
    1385 var left=parseInt(Element.getStyle(_1be,"left")); 
    1386 var _1c3=Math.round((left+_1c0)/this.column.width)-1; 
    1387 var _1c4=Math.round(top/this.column.height); 
    1388 var cell=this.findCell(_1c4,_1c3); 
    1389 var _1c6=_1bf.finish; 
    1390 var _1c7=null; 
     1383},updateTirm:function(_1bf){ 
     1384var _1c0=_1bf.schedule; 
     1385var _1c1=parseInt(Element.getStyle(_1bf,"width")); 
     1386var top=parseInt(Element.getStyle(_1bf,"top")); 
     1387var left=parseInt(Element.getStyle(_1bf,"left")); 
     1388var _1c4=Math.round((left+_1c1)/this.column.width)-1; 
     1389var _1c5=Math.round(top/this.column.height); 
     1390var cell=this.findCell(_1c5,_1c4); 
     1391var _1c7=_1c0.finish; 
     1392var _1c8=null; 
    13911393if(this.dateMap){ 
    1392 _1c7=this.dateMap[cell.id].toHash(); 
    1393 }else{ 
    1394 _1c7=new Date(this.calendar.date.getTime()); 
    1395 _1c7.setDate(parseInt(cell.id.getSuffix(),10)); 
    1396 _1c7=_1c7.toHash(); 
    1397 } 
    1398 _1c7.hour=_1c6.hour; 
    1399 _1c7.min=_1c6.min; 
    1400 if(DateUtil.toDate(_1bf.start).getTime()>=DateUtil.toDate(_1c7).getTime()){ 
    1401 var _1c8=23; 
    1402 var _1c9=55; 
    1403 if(_1bf.start.hour==_1c8&&_1bf.start.min==_1c9){ 
     1394_1c8=this.dateMap[cell.id].toHash(); 
     1395}else{ 
     1396_1c8=new Date(this.calendar.date.getTime()); 
     1397_1c8.setDate(parseInt(cell.id.getSuffix(),10)); 
     1398_1c8=_1c8.toHash(); 
     1399} 
     1400_1c8.hour=_1c7.hour; 
     1401_1c8.min=_1c7.min; 
     1402if(DateUtil.toDate(_1c0.start).getTime()>=DateUtil.toDate(_1c8).getTime()){ 
     1403var _1c9=23; 
     1404var _1ca=55; 
     1405if(_1c0.start.hour==_1c9&&_1c0.start.min==_1ca){ 
    14041406this.calendar.refreshSchedule(); 
    14051407this.calendar.options.updateTirm(); 
    14061408return; 
    14071409}else{ 
    1408 _1c7.hour=_1c8
    1409 _1c7.min=_1c9
    1410 } 
    1411 } 
    1412 _1bf.finish=_1c7
     1410_1c8.hour=_1c9
     1411_1c8.min=_1ca
     1412} 
     1413} 
     1414_1c0.finish=_1c8
    14131415this.calendar.refreshSchedule(); 
    1414 this.calendar.options.updateTirm(_1bf); 
    1415 },getTimeText:function(_1ca,_1cb){ 
    1416 var _1cc=this.calendar; 
    1417 return _1cc.formatTime(_1ca); 
    1418 },getDayDiff:function(_1cd){ 
    1419 return DateUtil.numberOfDays(this.toDate(_1cd.start),this.toDate(_1cd.finish)); 
     1416this.calendar.options.updateTirm(_1c0); 
     1417},getTimeText:function(_1cb,_1cc){ 
     1418var _1cd=this.calendar; 
     1419return _1cd.formatTime(_1cb); 
     1420},getDayDiff:function(_1ce){ 
     1421return DateUtil.numberOfDays(this.toDate(_1ce.start),this.toDate(_1ce.finish)); 
    14201422}}); 
    14211423var CalendarWeek=Class.create(); 
    14221424CalendarWeek.id=["calTable","columnContainer","columnHeader","column","next","pre","headerText"]; 
    14231425Object.extend(CalendarWeek.prototype,AbstractCalendar.prototype); 
    1424 Object.extend(CalendarWeek.prototype,{initialize:function(_1ce){ 
    1425 this.calendar=_1ce
     1426Object.extend(CalendarWeek.prototype,{initialize:function(_1cf){ 
     1427this.calendar=_1cf
    14261428this.week=this.getWeek(); 
    14271429this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarWeek.id); 
     
    14301432return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.pre+"' class='"+this.calendar.classNames.preWeekMark+"'></div>"+"</td>"; 
    14311433},buildHeaderCenter:function(){ 
    1432 var _1cf=[]; 
     1434var _1d0=[]; 
    14331435if(this.calendar.options.weekHeaderFormat){ 
    1434 _1cf=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
    1435 } 
    1436 return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1cf[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1cf[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1cf[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
     1436_1d0=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
     1437} 
     1438return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d0[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d0[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1d0[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
    14371439},formatHeaderDate:function(date){ 
    14381440if(this.calendar.options.weekHeaderFormat){ 
     
    14431445return "<td class='"+this.calendar.classNames.nextYears+"' align='right'>"+"<div id='"+this.ids.next+"' class='"+this.calendar.classNames.nextWeekMark+"'></div>"+"</td>"; 
    14441446},buildCalendar:function(){ 
    1445 var _1d1=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
    1446 _1d1+=this.buildCalendarContainer(); 
    1447 return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1d1+"</tr>"+"</table>"; 
     1447var _1d2=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
     1448_1d2+=this.buildCalendarContainer(); 
     1449return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1d2+"</tr>"+"</table>"; 
    14481450},buildTimeLine:function(){ 
    14491451var time=new Date(); 
    1450 var hour=0,_1d4=24; 
     1452var hour=0,_1d5=24; 
    14511453time.setHours(hour); 
    14521454time.setMinutes(0); 
    1453 var _1d5=this.buildTimeLineTop(); 
     1455var _1d6=this.buildTimeLineTop(); 
    14541456var now=new Date().getHours(); 
    1455 while(hour<_1d4){ 
     1457while(hour<_1d5){ 
    14561458if(this.includeDisplayTime(hour)){ 
    1457 var _1d7="pointer: default;"; 
    1458 if(_1d5.length==0){ 
    1459 _1d7+="border-top: none;"; 
    1460 } 
    1461 var _1d8=this.calendar.classNames.timeLineTime; 
     1459var _1d8="pointer: default;"; 
     1460if(_1d6.length==0){ 
     1461_1d8+="border-top: none;"; 
     1462} 
     1463var _1d9=this.calendar.classNames.timeLineTime; 
    14621464if(hour==now){ 
    1463 _1d8+=" "+this.calendar.classNames.highlightTime; 
    1464 } 
    1465 _1d5+="<div class='"+_1d8+"' style='"+_1d7+"'>"+this.formatTime(time)+"</div>"; 
     1465_1d9+=" "+this.calendar.classNames.highlightTime; 
     1466} 
     1467_1d6+="<div class='"+_1d9+"' style='"+_1d8+"'>"+this.formatTime(time)+"</div>"; 
    14661468} 
    14671469hour++; 
    14681470time.setHours(hour); 
    14691471} 
    1470 return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1d5+"</td>"; 
     1472return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1d6+"</td>"; 
    14711473},buildTimeLineTop:function(){ 
    14721474return "<div class='"+this.calendar.classNames.timeLineTimeTop+"'></div>"; 
     
    14741476return "<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+this.buildCalendarHeader()+this.buildCalendarMain()+"</table>"+"</td>"; 
    14751477},buildCalendarHeader:function(){ 
    1476 var _1d9=this.calendar.options.displayIndexes; 
     1478var _1da=this.calendar.options.displayIndexes; 
    14771479var ths=""; 
    1478 var _1db=new Date().days(); 
    1479 var _1dc=100/_1d9.length+"%"; 
    1480 var _1dd=this.calendar.element.id.appendSuffix(this.ids.column); 
    1481 var _1de=this.calendar.element.id.appendSuffix(this.ids.headerText); 
     1480var _1dc=new Date().days(); 
     1481var _1dd=100/_1da.length+"%"; 
     1482var _1de=this.calendar.element.id.appendSuffix(this.ids.column); 
     1483var _1df=this.calendar.element.id.appendSuffix(this.ids.headerText); 
    14821484this.headers=[]; 
    1483 var _1df=this.calendar.options.noEvent; 
    1484 var _1e0=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
    1485 this.week.each(function(w,_1e2){ 
     1485var _1e0=this.calendar.options.noEvent; 
     1486var _1e1=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
     1487this.week.each(function(w,_1e3){ 
    14861488var text=null; 
    1487 if(_1e0){ 
    1488 text=_1e0.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
     1489if(_1e1){ 
     1490text=_1e1.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
    14891491}else{ 
    14901492text=w.toDateString().split(" "); 
     
    14921494text=text.join(" "); 
    14931495} 
    1494 var _1e4=(w.days()==_1db)?this.calendar.classNames.highlightDay:""; 
    1495 var _1e5=_1de.appendSuffix(_1e2); 
     1496var _1e5=(w.days()==_1dc)?this.calendar.classNames.highlightDay:""; 
     1497var _1e6=_1df.appendSuffix(_1e3); 
    14961498var node="<div class='"+this.calendar.classNames.headerColumn+"'>"; 
    1497 if(_1df){ 
    1498 node+="<span='#' id='"+_1e5+"' class='"+_1e4+"' style='cursor: default;'>"+text+"</a>"; 
    1499 }else{ 
    1500 node+="<a href='#' id='"+_1e5+"' class='"+_1e4+"'>"+text+"</a>"; 
     1499if(_1e0){ 
     1500node+="<span='#' id='"+_1e6+"' class='"+_1e5+"' style='cursor: default;'>"+text+"</a>"; 
     1501}else{ 
     1502node+="<a href='#' id='"+_1e6+"' class='"+_1e5+"'>"+text+"</a>"; 
    15011503} 
    15021504node+="</div>"; 
    1503 this.headers.push({id:_1e5,wday:w}); 
    1504 ths+="<th id='"+_1dd.appendSuffix(_1e2)+"' width='"+_1dc+"'>"+node+"</th>"; 
     1505this.headers.push({id:_1e6,wday:w}); 
     1506ths+="<th id='"+_1de.appendSuffix(_1e3)+"' width='"+_1dd+"'>"+node+"</th>"; 
    15051507}.bind(this)); 
    15061508return "<tr>"+"<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+"<tr>"+ths+"</tr>"+"</table>"+"</td>"+"</tr>"; 
    15071509},buildCalendarMain:function(){ 
    1508 var _1e7=this.calendar.options.displayIndexes; 
     1510var _1e8=this.calendar.options.displayIndexes; 
    15091511var tds=""; 
    1510 var _1e9=100/_1e7.length+"%"; 
     1512var _1ea=100/_1e8.length+"%"; 
    15111513this.dateMap={}; 
    1512 this.week.each(function(w,_1eb){ 
    1513 var _1ec=this.calendar.options.schedules[w.toDateString()]; 
    1514 var _1ed=""; 
     1514this.week.each(function(w,_1ec){ 
     1515var _1ed=this.calendar.options.schedules[w.toDateString()]; 
     1516var _1ee=""; 
    15151517var i=0,j=0; 
    15161518while(i<24){ 
    15171519if(this.includeDisplayTime(i)){ 
    1518 var _1f0=""; 
    1519 if(_1ed.length==0){ 
    1520 _1f0=this.calendar.classNames.columnTopDate; 
     1520var _1f1=""; 
     1521if(_1ee.length==0){ 
     1522_1f1=this.calendar.classNames.columnTopDate; 
    15211523}else{ 
    15221524if(i%1==0){ 
    1523 _1f0=this.calendar.classNames.columnDate; 
    1524 }else{ 
    1525 _1f0=this.calendar.classNames.columnDateOdd; 
    1526 } 
    1527 } 
    1528 var id=this.getDateId(w,i,_1eb); 
     1525_1f1=this.calendar.classNames.columnDate; 
     1526}else{ 
     1527_1f1=this.calendar.classNames.columnDateOdd; 
     1528} 
     1529} 
     1530var id=this.getDateId(w,i,_1ec); 
    15291531var hour=i/1; 
    15301532var min=i%1*60; 
    15311533this.dateMap[id]=new Date(w.getFullYear(),w.getMonth(),w.getDate(),hour,min,0); 
    1532 _1ed+="<div id='"+id+"' class='"+_1f0+"'></div>"; 
     1534_1ee+="<div id='"+id+"' class='"+_1f1+"'></div>"; 
    15331535} 
    15341536i+=0.5; 
    15351537} 
    1536 tds+="<td width='"+_1e9+"'>"+_1ed+"</td>"; 
     1538tds+="<td width='"+_1ea+"'>"+_1ee+"</td>"; 
    15371539}.bind(this)); 
    15381540return "<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>"; 
     
    15421544var rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.columnDate); 
    15431545this.column.height=parseInt(rule.style["height"],10)+1; 
    1544 },buildSchedule:function(_1f6){ 
    1545 var id="scheduleItem_"+_1f6.id; 
    1546 var _1f8=(_1f6.edit==undefined||_1f6.edit); 
     1546},buildSchedule:function(_1f7){ 
     1547var id="scheduleItem_"+_1f7.id; 
     1548var _1f9=(_1f7.edit==undefined||_1f7.edit); 
    15471549var item=Builder.node("DIV",{id:id}); 
    15481550this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    1549 var _1fa=this.calendar.options.noEvent; 
    1550 var _1fb={}; 
    1551 if(_1f6.background_color){ 
    1552 _1fb.backgroundColor=_1f6.background_color; 
    1553 
    1554 if(_1f6.frame_color){ 
    1555 _1fb.border="2px solid "+_1f6.frame_color; 
    1556 
    1557 if(_1fa){ 
    1558 _1fb.cursor="default"; 
    1559 
    1560 Element.setStyle(item,_1fb); 
    1561 if(_1f8){ 
    1562 var _1fc=Builder.node("DIV",{id:"scheduleDeleteImg_"+_1f6.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    1563 Element.hide(_1fc); 
    1564 item.appendChild(_1fc); 
    1565 if(!_1fa){ 
    1566 Event.observe(_1fc,"click",this.clickDeleteImage.bind(this,_1f6)); 
    1567 Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_1fc)); 
    1568 Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_1fc)); 
    1569 
    1570 
    1571 if(!_1fa&&this.calendar.options.dblclickSchedule){ 
    1572 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_1f6)); 
    1573 
    1574 var _1fd=null; 
    1575 if(_1f8){ 
    1576 _1fd=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
    1577 if(_1fa){ 
     1551var _1fb=this.calendar.options.noEvent; 
     1552var _1fc={}; 
     1553if(_1f7.background_color){ 
     1554_1fc.backgroundColor=_1f7.background_color; 
     1555
     1556if(_1f7.frame_color){ 
     1557_1fc.border="2px solid "+_1f7.frame_color; 
     1558
     1559if(_1fb){ 
     1560_1fc.cursor="default"; 
     1561
     1562Element.setStyle(item,_1fc); 
     1563if(_1f9){ 
     1564var _1fd=Builder.node("DIV",{id:"scheduleDeleteImg_"+_1f7.id,className:this.calendar.css.joinClassNames("deleteImg")}); 
    15781565Element.hide(_1fd); 
    1579 } 
    15801566item.appendChild(_1fd); 
     1567if(!_1fb){ 
     1568Event.observe(_1fd,"click",this.clickDeleteImage.bind(this,_1f7)); 
     1569Event.observe(item,"mouseover",this.showDeleteImage.bind(this,_1fd)); 
     1570Event.observe(item,"mouseout",this.hideDeleteImage.bind(this,_1fd)); 
     1571} 
     1572} 
     1573if(!_1fb&&this.calendar.options.dblclickSchedule){ 
     1574Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_1f7)); 
     1575} 
     1576var _1fe=null; 
     1577if(_1f9){ 
     1578_1fe=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 
     1579if(_1fb){ 
     1580Element.hide(_1fe); 
     1581} 
     1582item.appendChild(_1fe); 
    15811583} 
    15821584var icon=null; 
    1583 if(_1f6.icon){ 
    1584 icon=Builder.node("IMG",{src:_1f6.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
     1585if(_1f7.icon){ 
     1586icon=Builder.node("IMG",{src:_1f7.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
    15851587item.appendChild(icon); 
    15861588} 
    1587 if(!_1f6.publicity){ 
     1589if(!_1f7.publicity){ 
    15881590if(Calendar.privateImgPath){ 
    15891591icon=Builder.node("IMG",{src:Calendar.privateImgPath,alt:"private",style:"float: left;",width:16,height:16}); 
    15901592item.appendChild(icon); 
    15911593}else{ 
    1592 icon=Builder.node("DIV",{id:"private_img_"+_1f6.id}); 
     1594icon=Builder.node("DIV",{id:"private_img_"+_1f7.id}); 
    15931595this.calendar.css.addClassNames(icon,"privateImg"); 
    15941596item.appendChild(icon); 
    15951597} 
    15961598} 
    1597 var text=this.getTimeText(_1f6.start,_1f6.finish); 
     1599var text=this.getTimeText(_1f7.start,_1f7.finish); 
    15981600text=Builder.node("DIV",{id:id+"_text"},[text]); 
    15991601this.calendar.css.addClassNames(text,"scheduleTimeArea"); 
    16001602item.appendChild(text); 
    1601 var _200=_1f6.description.unescapeHTML(); 
    1602 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_200])); 
    1603 item.title=_200
    1604 item.schedule=_1f6
    1605 return [item,_1fd]; 
    1606 },adjustScheduleStyle:function(item,_202,_203){ 
    1607 var _204=item.schedule; 
    1608 var time=this.convertHours(_204); 
    1609 var _206=time[0]; 
    1610 var _207=time[1]; 
     1603var _201=_1f7.description.unescapeHTML(); 
     1604item.appendChild(Builder.node("DIV",{id:id+"_description"},[_201])); 
     1605item.title=_201
     1606item.schedule=_1f7
     1607return [item,_1fe]; 
     1608},adjustScheduleStyle:function(item,_203,_204){ 
     1609var _205=item.schedule; 
     1610var time=this.convertHours(_205); 
     1611var _207=time[0]; 
     1612var _208=time[1]; 
    16111613var same=[]; 
    16121614var self=this; 
    1613 _203.each(function(h){ 
    1614 var _20b=self.convertHours(h.schedule); 
    1615 var _20c=_20b[0]; 
    1616 var _20d=_20b[1]; 
    1617 if(((_20c<=_206)&&(_20d>_206))||((_20c<_207)&&(_20d>=_207))||((_206<=_20c)&&(_207>_20c))||((_206<_20d)&&(_207>=_20d))){ 
     1615_204.each(function(h){ 
     1616var _20c=self.convertHours(h.schedule); 
     1617var _20d=_20c[0]; 
     1618var _20e=_20c[1]; 
     1619if(((_20d<=_207)&&(_20e>_207))||((_20d<_208)&&(_20e>=_208))||((_207<=_20d)&&(_208>_20d))||((_207<_20e)&&(_208>=_20e))){ 
    16181620same.push(h); 
    16191621} 
    16201622}); 
    1621 var _20e=_202*this.getAdjustSize(); 
     1623var _20f=_203*this.getAdjustSize(); 
    16221624if(UserAgent.isIE()||this.calendar.options.noEvent){ 
    1623 _20e+=1; 
    1624 } 
    1625 var left=this.column.width*_202+_20e
     1625_20f+=1; 
     1626} 
     1627var left=this.column.width*_203+_20f
    16261628if(same.length==0){ 
    16271629Element.setStyle(item,{left:left+"px"}); 
    16281630}else{ 
    16291631same.push(item); 
    1630 var _210=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
     1632var _211=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
    16311633same.each(function(s,i){ 
    1632 var _213=left+_210*i+(2*i); 
    1633 Element.setStyle(s,{width:_210+"px",left:_213+"px"}); 
     1634var _214=left+_211*i+(2*i); 
     1635Element.setStyle(s,{width:_211+"px",left:_214+"px"}); 
    16341636}); 
    16351637} 
    16361638return left; 
    16371639},setScheduleBaseStyle:function(item){ 
    1638 var _215=item.schedule; 
    1639 if(!this.calendar.isSameDate(_215.start,_215.finish)){ 
    1640 _215.finish.hour=24; 
    1641 _215.finish.min=0; 
    1642 } 
    1643 var time=this.convertHours(_215); 
    1644 var _217=time.first(); 
    1645 var _218=time.last(); 
    1646 var _219=this.column.height*2; 
    1647 var diff=this.calendar.getTimeDiff(_215.start,_215.finish); 
     1640var _216=item.schedule; 
     1641if(!this.calendar.isSameDate(_216.start,_216.finish)){ 
     1642_216.finish.hour=24; 
     1643_216.finish.min=0; 
     1644} 
     1645var time=this.convertHours(_216); 
     1646var _218=time.first(); 
     1647var _219=time.last(); 
     1648var _21a=this.column.height*2; 
     1649var diff=this.calendar.getTimeDiff(_216.start,_216.finish); 
    16481650var rate=(diff.hour+(diff.min/60))||1; 
    16491651var over=0; 
    16501652var top=0; 
    1651 var _21e=0; 
    1652 var _21f=this.includeDisplayTime(_217); 
     1653var _21f=0; 
    16531654var _220=this.includeDisplayTime(_218); 
    1654 if(!_21f&&!_220){ 
    1655 if((this.startTime<=_217&&this.startTime<=_218)||(_217<this.finishTime&&_218<this.finishTime)){ 
    1656 top=_21e=0; 
     1655var _221=this.includeDisplayTime(_219); 
     1656if(!_220&&!_221){ 
     1657if((this.startTime<=_218&&this.startTime<=_219)||(_218<this.finishTime&&_219<this.finishTime)){ 
     1658top=_21f=0; 
    16571659Element.hide(item); 
    16581660}else{ 
    16591661top=0; 
    1660 _21e=_219*(this.finishTime-this.startTime)-3; 
    1661 } 
    1662 }else{ 
    1663 if(_21f){ 
    1664 top=_219*(_217-this.startTime); 
    1665 _21e=_219*rate-3; 
     1662_21f=_21a*(this.finishTime-this.startTime)-3; 
     1663} 
     1664}else{ 
     1665if(_220){ 
     1666top=_21a*(_218-this.startTime); 
     1667_21f=_21a*rate-3; 
    16661668}else{ 
    16671669top=0; 
    1668 over=this.startTime-_217
    1669 _21e=_219*(rate-over); 
    1670 } 
    1671 if(_220){ 
    1672 }else{ 
    1673 over=_218-this.finishTime; 
    1674 _21e-=_219*over; 
     1670over=this.startTime-_218
     1671_21f=_21a*(rate-over); 
     1672} 
     1673if(_221){ 
     1674}else{ 
     1675over=_219-this.finishTime; 
     1676_21f-=_21a*over; 
    16751677} 
    16761678} 
    16771679try{ 
    1678 Element.setStyle(item,{top:top+"px",width:this.column.width+"px",height:_21e+"px"}); 
     1680Element.setStyle(item,{top:top+"px",width:this.column.width+"px",height:_21f+"px"}); 
    16791681} 
    16801682catch(e){ 
     
    16861688this.setCover(); 
    16871689var self=this; 
    1688 var _222=$(this.getScheduleContainerId()); 
    1689 var _223=this.getDragDistance(); 
     1690var _223=$(this.getScheduleContainerId()); 
     1691var _224=this.getDragDistance(); 
    16901692this.scheduleNodes=[]; 
    1691 var _224=this.week.map(function(){ 
     1693var _225=this.week.map(function(){ 
    16921694return []; 
    16931695}); 
    1694 var _225=this.week.legth-1; 
    1695 var _226=this.calendar.options.noEvent; 
    1696 this.calendar.options.schedules.each(function(_227){ 
    1697 var _228=[]; 
    1698 var sub,_22a=null; 
    1699 self.week.each(function(date,_22c){ 
    1700 if(self.calendar.betweenDate(_227,date)){ 
    1701 if(self.isSameStartDate(_227,date)&&self.isSameFinishDate(_227,date)){ 
    1702 _228.push(self.setSchedule(_227,_22c,_224,_222,_223)); 
    1703 }else{ 
    1704 sub=self.copyOneDaySchedule(_227,date); 
     1696var _226=this.week.legth-1; 
     1697var _227=this.calendar.options.noEvent; 
     1698this.calendar.options.schedules.each(function(_228){ 
     1699var _229=[]; 
     1700var sub,_22b,_22c=null; 
     1701self.week.each(function(date,_22e){ 
     1702if(self.calendar.betweenDate(_228,date)){ 
     1703if(self.isSameStartDate(_228,date)&&self.isSameFinishDate(_228,date)){ 
     1704_22c=self.setSchedule(_228,_22e,_225,_223,_224); 
     1705_22c.cellDate=date; 
     1706_229.push(_22c); 
     1707}else{ 
     1708sub=self.copyOneDaySchedule(_228,date); 
    17051709if(sub.finish.hour==0&&sub.finish.min==0){ 
    17061710throw $continue; 
    17071711} 
    1708 _22a=self.setSchedule(sub,_22c,_224,_222,_223); 
    1709 _22a.originalSchedule=_227; 
    1710 _228.push(_22a); 
     1712_22b=self.setSchedule(sub,_22e,_225,_223,_224); 
     1713_22b.originalSchedule=_228; 
     1714_22b.cellDate=date; 
     1715_229.push(_22b); 
    17111716} 
    17121717}else{ 
     
    17161721} 
    17171722}); 
    1718 if(!_226){ 
    1719 _228.each(function(item){ 
    1720 Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_228)); 
    1721 Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_228)); 
     1723if(!_227){ 
     1724_229.each(function(item){ 
     1725Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_229)); 
     1726Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_229)); 
    17221727}); 
    17231728} 
     
    17301735new Hover(this.ids.pre); 
    17311736new Hover(this.ids.next); 
    1732 var _22e=this.calendar.options.clickDateText||this.clickDateText; 
     1737var _230=this.calendar.options.clickDateText||this.clickDateText; 
    17331738if(this.headers){ 
    1734 this.headers.each(function(_22f){ 
    1735 Event.observe(_22f.id,"mousedown",_22e.bindAsEventListener(this,_22f.wday)); 
     1739this.headers.each(function(_231){ 
     1740Event.observe(_231.id,"mousedown",_230.bindAsEventListener(this,_231.wday)); 
    17361741}.bind(this)); 
    17371742} 
    17381743} 
    1739 },copyOneDaySchedule:function(_230,date){ 
     1744},copyOneDaySchedule:function(_232,date){ 
    17401745var sub=null; 
    1741 if(this.isSameStartDate(_230,date)){ 
    1742 sub=this.copySchedule(_230,date); 
     1746if(this.isSameStartDate(_232,date)){ 
     1747sub=this.copySchedule(_232,date); 
    17431748sub.finish.hour=24; 
    17441749sub.finish.min=0; 
    17451750}else{ 
    1746 if(this.isSameFinishDate(_230,date)){ 
    1747 sub=this.copySchedule(_230,date); 
     1751if(this.isSameFinishDate(_232,date)){ 
     1752sub=this.copySchedule(_232,date); 
    17481753sub.start.hour=0; 
    17491754sub.start.min=0; 
    17501755}else{ 
    1751 sub=this.copySchedule(_230,date); 
     1756sub=this.copySchedule(_232,date); 
    17521757sub.start.hour=0; 
    17531758sub.start.min=0; 
     
    17571762} 
    17581763return sub; 
    1759 },copySchedule:function(_233,date){ 
    1760 sub=Object.extend({},_233); 
    1761 sub.start={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_233.start.hour,min:_233.start.min}; 
    1762 sub.finish={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_233.finish.hour,min:_233.finish.min}; 
     1764},copySchedule:function(_235,date){ 
     1765sub=Object.extend({},_235); 
     1766sub.start={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_235.start.hour,min:_235.start.min}; 
     1767sub.finish={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_235.finish.hour,min:_235.finish.min}; 
    17631768return sub; 
    1764 },setSchedule:function(_235,_236,_237,_238,_239){ 
    1765 var _23a=this.buildSchedule(_235); 
    1766 var item=_23a.first(); 
    1767 _238.appendChild(item); 
     1769},setSchedule:function(_237,_238,_239,_23a,_23b){ 
     1770var _23c=this.buildSchedule(_237); 
     1771var item=_23c.first(); 
     1772_23a.appendChild(item); 
    17681773this.setScheduleBaseStyle(item); 
    1769 var left=this.adjustScheduleStyle(item,_236,_237[_236]); 
    1770 var _23d=_236*this.getAdjustSize(); 
    1771 var _23e=this.column.width+_23d+"px"; 
    1772 if(!this.calendar.options.noEvent&&((_235.edit==undefined)||_235.edit)){ 
    1773 this.setDraggable(item,_23a.last(),_238,_239); 
     1774var left=this.adjustScheduleStyle(item,_238,_239[_238]); 
     1775var _23f=_238*this.getAdjustSize(); 
     1776var _240=this.column.width+_23f+"px"; 
     1777if(!this.calendar.options.noEvent&&((_237.edit==undefined)||_237.edit)){ 
     1778this.setDraggable(item,_23c.last(),_23a,_23b); 
    17741779this.setResize(item); 
    17751780} 
    1776 _237[_236].push(item); 
     1781_239[_238].push(item); 
    17771782this.scheduleNodes.push(item); 
    17781783return item; 
    17791784},getDragDistance:function(){ 
    1780 var _23f=this.getAdjustSize(); 
    1781 return [this.column.width+_23f,this.column.height/2]; 
    1782 },setDraggable:function(item,_241,_242,_243){ 
     1785var _241=this.getAdjustSize(); 
     1786return [this.column.width+_241,this.column.height/2]; 
     1787},setDraggable:function(item,_243,_244,_245){ 
    17831788var self=this; 
    1784 new Draggable(item,{handle:_241,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,snap:function(x,y){ 
    1785 var _247=Element.getDimensions(item); 
    1786 var _248=Element.getDimensions(_242); 
    1787 var _249=(self.column.height/2); 
     1789new Draggable(item,{handle:_243,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,snap:function(x,y){ 
     1790var _249=Element.getDimensions(item); 
     1791var _24a=Element.getDimensions(_244); 
     1792var _24b=(self.column.height/2); 
    17881793var xy=[x,y].map(function(v,i){ 
    1789 return Math.floor(v/_243[i])*_243[i]; 
    1790 }); 
    1791 xy=[self._constrain(xy[0],0,_248.width-_247.width),self._constrain(xy[1],0-(_247.height-_249),_248.height-_249)]; 
     1794return Math.floor(v/_245[i])*_245[i]; 
     1795}); 
     1796xy=[self._constrain(xy[0],0,_24a.width-_249.width),self._constrain(xy[1],0-(_249.height-_24b),_24a.height-_24b)]; 
    17921797return xy; 
    1793 },onEnd:function(_24d,_24e){ 
    1794 self.changeSchedule(_24d,_24e); 
    1795 },change:function(_24f){ 
    1796 self.changeTimeDisplay(_24f.element); 
     1798},onEnd:function(_24f,_250){ 
     1799self.changeSchedule(_24f,_250); 
     1800},change:function(_251){ 
     1801self.changeTimeDisplay(_251.element); 
    17971802}}); 
    17981803},setResize:function(item){ 
    1799 new CalendarResizeableEx(item,{left:0,right:0,distance:this.column.height/2,restriction:true,resize:function(_251){ 
    1800 this.updateTirm(_251); 
    1801 }.bind(this),change:function(_252){ 
    1802 this.changeTimeDisplay(_252); 
     1804new CalendarResizeableEx(item,{left:0,right:0,distance:this.column.height/2,restriction:true,resize:function(_253){ 
     1805this.updateTirm(_253); 
     1806}.bind(this),change:function(_254){ 
     1807this.changeTimeDisplay(_254); 
    18031808}.bind(this)}); 
    1804 },getDate:function(_253){ 
    1805 return _253.date; 
    1806 },abstractSelect:function(_254,_255){ 
    1807 var _256=this.findClickedElement(_254); 
    1808 if(_256){ 
    1809 if(Element.hasClassName(_256,Calendar.className.columnDate)||Element.hasClassName(_256,Calendar.className.columnDateOdd)||Element.hasClassName(_256,Calendar.className.columnTopDate)){ 
    1810 var date=this.getDate(_256); 
    1811 _255(date,_256); 
     1809},getDate:function(_255){ 
     1810return _255.date; 
     1811},abstractSelect:function(_256,_257){ 
     1812var _258=this.findClickedElement(_256); 
     1813if(_258){ 
     1814if(Element.hasClassName(_258,Calendar.className.columnDate)||Element.hasClassName(_258,Calendar.className.columnDateOdd)||Element.hasClassName(_258,Calendar.className.columnTopDate)){ 
     1815var date=this.getDate(_258); 
     1816_257(date,_258); 
    18121817} 
    18131818} 
    18141819},getSelectedTerm:function(){ 
    1815 var _258=this.calendar.getSelected(); 
    1816 if(_258.length==0){ 
     1820var _25a=this.calendar.getSelected(); 
     1821if(_25a.length==0){ 
    18171822return; 
    18181823} 
    18191824if(this.calendar.options.build){ 
    1820 var last=_258.last(); 
     1825var last=_25a.last(); 
    18211826if(last){ 
    18221827last=this.dateMap[last.id]; 
    18231828}else{ 
    1824 last=this.dateMap[_258.first().id]; 
     1829last=this.dateMap[_25a.first().id]; 
    18251830} 
    18261831last=new Date(last.getFullYear(),last.getMonth(),last.getDate(),last.getHours(),last.getMinutes(),0); 
    18271832last.setMinutes(last.getMinutes()+30); 
    1828 return [this.dateMap[_258.first().id],last]; 
    1829 }else{ 
    1830 var last=this._getDateTimeFromElement(_258.last()); 
     1833return [this.dateMap[_25a.first().id],last]; 
     1834}else{ 
     1835var last=this._getDateTimeFromElement(_25a.last()); 
    18311836last.setMinutes(last.getMinutes()+30); 
    1832 return [this._getDateTimeFromElement(_258.first()),last]; 
     1837return [this._getDateTimeFromElement(_25a.first()),last]; 
    18331838} 
    18341839},setWidth:function(node){ 
    18351840Element.setStyle(node,{width:this.column.width+"px"}); 
    1836 },inspectArgument:function(_25b,time){ 
    1837 if(_25b.date){ 
    1838 return _25b
     1841},inspectArgument:function(_25d,time){ 
     1842if(_25d.date){ 
     1843return _25d
    18391844} 
    18401845var self=this; 
    1841 var _25e=this.calendar.getSelected(); 
    1842 var _25f=[]; 
    1843 this.calendar.recurrence(_25b,function(o){ 
    1844 var _261={}; 
     1846var _260=this.calendar.getSelected(); 
     1847var _261=[]; 
     1848this.calendar.recurrence(_25d,function(o){ 
     1849var _263={}; 
    18451850if(!o.date){ 
    1846 _261={date:self.getDate(_25e[0])}; 
     1851_263={date:self.getDate(_260[0])}; 
    18471852if(!o.start){ 
    1848 _261.start=_25e[0].time; 
     1853_263.start=_260[0].time; 
    18491854} 
    18501855if(!o.finish){ 
    1851 _261.finish=_25e[_25e.length-1].time; 
    1852 } 
    1853 } 
    1854 Object.extend(_261,o); 
    1855 _25f.push(_261); 
    1856 }); 
    1857 return _25f
     1856_263.finish=_260[_260.length-1].time; 
     1857} 
     1858} 
     1859Object.extend(_263,o); 
     1860_261.push(_263); 
     1861}); 
     1862return _261
    18581863},inspectDateArgument:function(date){ 
    18591864if(date){ 
    18601865return date; 
    18611866} 
    1862 var _263=this; 
    1863 var _264=this.getSelected(); 
    1864 if(_264.length==0){ 
     1867var _265=this; 
     1868var _266=this.getSelected(); 
     1869if(_266.length==0){ 
    18651870return null; 
    18661871} 
    1867 return _264.collect(function(d){ 
    1868 return _263.getDate(d); 
    1869 }); 
    1870 },addColumnClass:function(_266){ 
     1872return _266.collect(function(d){ 
     1873return _265.getDate(d); 
     1874}); 
     1875},addColumnClass:function(_268){ 
    18711876if(document.all){ 
    1872 this.calendar.css.addClassNames(_266,"columnWin"); 
    1873 }else{ 
    1874 this.calendar.css.addClassNames(_266,"column"); 
     1877this.calendar.css.addClassNames(_268,"columnWin"); 
     1878}else{ 
     1879this.calendar.css.addClassNames(_268,"column"); 
    18751880} 
    18761881},getHeaderId:function(){ 
     
    18781883},getColumnId:function(i){ 
    18791884return this.calendar.element.id.appendSuffix(CalendarWeek.id.column+"_"+i); 
    1880 },changeSchedule:function(_268,_269){ 
    1881 var _26a=_268.element; 
    1882 var _26b=_26a.schedule; 
    1883 var time=this.getTimeByElement(_26a); 
    1884 this.calendar.cacheSchedule(_26b); 
    1885 var _26d=$(this.getScheduleContainerId()); 
    1886 var _26e=Element.getDimensions(_26d); 
    1887 var _26f=Position.cumulativeOffset(_26d); 
    1888 var x=Event.pointerX(_269); 
    1889 var y=Event.pointerY(_269); 
    1890 var left=parseInt(Element.getStyle(_26a,"left")); 
    1891 var _273=Math.round(left/this.column.width); 
    1892 var date=this.week[_273]; 
    1893 if(_26b.start.year==date.getFullYear()&&_26b.start.month==date.getMonth()&&_26b.start.day==date.getDate()&&_26b.start.hour==time[0].hour&&_26b.start.min==time[0].min&&_26b.finish.year==date.getFullYear()&&_26b.finish.month==date.getMonth()&&_26b.finish.day==date.getDate()&&_26b.finish.hour==time[1].hour&&_26b.finish.min==time[1].min){ 
     1885},changeSchedule:function(_26a,_26b){ 
     1886var _26c=_26a.element; 
     1887var _26d=_26c.schedule; 
     1888var time=this.getTimeByElement(_26c); 
     1889this.calendar.cacheSchedule(_26d); 
     1890var _26f=$(this.getScheduleContainerId()); 
     1891var _270=Element.getDimensions(_26f); 
     1892var _271=Position.cumulativeOffset(_26f); 
     1893var x=Event.pointerX(_26b); 
     1894var y=Event.pointerY(_26b); 
     1895var left=parseInt(Element.getStyle(_26c,"left")); 
     1896var _275=Math.round(left/this.column.width); 
     1897var date=this.week[_275]; 
     1898if(_26d.start.year==date.getFullYear()&&_26d.start.month==date.getMonth()&&_26d.start.day==date.getDate()&&_26d.start.hour==time[0].hour&&_26d.start.min==time[0].min&&_26d.finish.year==date.getFullYear()&&_26d.finish.month==date.getMonth()&&_26d.finish.day==date.getDate()&&_26d.finish.hour==time[1].hour&&_26d.finish.min==time[1].min){ 
    18941899this.calendar.refreshSchedule(); 
    18951900return; 
    18961901} 
    1897 if(_26a.originalSchedule){ 
    1898 _26b=_26a.originalSchedule; 
    1899 
    1900 var _275={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:time[0].hour,min:time[0].min}; 
    1901 var diff=DateUtil.toDate(_275).getTime()-DateUtil.toDate(_26b.start).getTime(); 
    1902 _26b.start=_275; 
    1903 _26b.finish=new Date(DateUtil.toDate(_26b.finish).getTime()+diff).toHash(); 
     1902if(_26c.originalSchedule){ 
     1903_26d=_26c.originalSchedule; 
     1904
     1905var _277={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:time[0].hour,min:time[0].min}; 
     1906var _278=DateUtil.toDate(_277); 
     1907var _279=_26c.cellDate.days()-DateUtil.toDate(_26d.start).days(); 
     1908_278.setDate(_278.getDate()-_279); 
     1909var diff=_278.getTime()-DateUtil.toDate(_26d.start).getTime(); 
     1910_26d.start=_278.toHash(); 
     1911_26d.finish=new Date(DateUtil.toDate(_26d.finish).getTime()+diff).toHash(); 
    19041912this.calendar.refreshSchedule(); 
    1905 this.calendar.options.changeSchedule(_26b); 
    1906 },updateTirm:function(_277){ 
    1907 var _278=_277.schedule; 
    1908 var time=this.getTimeByElement(_277); 
    1909 this.calendar.cacheSchedule(_278); 
    1910 var left=parseInt(Element.getStyle(_277,"left")); 
    1911 var _27b=Math.floor(left/this.column.width); 
    1912 var date=this.week[_27b]; 
    1913 var _27d=this.isChengeSchedule(_277,time); 
    1914 if(_277.originalSchedule){ 
    1915 _278=_277.originalSchedule; 
    1916 } 
    1917 if(_27d.start){ 
    1918 _278.start.year=date.getFullYear(); 
    1919 _278.start.month=date.getMonth(); 
    1920 _278.start.day=date.getDate(); 
    1921 _278.start.hour=time[0].hour; 
    1922 _278.start.min=time[0].min; 
    1923 } 
    1924 if(_27d.finish){ 
    1925 _278.finish.year=date.getFullYear(); 
    1926 _278.finish.month=date.getMonth(); 
    1927 _278.finish.day=date.getDate(); 
    1928 _278.finish.hour=time[1].hour; 
    1929 _278.finish.min=time[1].min; 
     1913this.calendar.options.changeSchedule(_26d); 
     1914},updateTirm:function(_27b){ 
     1915var _27c=_27b.schedule; 
     1916var time=this.getTimeByElement(_27b); 
     1917this.calendar.cacheSchedule(_27c); 
     1918var left=parseInt(Element.getStyle(_27b,"left")); 
     1919var _27f=Math.floor(left/this.column.width); 
     1920var date=this.week[_27f]; 
     1921var _281=this.isChengeSchedule(_27b,time); 
     1922if(_27b.originalSchedule){ 
     1923_27c=_27b.originalSchedule; 
     1924} 
     1925if(_281.start){ 
     1926_27c.start.year=date.getFullYear(); 
     1927_27c.start.month=date.getMonth(); 
     1928_27c.start.day=date.getDate(); 
     1929_27c.start.hour=time[0].hour; 
     1930_27c.start.min=time[0].min; 
     1931} 
     1932if(_281.finish){ 
     1933_27c.finish.year=date.getFullYear(); 
     1934_27c.finish.month=date.getMonth(); 
     1935_27c.finish.day=date.getDate(); 
     1936_27c.finish.hour=time[1].hour; 
     1937_27c.finish.min=time[1].min; 
    19301938} 
    19311939this.calendar.refreshSchedule(); 
    1932 this.calendar.options.updateTirm(_278); 
    1933 },changeTimeDisplay:function(_27e){ 
    1934 var _27f=_27e.schedule; 
    1935 var time=this.getTimeByElement(_27e); 
    1936 var _281=Element.getElementsByClassName(_27e,Calendar.className.scheduleTimeArea)[0]; 
     1940this.calendar.options.updateTirm(_27c); 
     1941},changeTimeDisplay:function(_282){ 
     1942var _283=_282.schedule; 
     1943var time=this.getTimeByElement(_282); 
     1944var _285=Element.getElementsByClassName(_282,Calendar.className.scheduleTimeArea)[0]; 
    19371945var text=this.getTimeText(time[0],time[1]); 
    1938 _281.innerHTML=text; 
    1939 },findClickedElement:function(_283){ 
    1940 var _284=$(this.getScheduleContainerId()); 
    1941 var _285=Position.cumulativeOffset(_284); 
    1942 var _286=Position.realOffset(_284).last(); 
    1943 _286-=document.documentElement.scrollTop||document.body.scrollTop; 
    1944 var x=Event.pointerX(_283)-_285[0]; 
    1945 var y=Event.pointerY(_283)-_285[1]+_286
    1946 var _289=Math.floor(y/this.column.height); 
    1947 var _28a=Math.floor(x/this.column.width); 
     1946_285.innerHTML=text; 
     1947},findClickedElement:function(_287){ 
     1948var _288=$(this.getScheduleContainerId()); 
     1949var _289=Position.cumulativeOffset(_288); 
     1950var _28a=Position.realOffset(_288).last(); 
     1951_28a-=document.documentElement.scrollTop||document.body.scrollTop; 
     1952var x=Event.pointerX(_287)-_289[0]; 
     1953var y=Event.pointerY(_287)-_289[1]+_28a
     1954var _28d=Math.floor(y/this.column.height); 
     1955var _28e=Math.floor(x/this.column.width); 
    19481956var row=this.calendarTable.rows[0]; 
    1949 if(_28a>=row.cells.length){ 
    1950 _28a--; 
    1951 } 
    1952 return $(row.cells[_28a]).down(_289); 
    1953 },multipleSelection:function(_28c){ 
     1957if(_28e>=row.cells.length){ 
     1958_28e--; 
     1959} 
     1960return $(row.cells[_28e]).down(_28d); 
     1961},multipleSelection:function(_290){ 
    19541962if(!this.calendar.selectedBase||!this.calendar.mouseDown){ 
    19551963return; 
    19561964} 
    19571965var self=this; 
    1958 var _28e=this.calendar; 
    1959 var _28f=this.calendar.selectedBase; 
    1960 var _290=this._getDateFromElement(_28f).getDate(); 
    1961 this.abstractSelect(_28c,function(date,_292){ 
    1962 var _293=$(_28f.id); 
    1963 if(_290!=self._getDateFromElement(_292).getDate()){ 
     1966var _292=this.calendar; 
     1967var _293=this.calendar.selectedBase; 
     1968var _294=this._getDateFromElement(_293).getDate(); 
     1969this.abstractSelect(_290,function(date,_296){ 
     1970var _297=$(_293.id); 
     1971if(_294!=self._getDateFromElement(_296).getDate()){ 
    19641972return; 
    19651973} 
    1966 var _294=$A(_293.parentNode.childNodes); 
    1967 var ids=[this._getTime(_28f),this._getTime(_292)]; 
     1974var _298=$A(_297.parentNode.childNodes); 
     1975var ids=[this._getTime(_293),this._getTime(_296)]; 
    19681976ids.sort(function(a,b){ 
    19691977return a-b; 
    19701978}); 
    1971 _294.each(function(n){ 
     1979_298.each(function(n){ 
    19721980if(!n.id){ 
    19731981throw $continue; 
     
    19751983var id=this._getTime(n); 
    19761984if((id<ids[0])||(ids[1]<id)){ 
    1977 _28e.removeSelectedClass(n); 
     1985_292.removeSelectedClass(n); 
    19781986}else{ 
    19791987if(!Element.hasClassName(n,Calendar.className.selected)){ 
    1980 _28e.addSelectedClass(n); 
     1988_292.addSelectedClass(n); 
    19811989} 
    19821990} 
    19831991}.bind(this)); 
    19841992}.bind(this)); 
    1985 },getTimeByElement:function(_29a){ 
    1986 var _29b=_29a.schedule; 
    1987 var top=parseInt(Element.getStyle(_29a,"top"),10); 
    1988 var _29d=parseInt(Element.getStyle(_29a,"height"),10); 
    1989 var _29e=this.column.height*2; 
    1990 var _29f=15/60; 
    1991 var _2a0=top/_29e+this.startTime; 
    1992 _2a0=Math.round(_2a0/_29f)*_29f
    1993 var _2a1={}; 
    1994 _2a1.hour=Math.floor(_2a0); 
    1995 _2a1.min=(_2a0-_2a1.hour)*60; 
    1996 var _2a2=Math.round(_29d/_29e/_29f)*_29f+_2a0
    1997 var _2a3={}; 
    1998 _2a3.hour=Math.floor(_2a2); 
    1999 _2a3.min=Math.round((_2a2-_2a3.hour)*60); 
    2000 if(_2a3.min==60){ 
    2001 _2a3.hour+=1; 
    2002 _2a3.min=0; 
    2003 } 
    2004 return [_2a1,_2a3]; 
     1993},getTimeByElement:function(_29e){ 
     1994var _29f=_29e.schedule; 
     1995var top=parseInt(Element.getStyle(_29e,"top"),10); 
     1996var _2a1=parseInt(Element.getStyle(_29e,"height"),10); 
     1997var _2a2=this.column.height*2; 
     1998var _2a3=15/60; 
     1999var _2a4=top/_2a2+this.startTime; 
     2000_2a4=Math.round(_2a4/_2a3)*_2a3
     2001var _2a5={}; 
     2002_2a5.hour=Math.floor(_2a4); 
     2003_2a5.min=(_2a4-_2a5.hour)*60; 
     2004var _2a6=Math.round(_2a1/_2a2/_2a3)*_2a3+_2a4
     2005var _2a7={}; 
     2006_2a7.hour=Math.floor(_2a6); 
     2007_2a7.min=Math.round((_2a6-_2a7.hour)*60); 
     2008if(_2a7.min==60){ 
     2009_2a7.hour+=1; 
     2010_2a7.min=0; 
     2011} 
     2012return [_2a5,_2a7]; 
    20052013},getTimeByTop:function(top){ 
    2006 var _2a5=this.column.height*2; 
    2007 var _2a6=15/60; 
    2008 var _2a7=top/_2a5+this.startTime; 
    2009 _2a7=Math.round(_2a7/_2a6)*_2a6
    2010 var _2a8={}; 
    2011 _2a8.hour=Math.floor(_2a7); 
    2012 _2a8.min=(_2a7-_2a8.hour)*60; 
    2013 return _2a8
    2014 },getDateId:function(date,time,_2ab){ 
    2015 var id=this.calendar.element.id.appendSuffix(_2ab+"_"+date.getDate()); 
     2014var _2a9=this.column.height*2; 
     2015var _2aa=15/60; 
     2016var _2ab=top/_2a9+this.startTime; 
     2017_2ab=Math.round(_2ab/_2aa)*_2aa
     2018var _2ac={}; 
     2019_2ac.hour=Math.floor(_2ab); 
     2020_2ac.min=(_2ab-_2ac.hour)*60; 
     2021return _2ac
     2022},getDateId:function(date,time,_2af){ 
     2023var id=this.calendar.element.id.appendSuffix(_2af+"_"+date.getDate()); 
    20162024return id.appendSuffix(time*10); 
    20172025},dateIdToTime:function(id){ 
     
    20252033time.pop(); 
    20262034return time.join(":"); 
    2027 },includeDisplayTime:function(_2b1){ 
    2028 return (this.startTime<=_2b1)&&(_2b1<this.finishTime); 
    2029 },convertHours:function(_2b2){ 
    2030 return [_2b2.start.hour+_2b2.start.min/60,_2b2.finish.hour+_2b2.finish.min/60]; 
     2035},includeDisplayTime:function(_2b5){ 
     2036return (this.startTime<=_2b5)&&(_2b5<this.finishTime); 
     2037},convertHours:function(_2b6){ 
     2038return [_2b6.start.hour+_2b6.start.min/60,_2b6.finish.hour+_2b6.finish.min/60]; 
    20312039},setDisplayTime:function(){ 
    20322040this.startTime=this.calendar.options.displayTime.first().hour; 
    2033 var _2b3=this.calendar.options.displayTime.last(); 
    2034 this.finishTime=Math.ceil(_2b3.hour+_2b3.min/60); 
    2035 },getTimeText:function(_2b4,_2b5){ 
    2036 var _2b6=this.calendar; 
    2037 return _2b6.formatTime(_2b4)+" - "+_2b6.formatTime(_2b5); 
    2038 },isChengeSchedule:function(_2b7,_2b8){ 
    2039 var _2b9=_2b7.schedule; 
    2040 var _2ba=((_2b9.start.hour!=_2b8[0].hour)||(_2b9.start.min!=_2b8[0].min)); 
    2041 var _2bb=((_2b9.finish.hour!=_2b8[1].hour)||(_2b9.finish.min!=_2b8[1].min)); 
    2042 if(_2b7.originalSchedule){ 
    2043 if(_2ba&&_2bb){ 
    2044 var _2bc=DateUtil.toDate(_2b9.start).getTime(); 
    2045 var _2bd=DateUtil.toDate(_2b7.originalSchedule.start).getTime(); 
    2046 if(_2bc==_2bd){ 
    2047 _2bb=false; 
    2048 }else{ 
    2049 _2ba=false; 
    2050 } 
    2051 } 
    2052 } 
    2053 return {start:_2ba,finish:_2bb}; 
    2054 },_getDateFromElement:function(_2be){ 
    2055 var arr=_2be.id.split("_"); 
    2056 var _2c0=arr[arr.length-3]; 
    2057 return this.week[_2c0]; 
    2058 },_getDateTimeFromElement:function(_2c1){ 
    2059 var id=_2c1.id.split("_"); 
    2060 var _2c3=id[id.length-3]; 
    2061 if(this.week[_2c3]){ 
    2062 var date=new Date(this.week[_2c3].getTime()); 
     2041var _2b7=this.calendar.options.displayTime.last(); 
     2042this.finishTime=Math.ceil(_2b7.hour+_2b7.min/60); 
     2043},getTimeText:function(_2b8,_2b9){ 
     2044var _2ba=this.calendar; 
     2045return _2ba.formatTime(_2b8)+" - "+_2ba.formatTime(_2b9); 
     2046},isChengeSchedule:function(_2bb,_2bc){ 
     2047var _2bd=_2bb.schedule; 
     2048var _2be=((_2bd.start.hour!=_2bc[0].hour)||(_2bd.start.min!=_2bc[0].min)); 
     2049var _2bf=((_2bd.finish.hour!=_2bc[1].hour)|