diff --git a/dist/cdnjs/2.0.2/fullcalendar.js b/dist/cdnjs/2.0.2/fullcalendar.js index 60db3d7..40c7a32 100644 --- a/dist/cdnjs/2.0.2/fullcalendar.js +++ b/dist/cdnjs/2.0.2/fullcalendar.js @@ -7558,6 +7558,8 @@ function ResourceEventRenderer() { trigger('eventDragStop', eventElement[0], event, ev, ui); if (isInBounds && (isAllDay || resourceDelta || snapDelta)) { // changed! + var targetResources = event.resources.slice(0); + if (resourceDelta){ // given we have r1/r3 // if we move r3 to r2, then we want to maintain r1/r2. @@ -7568,16 +7570,17 @@ function ResourceEventRenderer() { var oldIndex = event.resources.indexOf(oldId); var newIndex = event.resources.indexOf(newId); + if (newIndex > -1) { - event.resources.splice(oldIndex, 1); + targetResources.splice(oldIndex, 1); } else { - event.resources[oldIndex] = newId; + targetResources[oldIndex] = newId; } } eventDrop( eventElement[0], event, - event.resources, + targetResources, eventStart, ev, ui diff --git a/dist/cdnjs/2.0.2/fullcalendar.min.js b/dist/cdnjs/2.0.2/fullcalendar.min.js index 9552a20..6574335 100644 --- a/dist/cdnjs/2.0.2/fullcalendar.min.js +++ b/dist/cdnjs/2.0.2/fullcalendar.min.js @@ -4,5 +4,5 @@ * (c) 2014 Adam Shaw, Sean Kenny */ (function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):e(jQuery,moment)})(function(e,t){function n(e,t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")}function r(e,t){var n=t.longDateFormat("L");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),e.isRTL?n+=" ddd":n="ddd "+n,n}function a(e){o(_t,e)}function o(t){function n(n,r){e.isPlainObject(r)&&e.isPlainObject(t[n])&&!i(n)?t[n]=o({},t[n],r):void 0!==r&&(t[n]=r)}for(var r=1;arguments.length>r;r++)e.each(arguments[r],n);return t}function i(e){return/(Time|Duration)$/.test(e)}function s(n,r){function a(e){var n=t.localeData||t.langData;return n.call(t,e)||n.call(t,"en")}function i(e){ct?h()&&(w(),D(e)):s()}function s(){dt=at.theme?"ui":"fc",n.addClass("fc"),at.isRTL?n.addClass("fc-rtl"):n.addClass("fc-ltr"),at.theme&&n.addClass("ui-widget"),ct=e("
").prependTo(n),st=new l(nt,at),lt=st.render(),lt&&n.prepend(lt),g(at.defaultView),at.handleWindowResize&&e(window).resize(E),p()||d()}function d(){setTimeout(function(){!ut.start&&p()&&y()},0)}function v(){ut&&(K("viewDestroy",ut,ut,ut.element),ut.triggerEventDestroy()),e(window).unbind("resize",E),at.droppable&&e(document).off("dragstart",et).off("dragstop",tt),ut.selectionManagerDestroy&&ut.selectionManagerDestroy(),st.destroy(),ct.remove(),n.removeClass("fc fc-ltr fc-rtl ui-widget")}function h(){return n.is(":visible")}function p(){return e("body").is(":visible")}function g(e){ut&&e==ut.name||m(e)}function m(t){bt++,ut&&(K("viewDestroy",ut,ut,ut.element),W(),ut.triggerEventDestroy(),V(),ut.element.remove(),st.deactivateButton(ut.name)),st.activateButton(t),ut=new Ot[t](e("").appendTo(ct),nt),y(),G(),bt--}function y(e){ut.start&&!e&&ht.isWithin(ut.intervalStart,ut.intervalEnd)||h()&&D(e)}function D(e){bt++,ut.start&&(K("viewDestroy",ut,ut,ut.element),W(),R()),V(),e&&(ht=ut.incrementDate(ht,e)),ut.render(ht.clone()),T(),G(),(ut.afterRender||k)(),F(),O(),K("viewRender",ut,ut,ut.element),bt--,z()}function b(){h()&&(W(),R(),w(),T(),M())}function w(){vt=at.contentHeight?at.contentHeight:at.height?at.height-(lt?lt.height():0)-C(ct):Math.round(ct.width()/Math.max(at.aspectRatio,.5))}function T(){void 0===vt&&w(),bt++,ut.setHeight(vt),ut.setWidth(ct.width()),bt--,ft=n.outerWidth()}function E(e){if(!bt&&e.target===window)if(ut.start){var t=++Dt;setTimeout(function(){t==Dt&&!bt&&h()&&ft!=(ft=n.outerWidth())&&(bt++,b(),ut.trigger("windowResize",yt),bt--)},at.windowResizeDelay)}else d()}function S(){R(),_()}function x(e){R(),M(e)}function M(e){h()&&(ut.renderEvents(wt,e),ut.trigger("eventAfterAllRender"))}function R(){ut.triggerEventDestroy(),ut.clearEvents(),ut.clearEventData()}function z(){!at.lazyFetching||gt(ut.start,ut.end)?_():M()}function _(){mt(ut.start,ut.end)}function H(e){wt=e,M()}function N(e){x(e)}function F(){st.updateTitle(ut.title)}function O(){var e=nt.getNow();e.isWithin(ut.intervalStart,ut.intervalEnd)?st.disableButton("today"):st.enableButton("today")}function A(e,t){ut.select(e,t)}function W(){ut&&ut.unselect()}function Y(){y(-1)}function L(){y(1)}function Z(){ht.add("years",-1),y()}function B(){ht.add("years",1),y()}function j(){ht=nt.getNow(),y()}function I(e){ht=nt.moment(e),y()}function $(e){ht.add(t.duration(e)),y()}function X(){return ht.clone()}function V(){ct.css({width:"100%",height:ct.height(),overflow:"hidden"})}function G(){ct.css({width:"",height:"",overflow:""})}function U(){return nt}function Q(){return ut}function J(e,t){return void 0===t?at[e]:(("height"==e||"contentHeight"==e||"aspectRatio"==e)&&(at[e]=t,b()),void 0)}function K(e,t){return at[e]?at[e].apply(t||yt,Array.prototype.slice.call(arguments,2)):void 0}function et(t,n){var r=t.target,a=e(r);if(!a.parents(".fc").length){var o=at.dropAccept;(e.isFunction(o)?o.call(r,a):a.is(o))&&(pt=r,ut.dragStart(pt,t,n))}}function tt(e,t){pt&&(ut.dragStop(pt,e,t),pt=null)}var nt=this;r=r||{};var rt,at=o({},_t,r);rt=at.lang in Ht?Ht[at.lang]:Ht[_t.lang],rt&&(at=o({},_t,rt,r)),at.isRTL&&(at=o({},_t,Nt,rt||{},r)),nt.options=at,nt.render=i,nt.destroy=v,nt.refetchEvents=S,nt.reportEvents=H,nt.reportEventChange=N,nt.rerenderEvents=x,nt.changeView=g,nt.select=A,nt.unselect=W,nt.prev=Y,nt.next=L,nt.prevYear=Z,nt.nextYear=B,nt.today=j,nt.gotoDate=I,nt.incrementDate=$,nt.getDate=X,nt.getCalendar=U,nt.getView=Q,nt.option=J,nt.trigger=K;var ot=f(a(at.lang));if(at.monthNames&&(ot._months=at.monthNames),at.monthNamesShort&&(ot._monthsShort=at.monthNamesShort),at.dayNames&&(ot._weekdays=at.dayNames),at.dayNamesShort&&(ot._weekdaysShort=at.dayNamesShort),null!=at.firstDay){var it=f(ot._week);it.dow=at.firstDay,ot._week=it}nt.defaultAllDayEventDuration=t.duration(at.defaultAllDayEventDuration),nt.defaultTimedEventDuration=t.duration(at.defaultTimedEventDuration),nt.moment=function(){var e;return"local"===at.timezone?(e=Ft.moment.apply(null,arguments),e.hasTime()&&e.local()):e="UTC"===at.timezone?Ft.moment.utc.apply(null,arguments):Ft.moment.parseZone.apply(null,arguments),"_locale"in e?e._locale=ot:e._lang=ot,e},nt.getIsAmbigTimezone=function(){return"local"!==at.timezone&&"UTC"!==at.timezone},nt.rezoneDate=function(e){return nt.moment(e.toArray())},nt.getNow=function(){var e=at.now;return"function"==typeof e&&(e=e()),nt.moment(e)},nt.calculateWeekNumber=function(e){var t=at.weekNumberCalculation;return"function"==typeof t?t(e):"local"===t?e.week():"ISO"===t.toUpperCase()?e.isoWeek():void 0},nt.getEventEnd=function(e){return e.end?e.end.clone():nt.getDefaultEventEnd(e.allDay,e.start)},nt.getDefaultEventEnd=function(e,t){var n=t.clone();return e?n.stripTime().add(nt.defaultAllDayEventDuration):n.add(nt.defaultTimedEventDuration),nt.getIsAmbigTimezone()&&n.stripZone(),n},nt.formatRange=function(e,t,n){return"function"==typeof n&&(n=n.call(nt,at,ot)),q(e,t,n,null,at.isRTL)},nt.formatDate=function(e,t){return"function"==typeof t&&(t=t.call(nt,at,ot)),P(e,t)},c.call(nt,at),u.call(nt,at);var st,lt,ct,dt,ut,ft,vt,ht,pt,gt=nt.isFetchNeeded,mt=nt.fetchEvents,yt=n[0],Dt=0,bt=0,wt=[];ht=null!=at.defaultDate?nt.moment(at.defaultDate):nt.getNow(),at.droppable&&e(document).on("dragstart",et).on("dragstop",tt)}function l(t,n){function r(){f=n.theme?"ui":"fc";var t=n.header;return t?v=e("| "+(Lt("allDayHTML")||_(Lt("allDayText")))+" | "+""+" "+" | "+""+" |
|---|
| "+(d&&i?" ":_(Ut(o,Lt("axisFormat"))))+" | "+""+" | "+"
|---|
| "+(Pt("allDayHTML")||_(Pt("allDayText")))+" | "+""+" "+" | "+""+" |
|---|
| "+(d&&i?" ":_(Jt(o,Pt("axisFormat"))))+" | "+""+" | "+"
|---|
| "+(Pt("allDayHTML")||_(Pt("allDayText")))+" | "+""+" "+" | "+""+" |
|---|
| "+(d&&i?" ":_(Jt(o,Pt("axisFormat"))))+" | "+""+" | "+"
|---|
| "+(Lt("allDayHTML")||_(Lt("allDayText")))+" | "+""+" "+" | "+""+" |
|---|
| "+(d&&i?" ":_(Ut(o,Lt("axisFormat"))))+" | "+""+" | "+"
|---|
| "+(Pt("allDayHTML")||_(Pt("allDayText")))+" | "+""+" "+" | "+""+" |
|---|
| "+(d&&i?" ":_(Jt(o,Pt("axisFormat"))))+" | "+""+" | "+"
|---|
| "+(Pt("allDayHTML")||_(Pt("allDayText")))+" | "+""+" "+" | "+""+" |
|---|
| "+(d&&i?" ":_(Jt(o,Pt("axisFormat"))))+" | "+""+" | "+"
|---|