Commit graph

2514 commits

Author SHA1 Message Date
Yohan Boniface
82853f7ade chore: add very minimal test for OSM popup template 2024-12-05 17:29:30 +01:00
Yohan Boniface
6a0bc9443b feat: display an image from Panoramax in OSM template when tag is defined 2024-12-05 11:57:48 +01:00
Yohan Boniface
4949fcb4a4 feat: try to guess RGB from color name when element is not in DOM
We often need to compute the text/icon constrast color, but often
the element is not yet in the DOM, so we can't get the background
easily. Let's have a fallback for that instead of trying to have
"load" events everywhere.
2024-12-05 11:53:01 +01:00
Yohan Boniface
430dede0dd fix: fix broken OSM template 2024-12-05 11:46:52 +01:00
Yohan Boniface
d9c04c7d0a fix: do not render normal popup title in OSM template 2024-12-05 11:46:26 +01:00
Yohan Boniface
8f7e5c7252 chore: add missing import in cadastrefr
Some checks failed
Test & Docs / docs (push) Has been cancelled
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
2024-12-03 18:07:26 +01:00
Yohan Boniface
c9d532508d
chore: change cadastrefr buttons (#2333)
We remove the cancel button and change the accept label.
2024-12-03 17:56:57 +01:00
Yohan Boniface
6221b709f4
fix: importer.map is undefined in geodatamine importer (#2332)
Broken since the map split I guess.
2024-12-03 17:54:20 +01:00
Yohan Boniface
26ff82e838 chore: change cadastrefr buttons
We remove the cancel button and change the accept label.
2024-12-03 16:24:30 +01:00
Yohan Boniface
8fa26a02a2 fix: importer.map is undefined
Broken this the map split I guess.
2024-12-03 16:21:37 +01:00
Yohan Boniface
9a900319af feat: swap import and settings buttons in edit toolbar
fix #2297
2024-12-03 15:20:22 +01:00
Yohan Boniface
8569b827ca
fix: compute length of all shapes for MultiLineString (not only first) (#2310) 2024-12-02 19:46:45 +01:00
Yohan Boniface
666a92ec44 fix: compute length of all shapes for MultiLineString not only first 2024-12-02 19:39:57 +01:00
Yohan Boniface
2f776dab59
feat: highlight importer URL field when it is fulfilled (#2323)
Very small step of #2302 


![image](https://github.com/user-attachments/assets/0ff2c056-91ad-4daa-9882-dd44a4c6ef9f)
2024-12-02 19:04:04 +01:00
Yohan Boniface
bba9487847 feat: highlight importer URL field when it is fulfilled
cf #2302
2024-12-02 18:56:24 +01:00
Yohan Boniface
177a4edc1d
fix: broken ctrl+i and ctrl+o (#2322) 2024-12-02 17:19:53 +01:00
Yohan Boniface
31c8bf95ba fix: broken ctrl+i and ctrl+o 2024-12-02 17:10:06 +01:00
Yohan Boniface
f6f42f5e6b chore: move form css to a separate file 2024-12-02 17:07:06 +01:00
Yohan Boniface
d9998efc0f
Fix reordering of layers (#2316)
Broken in the map split I guess.

(Only the first line is the fix, the other are just naming, cf the two
commits.)
2024-12-02 15:43:14 +01:00
Yohan Boniface
30d9e43cd4
Add logo for social_core.backends.keycloak.KeycloakOAuth2 (#2258)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
2024-12-02 13:14:06 +01:00
Yohan Boniface
35b541f200 chore: better naming in layer reordering 2024-12-02 12:55:57 +01:00
Yohan Boniface
8624209e1b fix: iter on the right elements after reordering layers 2024-12-02 12:55:57 +01:00
Yohan Boniface
471de78ab3 chore: fix failing test 2024-12-02 12:46:09 +01:00
Yohan Boniface
e33fc787ab
fix: do not fail when navigating with popup arrows in cluster mode (#2307)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
- make sure we have correct `this` in callback
- do not call anymatePan if icon is not added to map (because
clusterized)
2024-11-29 21:43:52 +01:00
Yohan Boniface
ca127c8c3c fix: do not fail when navigating with popup arrows in cluster mode
- make sure we have correct `this` in callback
- do not call anymatePan if icon is not added to map (because clusterized)
2024-11-29 18:32:14 +01:00
David Larlet
b6229a05b7
Better login page styles and incentive (#2293)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
Fixes https://github.com/umap-project/umap-dsfr/issues/21

Rel.
24f23874f7
2024-11-22 09:29:47 -05:00
Yohan Boniface
4350f55e67
fix: do not fail when editing map infos if no licence is set (#2287) 2024-11-22 10:17:37 +01:00
Yohan Boniface
735c74dcb3
fix: allow spaces in iframe query strings in HTML formatting (#2292)
fix #2269
2024-11-22 09:46:56 +01:00
David Larlet
1073fe6142
Better login page styles and incentive
Fixes https://github.com/umap-project/umap-dsfr/issues/21

Rel. 24f23874f7
2024-11-21 15:37:21 -05:00
Yohan Boniface
95710a4dab fix: allow spaces in iframe query strings in HTML formatting
fix #2269
2024-11-21 15:21:35 +01:00
Yohan Boniface
f7c1b8f123 fix: do not fail when editing map infos if no licence is set 2024-11-20 16:44:15 +01:00
Yohan Boniface
ccd6a21958
chore: explicitely set postgis as db engine (#2285)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
While working on a helm chart, we do not control the creation of the db
URL, which use "postgres://" instead of "postgis://", so Django does not
set the correct engine. So let's be explicit here.
2024-11-20 10:49:38 +01:00
Yohan Boniface
5cef79d395 i18n 2024-11-20 10:47:28 +01:00
Yohan Boniface
833941a9e6 chore: set an explicit db engine (postgis)
While working on a helm chart, we do not control the creation of
the db URL, which use "postgres://" instead of "postgis://", so
Django does not set the correct engine.
2024-11-19 18:44:35 +01:00
Yohan Boniface
346597533c chore: a bit of CSS cleaning in bar.css 2024-11-19 13:16:02 +01:00
Yohan Boniface
5ceda7b2a3 chore: move editToolBar and captionBar to modules
This also tries to rework a bit the "reflow" process, which how
to edit the UI when something changes in the data.

The idea is to build the whole HTML, then:
- the `propagate` method tries to change the UI with targetted CSS
selector, but anywhere
- while `render` hide/show some elements

This is not the destination, but just another step. We certainly
need to refactor the SCHEMA to make the next step (as we want to associate
some data change to UI change).
2024-11-18 19:43:28 +01:00
Yohan Boniface
2c64745c52
fix: honour rules and slideshow when importing a umap file (#2270)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Side note (for another PR I'd say): this usually occurs on a non saved
map, but in case the map already exist and is in sync mode, should we
sync each property (safer but one call per property) or the whole
properties object (lighter, but may override unwanted things in remote,
and currently there is no method to do so).
2024-11-18 19:41:40 +01:00
Yohan Boniface
4b170df1c2 fix: honour custom labelKey in default popup template
The default popup template expects a `name` key, so let's populate
it.
2024-11-16 11:20:23 +01:00
Yohan Boniface
123a6ea508 fix: honour rules and slideshow when importing a umap file
Side note (for another PR I'd say): this usually occurs on a non
saved map, but in case the map already exist and is in sync mode,
should we sync each property (safer but one call per property)
or the whole properties object (lighter, but may override unwanted
things in remote, and currently there is no method to do so).
2024-11-16 10:30:15 +01:00
Yohan Boniface
7de3ebd2d1
fix: fix event name in drop util (#2261)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
2024-11-15 18:45:43 +01:00
Yohan Boniface
8c6766157a chore: add test for CSV latlng parsing with commas 2024-11-15 18:24:57 +01:00
Yohan Boniface
92ef4b25b4 fix: use our fork of csv2geojson to be able to parse lat/lon with commas 2024-11-15 18:10:08 +01:00
Yohan Boniface
4acf0db17f fix: fix evenet name in drop util 2024-11-15 16:43:58 +01:00
7dadb83ff5 feat(sync): Let the clients set layers UUID
This make it possible to synchronize datalayers before their creation on
the server, allowing at the same time to solve issues related to them
not being saved (e.g. duplication of geometries)

We use the DataLayer._referenceVersion to track if a DataLayer has been
saved on the server.

After a save, the _referenceVersion is synched with other peers.

To pass the reference version from the server to the frontend, we have two
options:
- use a header
- populate the `options.version` field

In the case of a GET on a Datalayer, we could not use the `options` scenario
because:
- the value in the file is not up to date (it was the value the client has
 before the save)
- the python cannot change it on the fly, as the file is served by nginx

So we decided to keep using a header. But on the map view, we load all
datalayers metadatas in the map options, so here we cannot use the header
scenario, so in this specific case we had to populate `options._referenceVersion`.

At the same time, we also changed:
- Umap.options.umap_id => Umap.id
- DataLayer.umap_id => Datalayer.id
- fixed the version number returned by DataLayer.version_metadata
2024-11-15 15:22:36 +01:00
Yohan Boniface
378e0f3ad3 chore: review with Alexis 2024-11-13 14:27:39 +01:00
Thomas Legay
4bd7bd7d48 Add logo for social_core.backends.keycloak.KeycloakOAuth2 2024-11-12 23:58:30 +01:00
Yohan Boniface
51e41b7bce chore: remove unused imports from global.js 2024-11-12 15:28:05 +01:00
Yohan Boniface
b49f3d7633 chore: remove old umap.js file 2024-11-12 15:06:34 +01:00
Yohan Boniface
0dbac92853 chore: remove 'postsync' event 2024-11-12 14:50:08 +01:00
Yohan Boniface
6d56bbb5de chore: refactore LeafletMap.setup/update 2024-11-12 14:36:59 +01:00