You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
1.7 KiB

var EXPO=EXPO||{};EXPO.profile=EXPO.profile||{},EXPO.profile.calendar?console.warn("WARNING: EXPO.profile.calendar is already defined!"):EXPO.profile.calendar=function(){var o=(EXPO.common,{});return o.opt={},$(function(){}),o.init=function(o){$.extend(this.opt,o);var t=this,s=$("#"+this.opt.scrollBoxId),l=$("#"+this.opt.calenadrId),n=(l.find("td."+this.opt.currentDayClass).index()*this.opt.cellWidth,$("#"+this.opt.scrollLeftId)),e=$("#"+this.opt.scrollRightId),a=$("."+this.opt.noEventsClass),i=$("."+this.opt.calendarToggleClass),c=this.opt.cellWidth*this.opt.cellsToScroll,r=0,d=function(){var o=0,s=0,l=t.opt.cellWidth,n=$("#"+t.opt.calenadrId),e=n.find("td."+t.opt.currentDayClass).index()+1,a=t.opt.cellsToScroll,i=n.find("."+t.opt.daysClass+" td").length,c=i/a,r=i/e;return s=c-r,s?(s=Math.round(s),o=a*s*l):o=0,o};$(function(){a.each(function(){$(this).attr("colspan")&&1!=$(this).attr("colspan")||$(this).find("."+t.opt.eventWrapClass).addClass("small")}),$("."+t.opt.eventsClass).each(function(){r++,3==r&&$(this).addClass("grey"),4==r&&($(this).addClass("grey"),r=0)})}),$(window).load(function(){s.mCustomScrollbar({axis:"y",horizontalScroll:!0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!1,updateOnBrowserResize:!1}}),s.mCustomScrollbar("scrollTo",d())}),n.on("click",function(){s.mCustomScrollbar("scrollTo","+="+c)}),e.on("click",function(){s.mCustomScrollbar("scrollTo","-="+c)}),i.on("click",function(){var o=$(this),t=o.closest(".ep-sect"),s=t.children("div.ep-sect-body");return t.hasClass("eps-opened")?(e.hide(),n.hide(),s.stop().animate({opacity:0},300,function(){t.removeClass("eps-opened")})):(e.show(),n.show(),s.stop().animate({opacity:1},300,function(){t.addClass("eps-opened")})),!1})},o}();