Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make paging configurable #99

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Repair Radiobutton ([PR#98](https://github.com/mapbender/mapbender-digitizer/pull/98))
* Add default whitepace: pre-line in text fields to keep formatting ([PR#98](https://github.com/mapbender/mapbender-digitizer/pull/98))
* Allow to set text area height by providing row attribute ([PR#98](https://github.com/mapbender/mapbender-digitizer/pull/98))

* Add option `paging` on root level to disable paging ([PR#99](https://github.com/mapbender/mapbender-digitizer/pull/99))

## 1.5.7
* Rewrite context menu for Openlayers 7 compatibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,16 @@
if (buttonColumnOptions) {
columnsOption.push(buttonColumnOptions);
}

var settings = {
columns: columnsOption,
lengthChange: false,
pageLength: (schema.table || {}).pageLength || 16,
searching: (schema.table || {}).searching || (typeof ((schema.table || {}).searching) === 'undefined'),
pageLength: schema.pageLength || 16,
searching: schema.inlineSearch ?? true,
info: true,
processing: false,
ordering: true,
paging: true,
paging: schema.paging ?? true,
selectable: false,
oLanguage: this.getOLanguageOption(schema),
autoWidth: false
Expand Down
9 changes: 0 additions & 9 deletions src/Mapbender/DigitizerBundle/Component/SchemaFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,7 @@ public function processSchemaBaseConfig(array $schemaConfig, $schemaName)
if (!empty($schemaConfig['tableFields'])) {
$schemaConfig['table'] += array('columns' => $schemaConfig['tableFields']);
}
if (isset($schemaConfig['inlineSearch'])) {
$schemaConfig['table']['searching'] = $schemaConfig['inlineSearch'];
}
if (!empty($schemaConfig['pageLength'])) {
$schemaConfig['table']['pageLength'] = $schemaConfig['pageLength'];
}

unset($schemaConfig['tableFields']);
unset($schemaConfig['inlineSearch']);
unset($schemaConfig['pageLength']);

// resolve aliasing DM "allowEdit" vs historical Digitizer "allowEditData"
if (\array_key_exists('allowEditData', $schemaConfig)) {
Expand Down