diff --git a/netbox/project-static/js/forms.js b/netbox/project-static/js/forms.js index 6647046d7..d437c3e4a 100644 --- a/netbox/project-static/js/forms.js +++ b/netbox/project-static/js/forms.js @@ -1,13 +1,18 @@ $(document).ready(function() { - // "Select all" checkbox in a table header - $('th input:checkbox[name=_all]').click(function (event) { - $(this).parents('table').find('td input:checkbox').prop('checked', $(this).prop('checked')); + // "Toggle all" checkbox in a table header + $('#toggle_all').click(function (event) { + $('td input:checkbox[name=pk]').prop('checked', $(this).prop('checked')); + if ($(this).is(':checked')) { + $('#select_all_box').removeClass('hidden'); + } else { + $('#select_all').prop('checked', false); + } }); - // Uncheck the "select all" checkbox if an item is unchecked + // Uncheck the "toggle all" checkbox if an item is unchecked $('input:checkbox[name=pk]').click(function (event) { if (!$(this).attr('checked')) { - $(this).parents('table').find('input:checkbox[name=_all]').prop('checked', false); + $('#select_all, #toggle_all').prop('checked', false); } }); diff --git a/netbox/templates/dcim/inc/device_table.html b/netbox/templates/dcim/inc/device_table.html index 2f585968f..480bbc933 100644 --- a/netbox/templates/dcim/inc/device_table.html +++ b/netbox/templates/dcim/inc/device_table.html @@ -1,30 +1,9 @@ -{% load render_table from django_tables2 %} -{% load helpers %} -{% if table.model|user_can_change:request.user or table.model|user_can_delete:request.user %} -
-{% else %} - {% render_table table table_template|default:'table.html' %} -{% endif %} +{% extends 'utilities/obj_table.html' %} + +{% block extra_actions %} + {% if perms.dcim.add_interface %} + + {% endif %} +{% endblock %} diff --git a/netbox/templates/utilities/bulk_edit_form.html b/netbox/templates/utilities/bulk_edit_form.html index e723da656..1aa7344ce 100644 --- a/netbox/templates/utilities/bulk_edit_form.html +++ b/netbox/templates/utilities/bulk_edit_form.html @@ -11,7 +11,7 @@