MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / extend$d

Function extend$d

codebase/sources/dhtmlxscheduler.js:4822–4880  ·  view source on GitHub ↗
(scheduler2)

Source from the content-addressed store, hash-verified

4820 } };
4821 }
4822 function extend$d(scheduler2) {
4823 scheduler2.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: false, preserve_length: true, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: true, fix_tab_position: true, start_on_monday: true, first_hour: 0, last_hour: 24, readonly: false, drag_resize: true, drag_move: true, drag_create: true, drag_event_body: true, dblclick_create: true, details_on_dblclick: true, edit_on_create: true, details_on_create: true, header: null, hour_size_px: 44, resize_month_events: false, resize_month_timed: false, responsive_lightbox: false, separate_short_events: true, rtl: false, cascade_event_display: false, cascade_event_count: 4, cascade_event_margin: 30, multi_day: true, multi_day_height_limit: 200, drag_lightbox: true, preserve_scroll: true, select: true, undo_deleted: true, server_utc: false, touch: true, touch_tip: true, touch_drag: 500, touch_swipe_dates: false, quick_info_detached: true, positive_closing: false, drag_highlight: true, limit_drag_out: false, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"], buttons_right: ["dhx_save_btn", "dhx_cancel_btn"], buttons_left: ["dhx_delete_btn"], lightbox: { sections: [{ name: "description", map_to: "text", type: "textarea", focus: true }, { name: "time", height: 72, type: "time", map_to: "auto" }] }, highlight_displayed_event: true, left_border: false, ajax_error: "alert", delay_render: 0, timeline_swap_resize: true, wai_aria_attributes: true, wai_aria_application_role: true, csp: "auto", event_attribute: "data-event-id", show_errors: true };
4824 scheduler2.config.buttons_left.$initial = scheduler2.config.buttons_left.join();
4825 scheduler2.config.buttons_right.$initial = scheduler2.config.buttons_right.join();
4826 scheduler2._helpers = { parseDate: function parseDate(date) {
4827 var parse = scheduler2.templates.xml_date || scheduler2.templates.parse_date;
4828 return parse(date);
4829 }, formatDate: function formatDate(date) {
4830 var format = scheduler2.templates.xml_format || scheduler2.templates.format_date;
4831 return format(date);
4832 } };
4833 scheduler2.templates = {};
4834 scheduler2.init_templates = function() {
4835 var d = scheduler2.date.date_to_str;
4836 var c = scheduler2.config;
4837 var f = function(a, b) {
4838 for (var c2 in b)
4839 if (!a[c2])
4840 a[c2] = b[c2];
4841 };
4842 f(scheduler2.templates, { day_date: d(c.default_date), month_date: d(c.month_date), week_date: function(d1, d2) {
4843 if (c.rtl) {
4844 return scheduler2.templates.day_date(scheduler2.date.add(d2, -1, "day")) + " – " + scheduler2.templates.day_date(d1);
4845 }
4846 return scheduler2.templates.day_date(d1) + " – " + scheduler2.templates.day_date(scheduler2.date.add(d2, -1, "day"));
4847 }, day_scale_date: d(c.default_date), time_slot_text: function(date) {
4848 return "";
4849 }, time_slot_class: function(date) {
4850 return "";
4851 }, month_scale_date: d(c.week_date), week_scale_date: d(c.day_date), hour_scale: d(c.hour_date), time_picker: d(c.hour_date), event_date: d(c.hour_date), month_day: d(c.month_day), load_format: d(c.load_date), format_date: d(c.date_format, c.server_utc), parse_date: scheduler2.date.str_to_date(c.date_format, c.server_utc), api_date: scheduler2.date.str_to_date(c.api_date, false, false), event_header: function(start, end, ev) {
4852 if (ev._mode === "small" || ev._mode === "smallest") {
4853 return scheduler2.templates.event_date(start);
4854 } else {
4855 return scheduler2.templates.event_date(start) + " - " + scheduler2.templates.event_date(end);
4856 }
4857 }, event_text: function(start, end, ev) {
4858 return ev.text;
4859 }, event_class: function(start, end, ev) {
4860 return "";
4861 }, month_date_class: function(d2) {
4862 return "";
4863 }, week_date_class: function(d2) {
4864 return "";
4865 }, event_bar_date: function(start, end, ev) {
4866 return scheduler2.templates.event_date(start);
4867 }, event_bar_text: function(start, end, ev) {
4868 return ev.text;
4869 }, month_events_link: function(date, count) {
4870 return "<a>View more(" + count + " events)</a>";
4871 }, drag_marker_class: function(start, end, event2) {
4872 return "";
4873 }, drag_marker_content: function(start, end, event2) {
4874 return "";
4875 }, tooltip_date_format: scheduler2.date.date_to_str("%Y-%m-%d %H:%i"), tooltip_text: function(start, end, event2) {
4876 return "<b>Event:</b> " + event2.text + "<br/><b>Start date:</b> " + scheduler2.templates.tooltip_date_format(start) + "<br/><b>End date:</b> " + scheduler2.templates.tooltip_date_format(end);
4877 }, calendar_month: d("%F %Y"), calendar_scale_date: d("%D"), calendar_date: d("%d"), calendar_time: d("%d-%m-%Y") });
4878 this.callEvent("onTemplatesReady", []);
4879 };

Callers 1

factoryMethodFunction · 0.70

Calls 9

fFunction · 0.70
day_dateMethod · 0.65
addMethod · 0.65
str_to_dateMethod · 0.65
event_dateMethod · 0.65
date_to_strMethod · 0.65
tooltip_date_formatMethod · 0.65
callEventMethod · 0.65
dFunction · 0.50

Tested by

no test coverage detected