forked from CGM_Public/pretix_original
Scheduled exports (#3033)
This commit is contained in:
21
src/pretix/static/pretixcontrol/js/ui/rrule.js
Normal file
21
src/pretix/static/pretixcontrol/js/ui/rrule.js
Normal 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));
|
||||
});
|
||||
});
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user