MDL-66354 core_calendar: Notices in error.log on calendar events

This commit is contained in:
David Matamoros 2019-09-02 14:42:24 +02:00
parent 6735197cc2
commit 21ad9531d0
6 changed files with 10 additions and 9 deletions

View File

@ -1,2 +1,2 @@
define ("core_calendar/calendar_filter",["jquery","core_calendar/selectors","core_calendar/events","core/str","core/templates"],function(a,b,c,d,e){var f=function(d){d.on("click",b.eventFilterItem,function(b){var c=a(b.currentTarget);g(c);b.preventDefault()});a("body").on(c.viewUpdated,function(){var c=d.find(b.eventFilterItem);c.each(function(b,c){c=a(c);if(c.data("eventtype-hidden")){var d=i(c);h(d)}})})},g=function(a){var b=i(a);b.hidden=!b.hidden;return d.get_string("eventtype"+b.eventtype,"calendar").then(function(a){b.name=a;return b}).then(function(a){return e.render("core_calendar/event_filter_key",a)}).then(function(b,c){return e.replaceNode(a,b,c)}).then(function(){h(b)})},h=function(b){M.util.js_pending("month-mini-filterChanged");a("body").trigger(c.filterChanged,{type:b.eventtype,hidden:b.hidden});M.util.js_complete("month-mini-filterChanged")},i=function(a){return{eventtype:a.data("eventtype"),hidden:a.data("eventtype-hidden")}};return{init:function init(b){b=a(b);f(b)}}});
define ("core_calendar/calendar_filter",["jquery","core_calendar/selectors","core_calendar/events","core/str","core/templates"],function(a,b,c,d,e){var f=function(d){d.on("click",b.eventFilterItem,function(b){var c=a(b.currentTarget);g(c);b.preventDefault()});a("body").on(c.viewUpdated,function(){var c=d.find(b.eventFilterItem);c.each(function(b,c){c=a(c);if(c.data("eventtype-hidden")){var d=i(c);h(d)}})})},g=function(a){var b=i(a);b.hidden=!b.hidden;return d.get_string("eventtype"+b.eventtype,"calendar").then(function(a){b.name=a;b.icon=!0;b.key="i/"+b.eventtype+"event";b.component="core";return b}).then(function(a){return e.render("core_calendar/event_filter_key",a)}).then(function(b,c){return e.replaceNode(a,b,c)}).then(function(){h(b)})},h=function(b){M.util.js_pending("month-mini-filterChanged");a("body").trigger(c.filterChanged,{type:b.eventtype,hidden:b.hidden});M.util.js_complete("month-mini-filterChanged")},i=function(a){return{eventtype:a.data("eventtype"),hidden:a.data("eventtype-hidden")}};return{init:function init(b){b=a(b);f(b)}}});
//# sourceMappingURL=calendar_filter.min.js.map

File diff suppressed because one or more lines are too long

View 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;
})

View 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);
}

View 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}}

View File

@ -136,12 +136,7 @@
{{$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}}