Skip to content

Commit

Permalink
separate functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Nov 19, 2024
1 parent e217227 commit a08eebb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/app/Library/CrudPanel/Traits/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ public function getRowViews($entry, $rowNumber = false)
->render();
}


// add the bulk actions checkbox to the first column
if ($this->getOperationSetting('bulkActions')) {
$bulk_actions_checkbox = \View::make('crud::columns.inc.bulk_actions_checkbox', ['entry' => $entry])->render();
Expand All @@ -288,8 +289,8 @@ public function getRowViews($entry, $rowNumber = false)
$row_items[0] = $details_row_button.$row_items[0];
}

if ($this->getResponsiveTable()) {
$responsiveTableTrigger = \View::make('crud::columns.inc.responsive_table_trigger', ['entry' => $entry])->render();
if($this->getResponsiveTable()) {
$responsiveTableTrigger = '<div class="dtr-control d-inline">';
$row_items[0] = $responsiveTableTrigger.$row_items[0];
}

Expand Down
1 change: 1 addition & 0 deletions src/resources/views/crud/inc/datatables_logic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ functionsToRunOnDataTablesDrawEvent: [],
}
},
responsiveToggle: function(dt) {
console.log(dt.table().header());
$(dt.table().header()).find('th').toggleClass('all');
dt.responsive.rebuild();
dt.responsive.recalc();
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/crud/inc/details_row_logic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function registerDetailsRowButtonAction() {
// Add event listener for opening and closing details
$('#crudTable tbody td .details-control').on('click', function (e) {
e.stopPropagation();
e.stopPropagation();
var tr = $(this).closest('tr');
var btn = $(this).find('.details-row-button');
Expand Down
4 changes: 2 additions & 2 deletions src/resources/views/crud/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class="{{ backpack_theme_config('classes.table') ?? 'table table-striped table-h
>
{{-- Bulk checkbox --}}
@if($loop->first && $crud->getOperationSetting('bulkActions'))
{!! View::make('crud::columns.inc.bulk_actions_checkbox')->render() !!}
{!! View::make('crud::columns.inc.bulk_actions_checkbox')->render() !!}
@endif
{!! $column['label'] !!}
</th>
Expand All @@ -122,7 +122,7 @@ class="{{ backpack_theme_config('classes.table') ?? 'table table-striped table-h
<th>
{{-- Bulk checkbox --}}
@if($loop->first && $crud->getOperationSetting('bulkActions'))
{!! View::make('crud::columns.inc.bulk_actions_checkbox')->render() !!}
{!! View::make('crud::columns.inc.bulk_actions_checkbox')->render() !!}
@endif
{!! $column['label'] !!}
</th>
Expand Down

0 comments on commit a08eebb

Please sign in to comment.