Skip to content

Commit

Permalink
if else bracket good practice
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-TBT committed Apr 8, 2024
1 parent 0cd83a6 commit 20125ca
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions omero_tagsearch/templates/omero_tagsearch/tagnav.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@
});

$('#id_operation').change(function() {
if ($('#enableCheckbox').is(':checked'))
if ($('#enableCheckbox').is(':checked')) {
$("#tagSearchForm").submit();
}
});

$( "#id_selectedTags" ).chosen().change(function(event, params) {
Expand Down Expand Up @@ -188,15 +189,17 @@
var do_select = $("#selectall_btn").text() === "Select all";
objTypes.forEach(function(objtype) {
_objclass = '#id_view_'+objtype
if ($(_objclass).is(":checked") != do_select)
if ($(_objclass).is(":checked") != do_select) {
$(_objclass).prop("checked", do_select);
change_row_display($(_objclass).is(":checked"), "."+objtype+"_row");
}
});

if (do_select)
if (do_select) {
$("#selectall_btn").text("Deselect all");
else
} else {
$("#selectall_btn").text("Select all");
}
});

});
Expand Down

0 comments on commit 20125ca

Please sign in to comment.