Fix ambiguity for selectors (now other button configuration are relyin on button[data-action] but we don't want it to affect the nodal window

This commit is contained in:
Alexandre Aubin 2019-10-17 19:01:16 +02:00
parent 3f8aff1a99
commit 1f4afe63e7
2 changed files with 3 additions and 3 deletions

View file

@ -76,8 +76,8 @@
</header>
<div class="content"></div>
<footer>
<button type="button" id="modal-cancel" data-action="cancel" data-y18n="cancel">Cancel</button>
<button type="button" id="modal-confirm" data-action="confirm" data-y18n="ok">OK</button>
<button type="button" id="modal-cancel" data-modal-action="cancel" data-y18n="cancel">Cancel</button>
<button type="button" id="modal-confirm" data-modal-action="confirm" data-y18n="ok">OK</button>
</footer>
</div></div>
</div>

View file

@ -424,7 +424,7 @@
.modal('hide');
// Do corresponding callback
if ($(this).data('action') == 'confirm') {
if ($(this).data('modal-action') == 'confirm') {
confirmCallback();
}
else {