From 1534827ad70da784e6294d78df1e6eb9732856c2 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 1 Aug 2021 20:23:04 +0200 Subject: [PATCH] With merge button disabled it's no longer possible to open merge dialog --- cps/static/js/table.js | 7 ++++++- cps/templates/book_table.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cps/static/js/table.js b/cps/static/js/table.js index 09e8f472..664570bc 100644 --- a/cps/static/js/table.js +++ b/cps/static/js/table.js @@ -74,7 +74,12 @@ $(function() { }); }); - $("#merge_books").click(function() { + $("#merge_books").click(function(event) { + if ($(this).hasClass("disabled")) { + event.stopPropagation() + } else { + $('#mergeModal').modal("show"); + } $.ajax({ method:"post", contentType: "application/json; charset=utf-8", diff --git a/cps/templates/book_table.html b/cps/templates/book_table.html index e340dc0a..8fa1b69c 100644 --- a/cps/templates/book_table.html +++ b/cps/templates/book_table.html @@ -21,7 +21,7 @@

{{_(title)}}

-
{{_('Merge selected books')}}
+
{{_('Merge selected books')}}
{{_('Remove Selections')}}