MDL-66354 core_calendar: Notices in error.log on calendar events
authorDavid Matamoros <davidmc@moodle.com>
Mon, 2 Sep 2019 12:42:24 +0000 (14:42 +0200)
committerDavid Matamoros <davidmc@moodle.com>
Wed, 25 Sep 2019 07:08:41 +0000 (09:08 +0200)
calendar/amd/build/calendar_filter.min.js
calendar/amd/build/calendar_filter.min.js.map
calendar/amd/src/calendar_filter.js
calendar/lib.php
calendar/templates/event_icon.mustache
calendar/templates/month_mini.mustache

index 6a9f95d..49ead88 100644 (file)
Binary files a/calendar/amd/build/calendar_filter.min.js and b/calendar/amd/build/calendar_filter.min.js differ
index 68ce74d..91dd103 100644 (file)
Binary files a/calendar/amd/build/calendar_filter.min.js.map and b/calendar/amd/build/calendar_filter.min.js.map differ
index 622dafd..41dd448 100644 (file)
@@ -67,6 +67,9 @@ function(
         return Str.get_string('eventtype' + data.eventtype, 'calendar')
         .then(function(nameStr) {
             data.name = nameStr;
+            data.icon = true;
+            data.key = 'i/' + data.eventtype + 'event';
+            data.component = 'core';
 
             return data;
         })
index 608bb6e..831c0ce 100644 (file)
@@ -3672,6 +3672,9 @@ function calendar_get_filter_types() {
         return [
             'eventtype' => $type,
             'name' => get_string("eventtype{$type}", "calendar"),
+            'icon' => true,
+            'key' => 'i/' . $type . 'event',
+            'component' => 'core'
         ];
     }, $types);
 }
index fb88bd6..ea61b32 100644 (file)
@@ -37,5 +37,5 @@
     {{#pix}} icon, {{modulename}} {{/pix}}
 {{/modulename}}
 {{^modulename}}
-    {{#pix}} i/{{eventtype}}event, core {{/pix}}
+    {{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
 {{/modulename}}
index b1aa06f..cb3e229 100644 (file)
                                 {{$content}}
                                     {{#events}}
                                         <div data-popover-eventtype-{{normalisedeventtype}}="1">
-                                            {{#modulename}}
-                                                {{#pix}} icon, {{modulename}} {{/pix}}
-                                            {{/modulename}}
-                                            {{^modulename}}
-                                                {{#pix}} i/{{eventtype}}event, core {{/pix}}
-                                            {{/modulename}}
+                                            {{> core_calendar/event_icon}}
                                             {{{popupname}}}
                                         </div>
                                     {{/events}}