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

✨ Search results pagination #681

Merged
merged 51 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b324968
:sparkles: Introduce pagination to search results
volterra79 Oct 30, 2024
75b7677
:sparkles: Load data pagination click on button
volterra79 Oct 31, 2024
743a1bb
:sparkles: change load pagination button
volterra79 Oct 31, 2024
1fe6a48
:sparkles: Pagination buttons on search query result
volterra79 Oct 31, 2024
3eb80fd
:sparkles: Pagination buttons on search query result according to tab…
volterra79 Oct 31, 2024
fe02cac
:sparkles: Move pagination buttons on bottom of layer results
volterra79 Oct 31, 2024
7eb3fd2
Clean code - spaces
volterra79 Oct 31, 2024
7148e18
:bug: Fix open close feature info in pagination.
volterra79 Oct 31, 2024
01717b2
:bug: Disable pagination on when new data is loading
volterra79 Oct 31, 2024
f0a9881
:lipstick: Adjust layout pagination
volterra79 Nov 4, 2024
117c590
:sparkles: When change pagination, if layer has geometry, zoom to loa…
volterra79 Nov 4, 2024
1c2379e
:bug: fix concat. It mutiply array items
volterra79 Nov 5, 2024
a7f0f5e
Clen code - space
volterra79 Nov 5, 2024
fc089f8
:sparkles: add PAGELENGTHS fro query result and table pagination
volterra79 Nov 6, 2024
675d502
:sparkles: Handle pagination in a better way
volterra79 Nov 6, 2024
b422f4d
set the first pagination page length array item to 10
volterra79 Nov 6, 2024
db373bb
Show pagination on query result search only if there are more than on…
volterra79 Nov 6, 2024
2eb05ad
Show number of features and features total
volterra79 Nov 6, 2024
ef63505
update count of loading data
volterra79 Nov 6, 2024
1676b1e
Clean code - simplify and comment
volterra79 Nov 7, 2024
12ce619
:bug: Need to be a layer and not a groutp
volterra79 Nov 7, 2024
e57f08e
revert to externalLayer object instead of ol layer
volterra79 Nov 7, 2024
9fdbc18
add type to getExternalLayers parameter
volterra79 Nov 7, 2024
d6afba3
:sparkles: Take in account paginate search option to paginate request
volterra79 Nov 8, 2024
832daed
:sparkles: Disable enable action button feature and layer on query re…
volterra79 Nov 8, 2024
ed78685
remove unuseful disable action
volterra79 Nov 8, 2024
9378a89
Remove console.log
volterra79 Nov 12, 2024
9b0d16a
:sparkles: Handle pagination, selection and filter
volterra79 Nov 13, 2024
8059433
Add ;
volterra79 Nov 13, 2024
fd178e1
:sparkles: On filtertocken changes, need to reload input search panel…
volterra79 Nov 14, 2024
e3d99fd
Reload only filtertoken layer change
volterra79 Nov 14, 2024
9a2cf74
Fix highlight features ony on query result layer (mouse over) and aut…
volterra79 Nov 14, 2024
dbfc913
Show bar loader
volterra79 Nov 15, 2024
9e6ebde
:bug: when set new filtertoken, need to hide/show selection features
volterra79 Nov 15, 2024
f111c26
:bug: Missing parentheses
volterra79 Nov 15, 2024
9b490d2
:bug: Listen filtertoken changes on single layer instead of Applicati…
volterra79 Nov 15, 2024
a3319ad
In case of already reload select 2 input for multilayer search, need …
volterra79 Nov 15, 2024
3229619
Listen filter layer pagination change to reflect action on query resu…
volterra79 Nov 15, 2024
b314d09
Fix show action
volterra79 Nov 15, 2024
ff03caa
:bug: Remove double 'TMS' === this._BASE_LAYER related to ARCGISMAPSE…
volterra79 Nov 18, 2024
66d8fe2
:recycle: run filter methods only when used
volterra79 Nov 19, 2024
ea477c5
:recycle: Use empty string
volterra79 Nov 19, 2024
e6278f2
:bug: Fix missing fid
volterra79 Nov 19, 2024
1641752
:fire: Use ES6 g3w-i18n module
volterra79 Nov 20, 2024
9cb7b2a
Merge branch 'dev' into issue_680
volterra79 Nov 22, 2024
4a49423
:bug: Clear highLight geometry when mouse in on feature result body
volterra79 Nov 22, 2024
edb1cfc
Clean code - spaces
volterra79 Nov 22, 2024
8532cb4
:bug: Fix missing go back title whe show relation
volterra79 Nov 22, 2024
228fc69
:bug: Align methods with table layer
volterra79 Nov 22, 2024
9ad13cd
:bug:Referred to https://github.com/g3w-suite/g3w-client/commit/db3be…
volterra79 Nov 22, 2024
f002180
Clean code
volterra79 Nov 25, 2024
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
3 changes: 1 addition & 2 deletions src/app/gui/inputs/service.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { toRawType } from 'utils/toRawType';

