mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Updated bootstrap tables
This commit is contained in:
parent
2bbb6001a8
commit
55b9f1207d
BIN
public/js/FileSaver.min.js
vendored
BIN
public/js/FileSaver.min.js
vendored
Binary file not shown.
BIN
public/js/bootstrap-table.js
vendored
BIN
public/js/bootstrap-table.js
vendored
Binary file not shown.
BIN
public/js/bootstrap-table.min.js
vendored
BIN
public/js/bootstrap-table.min.js
vendored
Binary file not shown.
Binary file not shown.
BIN
public/js/extensions/export/tableExport.min.js
vendored
Normal file
BIN
public/js/extensions/export/tableExport.min.js
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/js/jspdf.min.js
vendored
BIN
public/js/jspdf.min.js
vendored
Binary file not shown.
Binary file not shown.
BIN
public/js/xlsx.core.min.js
vendored
Normal file
BIN
public/js/xlsx.core.min.js
vendored
Normal file
Binary file not shown.
|
@ -40,9 +40,9 @@
|
|||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', [
|
||||
'exportFile' => 'accessories-export',
|
||||
'search' => true,
|
||||
'showFooter' => true,
|
||||
'columns' => \App\Presenters\AccessoryPresenter::dataTableLayout()
|
||||
'columns' => \App\Presenters\AccessoryPresenter::dataTableLayout(),
|
||||
'exportFile' => 'accessories-export',
|
||||
])
|
||||
@stop
|
||||
|
|
|
@ -42,15 +42,16 @@
|
|||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="licenseSeats"
|
||||
name="license-seats"
|
||||
class="table table-striped snipe-table"
|
||||
id="licenseSeats"
|
||||
data-id-table="licenseSeats"
|
||||
data-search="false"
|
||||
data-url="{{route('api.license.seats',['licence_id' => $license->id]) }}"
|
||||
data-export-options='{"fileName": "asset-assets"}'
|
||||
data-url="{{ route('api.license.seats',['licence_id' => $license->id]) }}"
|
||||
data-export="true"
|
||||
data-export-options="{'fileName': 'license-seats'}"
|
||||
data-cookie="true"
|
||||
data-show-footer="true"
|
||||
data-cookie-id-table="licenseSeats">
|
||||
data-cookie-id-table="licenseSeats-Table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1" data-field="name">{{ trans('admin/licenses/general.seat') }}</th>
|
||||
|
@ -80,7 +81,7 @@
|
|||
|
||||
@if ($license->manufacturer)
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.manufacturer') }}</td>
|
||||
<td>{{ trans('admin/hardware/form.manufacturer') }}:</td>
|
||||
<td><p style="line-height: 23px;">
|
||||
@can('view', \App\Models\Manufacturer::class)
|
||||
<a href="{{ route('manufacturers.show', $license->manufacturer->id) }}">
|
||||
|
@ -115,7 +116,7 @@
|
|||
|
||||
@if (!is_null($license->serial))
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.license_key') }}</td>
|
||||
<td>{{ trans('admin/licenses/form.license_key') }}: </td>
|
||||
<td style="word-wrap: break-word;overflow-wrap: break-word;word-break: break-word;">
|
||||
@can('viewKeys', $license)
|
||||
{!! nl2br(e($license->serial)) !!}
|
||||
|
@ -128,16 +129,16 @@
|
|||
@endif
|
||||
|
||||
|
||||
@if (!is_null($license->license_name))
|
||||
@if ($license->license_name!='')
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.to_name') }}</td>
|
||||
<td>{{ trans('admin/licenses/form.to_name') }}: </td>
|
||||
<td>{{ $license->license_name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (!is_null($license->license_email))
|
||||
@if ($license->license_email!='')
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.to_email') }}</td>
|
||||
<td>{{ trans('admin/licenses/form.to_email') }}:</td>
|
||||
<td>{{ $license->license_email }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
{{-- 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.min.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))
|
||||
<script src="{{ asset('js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
|
||||
<script src="{{ asset('js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script src="{{ asset('js/FileSaver.min.js') }}"></script>
|
||||
<script src="{{ asset('js/xlsx.core.min.js') }}"></script>
|
||||
<script src="{{ asset('js/jspdf.min.js') }}"></script>
|
||||
<script src="{{ asset('js/jspdf.plugin.autotable.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/export/tableExport.min.js') }}"></script>
|
||||
|
||||
|
||||
@if (!isset($simple_view))
|
||||
<script src="{{ asset('js/extensions/toolbar/bootstrap-table-toolbar.js') }}"></script>
|
||||
<script src="{{ asset('js/extensions/sticky-header/bootstrap-table-sticky-header.js') }}"></script>
|
||||
@endif
|
||||
|
@ -17,6 +18,9 @@
|
|||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
var $table = $('.snipe-table');
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
buildTable($table, 20, 50);
|
||||
});
|
||||
|
@ -34,6 +38,12 @@
|
|||
|
||||
$('.snipe-table').bootstrapTable('destroy').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
|
||||
ajaxOptions: {
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
},
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
search: {{ (isset($search)) ? 'true' : 'false' }},
|
||||
|
@ -69,10 +79,32 @@
|
|||
@endif
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
showExport: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'excel', 'doc', 'txt','json', 'xml', 'pdf'],
|
||||
exportOptions: {
|
||||
|
||||
fileName: '{{ ((isset($exportFile)) ? $exportFile : 'table') }}-' + (new Date()).toISOString().slice(0,10),
|
||||
ignoreColumn: ['actions','image','change','checkbox','checkincheckout','icon'],
|
||||
worksheetName: "Snipe-IT Export",
|
||||
escape: false,
|
||||
jspdf: {
|
||||
orientation: 'l',
|
||||
autotable: {
|
||||
styles: {
|
||||
rowHeight: 20,
|
||||
fontSize: 10,
|
||||
overflow: 'linebreak',
|
||||
},
|
||||
headerStyles: {fillColor: 255, textColor: 0},
|
||||
//alternateRowStyles: {fillColor: [60, 69, 79], textColor: 255}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@if (!isset($simple_view))
|
||||
|
||||
showRefresh: true,
|
||||
showExport: true,
|
||||
stickyHeader: true,
|
||||
stickyHeaderOffsetY: stickyHeaderOffsetY + 'px',
|
||||
|
||||
|
@ -87,28 +119,8 @@
|
|||
showMultiSort: true,
|
||||
@endif
|
||||
|
||||
@if (isset($exportFile))
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'excel', 'doc', 'txt','json', 'xml', 'pdf'],
|
||||
exportOptions: {
|
||||
|
||||
fileName: '{{ $exportFile . "-" }}' + (new Date()).toISOString().slice(0,10),
|
||||
ignoreColumn: ['actions','change','checkbox','checkincheckout','icon'],
|
||||
worksheetName: "Snipe-IT Export",
|
||||
jspdf: {
|
||||
orientation: 'l',
|
||||
autotable: {
|
||||
styles: {
|
||||
rowHeight: 20,
|
||||
fontSize: 10,
|
||||
overflow: 'linebreak',
|
||||
},
|
||||
headerStyles: {fillColor: 255, textColor: 0},
|
||||
//alternateRowStyles: {fillColor: [60, 69, 79], textColor: 255}
|
||||
}
|
||||
}
|
||||
},
|
||||
@endif
|
||||
|
||||
@endif
|
||||
pageList: ['20', '30','50','100','150','200']
|
||||
|
||||
|
|
Loading…
Reference in a new issue