mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed #4784 - cookie not always being set correctly for ajax tables
This commit is contained in:
parent
bab0bda174
commit
c6a956382f
Binary file not shown.
Binary file not shown.
|
@ -1,10 +1,10 @@
|
||||||
{{-- This Will load our default bootstrap-table settings on any table with a class of "snipe-table" and export it to the passed 'exportFile' name --}}
|
{{-- This Will load our default bootstrap-table settings on any table with a class of "snipe-table" and export it to the passed 'exportFile' name --}}
|
||||||
<script src="{{ asset('js/bootstrap-table.js') }}"></script>
|
<script src="{{ asset('js/bootstrap-table.js') }}"></script>
|
||||||
<script src="{{ asset('js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
<script src="{{ asset('js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||||
|
<script src="{{ asset('js/extensions/cookie/bootstrap-table-cookie.min.js?v=1') }}"></script>
|
||||||
|
|
||||||
@if (!isset($simple_view))
|
@if (!isset($simple_view))
|
||||||
<script src="{{ asset('js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
|
<script src="{{ asset('js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
|
||||||
<script src="{{ asset('js/extensions/cookie/bootstrap-table-cookie.js?v=1') }}"></script>
|
|
||||||
<script src="{{ asset('js/extensions/export/tableExport.js') }}"></script>
|
<script src="{{ asset('js/extensions/export/tableExport.js') }}"></script>
|
||||||
<script src="{{ asset('js/FileSaver.min.js') }}"></script>
|
<script src="{{ asset('js/FileSaver.min.js') }}"></script>
|
||||||
<script src="{{ asset('js/jspdf.min.js') }}"></script>
|
<script src="{{ asset('js/jspdf.min.js') }}"></script>
|
||||||
|
@ -36,31 +36,27 @@
|
||||||
classes: 'table table-responsive table-no-bordered',
|
classes: 'table table-responsive table-no-bordered',
|
||||||
undefinedText: '',
|
undefinedText: '',
|
||||||
iconsPrefix: 'fa',
|
iconsPrefix: 'fa',
|
||||||
|
search: {{ (isset($search)) ? 'true' : 'false' }},
|
||||||
@if (isset($search))
|
|
||||||
search: true,
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
paginationVAlign: 'both',
|
paginationVAlign: 'both',
|
||||||
sidePagination: '{{ (isset($clientSearch)) ? 'client' : 'server' }}',
|
sidePagination: '{{ (isset($clientSearch)) ? 'client' : 'server' }}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
pageSize: 20,
|
||||||
|
pagination: true,
|
||||||
|
cookie: true,
|
||||||
|
cookieExpire: '2y',
|
||||||
|
cookieIdTable: '{{ Route::currentRouteName() }}',
|
||||||
|
|
||||||
@if (!isset($simple_view))
|
@if (!isset($simple_view))
|
||||||
|
|
||||||
showRefresh: true,
|
showRefresh: true,
|
||||||
pagination: true,
|
|
||||||
pageSize: 20,
|
|
||||||
cookie: true,
|
|
||||||
cookieExpire: '2y',
|
|
||||||
showExport: true,
|
showExport: true,
|
||||||
stickyHeader: true,
|
stickyHeader: true,
|
||||||
stickyHeaderOffsetY: stickyHeaderOffsetY + 'px',
|
stickyHeaderOffsetY: stickyHeaderOffsetY + 'px',
|
||||||
|
|
||||||
|
|
||||||
@if (isset($showFooter))
|
@if (isset($showFooter))
|
||||||
showFooter: true,
|
showFooter: true,
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
showColumns: true,
|
showColumns: true,
|
||||||
trimOnSearch: false,
|
trimOnSearch: false,
|
||||||
|
|
||||||
|
@ -287,13 +283,9 @@
|
||||||
|
|
||||||
// We need a special formatter for license seats, since they don't work exactly the same
|
// We need a special formatter for license seats, since they don't work exactly the same
|
||||||
//
|
//
|
||||||
function licenseSeatInOutFormatter (value, row) {
|
function licenseSeatInOutFormatter(value, row) {
|
||||||
|
|
||||||
if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && (!row.assigned_to)) {
|
|
||||||
return '<a href="{{ url('/') }}/' + destination + '/' + row.next_seat + '/checkout" class="btn btn-sm bg-maroon" data-tooltip="true" title="Check this item out to a user">{{ trans('general.checkout') }}</a>';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function genericCheckinCheckoutFormatter(destination) {
|
function genericCheckinCheckoutFormatter(destination) {
|
||||||
|
|
Loading…
Reference in a new issue