Skip to content

Commit 9ef8a8e

Browse files
authored
Merge pull request #5837 from Laravel-Backpack/fix-ui
Fix UI
2 parents 271c8a8 + 29a94e9 commit 9ef8a8e

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

src/resources/assets/css/common.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
:root {
22
--table-row-hover: #f2f1ff;
3+
--select2-selected-item-background: #7c69ef;
4+
--select2-selected-item-color: #fff;
35
}
46

57
.sidebar .nav-dropdown-items .nav-dropdown {
@@ -941,8 +943,8 @@ div.dt-scroll-body {
941943
}
942944

943945
.select2-container--bootstrap .select2-results__option--highlighted[aria-selected] {
944-
background-color: #3875d7;
945-
color: #fff;
946+
background-color: var(--select2-selected-item-background);
947+
color: var(--select2-selected-item-color);
946948
}
947949

948950
.select2-container--bootstrap .select2-selection--multiple .select2-selection__choice {
@@ -1339,3 +1341,7 @@ div.dt-scroll-body {
13391341
grid-column: span 12 / span 12;
13401342
}
13411343
}
1344+
1345+
.dt-container .crud_bulk_actions_checkbox, .dt-container table.dataTable .crud_bulk_actions_checkbox {
1346+
margin: 0 0.6rem 0 0.45rem;
1347+
}

src/resources/views/crud/components/datatable/datatable.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Define the table ID - use the provided tableId or default to 'crudTable'
33
$tableId = $tableId ?? 'crudTable';
44
@endphp
5-
<section class="header-operation datatable-header container-fluid animated fadeIn d-flex mb-2 align-items-baseline d-print-none" bp-section="page-header">
5+
<section class="header-operation datatable-header animated fadeIn d-flex mb-2 align-items-baseline d-print-none" bp-section="page-header">
66
<h1 class="text-capitalize mb-0" bp-section="page-heading">{!! $crud->getHeading() ?? $crud->entity_name_plural !!}</h1>
77
<p class="ms-2 ml-2 mb-0" id="datatable_info_stack_{{$tableId}}" bp-section="page-subheading">{!! $crud->getSubheading() ?? '' !!}</p>
88
</section>

src/resources/views/crud/components/datatable/datatable_logic.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ functionsToRunOnDataTablesDrawEvent: [],
309309
topStart: null,
310310
topEnd: null,
311311
bottomEnd: null,
312-
bottomStart: null,
312+
bottomStart: 'info',
313313
bottom: config.exportButtons ? [
314314
'pageLength',
315315
{
@@ -813,7 +813,7 @@ function resizeCrudTableColumnWidths() {
813813
let shouldUpdateUrl = event.detail.shouldUpdateUrl;
814814
let debounce = event.detail.debounce;
815815
816-
updateDatatablesOnFilterChange(filterName, filterValue, filterValue || shouldUpdateUrl, debounce, tableId);
816+
updateDatatablesOnFilterChange(filterName, filterValue, shouldUpdateUrl, debounce, tableId);
817817
});
818818
819819
// Update the updateDatatablesOnFilterChange function to support multiple tables
@@ -837,7 +837,7 @@ function updateDatatablesOnFilterChange(filterName, filterValue, shouldUpdateUrl
837837
838838
// Update the browser URL if needed
839839
if (shouldUpdateUrl) {
840-
tableConfig.updateUrl(newUrl);
840+
window.crud.updateUrl(newUrl);
841841
}
842842
843843
// Reload the table with the new URL if needed

src/resources/views/crud/inc/filters_navbar.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<nav class="navbar navbar-expand-lg navbar-filters mb-0 py-0 shadow-none" componentId="{{ $componentId ?? '' }}">
1+
<nav class="navbar navbar-expand-lg navbar-filters mb-0 py-0 shadow-none" data-component-id="{{ $componentId ?? '' }}">
22
{{-- Brand and toggle get grouped for better mobile display --}}
33
<a class="nav-item d-none d-lg-block my-auto"><span class="la la-filter"></span></a>
44
<button class="navbar-toggler ms-3"

src/resources/views/crud/list.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{-- THE ACTUAL CONTENT --}}
1919
<div class="{{ $crud->getListContentClass() }}">
2020

21-
<x-backpack::datatable :controller="$controller" :crud="$crud" />
21+
<x-backpack::datatable :controller="$controller" :crud="$crud" :modifiesUrl="true" />
2222

2323
</div>
2424

0 commit comments

Comments
 (0)