(scheduler2)
| 15270 | }; |
| 15271 | } |
| 15272 | function quick_info(scheduler2) { |
| 15273 | scheduler2.config.icons_select = ["icon_form", "icon_delete"]; |
| 15274 | scheduler2.config.details_on_create = true; |
| 15275 | scheduler2.config.show_quick_info = true; |
| 15276 | scheduler2.xy.menu_width = 0; |
| 15277 | let clickedElementPosition = null; |
| 15278 | scheduler2.attachEvent("onSchedulerReady", function() { |
| 15279 | const container = scheduler2.$container; |
| 15280 | if (container._$quickInfoHandler) { |
| 15281 | return; |
| 15282 | } else { |
| 15283 | container._$quickInfoHandler = true; |
| 15284 | scheduler2.event(container, "mousedown", function(e) { |
| 15285 | const eventElement = e.target.closest(`[${scheduler2.config.event_attribute}]`); |
| 15286 | if (eventElement) { |
| 15287 | clickedElementPosition = { id: eventElement.getAttribute(scheduler2.config.event_attribute), position: getPositionInsideScheduler(eventElement) }; |
| 15288 | } |
| 15289 | }); |
| 15290 | scheduler2.attachEvent("onDestroy", () => { |
| 15291 | delete container._$quickInfoHandler; |
| 15292 | }); |
| 15293 | } |
| 15294 | }); |
| 15295 | scheduler2.attachEvent("onClick", function(id) { |
| 15296 | if (!scheduler2.config.show_quick_info) { |
| 15297 | return; |
| 15298 | } |
| 15299 | scheduler2.showQuickInfo(id); |
| 15300 | return true; |
| 15301 | }); |
| 15302 | (function() { |
| 15303 | var events = ["onEmptyClick", "onViewChange", "onLightbox", "onBeforeEventDelete", "onBeforeDrag"]; |
| 15304 | var hiding_function = function() { |
| 15305 | scheduler2.hideQuickInfo(true); |
| 15306 | return true; |
| 15307 | }; |
| 15308 | for (var i = 0; i < events.length; i++) { |
| 15309 | scheduler2.attachEvent(events[i], hiding_function); |
| 15310 | } |
| 15311 | })(); |
| 15312 | scheduler2.templates.quick_info_title = function(start, end, ev) { |
| 15313 | return ev.text.substr(0, 50); |
| 15314 | }; |
| 15315 | scheduler2.templates.quick_info_content = function(start, end, ev) { |
| 15316 | return ev.details || ""; |
| 15317 | }; |
| 15318 | scheduler2.templates.quick_info_date = function(start, end, ev) { |
| 15319 | if (scheduler2.isOneDayEvent(ev) && scheduler2.config.rtl) { |
| 15320 | return scheduler2.templates.day_date(start, end, ev) + " " + scheduler2.templates.event_header(end, start, ev); |
| 15321 | } else if (scheduler2.isOneDayEvent(ev)) { |
| 15322 | return scheduler2.templates.day_date(start, end, ev) + " " + scheduler2.templates.event_header(start, end, ev); |
| 15323 | } else if (scheduler2.config.rtl) { |
| 15324 | return scheduler2.templates.week_date(end, start, ev); |
| 15325 | } else { |
| 15326 | return scheduler2.templates.week_date(start, end, ev); |
| 15327 | } |
| 15328 | }; |
| 15329 | scheduler2.showQuickInfo = function(id) { |
nothing calls this directly
no test coverage detected