| 14073 | } |
| 14074 | } |
| 14075 | function fill_map_tab() { |
| 14076 | let events = scheduler2.get_visible_events(); |
| 14077 | events.sort(function(a, b) { |
| 14078 | if (a.start_date.valueOf() == b.start_date.valueOf()) |
| 14079 | return a.id > b.id ? 1 : -1; |
| 14080 | return a.start_date > b.start_date ? 1 : -1; |
| 14081 | }); |
| 14082 | let ariaAttr = scheduler2._waiAria.mapAttrString(); |
| 14083 | let html = "<div " + ariaAttr + " class='dhx_map_area'>"; |
| 14084 | for (let i = 0; i < events.length; i++) { |
| 14085 | let ev = events[i]; |
| 14086 | let event_class = ev.id == scheduler2._selected_event_id ? "dhx_map_line highlight" : "dhx_map_line"; |
| 14087 | let bg_color = ev.color ? "--dhx-scheduler-event-background:" + ev.color + ";" : ""; |
| 14088 | let color = ev.textColor ? "--dhx-scheduler-event-color:" + ev.textColor + ";" : ""; |
| 14089 | let ariaAttr2 = scheduler2._waiAria.mapRowAttrString(ev); |
| 14090 | let ariaButtonAttr = scheduler2._waiAria.mapDetailsBtnString(); |
| 14091 | html += "<div " + ariaAttr2 + " class='" + event_class + "' event_id='" + ev.id + "' " + scheduler2.config.event_attribute + "='" + ev.id + "' style='" + bg_color + color + (ev._text_style || "") + " width: " + (scheduler2.xy.map_date_width + scheduler2.xy.map_description_width + 2) + "px;'><div class='dhx_map_event_time' style='width: " + scheduler2.xy.map_date_width + "px;' >" + scheduler2.templates.map_time(ev.start_date, ev.end_date, ev) + "</div>"; |
| 14092 | html += `<div ${ariaButtonAttr} class='dhx_event_icon icon_details'><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 14093 | <path d="M15.4444 16.4H4.55556V7.6H15.4444V16.4ZM13.1111 2V3.6H6.88889V2H5.33333V3.6H4.55556C3.69222 3.6 3 4.312 3 5.2V16.4C3 16.8243 3.16389 17.2313 3.45561 17.5314C3.74733 17.8314 4.143 18 4.55556 18H15.4444C15.857 18 16.2527 17.8314 16.5444 17.5314C16.8361 17.2313 17 16.8243 17 16.4V5.2C17 4.312 16.3 3.6 15.4444 3.6H14.6667V2H13.1111ZM13.8889 10.8H10V14.8H13.8889V10.8Z" fill="#A1A4A6"/> |
| 14094 | </svg></div>`; |
| 14095 | html += "<div class='line_description' style='width:" + (scheduler2.xy.map_description_width - scheduler2.xy.map_icon_width) + "px;'>" + scheduler2.templates.map_text(ev.start_date, ev.end_date, ev) + "</div></div>"; |
| 14096 | } |
| 14097 | html += "<div class='dhx_v_border' style=" + (scheduler2.config.rtl ? "'right: " : "'left: ") + (scheduler2.xy.map_date_width - 1) + "px;'></div><div class='dhx_v_border_description'></div></div>"; |
| 14098 | scheduler2._els["dhx_cal_data"][0].scrollTop = 0; |
| 14099 | scheduler2._els["dhx_cal_data"][0].innerHTML = html; |
| 14100 | let t2 = scheduler2._els["dhx_cal_data"][0].firstChild.childNodes; |
| 14101 | let dateElement = scheduler2._getNavDateElement(); |
| 14102 | if (dateElement) { |
| 14103 | dateElement.innerHTML = scheduler2.templates[scheduler2._mode + "_date"](scheduler2._min_date, scheduler2._max_date, scheduler2._mode); |
| 14104 | } |
| 14105 | scheduler2._rendered = []; |
| 14106 | for (let i = 0; i < t2.length - 2; i++) { |
| 14107 | scheduler2._rendered[i] = t2[i]; |
| 14108 | } |
| 14109 | } |
| 14110 | function set_full_view(mode) { |
| 14111 | if (mode) { |
| 14112 | const l = scheduler2.locale.labels; |