cosin-fahrplan/schedules/2014/assets/public_schedule-e5f130c7d7daa523e3fef70582a65a9b.js
2024-04-07 00:57:09 +02:00

1 line
No EOL
1.1 KiB
JavaScript

(function(){$(function(){var e,a,t,n,s,i;return e=$("table.rooms-table th").size(),a=Math.floor(($(window).width()-95)/200),e>a?($("#conference-rooms").css("overflow","hidden"),$("#conference-rooms").css("width",200*a),t=1,n=Math.ceil(e/a),s="<span id='pages'>( ",s+="<span id='current-page'>"+t+"</span>",s+=" / ",s+="<span id='page-count'>"+n+"</span>",s+=" )</span>",s+="<a class='page-button disabled' href='#' id='previous-page'>&lt;</a> ",s+="<a class='page-button' href='#' id='next-page'>&gt;</a> ",$("#pagination").append(s),$("#pagination").width($("#conference-rooms").width()+$("#time-line").width()),i=200*a,$("a#next-page").click(function(e){return n>t?($("table.rooms-table").animate({left:"-="+i+"px"},"slow"),t+=1,$("a#previous-page").removeClass("disabled"),t===n&&$("a#next-page").addClass("disabled"),$("span#current-page").html(t),e.preventDefault()):void 0}),$("a#previous-page").click(function(e){return t>1?($("table.rooms-table").animate({left:"+="+i+"px"},"slow"),t-=1,$("a#next-page").removeClass("disabled"),1===t&&$("a#previous-page").addClass("disabled"),$("span#current-page").html(t),e.preventDefault()):void 0})):void 0})}).call(this);