fork download
  1. @extends('admin.layouts.layout')
  2.  
  3. @section('styles')
  4. <link rel="stylesheet" href="{{ asset('assets/admin/plugins/jsgrid/jsgrid.css') }}">
  5. @endsection
  6.  
  7. @section('content')
  8. <div class="table-responsive">
  9. <div id="grid-table">
  10.  
  11. </div>
  12. </div>
  13. @endsection
  14.  
  15. @section('scripts')
  16. <script src="{{ asset('assets/admin/plugins/jsgrid/jsgrid.js') }}"></script>
  17. <script>
  18. $(function () {
  19. $("#grid-table").jsGrid({
  20. width: "100%",
  21. height: "100%",
  22.  
  23. filtering: true,
  24. inserting: true,
  25. editing: true,
  26. sorting: true,
  27. paging: true,
  28. autoload: true,
  29. pageSize: 10,
  30. pageButtonCount: 5,
  31. deleteConfirm: "Вы действительно хотите удалить данные?",
  32. fields: [
  33. {name: "id", type: "hidden", css: 'd-none'},
  34. {name: "name", type: "text", width: 150, validate: 'required'},
  35. {name: "email", type: "text", width: 150, validate: 'required'},
  36. {name: "roles", type: "text", width: 150},
  37. {name: "permissions", type: "text", width: 150},
  38. {type: "control"},
  39. ],
  40. controller: {
  41. loadData: function (filter) {
  42. return $.ajax({
  43. type: "GET",
  44. url: "{{ route('admin.filter') }}",
  45. data: filter,
  46. dataType: "JSON",
  47. success: function(data){
  48. console.log(data.filter);
  49. },
  50. });
  51. },
  52. insertItem: function (item){
  53. return $.ajax({
  54. type: "POST",
  55. url: "{{ route('admin.filter') }}",
  56. data:item,
  57. });
  58. }
  59. }
  60. });
  61. });
  62. </script>
  63. @endsection
  64.  
Runtime error #stdin #stdout #stderr 0.25s 43732KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
js: "prog.js", line 4: missing ; before statement
js:     <link rel="stylesheet" href="{{ asset('assets/admin/plugins/jsgrid/jsgrid.css') }}">
js: .............^
js: "prog.js", line 8: missing ; before statement
js:     <div class="table-responsive">
js: ..............^
js: "prog.js", line 9: missing ; before statement
js:         <div id="grid-table">
js: ...............^
js: "prog.js", line 11: unterminated regular expression literal
js:         </div>
js: .............^
js: "prog.js", line 12: unterminated regular expression literal
js:     </div>
js: .........^
js: "prog.js", line 16: missing ; before statement
js:     <script src="{{ asset('assets/admin/plugins/jsgrid/jsgrid.js') }}"></script>
js: ...............^
js: "prog.js", line 61: illegally formed XML syntax
js:     </script>
js: .....^
js: "prog.js", line 61: syntax error
js:     </script>
js: .....^
js: "prog.js", line 1: Compilation produced 8 syntax errors.