Merge branch 'develop' of http://git.general-servers.com/expomap/expomap into develop
commit
614bf306d7
12 changed files with 452 additions and 200 deletions
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 1.8 KiB |
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
||||
var EXPO=EXPO||{};EXPO.profile=EXPO.profile||{},EXPO.profile.calendar?console.warn("WARNING: EXPO.profile.calendar is already defined!"):EXPO.profile.calendar=function(){var t=(EXPO.common,{});return t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var e=this,s=$("#"+this.opt.scrollBoxId),n=$("#"+this.opt.calenadrId),o=(n.find("td."+this.opt.currentDayClass).index()*this.opt.cellWidth,$("#"+this.opt.scrollLeftId)),a=$("#"+this.opt.scrollRightId),l=$("."+this.opt.noEventsClass),i=$("."+this.opt.calendarToggleClass),r=this.opt.cellWidth*this.opt.cellsToScroll,c=0,d=function(){var t=0,s=0,n=e.opt.cellWidth,o=$("#"+e.opt.calenadrId),a=o.find("td."+e.opt.currentDayClass).index()+1,l=e.opt.cellsToScroll,i=o.find("."+e.opt.daysClass+" td").length,r=i/l,c=i/a;return s=r-c,e.stepWidth=l*n,e.calendarWidth=n*i,s?(s=Math.floor(s),t=l*s*n):t=0,t};this.currentOffset=d(),this.$messages=[],$(function(){l.each(function(){$(this).attr("colspan")&&1!=$(this).attr("colspan")?$(this).width()>e.stepWidth&&e.$messages.push($(".message",$(this)).width(e.stepWidth).css({marginLeft:e.currentOffset+"px"})):$(this).find("."+e.opt.eventWrapClass).addClass("small")}),$("."+e.opt.eventsClass).each(function(){c++,3==c&&$(this).addClass("grey"),4==c&&($(this).addClass("grey"),c=0)})}),$(window).load(function(){s.mCustomScrollbar({axis:"y",horizontalScroll:!0,setLeft:"-"+EXPO.profile.calendar.currentOffset+"px",mouseWheel:{enable:!1},scrollButtons:{enable:!1},contentTouchScroll:!1,scrollInertia:1e3,timeout:0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!1,updateOnBrowserResize:!1},keyboard:{enable:!1}})}),o.on("click",function(){if(e.currentOffset>=e.stepWidth){e.currentOffset-=r,s.mCustomScrollbar("scrollTo","+="+r);for(var t=0;t<e.$messages.length;t++){var n=parseInt(e.$messages[t].inlineStyle("margin-left"));n>0&&e.$messages[t].css({marginLeft:e.currentOffset+"px"})}}}),a.on("click",function(){if(e.currentOffset+e.stepWidth<e.calendarWidth){e.currentOffset+=r,s.mCustomScrollbar("scrollTo","-="+r);for(var t=0;t<e.$messages.length;t++){var n=parseInt(e.$messages[t].inlineStyle("margin-left"));n+e.$messages[t].width()<e.calendarWidth&&e.$messages[t].css({marginLeft:e.currentOffset+"px"})}}}),i.on("click",function(){var t=$(this),e=t.closest(".ep-sect"),s=e.children("div.ep-sect-body");return e.hasClass("eps-opened")?(a.hide(),o.hide(),s.stop().animate({opacity:0},300,function(){e.removeClass("eps-opened")})):(a.show(),o.show(),s.stop().animate({opacity:1},300,function(){e.addClass("eps-opened")})),!1})},t}(); |
||||
var EXPO=EXPO||{};EXPO.profile=EXPO.profile||{},EXPO.profile.calendar?console.warn("WARNING: EXPO.profile.calendar is already defined!"):EXPO.profile.calendar=function(){var t=(EXPO.common,{});return t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var e=this,s=$("#"+this.opt.scrollBoxId),n=$("#"+this.opt.calenadrId),a=(n.find("td."+this.opt.currentDayClass).index()*this.opt.cellWidth,$("#"+this.opt.scrollLeftId)),o=$("#"+this.opt.scrollRightId),r=$("."+this.opt.noEventsClass),l=$("."+this.opt.calendarToggleClass),i=this.opt.cellWidth*this.opt.cellsToScroll,c=0,d=function(){var t,s,n=0,a=0,o=e.opt.cellWidth,r=$("#"+e.opt.calenadrId),l=r.find("td."+e.opt.currentDayClass).index(),i=e.opt.cellsToScroll,c=r.find("."+e.opt.daysClass+" td").length;return e.stepWidth=i*o,e.calendarWidth=o*c,l>0?(l++,t=c/i,s=c/l,a=t-s,e.currentDay=l,a?(a=Math.floor(a-1),n=i*a*o):n=0):(e.currentDay=0,n=0),n};this.currentOffset=d(),this.$messages=[],$(function(){r.each(function(){$(this).attr("colspan")&&1!=$(this).attr("colspan")?$(this).width()>e.stepWidth&&e.$messages.push($(".message",$(this)).width(e.stepWidth).css({marginLeft:e.currentOffset+"px"})):$(this).find("."+e.opt.eventWrapClass).addClass("small")}),$("."+e.opt.eventsClass).each(function(){c++,3==c&&$(this).addClass("grey"),4==c&&($(this).addClass("grey"),c=0)})}),$(window).load(function(){s.mCustomScrollbar({axis:"y",horizontalScroll:!0,setLeft:"-"+EXPO.profile.calendar.currentOffset+"px",mouseWheel:{enable:!1},scrollButtons:{enable:!1},contentTouchScroll:!1,scrollInertia:1e3,timeout:0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!1,updateOnBrowserResize:!1},keyboard:{enable:!1}})}),a.on("click",function(){if(e.currentOffset>=e.stepWidth){e.currentOffset-=i,s.mCustomScrollbar("scrollTo","+="+i);for(var t=0;t<e.$messages.length;t++){var n=parseInt(e.$messages[t].inlineStyle("margin-left"));n>0&&e.$messages[t].css({marginLeft:e.currentOffset+"px"})}}}),o.on("click",function(){if(e.currentOffset+e.stepWidth<e.calendarWidth){e.currentOffset+=i,s.mCustomScrollbar("scrollTo","-="+i);for(var t=0;t<e.$messages.length;t++){var n=parseInt(e.$messages[t].inlineStyle("margin-left"));n+e.$messages[t].width()<e.calendarWidth&&e.$messages[t].css({marginLeft:e.currentOffset+"px"})}}}),l.on("click",function(){var t=$(this),e=t.closest(".ep-sect"),s=e.children("div.ep-sect-body");return e.hasClass("eps-opened")?(o.hide(),a.hide(),s.stop().animate({opacity:0},300,function(){e.removeClass("eps-opened")})):(o.show(),a.show(),s.stop().animate({opacity:1},300,function(){e.addClass("eps-opened")})),!1})},t}(); |
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue