(scheduler2)
| 9476 | } |
| 9477 | } |
| 9478 | function active_links(scheduler2) { |
| 9479 | scheduler2.config.active_link_view = "day"; |
| 9480 | scheduler2._active_link_click = function(e) { |
| 9481 | var start = e.target; |
| 9482 | var to = start.getAttribute("data-link-date"); |
| 9483 | var s_d = scheduler2.date.str_to_date(scheduler2.config.api_date, false, true); |
| 9484 | if (to) { |
| 9485 | scheduler2.setCurrentView(s_d(to), scheduler2.config.active_link_view); |
| 9486 | if (e && e.preventDefault) |
| 9487 | e.preventDefault(); |
| 9488 | return false; |
| 9489 | } |
| 9490 | }; |
| 9491 | scheduler2.attachEvent("onTemplatesReady", function() { |
| 9492 | var do_wrapper = function(key2, fullname) { |
| 9493 | fullname = fullname || key2 + "_scale_date"; |
| 9494 | if (!scheduler2.templates["_active_links_old_" + fullname]) { |
| 9495 | scheduler2.templates["_active_links_old_" + fullname] = scheduler2.templates[fullname]; |
| 9496 | } |
| 9497 | var week_x = scheduler2.templates["_active_links_old_" + fullname]; |
| 9498 | var d_s = scheduler2.date.date_to_str(scheduler2.config.api_date); |
| 9499 | scheduler2.templates[fullname] = function(date) { |
| 9500 | return "<a data-link-date='" + d_s(date) + "' href='#'>" + week_x(date) + "</a>"; |
| 9501 | }; |
| 9502 | }; |
| 9503 | do_wrapper("week"); |
| 9504 | do_wrapper("", "month_day"); |
| 9505 | if (this.matrix) { |
| 9506 | for (var key in this.matrix) |
| 9507 | do_wrapper(key); |
| 9508 | } |
| 9509 | this._detachDomEvent(this._obj, "click", scheduler2._active_link_click); |
| 9510 | scheduler2.event(this._obj, "click", scheduler2._active_link_click); |
| 9511 | }); |
| 9512 | } |
| 9513 | function agenda_legacy(scheduler2) { |
| 9514 | scheduler2.date.add_agenda_legacy = function(date) { |
| 9515 | return scheduler2.date.add(date, 1, "year"); |
nothing calls this directly
no test coverage detected