Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion ietf/static/js/edit-meeting-schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ $(function () {
let sessionPurposeInputs = schedEditor.find('.session-purpose-toggles input');
let timeSlotGroupInputs = schedEditor.find("#timeslot-group-toggles-modal .modal-body .individual-timeslots input");
let sessionParentInputs = schedEditor.find(".session-parent-toggles input");
let sessionParentToggleAll = schedEditor.find(".session-parent-toggles .session-parent-toggle-all")
const classes_to_hide = '.hidden-timeslot-group,.hidden-timeslot-type';

// hack to work around lack of position sticky support in old browsers, see https://caniuse.com/#feat=css-sticky
Expand Down Expand Up @@ -769,6 +770,17 @@ $(function () {
sessionParentInputs.on("click", updateSessionParentToggling);
updateSessionParentToggling();

// Toggle _all_ session parents
function toggleAllSessionParents() {
if (sessionParentInputs.filter(":checked").length < sessionParentInputs.length) {
sessionParentInputs.prop("checked", true);
} else {
sessionParentInputs.prop("checked", false);
}
updateSessionParentToggling();
}
sessionParentToggleAll.on("click", toggleAllSessionParents);

// Toggling timeslot types
function updateTimeSlotTypeToggling() {
const checkedTypes = jQuery.map(timeSlotTypeInputs.filter(":checked"), elt => elt.value);
Expand Down Expand Up @@ -1020,4 +1032,4 @@ $(function () {
.on("mouseleave", ".other-session", function () {
sessions.filter("#session" + this.dataset.othersessionid).removeClass("highlight");
});
});
});
5 changes: 5 additions & 0 deletions ietf/templates/meeting/edit_meeting_schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ <h1>
{{ p.acronym }}
</label>
{% endfor %}
<button type="button"
class="btn btn-outline-primary btn-sm session-parent-toggle-all">
Toggle All
</button>

</div>
<div class="my-3">
{% if session_purposes|length > 1 %}
Expand Down
Loading