Commit graph

31 commits

Author SHA1 Message Date
Paul Chavard
a4681d8832 refactor(autosave): improuve events handling 2022-07-12 11:47:33 +02:00
Martin
4c0aac8e0c fix(linked_dropdown/dropdown): for dropdown_list, drop blank option because rails add it when the field is required. kind of same behaviour for linked_dropdown_list [but requires to manage it on the front too] 2022-07-11 14:47:26 +02:00
Paul Chavard
1a9f2f0eef refactor(champ): improuve repetition champ 2022-05-04 17:18:52 +02:00
Paul Chavard
22aefbaa4a refactor(js): remove geo-area event handlers 2022-04-22 09:40:17 +02:00
Paul Chavard
7ebc439630 refactor(drop_down_list_champ): other option 2021-10-27 12:01:15 +02:00
Pierre de La Morinerie
ecc4f01c20 autosave: trigger an autosave after removing a row 2020-08-25 15:45:49 +02:00
Pierre de La Morinerie
96037069ff autosave: remove the repetition row after deletion
Before, when autosaving a draft, removing a repetition row would
send `_destroy` inputs to the controller – but not remove the row
from the DOM. This led to the `_destroy` inputs being sent again
on the next autosave request, which made the controller raise
(because the row fields were already deleted before).

To fix this, we let the controller response remove the deleted
row(s) from the DOM.

Doing it using a controller response avoids the need to keep track
of operations on the Javascript side: the controller can easily
know which row was just deleted, and emit the relevant changes for
the DOM. This keeps the autosave requests robust: even if a request
is skipped (e.g. because of a network interruption), the next request
will still contain the relevant informations to succeed, and not let the
form in an unstable state.

Fix #5470
2020-08-25 14:39:34 +02:00
Paul Chavard
95d61c85e1 Dispatch events from geo areas list view 2020-06-09 18:45:45 +02:00
Paul Chavard
901b6e23a8 Remove legacy carto 2020-06-04 16:03:23 +02:00
Pierre de La Morinerie
b5f1d97629 app: disable Turbolinks
Fix #5039
2020-05-13 11:04:16 +02:00
Paul Chavard
43a1ead1cb fix new prettier defaults 2020-05-12 18:18:37 +02:00
Paul Chavard
442a6a3cdd Remove deprecated map reader 2020-04-15 18:07:09 +02:00
Paul Chavard
a86129c3a1 Revert "Revert "Update javascript dependencies and add webpack-bundle-analyzer""
This reverts commit eddd59e554.
2020-02-03 14:54:25 +01:00
Keirua
eddd59e554
Revert "Update javascript dependencies and add webpack-bundle-analyzer" 2020-01-29 14:51:55 +01:00
Paul Chavard
7ebebf2e80 Refactor leaflet code for better loading 2020-01-28 16:37:44 +01:00
Paul Chavard
6215ccb3d7 Fix carte initialize 2019-08-21 10:48:49 +02:00
Paul Chavard
86b9ed2079 Run load scripts after ujs responces 2019-08-13 17:03:55 +01:00
Paul Chavard
2f633b5d23 Load leaflet from a separate chunk 2019-05-02 14:10:48 +02:00
Paul Chavard
cb72507c12 Simplify repetition js 2019-02-05 16:48:26 +01:00
Paul Chavard
a9a853b669 Fix and simplify linked-drop-down-list js 2019-02-05 16:48:26 +01:00
Paul Chavard
071448e1d9 Champ Repetition dossier editor 2019-02-04 16:19:07 +01:00
Paul Chavard
5a8a4b393f Add RPG carte source 2018-10-23 18:13:44 +02:00
Paul Chavard
4a097900d2 Implement carte champ editor 2018-10-23 09:35:25 +02:00
Paul Chavard
55a9b31b93 Cleanup SIRET champ 2018-09-12 15:53:02 +02:00
Paul Chavard
212dee1565 Drop unused js 2018-09-07 19:41:33 +01:00
Paul Chavard
2500cd516b Use delegation in SIRET champ code 2018-08-22 16:42:55 +02:00
Paul Chavard
a17fb60aea Include select2 from the file where it is used 2018-08-22 16:42:29 +02:00
Paul Chavard
13470e9781 Remove unused JavaScript 2018-08-14 17:03:00 +02:00
Paul Chavard
008d84f107 Explicitly import jQuery 2018-08-13 15:17:13 +02:00
Pierre de La Morinerie
55847f011c siret: fix validity being broken after clearing the field 2018-07-30 14:29:44 +02:00
Paul Chavard
bf7c023380 Add webpacker and use it for new_design 2018-07-25 15:14:06 +02:00