(scheduler2, initConfig)
| 9437 | return scheduler2; |
| 9438 | } |
| 9439 | _initFromConfig(scheduler2, initConfig) { |
| 9440 | if (initConfig.plugins) { |
| 9441 | scheduler2.plugins(initConfig.plugins); |
| 9442 | } |
| 9443 | if (initConfig.config) { |
| 9444 | scheduler2.mixin(scheduler2.config, initConfig.config, true); |
| 9445 | } |
| 9446 | if (initConfig.templates) { |
| 9447 | scheduler2.attachEvent("onTemplatesReady", function() { |
| 9448 | scheduler2.mixin(scheduler2.templates, initConfig.templates, true); |
| 9449 | }, { once: true }); |
| 9450 | } |
| 9451 | if (initConfig.events) { |
| 9452 | for (const event2 in initConfig.events) { |
| 9453 | scheduler2.attachEvent(event2, initConfig.events[event2]); |
| 9454 | } |
| 9455 | } |
| 9456 | if (initConfig.locale) { |
| 9457 | scheduler2.i18n.setLocale(initConfig.locale); |
| 9458 | } |
| 9459 | if (Array.isArray(initConfig.calendars)) { |
| 9460 | initConfig.calendars.forEach(function(calendar) { |
| 9461 | scheduler2.addCalendar(calendar); |
| 9462 | }); |
| 9463 | } |
| 9464 | if (initConfig.container) { |
| 9465 | scheduler2.init(initConfig.container); |
| 9466 | } else { |
| 9467 | scheduler2.init(); |
| 9468 | } |
| 9469 | if (initConfig.data) { |
| 9470 | if (typeof initConfig.data === "string") { |
| 9471 | scheduler2.load(initConfig.data); |
| 9472 | } else { |
| 9473 | scheduler2.parse(initConfig.data); |
| 9474 | } |
| 9475 | } |
| 9476 | } |
| 9477 | } |
| 9478 | function active_links(scheduler2) { |
| 9479 | scheduler2.config.active_link_view = "day"; |
no test coverage detected