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

Completes the records panel migration to odoo 17 #5

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ export class GeoengineRenderer extends Component {
*/
onDisplayPopupRecord(record) {
const popup = this.getPopup();
const feature = this.vectorSource.getFeatureById(record.id);
const feature = this.vectorSource.getFeatureById(record.resId);
if (feature) {
this.mountGeoengineRecord({
popup,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<div class="map_container">
<div id="olmap" />
</div>
<!-- <RecordsPanel
<RecordsPanel
list="props.data"
onDisplayPopupRecord.bind="onDisplayPopupRecord"
zoomOnFeature.bind="zoomOnFeature"
zoomOutOnFeature.bind="getOriginalZoom"
/> -->
/>
</div>
<div id="popup" class="ol-popup">
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class RecordsPanel extends Component {
*/
onDisplayPopupRecord(record) {
const rec = this.props.list.records.find((val) => val.id === record.id);
this.state.isClicked = record.id;
this.state.isClicked = record.resId;
this.props.onDisplayPopupRecord(rec);
}

Expand Down Expand Up @@ -76,4 +76,10 @@ export class RecordsPanel extends Component {
}

RecordsPanel.template = "base_geoengine.RecordsPanel";
RecordsPanel.props = {
list: {type: Object},
onDisplayPopupRecord: {type: Function},
zoomOnFeature: {type: Function},
zoomOutOnFeature: {type: Function},
};
RecordsPanel.components = {SearchBarRecords};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.scroller {
overflow-y: scroll;
overflow-x: clip;
overflow-y: auto;
scrollbar-width: auto;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<templates>
<t t-name="base_geoengine.RecordsPanel">
<div
class="menu border-end scroller"
t-attf-class="{{ state.isFolded ? 'o_layer_panel_fold ' : 'o_layer_panel bg-view' }}"
class="menu border-end"
t-attf-class="{{ state.isFolded ? 'o_layer_panel_fold' : 'o_layer_panel bg-view scroller' }}"
>
<div
class="w-100 d-flex"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ export class SearchBarRecords extends Component {
}

SearchBarRecords.template = "base_geoengine.SearchBarRecords";
SearchBarRecords.props = {
onInputKeyup: {type: Function},
};
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<templates>
<t t-name="base_geoengine.SearchBarRecords">
<div class="o_cp_searchview d-flex flex-grow-1" role="search">
<div class="o_cp_searchview d-flex input-group" role="search">
<div
class="o_searchview pb-1 align-self-center border-bottom flex-grow-1"
class="o_searchview form-control d-print-contents d-flex align-items-center py-1"
role="search"
>
<i
class="o_searchview_icon oi oi-search"
class="o_searchview_icon d-print-none oi oi-search me-2"
role="img"
aria-label="Search..."
title="Search..."
Expand All @@ -16,7 +16,7 @@
<input
t-ref="searchComponent"
type="text"
class="o_searchview_input"
class="o_searchview_input o_input d-print-none flex-grow-1 w-auto border-0"
placeholder="Search..."
t-on-keyup="onInputKeyup"
/>
Expand Down
Loading