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

Function extend$7

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

Source from the content-addressed store, hash-verified

6210 }).bind(scheduler2);
6211 }
6212 function extend$7(scheduler2) {
6213 scheduler2._loaded = {};
6214 scheduler2._load = function(url2, from) {
6215 url2 = url2 || this._load_url;
6216 if (!url2) {
6217 return;
6218 }
6219 url2 += (url2.indexOf("?") == -1 ? "?" : "&") + "timeshift=" + (/* @__PURE__ */ new Date()).getTimezoneOffset();
6220 if (this.config.prevent_cache)
6221 url2 += "&uid=" + this.uid();
6222 var to;
6223 from = from || this._date;
6224 function ajaxCallback(response) {
6225 scheduler2.on_load(response);
6226 scheduler2.callEvent("onLoadEnd", []);
6227 }
6228 if (this._load_mode) {
6229 var lf = this.templates.load_format;
6230 from = this.date[this._load_mode + "_start"](new Date(from.valueOf()));
6231 while (from > this._min_date)
6232 from = this.date.add(from, -1, this._load_mode);
6233 to = from;
6234 var cache_line = true;
6235 while (to < this._max_date) {
6236 to = this.date.add(to, 1, this._load_mode);
6237 if (this._loaded[lf(from)] && cache_line)
6238 from = this.date.add(from, 1, this._load_mode);
6239 else
6240 cache_line = false;
6241 }
6242 var temp_to = to;
6243 do {
6244 to = temp_to;
6245 temp_to = this.date.add(to, -1, this._load_mode);
6246 } while (temp_to > from && this._loaded[lf(temp_to)]);
6247 if (to <= from)
6248 return false;
6249 scheduler2.ajax.get(url2 + "&from=" + lf(from) + "&to=" + lf(to), ajaxCallback);
6250 while (from < to) {
6251 this._loaded[lf(from)] = true;
6252 from = this.date.add(from, 1, this._load_mode);
6253 }
6254 } else {
6255 scheduler2.ajax.get(url2, ajaxCallback);
6256 }
6257 this.callEvent("onXLS", []);
6258 this.callEvent("onLoadStart", []);
6259 return true;
6260 };
6261 scheduler2._parsers = {};
6262 extend$a(scheduler2);
6263 extend$9(scheduler2);
6264 extend$8(scheduler2);
6265 scheduler2.on_load = function(loader) {
6266 this.callEvent("onBeforeParse", []);
6267 var evs;
6268 var error = false;
6269 var foundParser = false;

Callers 1

factoryMethodFunction · 0.70

Calls 13

extend$aFunction · 0.70
extend$9Function · 0.70
extend$8Function · 0.70
getSerializatorFunction · 0.70
uidMethod · 0.65
addMethod · 0.65
callEventMethod · 0.65
parseMethod · 0.65
addEventMethod · 0.65
definedMethod · 0.65
xml_formatMethod · 0.65
format_dateMethod · 0.65

Tested by

no test coverage detected