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

Function extend$h

codebase/sources/dhtmlxscheduler.es.js:3750–3943  ·  view source on GitHub ↗
(scheduler2)

Source from the content-addressed store, hash-verified

3748 };
3749}
3750function extend$h(scheduler2) {
3751 (function() {
3752 var htmlTags = new RegExp("<(?:.|\n)*?>", "gm");
3753 var extraSpaces = new RegExp(" +", "gm");
3754 function stripHTMLLite(htmlText) {
3755 return (htmlText + "").replace(htmlTags, " ").replace(extraSpaces, " ");
3756 }
3757 var singleQuotes = new RegExp("'", "gm");
3758 function escapeQuotes(text) {
3759 return (text + "").replace(singleQuotes, "&#39;");
3760 }
3761 scheduler2._waiAria = { getAttributeString: function(attr) {
3762 var attributes = [" "];
3763 for (var i2 in attr) {
3764 if (typeof attr[i2] != "function" && typeof attr[i2] != "object") {
3765 var text = escapeQuotes(stripHTMLLite(attr[i2]));
3766 attributes.push(i2 + "='" + text + "'");
3767 }
3768 }
3769 attributes.push(" ");
3770 return attributes.join(" ");
3771 }, setAttributes: function(div, values) {
3772 for (var i2 in values) {
3773 div.setAttribute(i2, stripHTMLLite(values[i2]));
3774 }
3775 return div;
3776 }, labelAttr: function(div, content) {
3777 return this.setAttributes(div, { "aria-label": content });
3778 }, label: function(label) {
3779 return scheduler2._waiAria.getAttributeString({ "aria-label": label });
3780 }, hourScaleAttr: function(div, content) {
3781 this.labelAttr(div, content);
3782 }, monthCellAttr: function(div, date) {
3783 this.labelAttr(div, scheduler2.templates.day_date(date));
3784 }, navBarDateAttr: function(div, content) {
3785 this.labelAttr(div, content);
3786 }, dayHeaderAttr: function(div, content) {
3787 this.labelAttr(div, content);
3788 }, dayColumnAttr: function(div, date) {
3789 this.dayHeaderAttr(div, scheduler2.templates.day_date(date));
3790 }, headerButtonsAttributes: function(div, label) {
3791 return this.setAttributes(div, { role: "button", "aria-label": label });
3792 }, headerToggleState: function(div, isActive) {
3793 return this.setAttributes(div, { "aria-pressed": isActive ? "true" : "false" });
3794 }, getHeaderCellAttr: function(dateString) {
3795 return scheduler2._waiAria.getAttributeString({ "aria-label": dateString });
3796 }, eventAttr: function(event2, div) {
3797 this._eventCommonAttr(event2, div);
3798 }, _eventCommonAttr: function(event2, div) {
3799 div.setAttribute("aria-label", stripHTMLLite(scheduler2.templates.event_text(event2.start_date, event2.end_date, event2)));
3800 if (scheduler2.config.readonly) {
3801 div.setAttribute("aria-readonly", true);
3802 }
3803 if (event2.$dataprocessor_class) {
3804 div.setAttribute("aria-busy", true);
3805 }
3806 div.setAttribute("aria-selected", scheduler2.getState().select_id == event2.id ? "true" : "false");
3807 }, setEventBarAttr: function(event2, div) {

Callers 1

factoryMethodFunction · 0.70

Calls 7

escapeQuotesFunction · 0.70
stripHTMLLiteFunction · 0.70
isDisabledFunction · 0.70
day_dateMethod · 0.65
event_textMethod · 0.65
getStateMethod · 0.65
uidMethod · 0.65

Tested by

no test coverage detected