Fixed #31523 -- Removed jQuery dependency from actions.js.

This commit is contained in:
Jon Dufresne 2020-06-24 11:13:51 +02:00 committed by Carlton Gibson
parent 074844e947
commit 30e59705fc
7 changed files with 178 additions and 158 deletions

View file

@ -11,7 +11,7 @@ QUnit.module('admin.actions', {
const $ = django.jQuery;
$('#qunit-fixture').append($('#result-table').text());
$('tr input.action-select').actions();
Actions(document.querySelectorAll('tr input.action-select'));
}
});

View file

@ -11,18 +11,23 @@
<div id="qunit-fixture">
</div>
<script type="text/html" id="result-table">
<table id="result_list">
<tr>
<th>
<input type="checkbox" id="action-toggle">
</th>
</tr>
<tr>
<td class="action-checkbox">
<input class="action-select" type="checkbox" value="618">
</td>
</tr>
</table>
<form id="changelist-form">
<button type="submit" class="button" name="index" value="0">Go</button>
<span class="action-counter" data-actions-icnt="100"></span>
<table id="result_list">
<tr>
<th>
<input type="checkbox" id="action-toggle">
</th>
</tr>
<tr>
<td class="action-checkbox">
<input class="action-select" type="checkbox" value="618">
</td>
</tr>
</table>
<input type="submit" name="_save" value="Save">
</form>
</script>
<script type="text/html" id="tabular-formset">
<input id="id_first-TOTAL_FORMS" value="1">