From 16453a05f8f37ae53c559dd5859006febf3d2a3d Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 14 Mar 2021 16:02:37 +0100 Subject: [PATCH] Code cosmetics --- cps/static/js/edit_books.js | 2 +- cps/static/js/filter_grid.js | 4 ++-- cps/static/js/main.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cps/static/js/edit_books.js b/cps/static/js/edit_books.js index 8f683be4..8cedf688 100644 --- a/cps/static/js/edit_books.js +++ b/cps/static/js/edit_books.js @@ -265,7 +265,7 @@ $("#search").on("change input.typeahead:selected", function(event) { } }); $("#include_tag option:selected").each(function () { - $("#exclude_tag").find("[value="+$(this).val() + "]").prop("disabled", true); + $("#exclude_tag").find("[value=" + $(this).val() + "]").prop("disabled", true); }); $("#include_tag").selectpicker("refresh"); $("#exclude_tag").selectpicker("refresh"); diff --git a/cps/static/js/filter_grid.js b/cps/static/js/filter_grid.js index 1603f641..d57d155f 100644 --- a/cps/static/js/filter_grid.js +++ b/cps/static/js/filter_grid.js @@ -64,7 +64,7 @@ $("#all").click(function() { $(".char").click(function() { var character = this.innerText; $list.isotope({ filter: function() { - return this.attributes["data-id"].value.charAt(0).toUpperCase() == character; - } + return this.attributes["data-id"].value.charAt(0).toUpperCase() === character; + } }); }); diff --git a/cps/static/js/main.js b/cps/static/js/main.js index ba6f726f..a3fed40f 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -55,7 +55,7 @@ $(document).on("change", "select[data-control]", function() { $(document).on("change", "select[data-controlall]", function() { var $this = $(this); var name = $this.data("controlall"); - var showOrHide = parseInt($this.val()); + var showOrHide = parseInt($this.val(), 10); if (showOrHide) { $("[data-related=" + name + "]").show(); } else {