With merge button disabled it's no longer possible to open merge dialog

This commit is contained in:
Ozzie Isaacs 2021-08-01 20:23:04 +02:00
parent b36422bc05
commit 1534827ad7
2 changed files with 7 additions and 2 deletions

View File

@ -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({ $.ajax({
method:"post", method:"post",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",

View File

@ -21,7 +21,7 @@
<h2 class="{{page}}">{{_(title)}}</h2> <h2 class="{{page}}">{{_(title)}}</h2>
<div class="col-xs-12 col-sm-6"> <div class="col-xs-12 col-sm-6">
<div class="row form-group"> <div class="row form-group">
<div class="btn btn-default disabled" id="merge_books" data-toggle="modal" data-target="#mergeModal" aria-disabled="true">{{_('Merge selected books')}}</div> <div class="btn btn-default disabled" id="merge_books" aria-disabled="true">{{_('Merge selected books')}}</div>
<div class="btn btn-default disabled" id="delete_selection" aria-disabled="true">{{_('Remove Selections')}}</div> <div class="btn btn-default disabled" id="delete_selection" aria-disabled="true">{{_('Remove Selections')}}</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">