[REF] web: remove sprintf when not needed
Related Task ID: 1891957
This commit is contained in:
@@ -405,7 +405,7 @@ return AbstractRenderer.extend({
|
||||
eventClickInfo.jsEvent.stopPropagation();
|
||||
var eventData = eventClickInfo.event;
|
||||
self._unselectEvent();
|
||||
$(self.calendarElement).find(_.str.sprintf('[data-event-id=%s]', eventData.id)).addClass('o_cw_custom_highlight');
|
||||
$(self.calendarElement).find(`[data-event-id=${eventData.id}]`).addClass('o_cw_custom_highlight');
|
||||
self._renderEventPopover(eventData, $(eventClickInfo.el));
|
||||
},
|
||||
yearDateClick: function (info) {
|
||||
@@ -502,20 +502,20 @@ return AbstractRenderer.extend({
|
||||
// The css ":hover" selector can't be used because these events
|
||||
// are rendered using multiple elements.
|
||||
eventMouseEnter: function (mouseEnterInfo) {
|
||||
$(self.calendarElement).find(_.str.sprintf('[data-event-id=%s]', mouseEnterInfo.event.id)).addClass('o_cw_custom_hover');
|
||||
$(self.calendarElement).find(`[data-event-id=${mouseEnterInfo.event.id}]`).addClass('o_cw_custom_hover');
|
||||
},
|
||||
eventMouseLeave: function (mouseLeaveInfo) {
|
||||
if (!mouseLeaveInfo.event.id) {
|
||||
return;
|
||||
}
|
||||
$(self.calendarElement).find(_.str.sprintf('[data-event-id=%s]', mouseLeaveInfo.event.id)).removeClass('o_cw_custom_hover');
|
||||
$(self.calendarElement).find(`[data-event-id=${mouseLeaveInfo.event.id}]`).removeClass('o_cw_custom_hover');
|
||||
},
|
||||
eventDragStart: function (mouseDragInfo) {
|
||||
$(self.calendarElement).find(_.str.sprintf('[data-event-id=%s]', mouseDragInfo.event.id)).addClass('o_cw_custom_hover');
|
||||
$(self.calendarElement).find(`[data-event-id=${mouseDragInfo.event.id}]`).addClass('o_cw_custom_hover');
|
||||
self._unselectEvent();
|
||||
},
|
||||
eventResizeStart: function (mouseResizeInfo) {
|
||||
$(self.calendarElement).find(_.str.sprintf('[data-event-id=%s]', mouseResizeInfo.event.id)).addClass('o_cw_custom_hover');
|
||||
$(self.calendarElement).find(`[data-event-id=${mouseResizeInfo.event.id}]`).addClass('o_cw_custom_hover');
|
||||
self._unselectEvent();
|
||||
},
|
||||
eventLimitClick: function () {
|
||||
@@ -708,7 +708,7 @@ return AbstractRenderer.extend({
|
||||
if (options.avatar_field) {
|
||||
_.each(options.filters, function (filter) {
|
||||
if (!['all', false].includes(filter.value)) {
|
||||
var selector = _.str.sprintf('.o_calendar_filter_item[data-value=%s]', filter.value);
|
||||
var selector = `.o_calendar_filter_item[data-value=${filter.value}]`;
|
||||
sidebarFilter.$el.find(selector).popover({
|
||||
animation: false,
|
||||
trigger: 'hover',
|
||||
@@ -718,7 +718,7 @@ return AbstractRenderer.extend({
|
||||
delay: {show: 300, hide: 0},
|
||||
content: function () {
|
||||
return $('<img>', {
|
||||
src: _.str.sprintf('/web/image/%s/%s/%s', options.avatar_model, filter.value, options.avatar_field),
|
||||
src: `/web/image/${options.avatar_model}/${filter.value}/${options.avatar_field}}`,
|
||||
class: 'mx-auto',
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user