const { t } = require('g3w-i18n');
import { t } from 'g3w-i18n';

const Validators = {

Expand Down
21 changes: 10 additions & 11 deletions src/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ import ModalLogin from 'components/ModalLogin.vue';
import ModalAddlayer from 'components/ModalAddLayer.vue';
import ModalChangemap from 'components/ModalChangeMap.vue';
import ModalMetadata from 'components/ModalMetadata.vue';

const { t } = require('g3w-i18n');
import { t } from 'g3w-i18n';

export default {

Expand All @@ -549,14 +548,14 @@ export default {
const custom_links = (window.initConfig.header_custom_links || []).concat(ApplicationState.navbaritems).filter(Boolean)

custom_links.unshift({
id: 'credits',
type: 'metadata',
id: 'credits',
type: 'metadata',
target: '#metadata_credits',
icon: 'far fa-question-circle',
title: 'Credits'
icon: 'far fa-question-circle',
title: 'Credits',
});

custom_links.forEach(item => !item.id && (item.id = getUniqueDomId()));
custom_links.forEach(l => !l.id && (l.id = getUniqueDomId()));

return {
language: null,
Expand Down Expand Up @@ -642,9 +641,9 @@ export default {
},

breadcrumb() {
return this.state.content.contentsdata
.filter(c => c.options.crumb)
.map(c => c.options.crumb);
return this.state.content.contentsdata
.filter(c => c.options.crumb)
.map(c => c.options.crumb);
},

showresize() {
Expand All @@ -664,7 +663,7 @@ export default {
showtitle() {
if (this.state.content.contentsdata.length > 0) {
const options = this.state.content.contentsdata[this.state.content.contentsdata.length - 1].options;
if (true === options.showtitle || false === options.showtitle) { return options.showtitle }
if ( [true, false].includes(options.showtitle) ) { return options.showtitle }
}
return true;
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Catalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export default {
_layers.push(layer);
}
if (null !== layer.nodes && undefined !== layer.nodes) {
_layers = _layers.concat(this._traverseVisibleLayers(layer.nodes, _layers));
this._traverseVisibleLayers(layer.nodes, _layers);
}
}
return _layers;
Expand Down
3 changes: 1 addition & 2 deletions src/components/CatalogChangeMapThemes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ import InputText from "./InputText.vue";
import GUI from "services/gui";
import ApplicationState from 'store/application';
import { XHR } from 'utils/XHR';

const { t } = require('g3w-i18n');
import { t } from 'g3w-i18n';

/**
* Attributes to send to server of layerstrees object
Expand Down
5 changes: 2 additions & 3 deletions src/components/CatalogContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,9 @@
import GUI from 'services/gui';
import { downloadFile } from 'utils/downloadFile';
import { getCatalogLayerById } from 'utils/getCatalogLayerById';
import { t } from 'g3w-i18n';

const { t } = require('g3w-i18n');
const shpwrite = require('shp-write');

import shpwrite from 'shp-write';
/**
* @see https://www.w3schools.com/howto/howto_js_draggable.asp
*/
Expand Down
4 changes: 2 additions & 2 deletions src/components/CatalogTristateTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@

<!-- TOGGLE FILTER -->
<span
v-if = "!layerstree.external && (layerstree.selection.active || layerstree.filter.active)"
v-if = "!layerstree.external && (layerstree.selection.active || layerstree.filter.active) && !layerstree.filter.pagination"
class = "action-button skin-tooltip-left selection-filter-icon"
data-placement = "left"
data-toggle = "tooltip"
Expand Down Expand Up @@ -336,7 +336,7 @@ export default {

isHighLight() {
const layer = getCatalogLayerById(this.layerstree.id) || this.layerstree;
return layer && ApplicationState.highlightlayers && layer.isVisible() && layer.getTocHighlightable();
return !this.isGroup && ApplicationState.highlightlayers && layer && layer.isVisible() && layer.getTocHighlightable();
},

isInGrey() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GlobalTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
handleRelation: {
type: Function,
default: ({relation, layerId, feature}={}) => GUI.getService('queryresults').showRelation({relation, layerId, feature})
default: ({ relation, layerId, feature } = {}) => GUI.getService('queryresults').showRelation({relation, layerId, feature})
}
},
data() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GlobalTabsNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<div
v-if = "showRelationByField"
v-disabled = "isRelationDisabled(getNode(row, column)) || loadingRelation(getNode(row, column)).loading"
@click.stop = "handleRelation({relation: getNode(row, column), feature:feature, layerId: layerid})"
@click.stop = "handleRelation({ relation: getNode(row, column), feature:feature, layerId: layerid })"
:style = "{cursor: showRelationByField && 'pointer'}"
>
<bar-loader :loading="loadingRelation(getNode(row, column)).loading"/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/InputMedia.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
<script>
import GUI from 'services/gui';
import { getUniqueDomId } from 'utils/getUniqueDomId';
import { t } from 'g3w-i18n';

const InputMixins = require('gui/inputs/input');
const { t } = require('g3w-i18n');
const { media_field: MediaField } = require('gui/fields/fields');

export default {
Expand Down
3 changes: 1 addition & 2 deletions src/components/MapControlGeocoding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ import { isPointGeometryType } from 'utils/isPointGeometryType';
import { convertSingleMultiGeometry } from 'utils/convertSingleMultiGeometry';
import { getCatalogLayerById } from 'utils/getCatalogLayerById';
import { getCatalogLayers } from 'utils/getCatalogLayers';

const { t } = require('g3w-i18n');
import { t } from 'g3w-i18n';

/**
* Provider definitions.
Expand Down
3 changes: 1 addition & 2 deletions src/components/Print.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ import { getCatalogLayerById } from 'utils/getCatalogLayerById';
import resizeMixin from 'mixins/resize';

import * as vueComp from 'components/PrintPage.vue';

const { t } = require('g3w-i18n');
import { t } from 'g3w-i18n';

export default {

Expand Down
5 changes: 2 additions & 3 deletions src/components/ProjectsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
</template>

<script>
import GUI from 'services/gui';

const { t } = require('g3w-i18n');
import GUI from 'services/gui';
import { t } from 'g3w-i18n';

export default {

Expand Down
3 changes: 1 addition & 2 deletions src/components/QueryBuilder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ import { getUniqueDomId } from 'utils/getUniqueDomId';
import { createFilterFromString } from 'utils/createFilterFromString';
import { XHR } from 'utils/XHR';
import { getCatalogLayerById } from 'utils/getCatalogLayerById';

const { t } = require('g3w-i18n');
import { t } from 'g3w-i18n';

export default {

Expand Down
Loading