function.blade.php 836 B

1234567891011121314
  1. window.dtx = window.dtx || {};
  2. window.dtx["%1$s"] = function(opts) {
  3. window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
  4. @if(isset($editors))
  5. @foreach($editors as $editor)
  6. var {{$editor->instance}} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{$editor->instance}}"] = new $.fn.dataTable.Editor({!! $editor->toJson() !!});
  7. {!! $editor->scripts !!}
  8. @foreach ((array) $editor->events as $event)
  9. {{$editor->instance}}.on('{!! $event['event'] !!}', {!! $event['script'] !!});
  10. @endforeach
  11. @endforeach
  12. @endif
  13. return window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"] = $("#%1$s").DataTable($.extend(%2$s, opts));
  14. }