Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.8
    • Fix Version/s: 2.0
    • Labels:
      None
    • Similar issues:

      Description

      See http://fullcalendar.io/

      Currently our macro uses version v1.5.3
      Mocca Calendar is using v1.6.4

      At this time (Dec 2014), the current version is v2.2.2
      Would be nice to use a newer version.

        Issue Links

          Activity

          Hide
          Victor Rachieru added a comment - - edited

          The code is located here:
          https://github.com/xwiki-contrib/macro-fullcalendar/tree/fullcalendar-2.2.2

          Notes:

          • instead of using 3 parameters (year, month, date) to define the default date, the new version uses just one (defaultDate)
          • month and day numbers have to be in double digits (this means trailing zeros for [1-9])
          • month numbering now starts at 1 instead of 0 (0-11 => 1-12)
          • the firstHour parameter seems to have been removed
          • due to now using moment.js some date formatting variables' meaning changed thus the translations are upgraded accordingly
          • possible extra modifications (need to investigate more)
          Show
          Victor Rachieru added a comment - - edited The code is located here: https://github.com/xwiki-contrib/macro-fullcalendar/tree/fullcalendar-2.2.2 Notes: instead of using 3 parameters (year, month, date) to define the default date, the new version uses just one (defaultDate) month and day numbers have to be in double digits (this means trailing zeros for [1-9] ) month numbering now starts at 1 instead of 0 (0-11 => 1-12) the firstHour parameter seems to have been removed due to now using moment.js some date formatting variables' meaning changed thus the translations are upgraded accordingly possible extra modifications (need to investigate more)
          Hide
          Ecaterina Moraru (Valica) added a comment - - edited

          Since this is not a released feature and we should try to as much as we can to be backwards compatible, I will report how the next applications are interacting with the upgrade:

          • Meeting 1.5 - http://extensions.xwiki.org/xwiki/bin/view/Extension/Meeting+Application
            • Status: Working + minor issue
            • See Meeting-with-FC1.1.9.png (before upgrade), Meeting-with-upgrade-today.png, Meeting-with-upgrade-refresh.png
            • Conclusion: calendar is displaying the meetings if you go to the right date in the calendar (in my case hitting on Today). The problem is that if you refresh the page, you are taken to "Dec 30 2013 - Jan 5 2014". So maybe there is a problem with 'startfield' parameter
          • Holiday Request 1.3.1 - http://extensions.xwiki.org/xwiki/bin/view/Extension/Holiday+Request
            • Status: Not working
            • See Holiday-with-FC1.1.9.png (before upgrade), Holiday-with-upgrade.png
            • Conclusion: calendar is not displayed. Although we might need to make some fixes in the 'holidayRequests' macro, someone should investigate what exactly is the problem and maybe test a bit how custom JSON work with the upgrade
          • Does anyone else know other applications that use the FullCalendar macro as dependency?
          Show
          Ecaterina Moraru (Valica) added a comment - - edited Since this is not a released feature and we should try to as much as we can to be backwards compatible, I will report how the next applications are interacting with the upgrade: Meeting 1.5 - http://extensions.xwiki.org/xwiki/bin/view/Extension/Meeting+Application Status: Working + minor issue See Meeting-with-FC1.1.9.png (before upgrade), Meeting-with-upgrade-today.png, Meeting-with-upgrade-refresh.png Conclusion: calendar is displaying the meetings if you go to the right date in the calendar (in my case hitting on Today). The problem is that if you refresh the page, you are taken to "Dec 30 2013 - Jan 5 2014". So maybe there is a problem with 'startfield' parameter Holiday Request 1.3.1 - http://extensions.xwiki.org/xwiki/bin/view/Extension/Holiday+Request Status: Not working See Holiday-with-FC1.1.9.png (before upgrade), Holiday-with-upgrade.png Conclusion: calendar is not displayed. Although we might need to make some fixes in the 'holidayRequests' macro, someone should investigate what exactly is the problem and maybe test a bit how custom JSON work with the upgrade Does anyone else know other applications that use the FullCalendar macro as dependency?
          Hide
          Clemens Robbenhaar added a comment - - edited

          the problem with the calendar not shown in the Holiday Request is caused by missing "require" call (maybe too old b/w compat?)
          Anyway, padding the javascript code

          require(['jquery'], function(jQuery) {
            jQuery(document).ready(function() {
           ...
          
           });
          });
          

          (instead if just the jQuery(document).ready(}
          in the HolidayRequestCalendar (and adding a $xwiki.jsx.use("Calendar.Moment",

          {'defer': false}

          ) on top should fix it.
          However when I try this at home, the calendar still does not display any holiday requests - that is likely due to the fact that the date format for the json parameter has changed - it is not longer a timestamp, but a string in the format 'yyyy-MM-dd'

          Show
          Clemens Robbenhaar added a comment - - edited the problem with the calendar not shown in the Holiday Request is caused by missing "require" call (maybe too old b/w compat?) Anyway, padding the javascript code require(['jquery'], function(jQuery) { jQuery(document).ready(function() { ... }); }); (instead if just the jQuery(document).ready( } in the HolidayRequestCalendar (and adding a $xwiki.jsx.use("Calendar.Moment", {'defer': false} ) on top should fix it. However when I try this at home, the calendar still does not display any holiday requests - that is likely due to the fact that the date format for the json parameter has changed - it is not longer a timestamp, but a string in the format 'yyyy-MM-dd'
          Hide
          Clemens Robbenhaar added a comment - - edited

          I have found one small thing with the FullCalendar itself:
          the signatue for the 'eventDrop` callback has changed: http://fullcalendar.io/docs/event_ui/eventDrop/
          similar the `eventResize` - this means the "updateEvent' needs to be updated, too, for calendars with editable (moveable/resizeable) events.

          Also 'timeFormat' is defined twice - once from the transations and once from the macro parameter 'timeFormat'. the second one always wins.

          Show
          Clemens Robbenhaar added a comment - - edited I have found one small thing with the FullCalendar itself: the signatue for the 'eventDrop` callback has changed: http://fullcalendar.io/docs/event_ui/eventDrop/ similar the `eventResize` - this means the "updateEvent' needs to be updated, too, for calendars with editable (moveable/resizeable) events. Also 'timeFormat' is defined twice - once from the transations and once from the macro parameter 'timeFormat'. the second one always wins.
          Hide
          Clemens Robbenhaar added a comment -

          Actually the change for the "updateEvent' is somewhat bigger that I first thought, because it affects the Calendar.UpdateService, too.
          As the Mocca Calendar contained a copy of that service (which it actually should not ...) I needed to fix it there, too. Fortunately the new FullCalendar.js sends all of "startDate", "endDate" and "duration" so one does not have to calculate one field from the others.

          Show
          Clemens Robbenhaar added a comment - Actually the change for the "updateEvent' is somewhat bigger that I first thought, because it affects the Calendar.UpdateService, too. As the Mocca Calendar contained a copy of that service (which it actually should not ...) I needed to fix it there, too. Fortunately the new FullCalendar.js sends all of "startDate", "endDate" and "duration" so one does not have to calculate one field from the others.
          Hide
          Clemens Robbenhaar added a comment -

          I have added my findings about the UpdateService as FULLCAL-17

          Show
          Clemens Robbenhaar added a comment - I have added my findings about the UpdateService as FULLCAL-17
          Show
          Victor Rachieru added a comment - Fixed in f7807d2e804decc27586713242966a77eb98b709 , 390412d9ee86c1babe81e01c44c4353c99badbc0

            People

            • Assignee:
              Victor Rachieru
              Reporter:
              Ecaterina Moraru (Valica)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: