Skip to content

Commit d2fc545

Browse files
frederic34claude
andcommitted
NEW: show owner user color as left border on calendar event blocks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ac9a24f commit d2fc545

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

class/actions_idreamanewcalendar.class.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,11 +776,19 @@ public function beforeAgenda($parameters, &$object, &$action, $hookmanager)
776776
?? (info.event.title && typeof info.event.title === 'object' ? info.event.title.html : null);
777777
const titleText = typeof info.event.title === 'string' ? info.event.title : null;
778778
const location = info.event.extendedProps && info.event.extendedProps.location;
779+
const userColor = info.event.extendedProps && info.event.extendedProps.borderColor;
779780
const nodes = [createElement('div', 'ec-event-title', titleHtml, titleText)];
780781
if (location) {
781782
nodes.push(createElement('div', 'ec-event-location', null, location));
782783
}
783-
content = { domNodes: nodes };
784+
if (userColor) {
785+
const wrapper = document.createElement('div');
786+
wrapper.style.cssText = 'border-left:3px solid ' + userColor + ';padding-left:4px;height:100%;box-sizing:border-box;';
787+
nodes.forEach(function(n) { wrapper.appendChild(n); });
788+
content = { domNodes: [wrapper] };
789+
} else {
790+
content = { domNodes: nodes };
791+
}
784792
}
785793
return content;
786794
},

0 commit comments

Comments
 (0)