Файл: assets/plugins/fullcalendar-2.6.1/calendar.user.custom.min.js
Строк: 558
<?php
/*!
* CIFullCalendar v3.1.7.1
* Docs & License: http://www.cifullcalendar.com
* (c) 2016 Sir.Dre
*/
!function(e){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],e);else if("object"==typeof exports)e(require("jquery"),require("moment"),require("google.maps.Geocoder"));else{if("undefined"==typeof google.maps.Geocoder)throw"CIFullCalendar requires Gmaps to be loaded first";if("undefined"==typeof jQuery)throw"CIFullCalendar requires jQuery to be loaded first";if("undefined"==typeof moment)throw"CIFullCalendar requires Moment.js to be loaded first";e(jQuery,moment)}}(function(e,t){function a(t){t.lengthComputable&&e("progress").attr({value:t.loaded,max:t.total})}function n(){var e;for(t.locale(q),t.tz(Y).format(w),e=0;e<m.length;e++)m[e].render()}function r(){var a=t.tz(Y),r=6*a.format(M),o=6*a.format(_)+r/60,l=a.format(x)%12/12*360+90+o/12;n();var i=a.format(w),s=a.format(D),d=a.format(y);e("#hour").css("transform","rotate("+l+"deg)"),e("#minute").css("transform","rotate("+o+"deg)"),e("#second").css("transform","rotate("+r+"deg)"),e("#ampm").text(s),e("#date").text(i),e("#timezone").text(Y),e("#digiclock").text(d)}function o(){e("#calendar").fullCalendar("refetchEvents"),setTimeout(o,6e4)}function l(){r(),n(),setTimeout(l,1e3)}function i(e){var t=typeof e;return"undefined"===t||("object"===t?null===e||0===Object.keys(e).length:[!1,0,"","0"].indexOf(e)>=0)}function s(t,a,n){var r=new google.maps.LatLng(t,a);if(i(n))e("#gmapsCanvas").attr("class","mapHidden"),e("#markers_ulat").attr("class","mapHidden"),e("#markers_ulng").attr("class","mapHidden");else{e("#gmapsCanvas").attr("class","map"),e("#markers_ulat").attr("class","map"),e("#markers_ulng").attr("class","map");var o={center:r,zoomControl:!0,zoom:19,mapTypeId:google.maps.MapTypeId.ROADMAP},l=new google.maps.Map(document.getElementById("gmapsCanvas"),o),s=(new google.maps.InfoWindow,new google.maps.Marker({position:r,map:l,draggable:!1}));google.maps.event.addListener(l,"idle",function(){google.maps.event.trigger(l,"resize"),l.setZoom(l.getZoom()-1),l.setZoom(l.getZoom()+1)}),google.maps.event.addListenerOnce(l,"center_changed",function(){window.setTimeout(function(){l.panTo(s.getPosition())},500)})}}function a(t){t.lengthComputable&&e("progress").attr({value:t.loaded,max:t.total})}function d(t,n){function r(){o()}function o(){4===u.readyState?(e("#loading").show(),a(4===u.readyState),(200===u.status||304===u.status||1223===u.status)&&e("#calendar").fullCalendar("refetchEvents")):e("#loading").hide()}function l(){var e=void 0;if(u.response?e=u.response:"text"!==u.responseType&&u.responseType||(e=u.responseText||u.responseXML),w)try{e=JSON.parse(e)}catch(t){}return e}function i(e){clearTimeout(m),e instanceof Error||(e=new Error(""+(e||"Unknown Error"))),e.statusCode=0,n(e,p)}function s(e){var t=u.headers;if(!e)return t;for(var a=e.split("rn"),n=0;n<a.length;n++){var r=a[n],o=r.indexOf(": ");if(o>0){var l=r.substring(0,o);r.substring(o,2);if(!u.setRequestHeader)throw new Error("Headers cannot be set on object");for(l in t)t.hasOwnProperty(l)&&u.setRequestHeader(l,t[l])}}return t}function d(){if(!f){var e;clearTimeout(m),e=void 0===u.status?200:1223===u.status?204:u.status;var a=p,r=null;0!==e?(a={body:l(),statusCode:e,method:v,headers:{},url:t,rawRequest:u},u.getAllResponseHeaders&&(a.headers=s(u.getAllResponseHeaders()))):r=new Error("Internal Error"),n(r,a.body)}}var u;if("undefined"==typeof n)try{u=new XMLHttpRequest}catch(c){throw new Error("argument missing")}(window.XMLHttpRequest||window.document||window.ActiveXObject)&&(u=new XMLHttpRequest);var f,m,p={body:void 0,headers:{},statusCode:0,method:v,url:t,rawRequest:u},v=u.method="GET",g=l(),h=u.headers,w=!0,E=0;return w&&"GET"!==v&&"HEAD"!==v&&(h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json")||(h["Access-Control-Allow-Methods"]="GET")||(h["Access-Control-Allow-Origin"]="*"),g=JSON.stringify()),u.onreadystatechange=r,u.onload=d,u.onerror=i,u.onprogress=o,u.ontimeout=i,u.open(v,t,!0),E>0&&(m=setTimeout(function(){f=!0,u.abort("timeout");var e=new Error("timeout");e.code="ETIMEDOUT",i(e)},E)),u.send(g),u}e.cifullCalendar={version:"3.1.7.1"};var u=e.cifullCalendar=function(t){e.options=t,e.getRequest(),e.init()};u.DEFAULTS={locale:void 0},u.LOCALES=[],u.prototype.init=function(){e.businessDOW(),e.timedUpdate()},e.fn.cifullCalendar=function(t){var a,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=e(this),o=r.data("calendar");e.extend({},u.DEFAULTS,r.data(),"object"==typeof t&&t);if("string"==typeof t){if(e.inArray(t)<0)throw new Error("Unknown method: "+t);if(!o)return;a=o[t].apply(o,n),"destroy"===t&&r.removeData("calendar")}}),"undefined"==typeof a?this:a},e.fn.cifullCalendar.defaults=u.DEFAULTS,e.fn.cifullCalendar.locales=u.LOCALES;var c=(new google.maps.Geocoder,new google.maps.InfoWindow,new google.maps.LatLngBounds,e.extend(u.DEFAULTS,u.LOCALES.en)),f=new Date,m=(f.getDate(),f.getSeconds(),f.getMinutes(),f.getHours(),f.getDay(),f.getMonth(),f.getFullYear(),[]),p="YYYY-MM-DD HH:mm:ss",v="YYYYMMDD[T]HHmmss",g="dddd, MMMM Do, h:mm:ss a",h="YYYY-MM-DD",w="MMM DD",E="HH:mm:ss",C="h:mm:ss a",b="hh:mm a",y="h:mm:ss",x="h",_="mm",M="ss",D="a",T=new RegExp("(.+)"),L=window.location.pathname.replace(T,"./home/"),T=new RegExp("(.+)/index.php/"),S=window.location.pathname.replace(T,""),k=new RegExp("index.php/(([a-z]+)|([0-9]+)|([a-z]+)([0-9]+))"),A=window.location.pathname.replace(k,"")+"assets/attachments/",H=new Array,R=new Array;H[0]="home/ujson/"+S,o();var N=1.35,j="",q="",O="",Y="",I="start",F="end",z="",U="",G="",P="",X="",W="",Z="",Q="",B="",J="",V="",K="",$="",ee="",te="",ae="",ne="",re="",oe="",le="",ie="",se="",de="00:30:00",ue=!1,ce=0,fe=!0,me=!1,pe=!1,ve=!1,ge=!0,he=!0,we=!1,Ee=!0,Ce=!1,be="Export to ICS";return d(L+"get_timezone",function(e,t){i(t)||(O=t)}),d(L+"get_timezone2",function(e,a){i(a)||(Y=a,z=t.tz(Y).format(E))}),d(L+"get_defaultview",function(e,t){i(t)||(j=t)}),d(L+"get_header_left",function(e,t){i(t)||(U=t)}),d(L+"get_header_center",function(e,t){i(t)||(G=t)}),d(L+"get_header_right",function(e,t){i(t)||(P=t)}),d(L+"get_firstday",function(e,t){i(t)||(ce=t)}),d(L+"get_slotduration",function(e,t){i(t)||(de=t)}),d(L+"get_slotlabeling",function(e,t){i(t)||(ue="true"==t?!0:!1)}),d(L+"get_aspectratio",function(e,t){i(t)||(N=t!=N?t:N)}),d(L+"get_hiddendays",function(e,t){i(t)||(X=t.split(","),W=Number(X[0]),Z=Number(X[1]),Q=Number(X[2]),B=Number(X[3]),J=Number(X[4]),V=Number(X[5]),K=Number(X[6]))}),d(L+"get_businessstart",function(e,t){i(t)||($=t)}),d(L+"get_businessend",function(e,t){i(t)||(ee=t)}),d(L+"get_businessdays",function(e,t){i(t)||(te=t.split(","),ae=Number(te[0]),ne=Number(te[1]),re=Number(te[2]),oe=Number(te[3]),le=Number(te[4]),ie=Number(te[5]),se=Number(te[6]))}),d(L+"get_weeknumbers",function(e,t){ve="true"==t?!0:!1}),d(L+"get_eventlimit",function(e,t){ge="true"==t?!0:!1}),d(L+"get_alldayslot",function(e,t){he="true"==t?!0:!1}),d(L+"get_isrtl",function(e,t){we="true"==t?!0:!1}),d(L+"get_lang",function(n,r){q=r,t.locale(q),c=e.extend(u.DEFAULTS,u.LOCALES[q]),l(),e("#calendar").fullCalendar({defaultView:j,lang:q,aspectRatio:N,defaultDate:f,timezone:O,now:O,weekNumberCalculation:O,scrollTime:z,nowIndicator:Ee,header:{left:U,center:G,right:P},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},axisFormat:b,slotLabel:ue,isRTL:we,theme:Ce,allDaySlot:he,fixedWeekCount:me,firstDay:ce,weekends:fe,weekNumbers:ve,hiddenDays:[W,Z,Q,B,J,V,K],businessHours:{start:$,end:ee,dow:[ae,ne,re,oe,le,ie,se]},editable:pe,eventStartEditable:pe,eventDurationEditable:pe,selectable:pe,selectHelper:pe,eventLimit:ge,startParam:I,endParam:F,eventSources:[H[0]],eventRender:function(e,t,a){var n=14;e.title.length>n&&t.find(".fc-title").text(e.title.substr(0,n)+"...").parent().attr("title",e.title)},views:{basic:{slotDuration:de},agenda:{slotDuration:de},week:{slotDuration:de},day:{slotDuration:de}},eventClick:function(t,a,n){var r=t.start?e.fullCalendar.moment(t.start).format(p):e.fullCalendar.moment(f).format(p),o=t.end?e.fullCalendar.moment(t.end).format(p):e.fullCalendar.moment(t.start).format(p),l=e.fullCalendar.moment(r).format(h),i=e.fullCalendar.moment(o).format(h),d=i>l?e.fullCalendar.moment(o).format(g):e.fullCalendar.moment(o).format(C),u=e.fullCalendar.moment(r).format(g)+" - "+d,c=t.end?e.fullCalendar.moment(t.end).format(v):e.fullCalendar.moment(t.start).format(v),m=(o-r)/60/1e3,w=(m/60+m%60).toString(),E=parseFloat(t.latitude).toFixed(14),b=parseFloat(t.longitude).toFixed(14);s(E,b,t.location),e("#viewEventModal #gexport").html('<a href="//www.google.com/calendar/event?action=TEMPLATE&text='+t.title+"&dates="+e.fullCalendar.moment(r).format(v)+"/"+c+"&details="+t.description+"&location="+t.location+'&sprop=website:" title="Google" target="_blank" ><i class="fa fa-google"></i></a>'),e("#viewEventModal #yexport").html("<a href='//calendar.yahoo.com/?v=60&DUR="+w.substr(0,2)+"&TITLE="+t.title+"&ST="+e.fullCalendar.moment(r).format(v)+"&in_loc="+t.location+"&DESC="+t.description+"&URL="+t.url+"' title='Yahoo' target='_blank' ><i class='fa fa-yahoo'></i></a>"),e("#viewEventModal #lexport").html("<a href='//calendar.live.com/calendar/calendar.aspx?rru=addevent&dtstart="+r+"&dtend="+o+"&summary="+t.title+"&description="+t.description+"&location="+t.location+"' title='Microsoft' target='_blank' ><i class='fa fa-windows'></i></a>"),e("#viewEventModal #Iexport").html("<a href='"+L+"export/"+t.id+"' title='"+be+"' ><i class='fa fa-calendar-o'></i></a>"),e("#viewEventModal #ic_event_title").text(t.title),e("#viewEventModal #ic_event_desc").text(t.description),e("#viewEventModal #ic_event_urllink").text(t.url),e("#viewEventModal #ic_event_location").text(t.location),e("#viewEventModal #markers_ulng").text(b),e("#viewEventModal #markers_ulat").text(E),e("#viewEventModal #ic_event_allday").text(t.allDay),e("#viewEventModal #filename").html('<a href="'+A+t.filename+'" title="'+t.filename+'" target="_blank"><b>'+t.filename+"</b></a>"),e("#viewEventModal #when").text(u),e("#viewEventModal").modal("show")},eventMouseover:function(t,a,n){e(".fc-content").popover({trigger:"hover",html:!0,title:function(){return e(this).parent().find(".fc-title").html()},content:function(){return e(this).parent().find(".fc-description").html()},container:"body",placement:"top"})},loading:function(t){t?(e("#loading").show(),a(t)):e("#loading").hide()}})}),e("#cifcv").text(e.cifullCalendar.version),e("#fcv").text(e.fullCalendar.version),e("#loadEvents").on("click",function(t){t.preventDefault(),e("#calendar").fullCalendar("removeEvents"),e("#calendar").fullCalendar("refetchEvents")}),e("#title").off("keyup drop").on("keyup drop",function(t){var a=0;clearTimeout(a),a=setTimeout(function(){t.preventDefault();var a=e("#title").val();i(a)?(R[0]=L+"json",e("#calendar").fullCalendar("removeEventSource",H[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",R[0]),e("#calendar").fullCalendar("refetchEvents"),H[0]=R[0]):(R[0]=L+"search?title="+a,e("#calendar").fullCalendar("removeEventSource",H[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",R[0]),e("#calendar").fullCalendar("refetchEvents"),H[0]=R[0])},!0)}),e("#submitsearch").on("click",function(t){t.preventDefault();var a=e("#title").val();i(a)?(R[0]=L+"json",e("#calendar").fullCalendar("removeEventSource",H[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",R[0]),e("#calendar").fullCalendar("refetchEvents"),H[0]=R[0]):(R[0]=L+"search?title="+a,e("#calendar").fullCalendar("removeEventSource",H[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",R[0]),e("#calendar").fullCalendar("refetchEvents"),H[0]=R[0])}),u});
?>