Repo rebuild

This commit is contained in:
Mark Gregory
2026-09-15 12:33:28 +01:00
commit be28c4feec
5629 changed files with 317074 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
document.addEventListener("DOMContentLoaded", function(){
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} =
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
$.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'}});
@foreach ($editors as $editor)
var {{ $editor->instance }} =
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{ $editor->instance }}"] = new
$.fn.dataTable.Editor({!! $editor->toJson() !!});
{!! $editor->scripts !!}
@foreach ((array) $editor->events as $event)
{{ $editor->instance }}.on('{!! $event['event'] !!}', {!! $event['script'] !!});
@endforeach
@endforeach
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"] = $("#%1$s").DataTable(%2$s);
});
@foreach ($scripts as $script)
@include($script)
@endforeach
+18
View File
@@ -0,0 +1,18 @@
window.dtx = window.dtx || {};
window.dtx["%1$s"] = function(opts) {
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} =
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
@if (isset($editors))
@foreach ($editors as $editor)
var {{ $editor->instance }} =
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{ $editor->instance }}"] = new
$.fn.dataTable.Editor({!! $editor->toJson() !!});
{!! $editor->scripts !!}
@foreach ((array) $editor->events as $event)
{{ $editor->instance }}.on('{!! $event['event'] !!}', {!! $event['script'] !!});
@endforeach
@endforeach
@endif
return window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"] =
$("#%1$s").DataTable($.extend(%2$s, opts));
}
@@ -0,0 +1,15 @@
$(function(){
@foreach ($editors as $editor)
{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{ $editor->instance }}"].on('preSubmit',
function(e, data, action) {
if (action !== 'remove') return;
for (let row_id of Object.keys(data.data))
{
data.data[row_id] = {
DT_RowId: data.data[row_id].DT_RowId
};
}
});
@endforeach
});
+8
View File
@@ -0,0 +1,8 @@
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} =
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}.options = %2$s
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}.editors = [];
@foreach ($editors as $editor)
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}.editors["{{ $editor->instance }}"] =
{!! $editor->toJson() !!}
@endforeach
+44
View File
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Print Table</title>
<meta charset="UTF-8">
<meta name=description content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<style>
body {
margin: 20px
}
</style>
</head>
<body>
<div data-dusk="page-ready" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);"
aria-hidden="true"></div>
<table class="table table-bordered table-condensed table-striped">
@foreach ($data as $row)
@if ($loop->first)
<tr>
@foreach ($row as $key => $value)
<th>{!! $key !!}</th>
@endforeach
</tr>
@endif
<tr>
@foreach ($row as $key => $value)
@if (is_string($value) || is_numeric($value))
<td>{!! $value !!}</td>
@else
<td></td>
@endif
@endforeach
</tr>
@endforeach
</table>
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
$(function(){
$('#%1$s').on('xhr.dt', function (e, settings, json, xhr) {
if (json == null || !('disableOrdering' in json)) return;
let table = {{ config('datatables-html.namespace', 'LaravelDataTables') }}[$(this).attr('id')];
if (json.disableOrdering) {
table.settings()[0].aoColumns.forEach(function(column) {
column.bSortable = false;
$(column.nTh).removeClass('sorting_asc sorting_desc sorting').addClass('sorting_disabled');
});
} else {
let changed = false;
table.settings()[0].aoColumns.forEach(function(column) {
if (column.bSortable) return;
column.bSortable = true;
changed = true;
});
if (changed) {
table.draw();
}
}
});
});
+4
View File
@@ -0,0 +1,4 @@
document.addEventListener("DOMContentLoaded",function(){window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}=window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}||{};window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"]=$("#%1$s").DataTable(%2$s);});
@foreach ($scripts as $script)
@include($script)
@endforeach