Changeset 5817
- Timestamp:
- 06/30/08 08:46:06 (2 months ago)
- Files:
-
- rubricks_core/trunk/preload/_lib_extension.rhtml (modified) (2 diffs)
- rubricks_core/trunk/public/images/spinelz/calendar_copy.gif (added)
- rubricks_core/trunk/public/images/spinelz/calendar_item_icon.gif (added)
- rubricks_core/trunk/public/images/spinelz/calendar_private_icon.gif (modified) (previous)
- rubricks_core/trunk/public/javascripts/components/system/src_system_calendar.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/components/system/system.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/rubricks_common.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/spinelz/calendar.js (modified) (36 diffs)
- rubricks_core/trunk/public/javascripts/spinelz/spinelz_for_rubricks.js (modified) (36 diffs)
- rubricks_core/trunk/public/javascripts/spinelz_lib/spinelz_util.js (modified) (18 diffs)
- rubricks_core/trunk/public/javascripts/spinelz_lib/spinelz_util_for_rubricks.js (modified) (18 diffs)
- rubricks_core/trunk/public/javascripts/src_rubricks_common_ignore_blur.js (added)
- rubricks_core/trunk/public/javascripts/src_spinelz/calendar.js (modified) (19 diffs)
- rubricks_core/trunk/public/javascripts/src_spinelz_lib/spinelz_util.js (modified) (7 diffs)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/fileattachment/editor_plugin.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/fileattachment/editor_plugin_src.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/imageattachment/editor_plugin.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/imageattachment/editor_plugin_src.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/sourcecode/editor_plugin.js (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/sourcecode/editor_plugin_src.js (modified) (2 diffs)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/table/cell.htm (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/table/row.htm (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/plugins/table/table.htm (modified) (1 diff)
- rubricks_core/trunk/public/javascripts/tiny_mce/themes/advanced/link.htm (modified) (1 diff)
- rubricks_core/trunk/public/stylesheets/spinelz/calendar.css (modified) (1 diff)
- rubricks_core/trunk/public/stylesheets/spinelz/spinelz_for_rubricks.css (modified) (1 diff)
- rubricks_core/trunk/script/make_user_data (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
rubricks_core/trunk/preload/_lib_extension.rhtml
r5788 r5817 41 41 Ajax.Base.prototype.setOptions = setOptionsForFailure; 42 42 })(); 43 44 Ajax.Responders.register({ 45 onComplete: function() { 46 if (!Modal.existTarget() && Modal.isMasked()) Modal.unmask(); 47 } 48 }); 43 49 44 50 /* Event(prototype.js) extension */ … … 144 150 } 145 151 }); 152 153 /* for MAC-Fx3 BUG */ 154 Object.extend(SpinelzUtil, { 155 blur: function() { 156 if(UserAgent.isIE()) { 157 window.focus(); 158 } else if(UserAgent.isFF3()) { 159 if(rubricks.common.ignore_blur && UserAgent.isMac()) { 160 } else { 161 this._dummyElement.focus(); 162 this._dummyElement.blur(); 163 } 164 } else { 165 document.body.blur(); 166 } 167 } 168 }); 146 169 </script> rubricks_core/trunk/public/javascripts/components/system/src_system_calendar.js
r5781 r5817 62 62 }, 63 63 renderList: function() { 64 var withoutCallbackTmpl = new Template("<tr><td>#{icon_for_list}</td><td> #{icon}#{description}</td><td>#{start}</td><td>#{finish}</td></tr>");65 var callbackTmpl = new Template("<tr><td>#{icon_for_list}</td><td> #{icon}<a href=\"javascript:void(0)\" onclick=\"(function() { #{callback}; })()\">#{description}</a></td><td>#{start}</td><td>#{finish}</td></tr>");64 var withoutCallbackTmpl = new Template("<tr><td>#{icon_for_list}</td><td><div style=\"overflow: hidden;\" title=\"#{description}\">#{icon}#{description}</div></td><td>#{start}</td><td>#{finish}</td></tr>"); 65 var callbackTmpl = new Template("<tr><td>#{icon_for_list}</td><td><div style=\"overflow: hidden; white-space: nowrap; width: 100%;\" title=\"#{description}\">#{icon}<a href=\"javascript:void(0)\" onclick=\"(function() { #{callback}; })()\">#{description}</a></div></td><td>#{start}</td><td>#{finish}</td></tr>"); 66 66 var tmpl = null; 67 67 var rows = []; rubricks_core/trunk/public/javascripts/components/system/system.js
r5781 r5817 924 924 this.changeCalendar(this.date,_8); 925 925 },renderList:function(){ 926 var _a=new Template("<tr><td>#{icon_for_list}</td><td> #{icon}#{description}</td><td>#{start}</td><td>#{finish}</td></tr>");927 var _b=new Template("<tr><td>#{icon_for_list}</td><td> #{icon}<a href=\"javascript:void(0)\" onclick=\"(function() { #{callback}; })()\">#{description}</a></td><td>#{start}</td><td>#{finish}</td></tr>");926 var _a=new Template("<tr><td>#{icon_for_list}</td><td><div style=\"overflow: hidden;\" title=\"#{description}\">#{icon}#{description}</div></td><td>#{start}</td><td>#{finish}</td></tr>"); 927 var _b=new Template("<tr><td>#{icon_for_list}</td><td><div style=\"overflow: hidden; white-space: nowrap; width: 100%;\" title=\"#{description}\">#{icon}<a href=\"javascript:void(0)\" onclick=\"(function() { #{callback}; })()\">#{description}</a></div></td><td>#{start}</td><td>#{finish}</td></tr>"); 928 928 var _c=null; 929 929 var _d=[]; rubricks_core/trunk/public/javascripts/rubricks_common.js
r5781 r5817 496 496 } 497 497 }); 498 499 Object.extend(rubricks.common,{ignore_blur_counter_for_select:0,restore_ignore_blur_for_select:function(e){ 500 rubricks.common.ignore_blur_counter_for_select--; 501 if(rubricks.common.ignore_blur_counter_for_select<1){ 502 rubricks.common.ignore_blur=false; 503 rubricks.common.ignore_blur_counter_for_select=0; 504 } 505 },ignore_blur_listener_for_select:function(e){ 506 rubricks.common.ignore_blur=true; 507 setTimeout(rubricks.common.restore_ignore_blur_for_select,1000); 508 rubricks.common.restore_ignore_blur_stack++; 509 },attach_ignore_blur_listener_for_select:function(_3){ 510 if(_3.ignore_blur_listener_attached){ 511 return; 512 } 513 Event.observe(_3,"click",rubricks.common.ignore_blur_listener_for_select,true); 514 _3.ignore_blur_listener_for_select=true; 515 },attach_ignore_blur_to_select:function(_4){ 516 if(!UserAgent.isMac()||!UserAgent.isFF3()){ 517 return; 518 } 519 _4=$(_4); 520 if(!_4){ 521 return; 522 } 523 if("select"==_4.tagName.toLowerCase()){ 524 rubricks.common.attach_ignore_blur_listener_for_select(_4); 525 }else{ 526 var _5=_4.getElementsByTagName("select"); 527 for(var i=0,_7=_5.length;i<_7;i++){ 528 rubricks.common.attach_ignore_blur_listener_for_select(_5[i]); 529 } 530 } 531 }}); 498 532 499 533 Object.extend(rubricks.common,{change_image:function(_1,_2){ rubricks_core/trunk/public/javascripts/spinelz/calendar.js
r5788 r5817 1 1 var Calendar=Class.create(); 2 Calendar.className={container:"calendar",header:"calendar_header",preYears:"calendar_preYears",nextYears:"calendar_nextYears",years:"calendar_years",mark:"calendar_mark",ym:"calendar_ym",table:"calendar_table",thRight:"right",tdRight:"right",tdBottom:"bottom",date:"calendar_date",holiday:"calendar_holiday",regularHoliday:"calendar_regularHoliday",schedule:"calendar_schedule",highlightDay:"calendar_highlightDay",highlightTime:"calendar_highlightTime",scheduleListContainer:"calendar_scheduleListContainer",scheduleItem:"calendar_scheduleItem",scheduleTimeArea:"calendar_scheduleItemTimeArea",schedule Handler:"calendar_scheduleHandler",holidayName:"calendar_holidayName",dateContainer:"calendar_dateContainer",tableHeader:"calendar_tableHeader",rowContent:"calendar_rowContent",selected:"calendar_selected",nextYearMark:"calendar_nextYearMark",nextMonthMark:"calendar_nextMonthMark",nextWeekMark:"calendar_nextWeekMark",preYearMark:"calendar_preYearMark",preMonthMark:"calendar_preMonthMark",preWeekMark:"calendar_preWeekMark",weekTable:"calendar_weekContainerTable",weekMainTable:"calendar_weekMainTable",timeLine:"calendar_timeline",timeLineTimeTop:"calendar_timelineTimeTop",timeLineTime:"calendar_timelineTime",headerColumn:"calendar_headerColumn",columnTopDate:"calendar_columnTopDate",columnDate:"calendar_columnDate",columnDateOdd:"calendar_columnOddDate",scheduleItemSamll:"calendar_scheduleItemSmall",scheduleItemLarge:"calendar_scheduleItemLarge",scheduleItemNoBorder:"calendar_scheduleItemNoBorder",scheduleItemSelect:"calendar_scheduleItemSelect",skipNode:"calendar_skipNode",deleteImg:"calendar_deleteImage",copyImg:"calendar_copyImage",privateImg:"calendar_privateImage",scheduleContainer:"calendar_weekScheduleContainer",selector:"calendar_selector",cover:"calendar_cover"};2 Calendar.className={container:"calendar",header:"calendar_header",preYears:"calendar_preYears",nextYears:"calendar_nextYears",years:"calendar_years",mark:"calendar_mark",ym:"calendar_ym",table:"calendar_table",thRight:"right",tdRight:"right",tdBottom:"bottom",date:"calendar_date",holiday:"calendar_holiday",regularHoliday:"calendar_regularHoliday",schedule:"calendar_schedule",highlightDay:"calendar_highlightDay",highlightTime:"calendar_highlightTime",scheduleListContainer:"calendar_scheduleListContainer",scheduleItem:"calendar_scheduleItem",scheduleTimeArea:"calendar_scheduleItemTimeArea",scheduleTimeAreaMonth:"calendar_scheduleItemTimeAreaMonth",scheduleHandler:"calendar_scheduleHandler",holidayName:"calendar_holidayName",dateContainer:"calendar_dateContainer",tableHeader:"calendar_tableHeader",rowContent:"calendar_rowContent",selected:"calendar_selected",nextYearMark:"calendar_nextYearMark",nextMonthMark:"calendar_nextMonthMark",nextWeekMark:"calendar_nextWeekMark",preYearMark:"calendar_preYearMark",preMonthMark:"calendar_preMonthMark",preWeekMark:"calendar_preWeekMark",weekTable:"calendar_weekContainerTable",weekMainTable:"calendar_weekMainTable",timeLine:"calendar_timeline",timeLineTimeTop:"calendar_timelineTimeTop",timeLineTime:"calendar_timelineTime",headerColumn:"calendar_headerColumn",columnTopDate:"calendar_columnTopDate",columnDate:"calendar_columnDate",columnDateOdd:"calendar_columnOddDate",scheduleItemSamll:"calendar_scheduleItemSmall",scheduleItemLarge:"calendar_scheduleItemLarge",scheduleItemNoBorder:"calendar_scheduleItemNoBorder",scheduleItemSelect:"calendar_scheduleItemSelect",skipNode:"calendar_skipNode",deleteImg:"calendar_deleteImage",copyImg:"calendar_copyImage",privateImg:"calendar_privateImage",scheduleContainer:"calendar_weekScheduleContainer",selector:"calendar_selector",cover:"calendar_cover"}; 3 3 Calendar.smallClassName={container:"calendar_small",header:"calendar_header_small",calendar:"calendar_calendar_small",table:"calendar_tableSmall"}; 4 4 Calendar.size={large:"large",small:"small"}; 5 5 Calendar.privateImgPath=null; 6 Calendar.defaultIconPath=null; 6 7 Calendar.prototype={initialize:function(_1){ 7 8 this.building=true; … … 611 612 },clickCopyImage:function(_9f){ 612 613 this.calendar.options.copySchedule(_9f,true); 613 },showImage:function(ids){ 614 ids.each(function(id){ 615 Element.show(id); 616 }); 617 },hideImage:function(ids){ 618 ids.each(function(id){ 619 Element.hide(id); 620 }); 621 },_constrain:function(n,_a5,_a6){ 622 if(n>_a6){ 623 return _a6; 624 }else{ 625 if(n<_a5){ 626 return _a5; 614 },showImage:function(_a0,_a1){ 615 _a0.each(function(img){ 616 Element.show(img); 617 }); 618 if(_a1){ 619 Element.setStyle(_a1,{right:(17*_a0.length)+"px"}); 620 } 621 },hideImage:function(_a3,_a4){ 622 _a3.each(function(img){ 623 Element.hide(img); 624 }); 625 if(_a4){ 626 Element.setStyle(_a4,{right:"0px"}); 627 } 628 },_constrain:function(n,_a7,_a8){ 629 if(n>_a8){ 630 return _a8; 631 }else{ 632 if(n<_a7){ 633 return _a7; 627 634 }else{ 628 635 return n; … … 636 643 return this.calendar.element.id.appendSuffix(AbstractCalendar.id.scheduleContainer); 637 644 },setColumnWidth:function(){ 638 var _a 7=this.getAdjustSize();639 var _a 8=$(this.getScheduleContainerId())||this.container;640 var _a 9=this.calendar.options.displayIndexes;641 this.column.width=_a 8.offsetWidth/_a9.length-_a7;645 var _a9=this.getAdjustSize(); 646 var _aa=$(this.getScheduleContainerId())||this.container; 647 var _ab=this.calendar.options.displayIndexes; 648 this.column.width=_aa.offsetWidth/_ab.length-_a9; 642 649 if(this.column.width<0){ 643 650 this.column.width=0; 644 651 } 645 652 },setCover:function(){ 646 var _a a=$(this.getScheduleContainerId())||this.container;653 var _ac=$(this.getScheduleContainerId())||this.container; 647 654 this.cover=this.cover||$(this.calendar.element.id.appendSuffix("cover")); 648 655 if(this.cover){ … … 650 657 this.cover=null; 651 658 } 652 _a a.appendChild(this.buildCover());653 Element.setStyle(this.cover,{height:Element.getHeight(_a a)+"px"});659 _ac.appendChild(this.buildCover()); 660 Element.setStyle(this.cover,{height:Element.getHeight(_ac)+"px"}); 654 661 },getDragDistance:function(){ 655 var _a b=this.getAdjustSize();656 return [this.column.width+_a b,this.column.height/2];662 var _ad=this.getAdjustSize(); 663 return [this.column.width+_ad,this.column.height/2]; 657 664 },getWeek:function(){ 658 var _a c=this.calendar.date;659 var _a d=this.calendar.sortWeekIndex([0,1,2,3,4,5,6]);660 var _ ae=_ac.getDay();661 var _ af=_ad.indexOf(_ae);662 var _b 0=[];663 var _b 1=[];664 var _b 2=this.calendar.options.displayIndexes;665 _a d.each(function(_b3){666 var _b 4=_b3-_ae;667 var _b 5=_ad.indexOf(_b3);668 if((_b 5<_af)&&(_b4>0)){669 _b 4-=7;670 }else{ 671 if((_b 5>_af)&&(_b4<0)){672 _b 4+=7;673 } 674 } 675 var _b 6=DateUtil.afterDays(_ac,_b4);676 if(_b 2.indexOf(_b3)>=0){677 _b 0.push(_b6);678 }else{ 679 _b 1.push(_b6);665 var _ae=this.calendar.date; 666 var _af=this.calendar.sortWeekIndex([0,1,2,3,4,5,6]); 667 var _b0=_ae.getDay(); 668 var _b1=_af.indexOf(_b0); 669 var _b2=[]; 670 var _b3=[]; 671 var _b4=this.calendar.options.displayIndexes; 672 _af.each(function(_b5){ 673 var _b6=_b5-_b0; 674 var _b7=_af.indexOf(_b5); 675 if((_b7<_b1)&&(_b6>0)){ 676 _b6-=7; 677 }else{ 678 if((_b7>_b1)&&(_b6<0)){ 679 _b6+=7; 680 } 681 } 682 var _b8=DateUtil.afterDays(_ae,_b6); 683 if(_b4.indexOf(_b5)>=0){ 684 _b2.push(_b8); 685 }else{ 686 _b3.push(_b8); 680 687 } 681 688 }.bind(this)); 682 return [_b 0,_b1];683 },isSameStartDate:function(_b 7,_b8){684 return ((_b 8.getFullYear()==_b7.start.year)&&(_b8.getMonth()==_b7.start.month)&&(_b8.getDate()==_b7.start.day));685 },isSameFinishDate:function(_b 9,_ba){686 return ((_b a.getFullYear()==_b9.finish.year)&&(_ba.getMonth()==_b9.finish.month)&&(_ba.getDate()==_b9.finish.day));689 return [_b2,_b3]; 690 },isSameStartDate:function(_b9,_ba){ 691 return ((_ba.getFullYear()==_b9.start.year)&&(_ba.getMonth()==_b9.start.month)&&(_ba.getDate()==_b9.start.day)); 692 },isSameFinishDate:function(_bb,_bc){ 693 return ((_bc.getFullYear()==_bb.finish.year)&&(_bc.getMonth()==_bb.finish.month)&&(_bc.getDate()==_bb.finish.day)); 687 694 },getSelectorId:function(){ 688 695 return this.calendar.element.id.appendSuffix(AbstractCalendar.id.selector); 689 },clickDateText:function(_b b,_bc){690 Event.stop(_b b);691 this.calendar.date=_b c;696 },clickDateText:function(_bd,_be){ 697 Event.stop(_bd); 698 this.calendar.date=_be; 692 699 this.calendar.options.displayType="day"; 693 700 this.calendar.refresh(); … … 698 705 this.containerDimensions=Element.getDimensions(this.container); 699 706 this.containerOffset=Position.cumulativeOffset(this.container); 700 },mouseOverSubSchedule:function(_b d){701 _b d.each(function(_be){702 var _ bf=Element.getStyle(_be,"borderTopColor");703 var _c 0=Element.getStyle(_be,"border");704 if(_ bf&&(_bf!="")&&_c0&&(_c0!="")){705 if(!_ be.originalBorderColor){706 _ be.originalBorderColor=_bf;707 } 708 Element.setStyle(_ be,{borderColor:new Color(_bf).invert()});709 }else{ 710 Element.addClassName(_ be,Calendar.className.scheduleItemSelect);711 } 712 }); 713 },mouseOutSubSchedule:function(_c 1){714 _c 1.each(function(_c2){715 if(_c 2.originalBorderColor){716 Element.setStyle(_c 2,{borderColor:_c2.originalBorderColor});717 }else{ 718 Element.removeClassName(_c 2,Calendar.className.scheduleItemSelect);719 } 720 }); 721 },toDate:function(_c 3){722 return DateUtil.toDate(_c 3);707 },mouseOverSubSchedule:function(_bf){ 708 _bf.each(function(_c0){ 709 var _c1=Element.getStyle(_c0,"borderTopColor"); 710 var _c2=Element.getStyle(_c0,"borderTop"); 711 if(_c1&&(_c1!="")&&_c2&&(_c2!="")){ 712 if(!_c0.originalBorderColor){ 713 _c0.originalBorderColor=_c1; 714 } 715 Element.setStyle(_c0,{borderColor:new Color(_c1).invert()}); 716 }else{ 717 Element.addClassName(_c0,Calendar.className.scheduleItemSelect); 718 } 719 }); 720 },mouseOutSubSchedule:function(_c3){ 721 _c3.each(function(_c4){ 722 if(_c4.originalBorderColor){ 723 Element.setStyle(_c4,{borderColor:_c4.originalBorderColor}); 724 }else{ 725 Element.removeClassName(_c4,Calendar.className.scheduleItemSelect); 726 } 727 }); 728 },toDate:function(_c5){ 729 return DateUtil.toDate(_c5); 723 730 },getCalendarTableId:function(){ 724 731 return this.ids.calTable; 725 732 },setSkipNode:function(){ 726 var _c 4=new Template(this.calendar.options.skipString);727 this.skipNode.each(function(_c 5){728 _c 5.value.innerHTML=_c4.evaluate({count:this.skipSchedules[_c5.key].length});733 var _c6=new Template(this.calendar.options.skipString); 734 this.skipNode.each(function(_c7){ 735 _c7.value.innerHTML=_c6.evaluate({count:this.skipSchedules[_c7.key].length}); 729 736 }.bind(this)); 730 737 },clickSkipNode:function(){ 731 738 this.hideTooltip(); 732 739 this.calendar.options.clickSkipNode.apply(this,arguments); 733 },showTooltip:function(e,id,_c 8){734 var _c 9=$(this.getTooltipId());735 var _c a=this.skipSchedules[id];736 var _c b=null;737 var _c c=null;738 _c 9.innerHTML=_ca.map(function(s){739 _c b=(DateUtil.toDate(s.start).sameDate(_c8))?s.start:{hour:0,min:0};740 _c c=(DateUtil.toDate(s.finish).sameDate(_c8))?s.finish:{hour:0,min:0};741 return this.calendar.formatTime(_c b)+"-"+this.calendar.formatTime(_cc)+" "+s.description;740 },showTooltip:function(e,id,_ca){ 741 var _cb=$(this.getTooltipId()); 742 var _cc=this.skipSchedules[id]; 743 var _cd=null; 744 var _ce=null; 745 _cb.innerHTML=_cc.map(function(s){ 746 _cd=(DateUtil.toDate(s.start).sameDate(_ca))?s.start:{hour:0,min:0}; 747 _ce=(DateUtil.toDate(s.finish).sameDate(_ca))?s.finish:{hour:0,min:0}; 748 return this.calendar.formatTime(_cd)+"-"+this.calendar.formatTime(_ce)+" "+s.description; 742 749 }.bind(this)).join("<br />"); 743 Element.positionedByCursor(_c 9,e,{top:10,left:10});744 _c 9.show();750 Element.positionedByCursor(_cb,e,{top:10,left:10}); 751 _cb.show(); 745 752 },hideTooltip:function(){ 746 753 $(this.getTooltipId()).hide(); … … 749 756 CalendarMonth.id=["year","month","column","nextYear","nextMonth","preYear","preMonth","calTable","scheduleContainer","container","emptyRow"]; 750 757 Object.extend(CalendarMonth.prototype,AbstractCalendar.prototype); 751 Object.extend(CalendarMonth.prototype,{initialize:function(_ ce){752 this.calendar=_ ce;758 Object.extend(CalendarMonth.prototype,{initialize:function(_d0){ 759 this.calendar=_d0; 753 760 this.week=this.getWeek()[0]; 754 761 this.ids=SpinelzUtil.concat(this.calendar.element.id,CalendarMonth.id); … … 757 764 return "<td class='"+this.calendar.classNames.preYears+"'>"+"<div id='"+this.ids.preYear+"' class='"+this.calendar.classNames.preYearMark+"'></div>"+"<div id='"+this.ids.preMonth+"' class='"+this.calendar.classNames.preMonthMark+"'></div>"+"</td>"; 758 765 },buildHeaderCenter:function(){ 759 var _ cf=[];766 var _d1=[]; 760 767 if(this.calendar.options.monthHeaderFormat){ 761 var _d 0=this.calendar.date;762 var _d 1=new Template(this.calendar.options.monthHeaderFormat).evaluate({year:_d0.getFullYear(),month:_d0.getMonth()+1});763 _ cf=[_d1," "];764 } 765 return "<td class='"+this.calendar.classNames.years+"'>"+"<span id='"+this.ids.month+"' class='"+this.calendar.classNames.ym+"'>"+(_ cf[0]||DateUtil.months[this.calendar.date.getMonth()])+"</span>"+"<span id='"+this.ids.year+"' class='"+this.calendar.classNames.ym+"'>"+(_cf[1]||this.calendar.date.getFullYear())+"</span>"+"</td>";768 var _d2=this.calendar.date; 769 var _d3=new Template(this.calendar.options.monthHeaderFormat).evaluate({year:_d2.getFullYear(),month:_d2.getMonth()+1}); 770 _d1=[_d3," "]; 771 } 772 return "<td class='"+this.calendar.classNames.years+"'>"+"<span id='"+this.ids.month+"' class='"+this.calendar.classNames.ym+"'>"+(_d1[0]||DateUtil.months[this.calendar.date.getMonth()])+"</span>"+"<span id='"+this.ids.year+"' class='"+this.calendar.classNames.ym+"'>"+(_d1[1]||this.calendar.date.getFullYear())+"</span>"+"</td>"; 766 773 },buildHeaderRight:function(){ 767 774 return "<td class='"+this.calendar.classNames.nextYears+"'>"+"<div id='"+this.ids.nextMonth+"' class='"+this.calendar.classNames.nextMonthMark+"'></div>"+"<div id='"+this.ids.nextYear+"' class='"+this.calendar.classNames.nextYearMark+"'></div>"+"</td>"; … … 769 776 return "<div>"+this.buildTableHeader()+this.buildScheduleContainer()+"</div>"; 770 777 },buildTableHeader:function(){ 771 var _d 2=100/this.calendar.options.displayIndexes.length+"%";772 var _d 3=this.calendar.options.displayIndexes.last();773 var _d 4=this.ids.column;774 var _d 5=this.calendar.options.displayIndexes.inject("",function(_d6,i){775 var id=_d 4.appendSuffix(i);778 var _d4=100/this.calendar.options.displayIndexes.length+"%"; 779 var _d5=this.calendar.options.displayIndexes.last(); 780 var _d6=this.ids.column; 781 var _d7=this.calendar.options.displayIndexes.inject("",function(_d8,i){ 782 var id=_d6.appendSuffix(i); 776 783 this.columnIds.push(id); 777 var _d 9=(_d3==i)?this.calendar.classNames.thRight:"";778 _d 6+="<th id='"+id+"' class='"+_d9+"' width='"+_d2+"'>"+this.calendar.options.dayOfWeek[i]+"</th>";779 return _d 6;784 var _db=(_d5==i)?this.calendar.classNames.thRight:""; 785 _d8+="<th id='"+id+"' class='"+_db+"' width='"+_d4+"'>"+this.calendar.options.dayOfWeek[i]+"</th>"; 786 return _d8; 780 787 }.bind(this)); 781 return "<table class='"+this.calendar.classNames.table+"'>"+"<tr>"+_d 5+"</tr>"+"</table>";788 return "<table class='"+this.calendar.classNames.table+"'>"+"<tr>"+_d7+"</tr>"+"</table>"; 782 789 },buildScheduleContainer:function(){ 783 var _d a=(this.calendar.options.size=="large")?"position: relative":"";784 return "<div id='"+this.getScheduleContainerId()+"' style='"+_d a+";'>"+this.buildTableData()+this.buildSelector()+"</div>";790 var _dc=(this.calendar.options.size=="large")?"position: relative":""; 791 return "<div id='"+this.getScheduleContainerId()+"' style='"+_dc+";'>"+this.buildTableData()+this.buildSelector()+"</div>"; 785 792 },buildTableData:function(){ 786 var _d b=this.calendar.options.displayIndexes;787 var _d c=new Date();788 var _d d=this.calendar.date.getFullYear();789 var _ de=this.calendar.date.getMonth();790 var _ df=DateUtil.getFirstDate(_dd,_de).getDay();791 var _e 0=DateUtil.getLastDate(_dd,_de).getDate();793 var _dd=this.calendar.options.displayIndexes; 794 var _de=new Date(); 795 var _df=this.calendar.date.getFullYear(); 796 var _e0=this.calendar.date.getMonth(); 797 var _e1=DateUtil.getFirstDate(_df,_e0).getDay(); 798 var _e2=DateUtil.getLastDate(_df,_e0).getDate(); 792 799 var trs=[]; 793 800 var tds=[]; 794 var _e 3=100/_db.length+"%";795 var _e 4=_db.last();796 var _e 5,_e6,_e7,_e8,_e9,i=null;801 var _e5=100/_dd.length+"%"; 802 var _e6=_dd.last(); 803 var _e7,_e8,_e9,_ea,_eb,i=null; 797 804 this.dateMap={}; 798 var _e b=this.calendar.options.weekIndex;799 var _e c=DateUtil.dayOfWeek.length*6;805 var _ed=this.calendar.options.weekIndex; 806 var _ee=DateUtil.dayOfWeek.length*6; 800 807 var i=null; 801 808 var day=1; 802 if(_e b<=_df){803 i=_e b;804 _e c+=i;805 }else{ 806 i=_e b-7;807 _e c-=i;808 } 809 var _ ee=_df-_eb;810 if(_ ee<0){811 _ ee+DateUtil.dayOfWeek.length;812 } 813 if((_e 0+_ee)>_ec){814 _e c+=DateUtil.dayOfWeek.length;815 } 816 var _ ef=_eb;817 var _f 0=0;818 for(;i<_e c;i++){819 if(_d b.include(_ef)){820 var _f 1=(_ef==_e4)?this.calendar.classNames.tdRight:"";821 if(i<_ df){822 var _f 2=i-_df+1;823 _e 8=new Date(this.calendar.date.getFullYear(),this.calendar.date.getMonth(),_f2);824 tds.push(this.buildEmptyRow(_e 8,_e3,_f1,_f2));825 }else{ 826 if(day>_e 0){827 _e 8=new Date(this.calendar.date.getFullYear(),this.calendar.date.getMonth(),day);828 tds.push(this.buildEmptyRow(_e 8,_e3,_f1,day));829 }else{ 830 if(i==_ df){831 _e c+=_f0;832 } 833 _e 8=new Date(this.calendar.date.getFullYear(),this.calendar.date.getMonth(),day);834 _e 6=this.calendar.options.holidays[_e8.toDateString()];809 if(_ed<=_e1){ 810 i=_ed; 811 _ee+=i; 812 }else{ 813 i=_ed-7; 814 _ee-=i; 815 } 816 var _f0=_e1-_ed; 817 if(_f0<0){ 818 _f0+DateUtil.dayOfWeek.length; 819 } 820 if((_e2+_f0)>_ee){ 821 _ee+=DateUtil.dayOfWeek.length; 822 } 823 var _f1=_ed; 824 var _f2=0; 825 for(;i<_ee;i++){ 826 if(_dd.include(_f1)){ 827 var _f3=(_f1==_e6)?this.calendar.classNames.tdRight:""; 828 if(i<_e1){ 829 var _f4=i-_e1+1; 830 _ea=new Date(this.calendar.date.getFullYear(),this.calendar.date.getMonth(),_f4); 831 tds.push(this.buildEmptyRow(_ea,_e5,_f3,_f4)); 832 }else{ 833 if(day>_e2){ 834 _ea=new Date(this.calendar.date.getFullYear(),this.calendar.date.getMonth(),day); 835 tds.push(this.buildEmptyRow(_ea,_e5,_f3,day)); 836 }else{ 837 if(i==_e1){ 838 _ee+=_f2; 839 } 840 _ea=new Date(this.calendar.date.getFullYear(),this.calendar.date.getMonth(),day); 841 _e8=this.calendar.options.holidays[_ea.toDateString()]; 835 842 if(this.calendar.options.size==Calendar.size.large){ 836 tds.push(this.buildLargeRow(_e 8,_e6,_dc,_e3,_f1));837 }else{ 838 _e 7=this.calendar.options.schedules.detect(function(_f3){839 var _f 4=DateUtil.toDate(_f3.start);840 return _e 8.sameDate(_f4);841 }); 842 tds.push(this.buildSmallRow(_e 8,_e6,_e7,_dc,_e3,_f1));843 } 844 } 845 } 846 _f 0++;847 } 848 if(i>=_ df){843 tds.push(this.buildLargeRow(_ea,_e8,_de,_e5,_f3)); 844 }else{ 845 _e9=this.calendar.options.schedules.detect(function(_f5){ 846 var _f6=DateUtil.toDate(_f5.start); 847 return _ea.sameDate(_f6); 848 }); 849 tds.push(this.buildSmallRow(_ea,_e8,_e9,_de,_e5,_f3)); 850 } 851 } 852 } 853 _f2++; 854 } 855 if(i>=_e1){ 849 856 day++; 850 857 } 851 if(_ ef==_e4){858 if(_f1==_e6){ 852 859 if(!(tds.first().match(/empty/)&&tds.last().match(/empty/))){ 853 860 trs.push("<tr>"+tds.join("")+"</tr>"); … … 855 862 tds=[]; 856 863 } 857 if(_ ef>=6){858 _ ef=0;859 }else{ 860 _ ef++;864 if(_f1>=6){ 865 _f1=0; 866 }else{ 867 _f1++; 861 868 } 862 869 } 863 870 this.rowMax=trs.length-1; 864 871 return "<table id='"+this.getCalendarTableId()+"' class='"+this.calendar.classNames.table+"'>"+trs.join("")+"</table>"; 865 },buildEmptyRow:function(_f 5,_f6,_f7,_f8){866 var id=this.ids.emptyRow.appendSuffix(_f 8);867 this.dateMap[id]=_f 5;868 return "<td id='"+id+"' class='"+_f 7+"' width='"+_f6+"'> </td>";869 },buildLargeRow:function(_f a,_fb,_fc,_fd,_fe){870 var _ ff=null;871 var _10 0=(_fa.days()==_fc.days())?this.calendar.classNames.highlightDay:"";872 var _10 1=this.calendar.options.clickDateText;873 if(_10 1||(_101==null)){874 _ ff="<span class='"+_100+"'>"+_fa.getDate()+"</span>";875 }else{ 876 _ ff="<span class='"+_100+"' style='text-decoration: none;'>"+_fa.getDate()+"</span>";877 } 878 var _10 2="";872 },buildEmptyRow:function(_f7,_f8,_f9,_fa){ 873 var id=this.ids.emptyRow.appendSuffix(_fa); 874 this.dateMap[id]=_f7; 875 return "<td id='"+id+"' class='"+_f9+"' width='"+_f8+"'> </td>"; 876 },buildLargeRow:function(_fc,_fd,_fe,_ff,_100){ 877 var _101=null; 878 var _102=(_fc.days()==_fe.days())?this.calendar.classNames.highlightDay:""; 879 var _103=this.calendar.options.clickDateText; 880 if(_103||(_103==null)){ 881 _101="<span class='"+_102+"'>"+_fc.getDate()+"</span>"; 882 }else{ 883 _101="<span class='"+_102+"' style='text-decoration: none;'>"+_fc.getDate()+"</span>"; 884 } 885 var _104=""; 879 886 var name=""; 880 if(_f b){881 _10 2=this.calendar.classNames.holiday;882 name="<span class='"+this.calendar.classNames.holidayName+"'>"+_f b.name+"</span>";883 }else{ 884 if(this.calendar.isRegularHoliday(_f a.getDay())){885 _10 2=this.calendar.classNames.regularHoliday;886 }else{ 887 _10 2=this.calendar.classNames.date;888 } 889 } 890 _ fe=[_102,_fe];891 var id=this.getDateId(_f a);892 this.dateMap[id]=_f a;893 return "<td id='"+id+"' class='"+_ fe.join(" ")+"' width='"+_fd+"'>"+"<div class='"+this.calendar.classNames.dateContainer+"'>"+_ff+name+"</div>"+"</td>";894 },buildSmallRow:function(date,_10 6,_107,_108,_109,_10a){887 if(_fd){ 888 _104=this.calendar.classNames.holiday; 889 name="<span class='"+this.calendar.classNames.holidayName+"'>"+_fd.name+"</span>"; 890 }else{ 891 if(this.calendar.isRegularHoliday(_fc.getDay())){ 892 _104=this.calendar.classNames.regularHoliday; 893 }else{ 894 _104=this.calendar.classNames.date; 895 } 896 } 897 _100=[_104,_100]; 898 var id=this.getDateId(_fc); 899 this.dateMap[id]=_fc; 900 return "<td id='"+id+"' class='"+_100.join(" ")+"' width='"+_ff+"'>"+"<div class='"+this.calendar.classNames.dateContainer+"'>"+_101+name+"</div>"+"</td>"; 901 },buildSmallRow:function(date,_108,_109,_10a,_10b,_10c){ 895 902 var id=this.getDateId(date); 896 903 this.dateMap[id]=date; 897 var _10 c=$H({id:id,width:_109});898 _10 a=[];899 if(_10 7){900 _10 a.push(this.calendar.classNames.schedule);901 var _10 d=_107[0];902 if(_10 d){903 _10 c.title=_10d.description;904 } 905 }else{ 906 if(_10 6){907 _10 a.push(this.calendar.classNames.holiday);908 _10 c.title=_106.name.stripTags();904 var _10e=$H({id:id,width:_10b}); 905 _10c=[]; 906 if(_109){ 907 _10c.push(this.calendar.classNames.schedule); 908 var _10f=_109[0]; 909 if(_10f){ 910 _10e.title=_10f.description; 911 } 912 }else{ 913 if(_108){ 914 _10c.push(this.calendar.classNames.holiday); 915 _10e.title=_108.name.stripTags(); 909 916 }else{ 910 917 if(this.calendar.isRegularHoliday(date.getDay())){ 911 _10 a.push(this.calendar.classNames.regularHoliday);912 }else{ 913 _10 a.push(this.calendar.classNames.date);914 } 915 } 916 } 917 if(date.days()==_10 8.days()){918 _10 a.push(Calendar.className.highlightDay);919 } 920 _10 a.push(_10a);921 _10 a=_10a.join(" ");922 _10 c=_10c.inject("",function(html,pair){918 _10c.push(this.calendar.classNames.regularHoliday); 919 }else{ 920 _10c.push(this.calendar.classNames.date); 921 } 922 } 923 } 924 if(date.days()==_10a.days()){ 925 _10c.push(Calendar.className.highlightDay); 926 } 927 _10c.push(_10c); 928 _10c=_10c.join(" "); 929 _10e=_10e.inject("",function(html,pair){ 923 930 return html+" "+pair.key+"=\""+pair.value+"\""; 924 931 }); 925 return "<td class=\""+_10 a+"\""+_10c+">"+date.getDate()+"</td>";932 return "<td class=\""+_10c+"\""+_10e+">"+date.getDate()+"</td>"; 926 933 },beforeBuild:function(){ 927 934 this.column={}; … … 930 937 rule=CssUtil.getCssRuleBySelectorText("."+Calendar.className.dateContainer); 931 938 this.column.dateTextHeight=parseInt(rule.style["height"],10); 932 },buildSchedule:function(_11 1,_112){933 var id="scheduleItem_"+_11 1.id;934 var _11 4=(_111.edit==undefined||_111.edit);939 },buildSchedule:function(_113,_114){ 940 var id="scheduleItem_"+_113.id; 941 var _116=(_113.edit==undefined||_113.edit); 935 942 var item=Builder.node("DIV",{id:id}); 936 var _11 6=DateUtil.toDate(_111.start);937 var _11 7=DateUtil.toDate(_111.finish);938 if(_11 1.finish.hour==0&&_111.finish.min==0){939 _11 7=_117.advance({days:-1});940 } 941 var _11 8=this.calendar.options.noEvent;942 var _11 9={};943 var _118=DateUtil.toDate(_113.start); 944 var _119=DateUtil.toDate(_113.finish); 945 if(_113.finish.hour==0&&_113.finish.min==0){ 946 _119=_119.advance({days:-1}); 947 } 948 var _11a=this.calendar.options.noEvent; 949 var _11b={}; 943 950 if(!UserAgent.isIE()){ 944 _11 9.whiteSpace="nowrap";945 } 946 if(_11 8){947 _11 9.cursor="default";948 } 949 if(_11 6.sameDate(_117)){951 _11b.whiteSpace="nowrap"; 952 } 953 if(_11a){ 954 _11b.cursor="default"; 955 } 956 if(_118.sameDate(_119)){ 950 957 this.calendar.css.addClassNames(item,"scheduleItemNoBorder"); 951 958 }else{ 952 if(_111.background_color){ 953 _119.backgroundColor=_111.background_color; 954 } 955 if(_111.frame_color){ 956 _119.border="2px solid "+_111.frame_color; 959 if(_113.frame_color){ 960 _11b.border="2px solid "+_113.frame_color; 961 _11b.backgroundColor=_113.frame_color; 957 962 } 958 963 this.calendar.css.addClassNames(item,"scheduleItemLarge"); 959 964 } 960 Element.setStyle(item,_119); 961 var _11a=[]; 962 var _11b=null; 963 var _11c=(_111.removable==undefined||_111.removable); 964 if(_114&&_11c){ 965 _11b="scheduleDeleteImg_"+_111.id; 966 _11a.push(_11b); 967 var _11d=Builder.node("DIV",{id:_11b,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 968 item.appendChild(_11d); 969 if(!_118){ 970 Event.observe(_11d,"click",this.clickDeleteImage.bind(this,_111)); 971 } 972 } 973 if(_111.copiable){ 974 var _11e="display: none;"; 975 if(_11a.length>0){ 976 _11e+="right: 17px;"; 977 } 978 _11b="scheduleCopyImg_"+_111.id; 979 _11a.push(_11b); 980 var _11f=Builder.node("DIV",{id:_11b,className:this.calendar.css.joinClassNames("copyImg"),style:_11e}); 981 item.appendChild(_11f); 982 if(!_118){ 983 Event.observe(_11f,"click",this.clickCopyImage.bind(this,_111)); 984 } 985 } 986 if(!_118&&(_11a.length>0)){ 987 Event.observe(item,"mouseover",this.showImage.bind(this,_11a)); 988 Event.observe(item,"mouseout",this.hideImage.bind(this,_11a)); 989 } 990 if(!_118&&this.calendar.options.dblclickSchedule){ 991 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_111)); 992 } 993 var _120=null; 994 if(_114){ 995 _120=Builder.node("DIV",{className:this.calendar.css.joinClassNames("scheduleHandler")}); 996 if(_118){ 997 Element.hide(_120); 998 } 965 Element.setStyle(item,_11b); 966 var _11c=[]; 967 var _11d=(_113.removable==undefined||_113.removable); 968 if(_116&&_11d){ 969 var _11e=Builder.node("DIV",{id:"scheduleDeleteImg_"+_113.id,className:this.calendar.css.joinClassNames("deleteImg"),style:"display: none;"}); 970 _11c.push(_11e); 971 item.appendChild(_11e); 972 if(!_11a){ 973 Event.observe(_11e,"click",this.clickDeleteImage.bind(this,_113)); 974 } 975 } 976 if(_113.copiable){ 977 var _11f="display: none;"; 978 if(_11c.length>0){ 979 _11f+="right: 17px;"; 980 } 981 var _120=Builder.node("DIV",{id:"scheduleCopyImg_"+_113.id,className:this.calendar.css.joinClassNames("copyImg"),style:_11f}); 982 _11c.push(_120); 999 983 item.appendChild(_120); 984 if(!_11a){ 985 Event.observe(_120,"click",this.clickCopyImage.bind(this,_113)); 986 } 987 } 988 if(!_11a&&this.calendar.options.dblclickSchedule){ 989 Event.observe(item,"dblclick",this.calendar.options.dblclickSchedule.bind(this,_113)); 1000 990 } 1001 991 var icon=null; 1002 if(_11 1.icon){1003 icon=Builder.node("IMG",{ src:_111.icon,alt:"icon",style:"float: left;",width:16,height:16});992 if(_113.icon){ 993 icon=Builder.node("IMG",{id:"private_img_"+_113.id,src:_113.icon,alt:"icon",style:"float: left;",width:16,height:16}); 1004 994 item.appendChild(icon); 1005 } 1006 if(!_111.publicity){ 995 }else{ 996 if(Calendar.defaultIconPath){ 997 icon=Builder.node("IMG",{id:"private_img_"+_113.id,src:Calendar.defaultIconPath,alt:"icon",style:"float: left;",width:16,height:16}); 998 item.appendChild(icon); 999 } 1000 } 1001 var _122=null; 1002 if(!_113.publicity){ 1007 1003 if(Calendar.privateImgPath){ 1008 icon=Builder.node("IMG",{src:Calendar.privateImgPath,alt:"private",style:"float: left;",width:16,height:16}); 1009 item.appendChild(icon); 1010 }else{ 1011 icon=Builder.node("DIV",{id:"private_img_"+_111.id}); 1012 this.calendar.css.addClassNames(icon,"privateImg"); 1013 item.appendChild(icon); 1014 } 1004 _122=Builder.node("IMG",{src:Calendar.privateImgPath,alt:"private",style:"position: absolute; right: 0px; display: block;",width:16,height:16}); 1005 item.appendChild(_122); 1006 }else{ 1007 _122=Builder.node("DIV",{id:"private_img_"+_113.id}); 1008 this.calendar.css.addClassNames(_122,"privateImg"); 1009 item.appendChild(_122); 1010 } 1011 } 1012 if(!_11a&&(_11c.length>0)){ 1013 Event.observe(item,"mouseover",this.showImage.bind(this,_11c,_122)); 1014 Event.observe(item,"mouseout",this.hideImage.bind(this,_11c,_122)); 1015 1015 } 1016 1016 var body=Builder.node("DIV"); 1017 var text=this.getTimeText((_11 2)?_111.start:{hour:"0",min:"0"},_111.finish);1018 var _12 4=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]);1019 this.calendar.css.addClassNames(_12 4,"scheduleTimeArea");1020 item.appendChild(_12 4);1021 var _12 5=_111.description.unescapeHTML();1022 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_12 5]));1023 item.title=text+"-"+this.calendar.formatTime(_11 1.finish)+" "+_125;1024 item.schedule=_11 1;1025 return [item ,_120];1026 },adjustScheduleStyle:function(item,_12 7,_128,_129){1017 var text=this.getTimeText((_114)?_113.start:{hour:"0",min:"0"},_113.finish); 1018 var _125=Builder.node("DIV",{id:id+"_text",style:"float: left;"},[text]); 1019 this.calendar.css.addClassNames(_125,"scheduleTimeAreaMonth"); 1020 item.appendChild(_125); 1021 var _126=_113.description.unescapeHTML(); 1022 item.appendChild(Builder.node("DIV",{id:id+"_description"},[_126])); 1023 item.title=text+"-"+this.calendar.formatTime(_113.finish)+" "+_126; 1024 item.schedule=_113; 1025 return [item]; 1026 },adjustScheduleStyle:function(item,_128,_129,_12a){ 1027 1027 var self=this; 1028 var _12 b=parseInt(Element.getStyle(item,"height"),10);1028 var _12c=parseInt(Element.getStyle(item,"height"),10); 1029 1029 var top=parseInt(Element.getStyle(item,"top"),10); 1030 var _12 d=this.getScheduleRange(item);1030 var _12e=this.getScheduleRange(item); 1031 1031 var tops=[]; 1032 var _1 2f=3;1033 _12 9.each(function(_130){1034 var _13 1=self.getScheduleRange(_130);1035 if(_12 d.any(function(r){1036 return _13 1.include(r);1032 var _130=3; 1033 _12a.each(function(_131){ 1034 var _132=self.getScheduleRange(_131); 1035 if(_12e.any(function(r){ 1036 return _132.include(r); 1037 1037 })){ 1038 tops.push(_13 0.topIndex);1039 } 1040 }); 1041 var _13 3=$R(0,tops.length,true).detect(function(i){1038 tops.push(_131.topIndex); 1039 } 1040 }); 1041 var _134=$R(0,tops.length,true).detect(function(i){ 1042 1042 return !tops.include(i); 1043 1043 }); 1044 if(isNaN(_13 3)){1045 _13 3=tops.length;1046 } 1047 item.topIndex=_13 3;1048 Element.setStyle(item,{top:top+(_12 b+2)*_133+"px"});1049 if(_13 3>=_12f){1044 if(isNaN(_134)){ 1045 _134=tops.length; 1046 } 1047 item.topIndex=_134; 1048 Element.setStyle(item,{top:top+(_12c+2)*_134+"px"}); 1049 if(_134>=_130){ 1050 1050 Element.hide(item); 1051 var node=this.buildSkipSchedule(_12 7+"_"+_128,item);1051 var node=this.buildSkipSchedule(_128+"_"+_129,item); 1052 1052 if(node){ 1053 1053 var left=Element.getStyle(item,"left"); 1054 Element.setStyle(node,{top:top+(_12 b+2)*_133+"px",left:left});1054 Element.setStyle(node,{top:top+(_12c+2)*_134+"px",left:left}); 1055 1055 } 1056 1056 return node; 1057 1057 } 1058 },buildSkipSchedule:function(_13 7,item){1059 var id=this.calendar.element.id.appendSuffix(_13 7);1058 },buildSkipSchedule:function(_138,item){ 1059 var id=this.calendar.element.id.appendSuffix(_138); 1060 1060 if(!this.skipNode[id]){ 1061 var _13 a=this.getAdjustSize()+(UserAgent.isIE()?0.5:0);1062 var _13 b=this.column.width+_13a-1+"px";1063 var node=Builder.node("a",{id:id,style:"display: block; z-index: 1000; cursor: pointer; width: "+_13 b+";",href:"javascript:void(0);"},["more"]);1061 var _13b=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 1062 var _13c=this.column.width+_13b-1+"px"; 1063 var node=Builder.node("a",{id:id,style:"display: block; z-index: 1000; cursor: pointer; width: "+_13c+";",href:"javascript:void(0);"},["more"]); 1064 1064 this.calendar.css.addClassNames(node,"skipNode"); 1065 1065 node.skipId=id; … … 1073 1073 return item.cellIndex+i; 1074 1074 }); 1075 },setScheduleBaseStyle:function(item,_14 0,_141,_142){1076 var _14 3=this.column.height;1077 var top=_14 3*_140+this.column.dateTextHeight;1078 var _14 5=this.getAdjustSize()+(UserAgent.isIE()?0.5:0);1079 Element.setStyle(item,{top:top+"px",width:this.column.width*_14 2+_145*(_142-1)+"px",left:this.column.width*_141+_141*_145+"px"});1075 },setScheduleBaseStyle:function(item,_141,_142,_143){ 1076 var _144=this.column.height; 1077 var top=_144*_141+this.column.dateTextHeight; 1078 var _146=this.getAdjustSize()+(UserAgent.isIE()?0.5:0); 1079 Element.setStyle(item,{top:top+"px",width:this.column.width*_143+_146*(_143-1)+"px",left:this.column.width*_142+_142*_146+"px"}); 1080 1080 },afterBuild:function(){ 1081 1081 this.calendar.options.startAfterBuild(); 1082 var _14 6=this.getTooltipId();1083 if($(_14 6)){1084 Element.appendToBody(_14 6);1082 var _147=this.getTooltipId(); 1083 if($(_147)){ 1084 Element.appendToBody(_147); 1085 1085 } 1086 1086 this.scheduleNodes=[]; … … 1095 1095 this.setSelector(); 1096 1096 var self=this; 1097 var _14 8=this.calendar.options.displayIndexes;1098 var _14 9=this.getDragDistance();1099 var _14 a=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){1097 var _149=this.calendar.options.displayIndexes; 1098 var _14a=this.getDragDistance(); 1099 var _14b=$R(0,$(this.getCalendarTableId()).rows.length).map(function(){ 1100 1100 return []; 1101 1101 }); 1102 1102 var date=this.calendar.date; 1103 var _14 c=DateUtil.getFirstDate(date.getFullYear(),date.getMonth());1104 var _14 d=_14c.days();1105 var _14 e=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days();1106 self.calendar.options.schedules.each(function(_1 4f,_150){1107 var _15 1=self.toDate(_14f.start);1108 var _15 2=_151.days();1109 var _15 3=self.toDate(_14f.finish);1110 var _15 4=_153.days();1111 var days=self.getDayDiff(_1 4f);1112 if(_1 4f.finish.hour==0&&_14f.finish.min==0){1103 var _14d=DateUtil.getFirstDate(date.getFullYear(),date.getMonth()); 1104 var _14e=_14d.days(); 1105 var _14f=DateUtil.getLastDate(date.getFullYear(),date.getMonth()).days(); 1106 self.calendar.options.schedules.each(function(_150,_151){ 1107 var _152=self.toDate(_150.start); 1108 var _153=_152.days(); 1109 var _154=self.toDate(_150.finish); 1110 var _155=_154.days(); 1111 var days=self.getDayDiff(_150); 1112 if(_150.finish.hour==0&&_150.finish.min==0){ 1113 1113 days--; 1114 1114 } 1115 if((_15 2>=_14d&&_152<=_14e)||(_154>=_14d&&_154<=_14e)){1116 if(!_14 c.sameMonth(_151)){1117 _15 1=_14c;1118 } 1119 self.setSchedule(_1 4f,_14a,_149,days);1115 if((_153>=_14e&&_153<=_14f)||(_155>=_14e&&_155<=_14f)){ 1116 if(!_14d.sameMonth(_152)){ 1117 _152=_14d; 1118 } 1119 self.setSchedule(_150,_14b,_14a,days); 1120 1120 } 1121 1121 }); … … 1142 1142 } 1143 1143 } 1144 },setSchedule:function(_15 8,_159,_15a,days){1145 var _15 c=[];1146 var _15 d=6;1147 var _15 e=DateUtil.toDate(_158.start);1148 var date=_15 e;1149 var _16 0=this.calendar.options.displayIndexes;1150 var _16 1=this.calendar.date;1151 var _16 2=this.calendar.options.noEvent;1152 var _16 3=this.calendar.options.clickSkipNode;1144 },setSchedule:function(_159,_15a,_15b,days){ 1145 var _15d=[]; 1146 var _15e=6; 1147 var _15f=DateUtil.toDate(_159.start); 1148 var date=_15f; 1149 var _161=this.calendar.options.displayIndexes; 1150 var _162=this.calendar.date; 1151 var _163=this.calendar.options.noEvent; 1152 var _164=this.calendar.options.clickSkipNode; 1153 1153 while(days>=0){ 1154 var _16 4=this.getLastWday(date);1155 var _16 5=days+1;1156 var _16 6=date.getDay();1157 var _16 7=date.advance({days:_165-1});1158 if(_16 7.getTime()>_164.getTime()){1159 _16 7=_164;1160 _16 5=_167.days()-date.days()+1;1161 } 1162 var _16 8=_167.getDay();1163 var _16 9=null;1164 if(_16 6<=_168){1165 _16 9=$R(_166,_168,false);1166 }else{ 1167 _16 9=$R(0,_168,false).toArray().concat($R(_166,_15d,false).toArray());1168 } 1169 var _16 a=_169.findAll(function(day){1170 return _16 0.include(day);1154 var _165=this.getLastWday(date); 1155 var _166=days+1;
