mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
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();
|
||||
|
||||
@@ -78,7 +78,7 @@ div[data-formset-body], div[data-formset-form], div[data-nested-formset-form], d
|
||||
// btn-lg
|
||||
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
|
||||
}
|
||||
.btn-cancel {
|
||||
.btn-cancel, .btn-alternative {
|
||||
float: left !important;
|
||||
// btn-lg
|
||||
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
|
||||
@@ -461,7 +461,7 @@ table td > .checkbox input[type="checkbox"] {
|
||||
width: 100px;
|
||||
display: inline;
|
||||
}
|
||||
.form-horizontal [data-formset] .rrule-form .form-group {
|
||||
.form-horizontal .rrule-form .form-group {
|
||||
margin: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user