Skip to content

Commit

Permalink
CLASSES-4010 show a message if all sections are blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
payten committed Jun 3, 2021
1 parent 117f6e0 commit de2ce93
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ $(document).ready(function() {
} else if ($(this).data('hidden') || $(this).find("[data-hidden]").length > 0) {
const $panel = $(this).closest('.collapsible-panel');
$(this).remove();
if ($panel.find('ul > li').length == 0) {
if ($panel.find('ul > li').length === 0) {
$panel.remove();
}
} else if ($(this).data('blocked') || $(this).find("[data-blocked]").length > 0) {
Expand All @@ -167,6 +167,10 @@ $(document).ready(function() {
}
});

if ($("#findCoursePanels .collapsible-panel").length === 0) {
$(".site-setup-messages").html('<p class="alertMessage">Sorry, but for this term there are no courses available to you.</p>');
}

// update the panel counts!
$("#findCoursePanels .collapsible-panel").each(function() {
var count = $(":checkbox[name=providerCourseAdd]", this).length;
Expand Down

0 comments on commit de2ce93

Please sign in to comment.