Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1824 #1880

Merged
merged 2 commits into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ All Notable changes to `Backpack CRUD` will be documented in this file
- Nothing
-----------

## [3.6.17] - 2019-05-07

### Fixed
- fixes #1824 - inside the ListEntries operation, ```visibleInModal``` did not work for columns that were NOT ```visibleInTable```;

## [3.6.16] - 2019-04-25

### Fixed
Expand Down
6 changes: 4 additions & 2 deletions src/resources/views/inc/datatables_logic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ functionsToRunOnDataTablesDrawEvent: [],
}
} ),
renderer: function ( api, rowIdx, columns ) {

var data = $.map( columns, function ( col, i ) {
var allColumnHeaders = $("#crudTable thead>tr>th");
var columnHeading = crud.table.columns().header()[col.columnIndex];

if ($(allColumnHeaders[col.columnIndex]).attr('data-visible-in-modal') == 'false') {
// hide columns that have VisibleInModal false
if ($(columnHeading).attr('data-visible-in-modal') == 'false') {
return '';
}

Expand Down
6 changes: 3 additions & 3 deletions src/resources/views/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
<th
data-orderable="{{ var_export($column['orderable'], true) }}"
data-priority="{{ $column['priority'] }}"
data-visible-in-modal="{{ (isset($column['visibleInModal']) && $column['visibleInModal'] == false) ? 'false' : 'true' }}"
data-visible="{{ !isset($column['visibleInTable']) ? 'true' : (($column['visibleInTable'] == false) ? 'false' : 'true') }}"
data-visible-in-export="{{ (isset($column['visibleInExport']) && $column['visibleInExport'] == false) ? 'false' : 'true' }}"
data-visible="{{ var_export($column['visibleInTable'] ?? true) }}"
data-visible-in-modal="{{ var_export($column['visibleInModal'] ?? true) }}"
data-visible-in-export="{{ var_export($column['visibleInExport'] ?? true) }}"
>
{!! $column['label'] !!}
</th>
Expand Down