Файл: assets/plugins/fullcalendar-2.6.1/calendar.admin.custom.min.js
Строк: 554
<?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"));else{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(R),t.tz(O).format(w),e=0;e<m.length;e++)m[e].render()}function r(){var a=t.tz(O),r=6*a.format(x),o=6*a.format(M)+r/60,l=a.format(_)%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(O),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,v)}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=v,r=null;0!==e?(a={body:l(),statusCode:e,method:p,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,v={body:void 0,headers:{},statusCode:0,method:p,url:t,rawRequest:u},p=u.method="GET",g=l(),h=u.headers,w=!0,E=0;return w&&"GET"!==p&&"HEAD"!==p&&(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(p,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:"2.6.0"};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(),[]),v="YYYY-MM-DD HH:mm:ss",p="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",_="h",M="mm",x="ss",D="a",T=new RegExp("(.+)"),L=window.location.pathname.replace(T,"./admin/home/"),S=window.location.pathname.replace("index.php/admin","")+"assets/attachments/",k=new Array,A=new Array;k[0]=L+"json",o();var H=1.35,N="",R="",j="",O="",Y="start",q="end",I="",F="",U="",z="",P="",G="",X="",W="",Z="",Q="",B="",J="",V="",K="",$="",ee="",te="",ae="",ne="",re="",oe="",le="",ie="00:30:00",se=!1,de=0,ue=!0,ce=!1,fe=!1,me=!1,ve=!0,pe=!0,ge=!1,he=!0,we=!1,Ee="Export to ICS";return d(L+"get_timezone",function(e,t){i(t)||(j=t)}),d(L+"get_timezone2",function(e,a){i(a)||(O=a,I=t.tz(O).format(E))}),d(L+"get_defaultview",function(e,t){i(t)||(N=t)}),d(L+"get_header_left",function(e,t){i(t)||(F=t)}),d(L+"get_header_center",function(e,t){i(t)||(U=t)}),d(L+"get_header_right",function(e,t){i(t)||(z=t)}),d(L+"get_firstday",function(e,t){i(t)||(de=t)}),d(L+"get_slotduration",function(e,t){i(t)||(ie=t)}),d(L+"get_slotlabeling",function(e,t){i(t)||(se="true"==t?!0:!1)}),d(L+"get_aspectratio",function(e,t){i(t)||(H=t!=H?t:H)}),d(L+"get_hiddendays",function(e,t){i(t)||(P=t.split(","),G=Number(P[0]),X=Number(P[1]),W=Number(P[2]),Z=Number(P[3]),Q=Number(P[4]),B=Number(P[5]),J=Number(P[6]))}),d(L+"get_businessstart",function(e,t){i(t)||(V=t)}),d(L+"get_businessend",function(e,t){i(t)||(K=t)}),d(L+"get_businessdays",function(e,t){i(t)||($=t.split(","),ee=Number($[0]),te=Number($[1]),ae=Number($[2]),ne=Number($[3]),re=Number($[4]),oe=Number($[5]),le=Number($[6]))}),d(L+"get_weeknumbers",function(e,t){me="true"==t?!0:!1}),d(L+"get_eventlimit",function(e,t){ve="true"==t?!0:!1}),d(L+"get_alldayslot",function(e,t){pe="true"==t?!0:!1}),d(L+"get_isrtl",function(e,t){ge="true"==t?!0:!1}),d(L+"get_lang",function(n,r){R=r,t.locale(R),c=e.extend(u.DEFAULTS,u.LOCALES[R]),l(),e("#calendar").fullCalendar({defaultView:N,lang:R,aspectRatio:H,defaultDate:f,timezone:j,now:j,weekNumberCalculation:j,scrollTime:I,nowIndicator:he,header:{left:F,center:U,right:z},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},axisFormat:b,slotLabel:se,isRTL:ge,theme:we,allDaySlot:pe,fixedWeekCount:ce,firstDay:de,weekends:ue,weekNumbers:me,hiddenDays:[G,X,W,Z,Q,B,J],businessHours:{start:V,end:K,dow:[ee,te,ae,ne,re,oe,le]},editable:fe,eventStartEditable:fe,eventDurationEditable:fe,selectable:fe,selectHelper:fe,eventLimit:ve,startParam:Y,endParam:q,eventSources:[k[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:ie},agenda:{slotDuration:ie},week:{slotDuration:ie},day:{slotDuration:ie}},eventClick:function(t,a,n){var r=t.start?e.fullCalendar.moment(t.start).format(v):e.fullCalendar.moment(f).format(v),o=t.end?e.fullCalendar.moment(t.end).format(v):e.fullCalendar.moment(t.start).format(v),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(p):e.fullCalendar.moment(t.start).format(p),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(p)+"/"+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(p)+"&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='"+Ee+"' ><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 #ic_event_author").text(t.username),e("#viewEventModal #filename").html('<a href="'+S+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)?(A[0]=L+"json",e("#calendar").fullCalendar("removeEventSource",k[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",A[0]),e("#calendar").fullCalendar("refetchEvents"),k[0]=A[0]):(A[0]=L+"search?title="+a,e("#calendar").fullCalendar("removeEventSource",k[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",A[0]),e("#calendar").fullCalendar("refetchEvents"),k[0]=A[0])},!0)}),e("#submitsearch").on("click",function(t){t.preventDefault();var a=e("#title").val();i(a)?(A[0]=L+"json",e("#calendar").fullCalendar("removeEventSource",k[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",A[0]),e("#calendar").fullCalendar("refetchEvents"),k[0]=A[0]):(A[0]=L+"search?title="+a,e("#calendar").fullCalendar("removeEventSource",k[0]),e("#calendar").fullCalendar("refetchEvents"),e("#calendar").fullCalendar("addEventSource",A[0]),e("#calendar").fullCalendar("refetchEvents"),k[0]=A[0])}),u});
?>