Scheduled exports (#3033)

This commit is contained in:
Raphael Michel
2023-01-19 11:46:30 +01:00
committed by GitHub
parent 0bb5af191b
commit 19d1a8de71
36 changed files with 2461 additions and 293 deletions

View File

@@ -0,0 +1,21 @@
/*globals $, Morris, gettext, RRule, RRuleSet*/
function rrule_form_toggles($form) {
var freq = $form.find("select[name*=freq]").val();
$form.find(".repeat-yearly").toggle(freq === "yearly");
$form.find(".repeat-monthly").toggle(freq === "monthly");
$form.find(".repeat-weekly").toggle(freq === "weekly");
}
function rrule_bind_form($form) {
$form.find("select[name*=freq]").change(function () {
rrule_form_toggles($form);
});
rrule_form_toggles($form);
}
$(document).on("pretix:bind-forms", function () {
$(".rrule-form").each(function () {
rrule_bind_form($(this));
});
});

View File

@@ -122,20 +122,6 @@ $(document).on("pretix:bind-forms", function () {
}
}
function rrule_form_toggles($form) {
var freq = $form.find("select[name*=freq]").val();
$form.find(".repeat-yearly").toggle(freq === "yearly");
$form.find(".repeat-monthly").toggle(freq === "monthly");
$form.find(".repeat-weekly").toggle(freq === "weekly");
}
function rrule_bind_form($form) {
$form.find("select[name*=freq]").change(function () {
rrule_form_toggles($form);
});
rrule_form_toggles($form);
}
$("#subevent_add_many_slots_go").on("click", function () {
$("#time-formset [data-formset-form]").each(function () {
var tf = $(this).find("[name$=time_from]").val()
@@ -186,7 +172,6 @@ $(document).on("pretix:bind-forms", function () {
});
rrule_preview();
$(".rrule-form").each(function () { rrule_bind_form($(this)); });
$("#rrule-formset").on("formAdded", "div", function (event) { rrule_bind_form($(event.target)); });
var $namef = $("input[id^=id_name]").first();