fix injection bugs in table editor
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
ready(function() {
|
||||
app.ColumnEditor('#column-editor', {
|
||||
name: 'columns',
|
||||
xColumns: {!! old('columns', toJSON($columns)) !!},
|
||||
xColumns: @json(old_json('columns', $columns)),
|
||||
newTable: true,
|
||||
//sortable: false,
|
||||
})
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
'<nav class="text-center" aria-label="Table pages">' +
|
||||
@json((string)$rows->links(null, ['ulClass' => 'mb-0'])) +
|
||||
'</nav>',
|
||||
route: {!! toJSON($table->draftUpdateRoute) !!},
|
||||
columns: {!! toJSON($columns) !!},
|
||||
xRows: {!! toJSON($xrows, true) !!},
|
||||
route: @json($table->draftUpdateRoute),
|
||||
columns: @json($columns),
|
||||
xRows: @json($xrows, true),
|
||||
newRows: true, // indicate all are new
|
||||
pageUrl: @json(request()->fullUrl()),
|
||||
loadCsvUrl: @json($table->getDraftRoute('add-rows-csv')),
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
'<nav class="text-center" aria-label="Table pages">' +
|
||||
@json((string)$rows->links(null, ['ulClass' => 'mb-0'])) +
|
||||
'</nav>',
|
||||
route: {!! toJSON($table->draftUpdateRoute) !!},
|
||||
columns: {!! toJSON($columns) !!},
|
||||
xRows: {!! toJSON($transformed, true) !!},
|
||||
route: @json($table->draftUpdateRoute),
|
||||
columns: @json($columns),
|
||||
xRows: @json($transformed),
|
||||
xRowOrder: @json($transformed->keys()),
|
||||
})
|
||||
});
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
ready(function() {
|
||||
app.ColumnEditor('#column-editor', {
|
||||
name: 'columns',
|
||||
route: {!! toJSON($table->draftUpdateRoute) !!},
|
||||
xColumns: {!! toJSON($columns) !!},
|
||||
route: @json($table->draftUpdateRoute),
|
||||
xColumns: @json($columns),
|
||||
orderChanged: @json(!empty($changeset->columnOrder))
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user