Show and hide option to view all events instead of disabling checkbox

This commit is contained in:
Brian Miyaji
2014-03-17 22:33:54 +11:00
parent e24cd547e2
commit a8587bd811
3 changed files with 7 additions and 3 deletions

View File

@@ -38,7 +38,11 @@ jQuery(document).ready(function($){
// Calendar affects view all link checkbox in widget options
$("body.widgets-php").on("change", ".sp-events-calendar-select", function() {
$(this).closest(".widget-content").find(".sp-events-calendar-show-all-toggle").prop("disabled", $(this).val() == 0);
$el = $(this).closest(".widget-content").find(".sp-events-calendar-show-all-toggle");
if($(this).val() == 0)
$el.hide();
else
$el.show();
});
// Tab switcher