Last active
August 10, 2018 15:18
-
-
Save ahebrank/eabdccee93e6c6e1816f53e084d54571 to your computer and use it in GitHub Desktop.
Patch Drupal fullcalendar to show full title on hover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/assets/js/fullcalendar.fullcalendar.js b/assets/js/fullcalendar.fullcalendar.js | |
| index 9ed1ffd..fb5a79b 100644 | |
| --- a/assets/js/fullcalendar.fullcalendar.js | |
| +++ b/assets/js/fullcalendar.fullcalendar.js | |
| @@ -106,6 +106,12 @@ | |
| fullcalendar.dateChange(view.start, view.end, settings['fullcalendar_fields']); | |
| fullcalendar.fetchEvents(); | |
| } | |
| + }, | |
| + eventRender: function(event, element, view) { | |
| + var limit = 10; | |
| + if (view.type === 'month' && event.title.length > limit) { | |
| + element.find('.fc-title').parent().attr('title', event.title); | |
| + } | |
| } | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment