Changeset 5827

Show
Ignore:
Timestamp:
07/02/08 10:49:47 (2 months ago)
Author:
kinoshita
Message:

5041

Files:

Legend:

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

    r5826 r5827  
    554554AbstractCalendar.id={container:"container",scheduleContainer:"scheduleContainer",selector:"selector",tooltip:"tooltip"}; 
    555555AbstractCalendar.prototype={destroy:Prototype.emptyFunction,beforeBuild:Prototype.emptyFunction,build:function(){ 
    556 return "<div id='"+this.getContainerId()+"' class='"+this.calendar.classNames.container+"'>"+this.buildHeader()+this.buildCalendar()+"<div id=\""+this.getTooltipId+"\" class=\"calendar_tooltip\" style=\"display: none;\"></div>"+"</div>"; 
     556return "<div id='"+this.getContainerId()+"' class='"+this.calendar.classNames.container+"'>"+this.buildHeader()+this.buildCalendar()+"<div id=\""+this.getTooltipId()+"\" class=\"calendar_tooltip\" style=\"display: none;\"></div>"+"</div>"; 
    557557},buildHeader:function(){ 
    558558var _96=this.calendar.options.noEvent; 
     
    11851185Event.observe(_173,"mouseout",this.hideTooltip.bindAsEventListener(this)); 
    11861186} 
     1187if(item.visible()){ 
    11871188if(!_163&&((_159.edit==undefined)||_159.edit)){ 
    11881189this.setDraggable(item,_171.last(),_15b); 
     
    11921193this.scheduleNodes.push(item); 
    11931194break; 
     1195}else{ 
     1196item.remove(); 
     1197_16b--; 
     1198} 
    11941199}else{ 
    11951200if(_161.include(_16d.getDay())){ 
     
    14561461_1d1.finish.month=_1de.getMonth(); 
    14571462_1d1.finish.day=_1de.getDate(); 
     1463var arr=this.calendar.options.schedules; 
     1464var idx=arr.indexOf(_1d1); 
     1465arr.remove(idx); 
     1466var _1e1=DateUtil.toDate(_1d1.start); 
     1467arr.each(function(s,i){ 
     1468idx=i; 
     1469if(_1e1<DateUtil.toDate(s.start)){ 
     1470throw $break; 
     1471} 
     1472}); 
     1473arr.insert(idx,_1d1); 
    14581474this.calendar.refreshSchedule(); 
    14591475this.calendar.options.changeSchedule(_1d1); 
     
    14611477this.calendar.refreshSchedule(); 
    14621478} 
    1463 },updateTirm:function(_1df){ 
    1464 var _1e0=_1df.schedule; 
    1465 var _1e1=parseInt(Element.getStyle(_1df,"width")); 
    1466 var top=parseInt(Element.getStyle(_1df,"top")); 
    1467 var left=parseInt(Element.getStyle(_1df,"left")); 
    1468 var _1e4=Math.round((left+_1e1)/this.column.width)-1; 
    1469 var _1e5=Math.round(top/this.column.height); 
    1470 var cell=this.findCell(_1e5,_1e4); 
    1471 var _1e7=_1e0.finish; 
    1472 var _1e8=null; 
     1479},updateTirm:function(_1e4){ 
     1480var _1e5=_1e4.schedule; 
     1481var _1e6=parseInt(Element.getStyle(_1e4,"width")); 
     1482var top=parseInt(Element.getStyle(_1e4,"top")); 
     1483var left=parseInt(Element.getStyle(_1e4,"left")); 
     1484var _1e9=Math.round((left+_1e6)/this.column.width)-1; 
     1485var _1ea=Math.round(top/this.column.height); 
     1486var cell=this.findCell(_1ea,_1e9); 
     1487var _1ec=_1e5.finish; 
     1488var _1ed=null; 
    14731489if(this.dateMap){ 
    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; 
    1482 if(DateUtil.toDate(_1e0.start).getTime()>=DateUtil.toDate(_1e8).getTime()){ 
    1483 var _1e9=23; 
    1484 var _1ea=55; 
    1485 if(_1e0.start.hour==_1e9&&_1e0.start.min==_1ea){ 
     1490_1ed=this.dateMap[cell.id].toHash(); 
     1491}else{ 
     1492_1ed=new Date(this.calendar.date.getTime()); 
     1493_1ed.setDate(parseInt(cell.id.getSuffix(),10)); 
     1494_1ed=_1ed.toHash(); 
     1495} 
     1496_1ed.hour=_1ec.hour; 
     1497_1ed.min=_1ec.min; 
     1498if(DateUtil.toDate(_1e5.start).getTime()>=DateUtil.toDate(_1ed).getTime()){ 
     1499var _1ee=23; 
     1500var _1ef=55; 
     1501if(_1e5.start.hour==_1ee&&_1e5.start.min==_1ef){ 
    14861502this.calendar.refreshSchedule(); 
    1487 if(!((_1e8.year==_1e7.year)&&(_1e8.month==_1e7.month)&&(_1e8.day==_1e7.day))){ 
     1503if(!((_1ed.year==_1ec.year)&&(_1ed.month==_1ec.month)&&(_1ed.day==_1ec.day))){ 
    14881504this.calendar.options.updateTirm(); 
    14891505} 
    14901506return; 
    14911507}else{ 
    1492 _1e8.hour=_1e9
    1493 _1e8.min=_1ea
    1494 } 
    1495 } 
    1496 _1e0.finish=_1e8
     1508_1ed.hour=_1ee
     1509_1ed.min=_1ef
     1510} 
     1511} 
     1512_1e5.finish=_1ed
    14971513this.calendar.refreshSchedule(); 
    1498 if(!((_1e8.year==_1e7.year)&&(_1e8.month==_1e7.month)&&(_1e8.day==_1e7.day))){ 
    1499 this.calendar.options.updateTirm(_1e0); 
    1500 } 
    1501 },getTimeText:function(_1eb,_1ec){ 
    1502 var _1ed=this.calendar; 
    1503 return _1ed.formatTime(_1eb); 
    1504 },getDayDiff:function(_1ee){ 
    1505 return DateUtil.numberOfDays(this.toDate(_1ee.start),this.toDate(_1ee.finish)); 
     1514if(!((_1ed.year==_1ec.year)&&(_1ed.month==_1ec.month)&&(_1ed.day==_1ec.day))){ 
     1515this.calendar.options.updateTirm(_1e5); 
     1516} 
     1517},getTimeText:function(_1f0,_1f1){ 
     1518var _1f2=this.calendar; 
     1519return _1f2.formatTime(_1f0); 
     1520},getDayDiff:function(_1f3){ 
     1521return DateUtil.numberOfDays(this.toDate(_1f3.start),this.toDate(_1f3.finish)); 
    15061522}}); 
    15071523var CalendarWeek=Class.create(); 
    15081524CalendarWeek.id=["calTable","columnContainer","columnHeader","column","next","pre","headerText"]; 
    15091525Object.extend(CalendarWeek.prototype,AbstractCalendar.prototype); 
    1510 Object.extend(CalendarWeek.prototype,{initialize:function(_1ef){ 
    1511 this.calendar=_1ef
    1512 var _1f0=this.getWeek(); 
    1513 this.week=_1f0[0]; 
    1514 this.invisibleWeek=_1f0[1]; 
     1526Object.extend(CalendarWeek.prototype,{initialize:function(_1f4){ 
     1527this.calendar=_1f4
     1528var _1f5=this.getWeek(); 
     1529this.week=_1f5[0]; 
     1530this.invisibleWeek=_1f5[1]; 
    15151531this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarWeek.id); 
    15161532this.setDisplayTime(); 
     
    15181534return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.pre+"' class='"+this.calendar.classNames.preWeekMark+"'></div>"+"</td>"; 
    15191535},buildHeaderCenter:function(){ 
    1520 var _1f1=[]; 
     1536var _1f6=[]; 
    15211537if(this.calendar.options.weekHeaderFormat){ 
    1522 _1f1=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
    1523 } 
    1524 return "<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>"; 
     1538_1f6=[this.formatHeaderDate(this.week.first()),"-",this.formatHeaderDate(this.week.last())]; 
     1539} 
     1540return "<td class='"+this.calendar.classNames.years+"'>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1f6[0]||this.week[0].toDateString())+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1f6[1]||"-")+"</span>"+"<span class='"+this.calendar.classNames.ym+"'>"+(_1f6[2]||this.week.last().toDateString())+"</span>"+"</td>"; 
    15251541},formatHeaderDate:function(date){ 
    15261542if(this.calendar.options.weekHeaderFormat){ 
     
    15311547return "<td class='"+this.calendar.classNames.nextYears+"' align='right'>"+"<div id='"+this.ids.next+"' class='"+this.calendar.classNames.nextWeekMark+"'></div>"+"</td>"; 
    15321548},buildCalendar:function(){ 
    1533 var _1f3=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
    1534 _1f3+=this.buildCalendarContainer(); 
    1535 return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1f3+"</tr>"+"</table>"; 
     1549var _1f8=(this.calendar.options.displayTimeLine)?this.buildTimeLine():""; 
     1550_1f8+=this.buildCalendarContainer(); 
     1551return "<table id='"+this.ids.columnContainer+"' class='"+this.calendar.classNames.weekTable+"'>"+"<tr>"+_1f8+"</tr>"+"</table>"; 
    15361552},buildTimeLine:function(){ 
    15371553var time=new Date(); 
    1538 var hour=0,_1f6=24; 
     1554var hour=0,_1fb=24; 
    15391555time.setHours(hour); 
    15401556time.setMinutes(0); 
    1541 var _1f7=this.buildTimeLineTop(); 
     1557var _1fc=this.buildTimeLineTop(); 
    15421558var now=new Date().getHours(); 
    1543 while(hour<_1f6){ 
     1559while(hour<_1fb){ 
    15441560if(this.includeDisplayTime(hour)){ 
    1545 var _1f9="pointer: default;"; 
    1546 if(_1f7.length==0){ 
    1547 _1f9+="border-top: none;"; 
    1548 } 
    1549 var _1fa=this.calendar.classNames.timeLineTime; 
     1561var _1fe="pointer: default;"; 
     1562if(_1fc.length==0){ 
     1563_1fe+="border-top: none;"; 
     1564} 
     1565var _1ff=this.calendar.classNames.timeLineTime; 
    15501566if(hour==now){ 
    1551 _1fa+=" "+this.calendar.classNames.highlightTime; 
    1552 } 
    1553 _1f7+="<div class='"+_1fa+"' style='"+_1f9+"'>"+this.formatTime(time)+"</div>"; 
     1567_1ff+=" "+this.calendar.classNames.highlightTime; 
     1568} 
     1569_1fc+="<div class='"+_1ff+"' style='"+_1fe+"'>"+this.formatTime(time)+"</div>"; 
    15541570} 
    15551571hour++; 
    15561572time.setHours(hour); 
    15571573} 
    1558 return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1f7+"</td>"; 
     1574return "<td class='"+this.calendar.classNames.timeLine+"'>"+_1fc+"</td>"; 
    15591575},buildTimeLineTop:function(){ 
    15601576return "<div class='"+this.calendar.classNames.timeLineTimeTop+"'></div>"; 
     
    15621578return "<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+this.buildCalendarHeader()+this.buildCalendarMain()+"</table>"+"</td>"; 
    15631579},buildCalendarHeader:function(){ 
    1564 var _1fb=this.calendar.options.displayIndexes; 
     1580var _200=this.calendar.options.displayIndexes; 
    15651581var ths=""; 
    1566 var _1fd=new Date().days(); 
    1567 var _1fe=100/_1fb.length+"%"; 
    1568 var _1ff=this.calendar.element.id.appendSuffix(this.ids.column); 
    1569 var _200=this.calendar.element.id.appendSuffix(this.ids.headerText); 
     1582var _202=new Date().days(); 
     1583var _203=100/_200.length+"%"; 
     1584var _204=this.calendar.element.id.appendSuffix(this.ids.column); 
     1585var _205=this.calendar.element.id.appendSuffix(this.ids.headerText); 
    15701586this.headers=[]; 
    1571 var _201=this.calendar.options.noEvent; 
    1572 var _202=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
    1573 this.week.each(function(w,_204){ 
     1587var _206=this.calendar.options.noEvent; 
     1588var _207=(this.calendar.options.weekSubHeaderFormat)?new Template(this.calendar.options.weekSubHeaderFormat):null; 
     1589this.week.each(function(w,_209){ 
    15741590var text=null; 
    1575 if(_202){ 
    1576 text=_202.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
     1591if(_207){ 
     1592text=_207.evaluate({month:w.getMonth().succ(),day:w.getDate(),wday:this.calendar.options.dayOfWeek[w.getDay()]}); 
    15771593}else{ 
    15781594text=w.toDateString().split(" "); 
     
    15801596text=text.join(" "); 
    15811597} 
    1582 var _206=(w.days()==_1fd)?this.calendar.classNames.highlightDay:""; 
    1583 var _207=_200.appendSuffix(_204); 
     1598var _20b=(w.days()==_202)?this.calendar.classNames.highlightDay:""; 
     1599var _20c=_205.appendSuffix(_209); 
    15841600var node="<div class='"+this.calendar.classNames.headerColumn+"'>"; 
    1585 if(_201){ 
    1586 node+="<span='#' id='"+_207+"' class='"+_206+"' style='cursor: default;'>"+text+"</a>"; 
    1587 }else{ 
    1588 node+="<a href='#' id='"+_207+"' class='"+_206+"'>"+text+"</a>"; 
     1601if(_206){ 
     1602node+="<span='#' id='"+_20c+"' class='"+_20b+"' style='cursor: default;'>"+text+"</a>"; 
     1603}else{ 
     1604node+="<a href='#' id='"+_20c+"' class='"+_20b+"'>"+text+"</a>"; 
    15891605} 
    15901606node+="</div>"; 
    1591 this.headers.push({id:_207,wday:w}); 
    1592 ths+="<th id='"+_1ff.appendSuffix(_204)+"' width='"+_1fe+"'>"+node+"</th>"; 
     1607this.headers.push({id:_20c,wday:w}); 
     1608ths+="<th id='"+_204.appendSuffix(_209)+"' width='"+_203+"'>"+node+"</th>"; 
    15931609}.bind(this)); 
    15941610return "<tr>"+"<td>"+"<table class='"+this.calendar.classNames.weekMainTable+"'>"+"<tr>"+ths+"</tr>"+"</table>"+"</td>"+"</tr>"; 
    15951611},buildCalendarMain:function(){ 
    1596 var _209=this.calendar.options.displayIndexes; 
     1612var _20e=this.calendar.options.displayIndexes; 
    15971613var tds=""; 
    1598 var _20b=100/_209.length+"%"; 
     1614var _210=100/_20e.length+"%"; 
    15991615this.dateMap={}; 
    1600 this.week.each(function(w,_20d){ 
    1601 var _20e=this.calendar.options.schedules[w.toDateString()]; 
    1602 var _20f=""; 
     1616this.week.each(function(w,_212){ 
     1617var _213=this.calendar.options.schedules[w.toDateString()]; 
     1618var _214=""; 
    16031619var i=0,j=0; 
    16041620while(i<24){ 
    16051621if(this.includeDisplayTime(i)){ 
    1606 var _212=""; 
    1607 if(_20f.length==0){ 
    1608 _212=this.calendar.classNames.columnTopDate; 
     1622var _217=""; 
     1623if(_214.length==0){ 
     1624_217=this.calendar.classNames.columnTopDate; 
    16091625}else{ 
    16101626if(i%1==0){ 
    1611 _212=this.calendar.classNames.columnDate; 
    1612 }else{ 
    1613 _212=this.calendar.classNames.columnDateOdd; 
    1614 } 
    1615 } 
    1616 var id=this.getDateId(w,i,_20d); 
     1627_217=this.calendar.classNames.columnDate; 
     1628}else{ 
     1629_217=this.calendar.classNames.columnDateOdd; 
     1630} 
     1631} 
     1632var id=this.getDateId(w,i,_212); 
    16171633var hour=i/1; 
    16181634var min=i%1*60; 
    16191635this.dateMap[id]=new Date(w.getFullYear(),w.getMonth(),w.getDate(),hour,min,0); 
    1620 _20f+="<div id='"+id+"' class='"+_212+"'></div>"; 
     1636_214+="<div id='"+id+"' class='"+_217+"'></div>"; 
    16211637} 
    16221638i+=0.5; 
    16231639} 
    1624 tds+="<td width='"+_20b+"'>"+_20f+"</td>"; 
     1640tds+="<td width='"+_210+"'>"+_214+"</td>"; 
    16251641}.bind(this)); 
    16261642return "<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>"; 
     
    16301646var rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.columnDate); 
    16311647this.column.height=parseInt(rule.style["height"],10)+1; 
    1632 },buildSchedule:function(_218){ 
    1633 var id="scheduleItem_"+_218.id; 
    1634 var _21a=(_218.edit==undefined||_218.edit); 
     1648},buildSchedule:function(_21d){ 
     1649var id="scheduleItem_"+_21d.id; 
     1650var _21f=(_21d.edit==undefined||_21d.edit); 
    16351651var item=Builder.node("DIV",{id:id}); 
    16361652this.calendar.css.addClassNames(item,"scheduleItemLarge"); 
    1637 var _21c=this.calendar.options.noEvent; 
    1638 var term=DateUtil.toDate(_218.finish).minutes()-DateUtil.toDate(_218.start).minutes(); 
    1639 var _21e={}; 
    1640 if(_218.background_color){ 
    1641 _21e.backgroundColor=_218.background_color; 
    1642 } 
    1643 if(_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; 
     1653var _221=this.calendar.options.noEvent; 
     1654var term=DateUtil.toDate(_21d.finish).minutes()-DateUtil.toDate(_21d.start).minutes(); 
     1655var _223={}; 
     1656if(_21d.background_color){ 
     1657_223.backgroundColor=_21d.background_color; 
     1658} 
     1659if(_21d.frame_color){ 
     1660_223.borderTop="2px solid "+_21d.frame_color; 
     1661_223.borderLeft="1px solid "+_21d.frame_color; 
     1662_223.borderRight="1px solid "+_21d.frame_color; 
     1663_223.borderBottom="2px solid "+_21d.frame_color; 
    16481664if(term<=30){ 
    1649 _21e.backgroundColor=_218.frame_color; 
    1650 } 
    1651 } 
    1652 if(_21c){ 
    1653 _21e.cursor="default"; 
    1654 } 
    1655 Element.setStyle(item,_21e); 
    1656 var _21f=[]; 
    1657 if(_21a){ 
    1658 var _220=Builder.node("DIV",{id:"scheduleDeleteImg_"+_218.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
    1659 _21f.push(_220); 
    1660 item.appendChild(_220); 
    1661 if(!_21c){ 
    1662 Event.observe(_220,"click",this.clickDeleteImage.bind(this,_218)); 
    1663 } 
    1664 } 
    1665 if(!_21c&&this.calendar.options.dblclickSchedule){ 
    1666 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_218)); 
     1665_223.backgroundColor=_21d.frame_color; 
     1666} 
     1667} 
     1668if(_221){ 
     1669_223.cursor="default"; 
     1670} 
     1671Element.setStyle(item,_223); 
     1672var _224=[]; 
     1673if(_21f){ 
     1674var _225=Builder.node("DIV",{id:"scheduleDeleteImg_"+_21d.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 
     1675_224.push(_225); 
     1676item.appendChild(_225); 
     1677if(!_221){ 
     1678Event.observe(_225,"click",this.clickDeleteImage.bind(this,_21d)); 
     1679} 
     1680} 
     1681if(!_221&&this.calendar.options.dblclickSchedule){ 
     1682Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_21d)); 
    16671683} 
    16681684var icon=null; 
    1669 if(_218.icon){ 
    1670 icon=Builder.node("IMG",{src:_218.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
     1685if(_21d.icon){ 
     1686icon=Builder.node("IMG",{src:_21d.icon,alt:"icon",style:"float: left;",width:16,height:16}); 
    16711687}else{ 
    16721688if(Calendar.defaultIconPath){ 
     
    16741690} 
    16751691} 
    1676 var _222=null; 
    1677 if(!_218.publicity){ 
     1692var _227=null; 
     1693if(!_21d.publicity){ 
    16781694if(Calendar.privateImgPath){ 
    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}); 
    1680 item.appendChild(_222); 
    1681 }else{ 
    1682 _222=Builder.node("DIV",{id:"private_img_"+_218.id}); 
    1683 this.calendar.css.addClassNames(_222,"privateImg"); 
    1684 item.appendChild(_222); 
    1685 } 
    1686 } 
    1687 if(!_21c&&(_21f.length>0)){ 
    1688 Event.observe(item,"mouseover",this.showImage.bind(this,_21f,_222)); 
    1689 Event.observe(item,"mouseout",this.hideImage.bind(this,_21f,_222)); 
    1690 } 
    1691 var text=this.getTimeText(_218.start,_218.finish); 
    1692 var _224=_218.description.unescapeHTML(); 
    1693 var _225={id:id+"_text"}; 
    1694 if(_218.frame_color){ 
    1695 _225.style="background-color:"+_218.frame_color+";"; 
    1696 } 
    1697 if(!_21c&&_21a){ 
    1698 _225.style+="cursor: move;"; 
     1695_227=Builder.node("IMG",{id:"private_img_"+_21d.id,src:Calendar.privateImgPath,alt:"private",style:"position: absolute; right: 0px; display: block;",width:16,height:16}); 
     1696item.appendChild(_227); 
     1697}else{ 
     1698_227=Builder.node("DIV",{id:"private_img_"+_21d.id}); 
     1699this.calendar.css.addClassNames(_227,"privateImg"); 
     1700item.appendChild(_227); 
     1701} 
     1702} 
     1703if(!_221&&(_224.length>0)){ 
     1704Event.observe(item,"mouseover",this.showImage.bind(this,_224,_227)); 
     1705Event.observe(item,"mouseout",this.hideImage.bind(this,_224,_227)); 
     1706} 
     1707var text=this.getTimeText(_21d.start,_21d.finish); 
     1708var _229=_21d.description.unescapeHTML(); 
     1709var _22a={id:id+"_text"}; 
     1710if(_21d.frame_color){ 
     1711_22a.style="background-color:"+_21d.frame_color+";"; 
     1712} 
     1713if(!_221&&_21f){ 
     1714_22a.style+="cursor: move;"; 
    16991715} 
    17001716if(term<=15){ 
    1701 var _226=this.calendar.formatTime(_218.start); 
    1702 _225.style+="line-height: 12px;"; 
     1717var _22b=this.calendar.formatTime(_21d.start); 
     1718_22a.style+="line-height: 12px;"; 
    17031719if(UserAgent.isFF()){ 
    1704 _225.style+="white-space: nowrap;"; 
    1705 } 
    1706 var _227=Builder.node("DIV",_225,[icon,_226+" "+_224]); 
    1707 this.calendar.css.addClassNames(_227,"scheduleTimeArea"); 
    1708 item.appendChild(_227); 
     1720_22a.style+="white-space: nowrap;"; 
     1721} 
     1722var _22c=Builder.node("DIV",_22a,[icon,_22b+" "+_229]); 
     1723this.calendar.css.addClassNames(_22c,"scheduleTimeArea"); 
     1724item.appendChild(_22c); 
    17091725}else{ 
    17101726if(term<=30){ 
    1711 var _226=this.calendar.formatTime(_218.start); 
     1727var _22b=this.calendar.formatTime(_21d.start); 
    17121728if(UserAgent.isIE()){ 
    1713 _225.style+="line-height: 20px;"; 
    1714 }else{ 
    1715 _225.style+="line-height: 18px; white-space: nowrap;"; 
    1716 } 
    1717 var _227=Builder.node("DIV",_225,[icon,_226+" "+_224]); 
    1718 this.calendar.css.addClassNames(_227,"scheduleTimeArea"); 
    1719 item.appendChild(_227); 
    1720 }else{ 
    1721 _225.style+="line-height: 18px;"; 
    1722 var _227=Builder.node("DIV",_225,[icon,text]); 
    1723 this.calendar.css.addClassNames(_227,"scheduleTimeArea"); 
    1724 item.appendChild(_227); 
    1725 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_224])); 
    1726 } 
    1727 } 
    1728 item.title=text.replace(/ /g,"")+" "+_224
    1729 item.schedule=_218
    1730 return [item,_227]; 
    1731 },adjustScheduleStyle:function(item,_229,_22a){ 
    1732 var _22b=item.schedule; 
    1733 var time=this.convertHours(_22b); 
    1734 var _22d=time[0]; 
    1735 var _22e=time[1]; 
     1729_22a.style+="line-height: 20px;"; 
     1730}else{ 
     1731_22a.style+="line-height: 18px; white-space: nowrap;"; 
     1732} 
     1733var _22c=Builder.node("DIV",_22a,[icon,_22b+" "+_229]); 
     1734this.calendar.css.addClassNames(_22c,"scheduleTimeArea"); 
     1735item.appendChild(_22c); 
     1736}else{ 
     1737_22a.style+="line-height: 18px;"; 
     1738var _22c=Builder.node("DIV",_22a,[icon,text]); 
     1739this.calendar.css.addClassNames(_22c,"scheduleTimeArea"); 
     1740item.appendChild(_22c); 
     1741item.appendChild(Builder.node("DIV",{id:id+"_description"},[_229])); 
     1742} 
     1743} 
     1744item.title=text.replace(/ /g,"")+" "+_229
     1745item.schedule=_21d
     1746return [item,_22c]; 
     1747},adjustScheduleStyle:function(item,_22e,_22f){ 
     1748var _230=item.schedule; 
     1749var time=this.convertHours(_230); 
     1750var _232=time[0]; 
     1751var _233=time[1]; 
    17361752var same=[]; 
    17371753var self=this; 
    1738 _22a.each(function(h){ 
    1739 var _232=self.convertHours(h.schedule); 
    1740 var _233=_232[0]; 
    1741 var _234=_232[1]; 
    1742 if(((_233<=_22d)&&(_234>_22d))||((_233<_22e)&&(_234>=_22e))||((_22d<=_233)&&(_22e>_233))||((_22d<_234)&&(_22e>=_234))){ 
     1754_22f.each(function(h){ 
     1755var _237=self.convertHours(h.schedule); 
     1756var _238=_237[0]; 
     1757var _239=_237[1]; 
     1758if(((_238<=_232)&&(_239>_232))||((_238<_233)&&(_239>=_233))||((_232<=_238)&&(_233>_238))||((_232<_239)&&(_233>=_239))){ 
    17431759same.push(h); 
    17441760} 
    17451761}); 
    1746 var _235=_229*this.getAdjustSize(); 
     1762var _23a=_22e*this.getAdjustSize(); 
    17471763if(UserAgent.isIE()||this.calendar.options.noEvent){ 
    1748 _235+=1; 
    1749 } 
    1750 var left=this.column.width*_229+_235
     1764_23a+=1; 
     1765} 
     1766var left=this.column.width*_22e+_23a
    17511767if(same.length==0){ 
    17521768Element.setStyle(item,{left:left+"px"}); 
    17531769}else{ 
    17541770same.push(item); 
    1755 var _237=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
     1771var _23c=parseInt(Element.getStyle(item,"width"),10)/(same.length)-(UserAgent.isIE()?1:2)+1; 
    17561772same.each(function(s,i){ 
    1757 var _23a=left+_237*i+(2*i); 
    1758 Element.setStyle(s,{width:_237+"px",left:_23a+"px"}); 
     1773var _23f=left+_23c*i+(2*i); 
     1774Element.setStyle(s,{width:_23c+"px",left:_23f+"px"}); 
    17591775}); 
    17601776} 
    17611777return left; 
    17621778},setScheduleBaseStyle:function(item){ 
    1763 var _23c=item.schedule; 
    1764 if(!this.calendar.isSameDate(_23c.start,_23c.finish)){ 
    1765 _23c.finish.hour=24; 
    1766 _23c.finish.min=0; 
    1767 } 
    1768 var time=this.convertHours(_23c); 
    1769 var _23e=time.first(); 
    1770 var _23f=time.last(); 
    1771 var _240=this.column.height*2; 
    1772 var diff=this.calendar.getTimeDiff(_23c.start,_23c.finish); 
     1779var _241=item.schedule; 
     1780if(!this.calendar.isSameDate(_241.start,_241.finish)){ 
     1781_241.finish.hour=24; 
     1782_241.finish.min=0; 
     1783} 
     1784var time=this.convertHours(_241); 
     1785var _243=time.first(); 
     1786var _244=time.last(); 
     1787var _245=this.column.height*2; 
     1788var diff=this.calendar.getTimeDiff(_241.start,_241.finish); 
    17731789var rate=(diff.hour+(diff.min/60))||1; 
    17741790var over=0; 
    17751791var top=0; 
    1776 var _245=0; 
    1777 var _246=this.includeDisplayTime(_23e); 
    1778 var _247=this.includeDisplayTime(_23f,true); 
    1779 if(!_246&&!_247){ 
    1780 if((this.startTime<=_23e&&this.startTime<=_23f)||(_23e<this.finishTime&&_23f<this.finishTime)){ 
    1781 top=_245=0; 
     1792var _24a=0; 
     1793var _24b=this.includeDisplayTime(_243); 
     1794var _24c=this.includeDisplayTime(_244,true); 
     1795if(!_24b&&!_24c){ 
     1796if((this.startTime<=_243&&this.startTime<=_244)||(_243<this.finishTime&&_244<this.finishTime)){ 
     1797top=_24a=0; 
    17821798Element.hide(item); 
    17831799this.hasInvisibleSchedule=true; 
    17841800}else{ 
    17851801top=0; 
    1786 _245=_240*(this.finishTime-this.startTime)-3; 
    1787 } 
    1788 }else{ 
    1789 if(_246){ 
    1790 top=_240*(_23e-this.startTime); 
    1791 _245=_240*rate-3; 
     1802_24a=_245*(this.finishTime-this.startTime)-3; 
     1803} 
     1804}else{ 
     1805if(_24b){ 
     1806top=_245*(_243-this.startTime); 
     1807_24a=_245*rate-3; 
    17921808}else{ 
    17931809top=0; 
    1794 over=this.startTime-_23e
    1795 _245=_240*(rate-over); 
    1796 } 
    1797 if(_247){ 
    1798 }else{ 
    1799 over=_23f-this.finishTime; 
    1800 _245-=_240*over; 
     1810over=this.startTime-_243
     1811_24a=_245*(rate-over); 
     1812} 
     1813if(_24c){ 
     1814}else{ 
     1815over=_244-this.finishTime; 
     1816_24a-=_245*over; 
    18011817} 
    18021818} 
    18031819try{ 
    1804 Element.setStyle(item,{top:top+"px",width:this.column.width+"px",height:_245+"px"}); 
     1820Element.setStyle(item,{top:top+"px",width:this.column.width+"px",height:_24a+"px"}); 
    18051821} 
    18061822catch(e){ 
     
    18141830this.setCover(); 
    18151831var self=this; 
    1816 var _249=$(this.getScheduleContainerId()); 
    1817 var _24a=this.getDragDistance(); 
     1832var _24e=$(this.getScheduleContainerId()); 
     1833var _24f=this.getDragDistance(); 
    18181834this.scheduleNodes=[]; 
    1819 var _24b=this.week.map(function(){ 
     1835var _250=this.week.map(function(){ 
    18201836return []; 
    18211837}); 
    1822 var _24c=this.week.legth-1; 
    1823 var _24d=this.calendar.options.noEvent; 
    1824 this.calendar.options.schedules.each(function(_24e){ 
    1825 var _24f=[]; 
    1826 var sub,_251,_252=null; 
    1827 self.week.each(function(date,_254){ 
    1828 if(self.calendar.betweenDate(_24e,date)){ 
    1829 if(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{ 
    1834 sub=self.copyOneDaySchedule(_24e,date); 
     1838var _251=this.week.legth-1; 
     1839var _252=this.calendar.options.noEvent; 
     1840this.calendar.options.schedules.each(function(_253){ 
     1841var _254=[]; 
     1842var sub,_256,_257=null; 
     1843self.week.each(function(date,_259){ 
     1844if(self.calendar.betweenDate(_253,date)){ 
     1845if(self.isSameStartDate(_253,date)&&self.isSameFinishDate(_253,date)){ 
     1846_257=self.setSchedule(_253,_259,_250,_24e,_24f); 
     1847_257.cellDate=date; 
     1848_254.push(_257); 
     1849}else{ 
     1850sub=self.copyOneDaySchedule(_253,date); 
    18351851if(sub.finish.hour==0&&sub.finish.min==0){ 
    18361852throw $continue; 
    18371853} 
    1838 _251=self.setSchedule(sub,_254,_24b,_249,_24a); 
    1839 _251.originalSchedule=_24e
    1840 _251.cellDate=date; 
    1841 _24f.push(_251); 
     1854_256=self.setSchedule(sub,_259,_250,_24e,_24f); 
     1855_256.originalSchedule=_253
     1856_256.cellDate=date; 
     1857_254.push(_256); 
    18421858} 
    18431859}else{ 
     
    18491865if(!self.hasInvisibleSchedule){ 
    18501866(self.invisibleWeek||[]).each(function(date){ 
    1851 if(self.calendar.betweenDate(_24e,date)){ 
     1867if(self.calendar.betweenDate(_253,date)){ 
    18521868self.hasInvisibleSchedule=true; 
    18531869throw $break; 
     
    18551871}); 
    18561872} 
    1857 if(!_24d){ 
    1858 _24f.each(function(item){ 
    1859 Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_24f)); 
    1860 Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_24f)); 
    1861 }); 
    1862 } 
    1863 if(!self.hasInvisibleSchedule&&(_24f.length==0)){ 
     1873if(!_252){ 
     1874_254.each(function(item){ 
     1875Event.observe(item,"mouseover",self.mouseOverSubSchedule.bind(this,_254)); 
     1876Event.observe(item,"mouseout",self.mouseOutSubSchedule.bind(this,_254)); 
     1877}); 
     1878} 
     1879if(!self.hasInvisibleSchedule&&(_254.length==0)){ 
    18641880self.hasInvisibleSchedule=true; 
    18651881} 
     
    18721888new Hover(this.ids.pre); 
    18731889new Hover(this.ids.next); 
    1874 var _257=this.calendar.options.clickDateText||this.clickDateText; 
     1890var _25c=this.calendar.options.clickDateText||this.clickDateText; 
    18751891if(this.headers){ 
    1876 this.headers.each(function(_258){ 
    1877 Event.observe(_258.id,"mousedown",_257.bindAsEventListener(this,_258.wday)); 
     1892this.headers.each(function(_25d){ 
     1893Event.observe(_25d.id,"mousedown",_25c.bindAsEventListener(this,_25d.wday)); 
    18781894}.bind(this)); 
    18791895} 
    18801896} 
    1881 },copyOneDaySchedule:function(_259,date){ 
     1897},copyOneDaySchedule:function(_25e,date){ 
    18821898var sub=null; 
    1883 if(this.isSameStartDate(_259,date)){ 
    1884 sub=this.copySchedule(_259,date); 
     1899if(this.isSameStartDate(_25e,date)){ 
     1900sub=this.copySchedule(_25e,date); 
    18851901sub.finish.hour=24; 
    18861902sub.finish.min=0; 
    18871903}else{ 
    1888 if(this.isSameFinishDate(_259,date)){ 
    1889 sub=this.copySchedule(_259,date); 
     1904if(this.isSameFinishDate(_25e,date)){ 
     1905sub=this.copySchedule(_25e,date); 
    18901906sub.start.hour=0; 
    18911907sub.start.min=0; 
    18921908}else{ 
    1893 sub=this.copySchedule(_259,date); 
     1909sub=this.copySchedule(_25e,date); 
    18941910sub.start.hour=0; 
    18951911sub.start.min=0; 
     
    18991915} 
    19001916return sub; 
    1901 },copySchedule:function(_25c,date){ 
    1902 sub=Object.extend({},_25c); 
    1903 sub.start={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_25c.start.hour,min:_25c.start.min}; 
    1904 sub.finish={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_25c.finish.hour,min:_25c.finish.min}; 
     1917},copySchedule:function(_261,date){ 
     1918sub=Object.extend({},_261); 
     1919sub.start={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_261.start.hour,min:_261.start.min}; 
     1920sub.finish={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:_261.finish.hour,min:_261.finish.min}; 
    19051921return sub; 
    1906 },setSchedule:function(_25e,_25f,_260,_261,_262){ 
    1907 var _263=this.buildSchedule(_25e); 
    1908 var item=_263.first(); 
    1909 _261.appendChild(item); 
     1922},setSchedule:function(_263,_264,_265,_266,_267){ 
     1923var _268=this.buildSchedule(_263); 
     1924var item=_268.first(); 
     1925_266.appendChild(item); 
    19101926this.setScheduleBaseStyle(item); 
    1911 var left=this.adjustScheduleStyle(item,_25f,_260[_25f]); 
    1912 var _266=_25f*this.getAdjustSize(); 
    1913 var _267=this.column.width+_266+"px"; 
    1914 if(!this.calendar.options.noEvent&&((_25e.edit==undefined)||_25e.edit)){ 
    1915 this.setDraggable(item,_263.last(),_261,_262); 
     1927var left=this.adjustScheduleStyle(item,_264,_265[_264]); 
     1928var _26b=_264*this.getAdjustSize(); 
     1929var _26c=this.column.width+_26b+"px"; 
     1930if(!this.calendar.options.noEvent&&((_263.edit==undefined)||_263.edit)){ 
     1931this.setDraggable(item,_268.last(),_266,_267); 
    19161932this.setResize(item); 
    19171933} 
    1918 _260[_25f].push(item); 
     1934_265[_264].push(item); 
    19191935this.scheduleNodes.push(item); 
    19201936return item; 
    19211937},getDragDistance:function(){ 
    1922 var _268=this.getAdjustSize(); 
    1923 return [this.column.width+_268,this.column.height/2]; 
    1924 },setDraggable:function(item,_26a,_26b,_26c){ 
     1938var _26d=this.getAdjustSize(); 
     1939return [this.column.width+_26d,this.column.height/2]; 
     1940},setDraggable:function(item,_26f,_270,_271){ 
    19251941var self=this; 
    1926 new Draggable(item,{handle:_26a,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,snap:function(x,y,_270){ 
    1927 var _271=Element.getDimensions(item); 
    1928 var _272=Element.getDimensions(_26b); 
    1929 var _273=(self.column.height/2); 
    1930 var _274=_270.offset; 
     1942new Draggable(item,{handle:_26f,scroll:window,starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction,snap:function(x,y,_275){ 
     1943var _276=Element.getDimensions(item); 
     1944var _277=Element.getDimensions(_270); 
     1945var _278=(self.column.height/2); 
     1946var _279=_275.offset; 
    19311947var xy=[x,y].map(function(v,i){ 
    1932 return Math.floor((v+_274[i])/_26c[i])*_26c[i]; 
    1933 }); 
    1934 xy=[self._constrain(xy[0],0,_272.width-_271.width),self._constrain(xy[1],0-(_271.height-_273),_272.height-_273)]; 
     1948return Math.floor((v+_279[i])/_271[i])*_271[i]; 
     1949}); 
     1950xy=[self._constrain(xy[0],0,_277.width-_276.width),self._constrain(xy[1],0-(_276.height-_278),_277.height-_278)]; 
    19351951return xy; 
    1936 },onEnd:function(_278,_279){ 
    1937 self.changeSchedule(_278,_279); 
    1938 },change:function(_27a){ 
    1939 self.changeTimeDisplay(_27a.element); 
     1952},onEnd:function(_27d,_27e){ 
     1953self.changeSchedule(_27d,_27e); 
     1954},change:function(_27f){ 
     1955self.changeTimeDisplay(_27f.element); 
    19401956}}); 
    19411957},setResize:function(item){ 
    1942 new CalendarResizeableEx(item,{left:0,right:0,top:0,distance:this.column.height/2,restriction:true,resize:function(_27c){ 
    1943 this.updateTirm(_27c); 
    1944 }.bind(this),change:function(_27d){ 
    1945 this.changeTimeDisplay(_27d); 
     1958new CalendarResizeableEx(item,{left:0,right:0,top:0,distance:this.column.height/2,restriction:true,resize:function(_281){ 
     1959this.updateTirm(_281); 
     1960}.bind(this),change:function(_282){ 
     1961this.changeTimeDisplay(_282); 
    19461962}.bind(this)}); 
    1947 },getDate:function(_27e){ 
    1948 return _27e.date; 
    1949 },abstractSelect:function(_27f,_280){ 
    1950 var _281=this.findClickedElement(_27f); 
    1951 if(_281){ 
    1952 if(Element.hasClassName(_281,Calendar.className.columnDate)||Element.hasClassName(_281,Calendar.className.columnDateOdd)||Element.hasClassName(_281,Calendar.className.columnTopDate)){ 
    1953 var date=this.getDate(_281); 
    1954 _280(date,_281); 
     1963},getDate:function(_283){ 
     1964return _283.date; 
     1965},abstractSelect:function(_284,_285){ 
     1966var _286=this.findClickedElement(_284); 
     1967if(_286){ 
     1968if(Element.hasClassName(_286,Calendar.className.columnDate)||Element.hasClassName(_286,Calendar.className.columnDateOdd)||Element.hasClassName(_286,Calendar.className.columnTopDate)){ 
     1969var date=this.getDate(_286); 
     1970_285(date,_286); 
    19551971} 
    19561972} 
    19571973},getSelectedTerm:function(){ 
    1958 var _283=this.calendar.getSelected(); 
    1959 if(_283.length==0){ 
     1974var _288=this.calendar.getSelected(); 
     1975if(_288.length==0){ 
    19601976return; 
    19611977} 
    19621978if(this.calendar.options.build){ 
    1963 var last=_283.last(); 
     1979var last=_288.last(); 
    19641980if(last){ 
    19651981last=this.dateMap[last.id]; 
    19661982}else{ 
    1967 last=this.dateMap[_283.first().id]; 
     1983last=this.dateMap[_288.first().id]; 
    19681984} 
    19691985last=new Date(last.getFullYear(),last.getMonth(),last.getDate(),last.getHours(),last.getMinutes(),0); 
    19701986last.setMinutes(last.getMinutes()+30); 
    1971 return [this.dateMap[_283.first().id],last]; 
    1972 }else{ 
    1973 var last=this._getDateTimeFromElement(_283.last()); 
     1987return [this.dateMap[_288.first().id],last]; 
     1988}else{ 
     1989var last=this._getDateTimeFromElement(_288.last()); 
    19741990last.setMinutes(last.getMinutes()+30); 
    1975 return [this._getDateTimeFromElement(_283.first()),last]; 
     1991return [this._getDateTimeFromElement(_288.first()),last]; 
    19761992} 
    19771993},setWidth:function(node){ 
    19781994Element.setStyle(node,{width:this.column.width+"px"}); 
    1979 },inspectArgument:function(_286,time){ 
    1980 if(_286.date){ 
    1981 return _286
     1995},inspectArgument:function(_28b,time){ 
     1996if(_28b.date){ 
     1997return _28b
    19821998} 
    19831999var self=this; 
    1984 var _289=this.calendar.getSelected(); 
    1985 var _28a=[]; 
    1986 this.calendar.recurrence(_286,function(o){ 
    1987 var _28c={}; 
     2000var _28e=this.calendar.getSelected(); 
     2001var _28f=[]; 
     2002this.calendar.recurrence(_28b,function(o){ 
     2003var _291={}; 
    19882004if(!o.date){ 
    1989 _28c={date:self.getDate(_289[0])}; 
     2005_291={date:self.getDate(_28e[0])}; 
    19902006if(!o.start){ 
    1991 _28c.start=_289[0].time; 
     2007_291.start=_28e[0].time; 
    19922008} 
    19932009if(!o.finish){ 
    1994 _28c.finish=_289[_289.length-1].time; 
    1995 } 
    1996 } 
    1997 Object.extend(_28c,o); 
    1998 _28a.push(_28c); 
    1999 }); 
    2000 return _28a
     2010_291.finish=_28e[_28e.length-1].time; 
     2011} 
     2012} 
     2013Object.extend(_291,o); 
     2014_28f.push(_291); 
     2015}); 
     2016return _28f
    20012017},inspectDateArgument:function(date){ 
    20022018if(date){ 
    20032019return date; 
    20042020} 
    2005 var _28e=this; 
    2006 var _28f=this.getSelected(); 
    2007 if(_28f.length==0){ 
     2021var _293=this; 
     2022var _294=this.getSelected(); 
     2023if(_294.length==0){ 
    20082024return null; 
    20092025} 
    2010 return _28f.collect(function(d){ 
    2011 return _28e.getDate(d); 
    2012 }); 
    2013 },addColumnClass:function(_291){ 
     2026return _294.collect(function(d){ 
     2027return _293.getDate(d); 
     2028}); 
     2029},addColumnClass:function(_296){ 
    20142030if(document.all){ 
    2015 this.calendar.css.addClassNames(_291,"columnWin"); 
    2016 }else{ 
    2017 this.calendar.css.addClassNames(_291,"column"); 
     2031this.calendar.css.addClassNames(_296,"columnWin"); 
     2032}else{ 
     2033this.calendar.css.addClassNames(_296,"column"); 
    20182034} 
    20192035},getHeaderId:function(){ 
     
    20212037},getColumnId:function(i){ 
    20222038return this.calendar.element.id.appendSuffix(CalendarWeek.id.column+"_"+i); 
    2023 },changeSchedule:function(_293,_294){ 
    2024 var _295=_293.element; 
    2025 var _296=_295.schedule; 
    2026 var time=this.getTimeByElement(_295); 
    2027 this.calendar.cacheSchedule(_296); 
    2028 var _298=$(this.getScheduleContainerId()); 
    2029 var _299=Element.getDimensions(_298); 
    2030 var _29a=Position.cumulativeOffset(_298); 
    2031 var x=Event.pointerX(_294); 
    2032 var y=Event.pointerY(_294); 
    2033 var left=parseInt(Element.getStyle(_295,"left")); 
    2034 var _29e=Math.round(left/this.column.width); 
    2035 var date=this.week[_29e]; 
    2036 if(_296.start.year==date.getFullYear()&&_296.start.month==date.getMonth()&&_296.start.day==date.getDate()&&_296.start.hour==time[0].hour&&_296.start.min==time[0].min&&_296.finish.year==date.getFullYear()&&_296.finish.month==date.getMonth()&&_296.finish.day==date.getDate()&&_296.finish.hour==time[1].hour&&_296.finish.min==time[1].min){ 
     2039},changeSchedule:function(_298,_299){ 
     2040var _29a=_298.element; 
     2041var _29b=_29a.schedule; 
     2042var time=this.getTimeByElement(_29a); 
     2043this.calendar.cacheSchedule(_29b); 
     2044var _29d=$(this.getScheduleContainerId()); 
     2045var _29e=Element.getDimensions(_29d); 
     2046var _29f=Position.cumulativeOffset(_29d); 
     2047var x=Event.pointerX(_299); 
     2048var y=Event.pointerY(_299); 
     2049var left=parseInt(Element.getStyle(_29a,"left")); 
     2050var _2a3=Math.round(left/this.column.width); 
     2051var date=this.week[_2a3]; 
     2052if(_29b.start.year==date.getFullYear()&&_29b.start.month==date.getMonth()&&_29b.start.day==date.getDate()&&_29b.start.hour==time[0].hour&&_29b.start.min==time[0].min&&_29b.finish.year==date.getFullYear()&&_29b.finish.month==date.getMonth()&&_29b.finish.day==date.getDate()&&_29b.finish.hour==time[1].hour&&_29b.finish.min==time[1].min){ 
    20372053this.calendar.refreshSchedule(); 
    20382054return; 
    20392055} 
    2040 if(_295.originalSchedule){ 
    2041 _296=_295.originalSchedule; 
    2042 } 
    2043 var _2a0={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:time[0].hour,min:time[0].min}; 
    2044 var _2a1=DateUtil.toDate(_2a0); 
    2045 var _2a2=_295.cellDate.days()-DateUtil.toDate(_296.start).days(); 
    2046 _2a1.setDate(_2a1.getDate()-_2a2); 
    2047 var diff=_2a1.getTime()-DateUtil.toDate(_296.start).getTime(); 
    2048 _296.start=_2a1.toHash(); 
    2049 _296.finish=new Date(DateUtil.toDate(_296.finish).getTime()+diff).toHash(); 
     2056if(_29a.originalSchedule){ 
     2057_29b=_29a.originalSchedule; 
     2058} 
     2059var _2a5={year:date.getFullYear(),month:date.getMonth(),day:date.getDate(),hour:time[0].hour,min:time[0].min}; 
     2060var _2a6=DateUtil.toDate(_2a5); 
     2061var _2a7=_29a.cellDate.days()-DateUtil.toDate(_29b.start).days(); 
     2062_2a6.setDate(_2a6.getDate()-_2a7); 
     2063var diff=_2a6.getTime()-DateUtil.toDate(_29b.start).getTime(); 
     2064_29b.start=_2a6.toHash(); 
     2065_29b.finish=new Date(DateUtil.toDate(_29b.finish).getTime()+diff).toHash(); 
    20502066this.calendar.refreshSchedule(); 
    2051 this.calendar.options.changeSchedule(_296); 
    2052 },updateTirm:function(_2a4){ 
    2053 var _2a5=_2a4.schedule; 
    2054 var time=this.getTimeByElement(_2a4); 
    2055 this.calendar.cacheSchedule(_2a5); 
    2056 var left=parseInt(Element.getStyle(_2a4,"left")); 
    2057 var _2a8=Math.floor(left/this.column.width); 
    2058 var date=this.week[_2a8]; 
    2059 var _2aa=this.isChengeSchedule(_2a4,time); 
    2060 if(_2a4.originalSchedule){ 
    2061 _2a5=_2a4.originalSchedule; 
    2062 } 
    2063 if(_2aa.start){ 
    2064 _2a5.start.year=date.getFullYear(); 
    2065 _2a5.start.month=date.getMonth(); 
    2066 _2a5.start.day=date.getDate(); 
    2067 _2a5.start.hour=time[0].hour; 
    2068 _2a5.start.min=time[0].min; 
    2069 } 
    2070 if(_2aa.finish){ 
    2071 _2a5.finish.year=date.getFullYear(); 
    2072 _2a5.finish.month=date.getMonth(); 
    2073 _2a5.finish.day=date.getDate(); 
    2074 _2a5.finish.hour=time[1].hour; 
    2075 _2a5.finish.min=time[1].min; 
     2067this.calendar.options.changeSchedule(_29b); 
     2068},updateTirm:function(_2a9){ 
     2069var _2aa=_2a9.schedule; 
     2070var time=this.getTimeByElement(_2a9); 
     2071this.calendar.cacheSchedule(_2aa); 
     2072var left=parseInt(Element.getStyle(_2a9,"left")); 
     2073var _2ad=Math.floor(left/this.column.width); 
     2074var date=this.week[_2ad]; 
     2075var _2af=this.isChengeSchedule(_2a9,time); 
     2076if(_2a9.originalSchedule){ 
     2077_2aa=_2a9.originalSchedule; 
     2078} 
     2079if(_2af.start){ 
     2080_2aa.start.year=date.getFullYear(); 
     2081_2aa.start.month=date.getMonth(); 
     2082_2aa.start.day=date.getDate(); 
     2083_2aa.start.hour=time[0].hour; 
     2084_2aa.start.min=time[0].min; 
     2085} 
     2086if(_2af.finish){ 
     2087_2aa.finish.year=date.getFullYear(); 
     2088_2aa.finish.month=date.getMonth(); 
     2089_2aa.finish.day=date.getDate(); 
     2090_2aa.finish.hour=time[1].hour; 
     2091_2aa.finish.min=time[1].min; 
    20762092} 
    20772093this.calendar.refreshSchedule(); 
    2078 if(_2aa.start||_2aa.finish){ 
    2079 this.calendar.options.updateTirm(_2a5); 
    2080 } 
    2081 },changeTimeDisplay:function(_2ab){ 
    2082 var _2ac=_2ab.schedule; 
    2083 var time=this.getTimeByElement(_2ab); 
    2084 var _2ae=Element.getElementsByClassName(_2ab,Calendar.className.scheduleTimeArea)[0]; 
     2094if(_2af.start||_2af.finish){ 
     2095this.calendar.options.updateTirm(_2aa); 
     2096} 
     2097},changeTimeDisplay:function(_2b0){ 
     2098var _2b1=_2b0.schedule; 
     2099var time=this.getTimeByElement(_2b0); 
     2100var _2b3=Element.getElementsByClassName(_2b0,Calendar.className.scheduleTimeArea)[0]; 
    20852101var text=this.getTimeText(time[0],time[1]); 
    2086 _2ae.innerHTML=text; 
    2087 },findClickedElement:function(_2b0){ 
    2088 var _2b1=$(this.getScheduleContainerId()); 
    2089 var _2b2=Position.cumulativeOffset(_2b1); 
    2090 var _2b3=Position.realOffset(_2b1).last(); 
    2091 _2b3-=document.documentElement.scrollTop||document.body.scrollTop; 
    2092 var x=Event.pointerX(_2b0)-_2b2[0]; 
    2093 var y=Event.pointerY(_2b0)-_2b2[1]+_2b3
    2094 var _2b6=Math.floor(y/this.column.height); 
    2095 var _2b7=Math.floor(x/this.column.width); 
     2102_2b3.innerHTML=text; 
     2103},findClickedElement:function(_2b5){ 
     2104var _2b6=$(this.getScheduleContainerId()); 
     2105var _2b7=Position.cumulativeOffset(_2b6); 
     2106var _2b8=Position.realOffset(_2b6).last(); 
     2107_2b8-=document.documentElement.scrollTop||document.body.scrollTop; 
     2108var x=Event.pointerX(_2b5)-_2b7[0]; 
     2109var y=Event.pointerY(_2b5)-_2b7[1]+_2b8
     2110var _2bb=Math.floor(y/this.column.height); 
     2111var _2bc=Math.floor(x/this.column.width); 
    20962112var row=this.calendarTable.rows[0]; 
    2097 if(_2b7>=row.cells.length){ 
    2098 _2b7--; 
    2099 } 
    2100 return $(row.cells[_2b7]).down(_2b6); 
    2101 },multipleSelection:function(_2b9){ 
     2113if(_2bc>=row.cells.length){ 
     2114_2bc--; 
     2115} 
     2116return $(row.cells[_2bc]).down(_2bb); 
     2117},multipleSelection:function(_2be){ 
    21022118if(!this.calendar.selectedBase||!this.calendar.mouseDown){ 
    21032119return; 
    21042120} 
    21052121var self=this; 
    2106 var _2bb=this.calendar; 
    2107 var _2bc=this.calendar.selectedBase; 
    2108 var _2bd=this._getDateFromElement(_2bc).getDate(); 
    2109 this.abstractSelect(_2b9,function(date,_2bf){ 
    2110 var _2c0=$(_2bc.id); 
    2111 if(_2bd!=self._getDateFromElement(_2bf).getDate()){ 
     2122var _2c0=this.calendar; 
     2123var _2c1=this.calendar.selectedBase; 
     2124var _2c2=this._getDateFromElement(_2c1).getDate(); 
     2125this.abstractSelect(_2be,function(date,_2c4){ 
     2126var _2c5=$(_2c1.id); 
     2127if(_2c2!=self._getDateFromElement(_2c4).getDate()){ 
    21122128return; 
    21132129} 
    2114 var _2c1=$A(_2c0.parentNode.childNodes); 
    2115 var ids=[this._getTime(_2bc),this._getTime(_2bf)]; 
     2130var _2c6=$A(_2c5.parentNode.childNodes);