Paul Chavard
22aa2d4ee0
Make all location champs autocomplete
2020-01-07 11:52:51 +01:00
Pierre de La Morinerie
a5f2c84cbf
sign_up: fix suggestions error when navigating away
...
When navigating away from the page, the field receives the 'focusout'
event – but stops to be present in the DOM.
Thus we need to check that the DOM element is actually present.
2019-12-19 17:45:14 +01:00
clemkeirua
c2c3f05262
p'tit fix d'utilisabilité
2019-12-16 09:49:23 +01:00
Paul Chavard
3a142fea40
Isolate react components from react loaders
2019-12-04 16:26:59 +01:00
Paul Chavard
03326169c5
Always load IntersectionObserver to fix old browsers
...
fix #4614
2019-12-04 16:26:59 +01:00
Pierre de La Morinerie
f351ade434
javascript: expose Turbolinks globally
...
When calling `redirect_to` in a Rails controller that emits Javascript,
Rails will emit `Turbolinks.replace(…)` commands. And for this,
Turbolinks needs to be globally available.
2019-12-03 16:28:47 +01:00
clemkeirua
841b00bafe
focus sur le mot de passe lorsqu'on traite les suggestions
2019-12-03 14:06:12 +01:00
clemkeirua
8cab6ae19f
retours divers
2019-12-03 14:06:12 +01:00
Pierre de La Morinerie
fb3f82074d
Hide the suggestions when the user corrects the address
2019-12-03 14:06:11 +01:00
Pierre de La Morinerie
1d1260060e
Fix the tests by using event delegation
2019-12-03 14:06:11 +01:00
clemkeirua
80b68afab5
implement email suggestion
2019-12-03 14:06:11 +01:00
clemkeirua
0bfdb2d5da
fermeture et acceptation de la suggestion d'email
2019-12-03 14:06:11 +01:00
Paul Chavard
2cf415dc41
Simplify React components loader
2019-11-28 14:45:40 +01:00
Pierre de La Morinerie
b9fd844633
dossiers: fix autosave not ignoring file inputs
...
The dossier autosave is supposed to ignore file inputs (which are
handled differently by ActiveStorage).
Fix a typo in the CSS selector.
2019-11-27 13:57:39 +00:00
Pierre de La Morinerie
52051914aa
editor: disable the "Add champ" button until the champ is saved
...
Otherwise some champs are created before the previous one has been
saved, and React complains that several champs have the same
`champ-undefined` key.
(Plus it made the tests flaky and unreliable.)
2019-11-27 11:58:46 +01:00
Pierre de La Morinerie
7ed649dfca
editor: don't create a champ by default
...
Before the editor attempted to create a default champ as soon as the
list became empty.
This created many race conditions, which made the tests flaky.
Remove this behavior, and add an empty label instead.
2019-11-27 11:58:45 +01:00
Pierre de La Morinerie
30b822b135
dossiers: don't trigger an autosave when an attachment is modified
...
The draft autosave should not be triggered when attaching a file
(as file inputs are handled separately).
2019-11-27 10:37:33 +00:00
Pierre de La Morinerie
c6eab70679
dossiers: autosave shouldn't send files being uploaded
...
When a file is being uploaded asynchronosely, hidden input fields
are created by DirectUpload to contain the result of the upload.
However, before the upload finishes, the value of these inputs is not
meaningful. Moreover, it makes the ActiveRecord signature invalid – thus
preventing drafts from being saved.
Exclude these fields from the auto-save.
2019-11-27 10:37:33 +00:00
Pierre de La Morinerie
64d96646a3
javascript: autosave with explicit cookies settings
...
Older browsers implemented a different default value for `window.fetch`
credentials: it was omitted unless explicitely set.
So we force the value for these older browsers:
- Firefox 39-60
- Chrome 42-67
- Safari 10.1-11.1.2
See https://github.com/github/fetch#sending-cookies
2019-11-27 10:37:33 +00:00
Pierre de La Morinerie
2309017727
javascript: add a window.fetch polyfill
...
This allows the autosave to work on browsers that don't support fetch:
- IE 11
- Edge < 14
- Safari < 11
2019-11-27 10:37:33 +00:00
Pierre de La Morinerie
6de5c0c9d1
autosave: make requests time out
...
This avoids recent requests being stuck because an older request never
finished.
2019-11-21 14:00:06 +01:00
Pierre de La Morinerie
68f5aae99d
autosave: add feature test
2019-11-21 14:00:06 +01:00
Pierre de La Morinerie
bff7892ba8
dossiers: autosave drafts
2019-11-21 14:00:06 +01:00
Pierre de La Morinerie
74a9db6580
javascript: make utils resilient to missing elements
2019-11-20 17:36:09 +01:00
simon lehericey
9ca026a630
Use a select2 box for looking to instructeurs
2019-11-18 17:08:51 +01:00
Pierre de La Morinerie
8a7f4ec769
editor: reduce scroll duration when inserting a new champ
...
The previous default was 1s, which felt slooooow.
2019-11-07 15:49:15 +01:00
Pierre de La Morinerie
fc8a0d46ff
editor: insert new champs after the last fully visible champ
...
Before, when the "Add new champ" button was clicked, the new champ
was inserted after the **first** fully visible champ.
That was most of the time unexpected. The correct behavior would be to
insert the new champ after the **last** fully visible champ.
That's what this commit does. Now the "Add new champ" behavior feels
much less confusing.
2019-11-07 15:19:11 +01:00
Pierre de La Morinerie
5be83bd01e
procedure: make the layout more similar to the mockup
2019-10-31 10:27:19 +01:00
Pierre de La Morinerie
02384b078c
procedure: remove UI to edit the european flag
...
This is an option we want to deprecate, and remove entirely in the
future.
Admins can still add the EU flag manually to their uploaded logo.
2019-10-31 10:27:19 +01:00
Nicolas Bouilleaud
72b7ff221c
move procedure to new design
2019-10-31 10:27:19 +01:00
Pierre de La Morinerie
bb024d1850
javascript: display a localized message on upload errors
2019-10-24 16:12:56 +02:00
Pierre de La Morinerie
a3057afc22
javascript: report upload errors to Sentry
2019-10-24 16:12:56 +02:00
Paul Chavard
a192924ee5
Fix infinit rerendering of TypeDeChamp component
...
fix #4428
2019-10-24 13:31:54 +02:00
Nicolas Bouilleaud
c26a701a17
Refactor and redesign publish modal
...
* remove the autocomplete menu
* use ujs to pre-validate the procedure
* tweak the UI
2019-09-17 16:30:48 +02:00
clemkeirua
c2916e9d05
remove possibility to create carte with parcelle agricole
2019-08-29 16:01:35 +02: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
clemkeirua
caa90613fd
ajout d'un confirm à la suppression d'un champ
2019-07-25 10:46:40 +02:00
Chaïb Martinez
d968e7e6bd
Add some admin usage info for contextual help with crisp
...
Fix #4052
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-15 12:10:56 +02:00
Chaïb Martinez
535d032b73
Send URL page view to Crisp to trigger contextual help
...
Fix #4052
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-15 12:10:56 +02:00
simon lehericey
f6c402deec
better default value for linked_drop_down_list
2019-07-10 10:21:34 +02:00
Paul Chavard
860588b216
Upgrade javascript dependencies and add actiontext
2019-07-03 11:42:25 +02:00
Pierre de La Morinerie
78f75744e3
javascript: fix payload of ActiveStorage events missing on IE 11
...
Under some circumstances (like dispatching events just before a page
navigation), IE 11 events will be dispatched twice by the browser: once
with the payload, and a second time without.
To prevent these errors, ignore the events if the payload is missing.
2019-06-06 15:00:57 +02:00
Chaïb Martinez
eccd456325
Add crisp
...
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-06-05 17:41:47 +02:00
Paul Chavard
6d312e1716
spec: refactor wait_for_ajax
to work with out new ajax utils
...
`wait_for_ajax` is not used anymore, but it may be in the future.
2019-06-04 16:30:36 +02:00
Pierre de La Morinerie
f2f16e2580
carte: disable tiles layer during tests
...
During integration tests, we don't want to load the tiles from OSM:
- It hits OSM servers during every test run;
- It it slow (Capybara waits for the tiles to be loaded to proceed);
- It makes test time out when tiles cannot be loaded for some reason.
Fix #3913
2019-06-03 17:24:15 +02:00
Paul Chavard
6797c01b69
Properly handle justificatif_motivation case
2019-05-22 14:11:08 +02:00
Paul Chavard
6a3413018a
Refresh attachments with virus scan result
2019-05-21 14:21:55 +02:00
Paul Chavard
0265c10474
Safari throw if deleting inexistent property
2019-05-14 17:12:27 +02:00
Paul Chavard
c93b1bb276
Add intersection-observer polyfill
2019-05-14 10:55:16 +02:00
Paul Chavard
c4dc2adcea
Add new type de champ after type de champ on screen
2019-05-14 10:55:16 +02:00
clemkeirua
ec2e17032e
suppression de la double confirmation
2019-05-07 08:54:29 +02:00
clemkeirua
4aab72be68
implementation du systeme de PJ de motivation
2019-05-07 08:54:29 +02:00
Paul Chavard
2f633b5d23
Load leaflet from a separate chunk
2019-05-02 14:10:48 +02:00
Paul Chavard
1d67005545
Add a default value for drop_down_list_value to avoid validation error on new type_de_champ
2019-04-30 10:39:27 +02:00
Nicolas Bouilleaud
2fb1b19e09
Hide other motivation fields when switching between states
2019-04-10 10:32:43 +02:00
Paul Chavard
a60943a173
Polyfill insertAdjacentElement and dataset on old browsers
2019-04-09 15:26:42 +02:00
Paul Chavard
4fb889f10a
Send browser support information and format user id
2019-04-04 14:21:32 +02:00
Paul Chavard
8e6e730c80
Send user information to sentry without email
2019-04-04 14:21:32 +02:00
Paul Chavard
8157fd0127
Fix type de champ menu déroulant
2019-04-03 21:53:57 +02:00
Paul Chavard
b9be186d2c
Sentry should send environment information
2019-04-03 18:19:16 +02:00
Paul Chavard
2374877e98
Add plus icon to ajouter un champ button
2019-04-03 17:59:42 +02:00
Paul Chavard
a197459e4d
Fix react props warning
2019-04-03 17:59:42 +02:00
Pierre de La Morinerie
253008e666
types_de_champ_editor: add title to actions
2019-04-03 17:49:03 +02:00
Pierre de La Morinerie
d79fee7040
types_de_champ_editor: improve the move handle
2019-04-03 17:15:35 +02:00
Pierre de La Morinerie
1880e5161b
types_de_champs_editor: improve apparence of Move buttons
2019-04-03 17:15:35 +02:00
Pierre de La Morinerie
e896310e34
procedure_context: display the procedure description on small screens
...
Fix #3658
2019-04-03 17:14:48 +02:00
Paul Chavard
47694d286e
Revrite types de champ editor using React
2019-04-03 14:38:57 +02:00
Paul Chavard
5a032d344d
Activate React components loader
2019-04-03 14:38:57 +02:00
Paul Chavard
f5a66df802
Remove old vue editor
2019-04-03 14:38:07 +02:00
Paul Chavard
51c79ba6a6
Update webpacker and replace vue with react
2019-04-03 14:38:07 +02:00
Paul Chavard
e71cdcd12c
Move all the trackers to a separate js pack
2019-04-02 17:33:53 +02:00
Paul Chavard
418466ca7a
Supprimer le code mort carto
2019-04-02 12:42:28 +02:00
Pierre de La Morinerie
4e2e8e9a57
support: toggle correct elements on page load
2019-03-28 11:09:00 +01:00
philemon95
bc408e3374
support: allow toggling any element depending on the question type
2019-03-28 11:09:00 +01:00
Frederic Merizen
a8ce11a4d2
Add rel=noopener to links with target=_blank
...
http://support.detectify.com/customer/portal/articles/2792257-external-links-using-target-_blank-
2019-03-05 18:25:26 +01:00
Paul Chavard
146e8ba2aa
Revrite with unobtrusive js
2019-02-21 18:05:47 +01:00
Pierre de La Morinerie
1f636e4d59
piece_justificative: toggle file upload control
2019-02-19 18:02:27 +01:00
Paul Chavard
5e806aa39e
Add progress bar to model uploads
2019-02-14 17:13:41 +01:00
Paul Chavard
1e8bc3e14c
Refactor upload progress bar
2019-02-14 17:13:41 +01:00
Paul Chavard
235310bcf6
Fix upload progress bar
2019-02-14 17:13:41 +01:00
Paul Chavard
b7058947e1
Fix buttons on screen bottom
2019-02-12 16:22:12 +01:00
Chaïb Martinez
d837066091
Add scroll-to to add champ buttons
2019-02-12 12:58:53 +01:00
Chaïb Martinez
dbfb7804a8
Add vue-scrollto settings
2019-02-12 12:58:53 +01:00
Paul Chavard
5da5f75c5f
[Types de Champ Editeur] Save on change and only edited model
2019-02-07 17:05:55 +01:00
Pierre de La Morinerie
82fc017430
autocomplete: fix initialization happening several times
2019-02-07 15:29:46 +01:00
Paul Chavard
bb5c90c579
Fix champ address on repetitions
2019-02-07 12:29:27 +01: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
1d75a32cac
Add a default text type de champ to editor
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
9b7b59f67e
Champs editor should handle repetition type
2019-02-04 11:58:26 +01:00
Paul Chavard
174b01ecd4
Fix champs editor on old procedures
2019-01-18 14:53:14 +01:00
Paul Chavard
d45273e117
Only initialize champs editor if is present on page
2019-01-17 16:29:30 +01:00
Paul Chavard
41c9b21509
Use new editor
2019-01-17 11:20:31 +01:00
Paul Chavard
0d35295d4e
New champs editor
2019-01-17 11:20:31 +01:00
Chaïb Martinez
408ee31595
Add Sendinbue subscribe form
...
Remove Mailjet newsletter subscribe popin
2018-12-19 12:35:22 +01:00
Paul Chavard
2f2aa580f8
Update activestorage.js
2018-12-04 11:37:00 +01:00
Paul Chavard
c492e1cd88
Update webpacker (babel7)
2018-12-04 11:37:00 +01:00
pedong
c14f9900d6
[ fix #2969 ] use JS replace semicolon by comma in the list email
2018-12-03 12:59:40 +01:00
Paul Chavard
d77a5c9f15
More tests and fixes on carte champ
2018-11-30 13:28:30 +01:00
Paul Chavard
5632929d3d
Remove old caro editor
2018-11-27 16:11:25 +01:00
Paul Chavard
febf625dd9
Make difference between error and empty geo json
2018-11-27 12:36:10 +01:00
Paul Chavard
f2e7feec1d
Do not send error json to backend - it doesn’t need it and it creates bad data
2018-11-27 11:45:24 +01:00
Paul Chavard
7ba9624a3f
Fix instructeurs list filter
...
fix #3002
2018-11-20 14:27:32 +01:00
Paul Chavard
5a8a4b393f
Add RPG carte source
2018-10-23 18:13:44 +02:00
Paul Chavard
c8c75fc254
Better handle empty user selection layers
2018-10-23 09:35:25 +02:00
Paul Chavard
4a097900d2
Implement carte champ editor
2018-10-23 09:35:25 +02:00
Paul Chavard
8d9f6573da
Rename shared module carto to carte
2018-10-23 09:35:25 +02:00
Paul Chavard
febef735b8
Refactor carto to share more code
2018-10-23 09:35:25 +02:00
gregoirenovel
6658b466cb
address/get → address/suggestions
2018-10-16 09:38:53 +02:00
gregoirenovel
f01057267b
address/address_point → address/geocode
2018-10-16 09:38:53 +02:00
gregoirenovel
e667cad617
ban → address
2018-10-16 09:38:53 +02:00
simon lehericey
45d63df5ee
Autocomplete.js: debounce input
2018-10-15 21:41:42 +02:00
Paul Chavard
9a4975a2dd
Remove dead carto code
2018-10-14 12:34:44 +02:00
Paul Chavard
55b955f838
carto: refactor carto editor using new primitives
2018-10-14 12:34:44 +02:00
Paul Chavard
ad2c589e4d
carto: extract draw method from old design carto
2018-10-14 12:34:44 +02:00
Paul Chavard
25e71634e7
carto: extract polygonArea helper
2018-10-14 12:34:44 +02:00
Paul Chavard
53c6003d27
carto: use exported polygon styles
2018-10-14 12:34:44 +02:00
Paul Chavard
f321e9df3f
carto: use initMap in new design carto
2018-10-14 12:34:44 +02:00
Paul Chavard
485aabf295
carto: export polygon styles
2018-10-14 12:34:44 +02:00
Paul Chavard
e1b068d67c
carto: add initMap method
2018-10-14 12:34:44 +02:00
Paul Chavard
561f9a8164
carto: add drawLayer method
2018-10-14 12:34:44 +02:00
Paul Chavard
6673467117
carto: add createLayer and removeLayer methods
2018-10-14 12:34:44 +02:00
Paul Chavard
136031bea4
Remove jQuery import from new design
2018-10-10 15:05:51 +02:00
Paul Chavard
b79e77687e
Refactor avis helpers
2018-10-10 15:05:51 +02:00
Paul Chavard
08d5e7d328
Refactor toggle chart helpers
2018-10-10 15:05:51 +02:00
Paul Chavard
9d5ffba068
Refactor state button helpers
2018-10-10 15:05:51 +02:00
Paul Chavard
3897d4abf4
Refactor messagerie helpers
2018-10-10 15:05:51 +02:00
Paul Chavard
d18b1c8ddc
Refactor form validation helpers
2018-10-10 14:55:28 +02:00
Paul Chavard
8c16eb4cd0
Use @utils instead of jQuery
2018-10-10 14:55:28 +02:00
Paul Chavard
c343893d00
Expose all utils function as @utils
2018-10-10 14:39:36 +02:00
Paul Chavard
37d424d671
Refactor carto code
2018-10-05 09:55:41 +02:00
Paul Chavard
51127c324d
Move old carto code to webpacker
2018-10-05 09:55:41 +02:00
Paul Chavard
eda3dd4215
Compile FranceConnect module with webpacker
2018-10-05 09:55:13 +02:00
Paul Chavard
9d19936f82
Move franceconnect kit to webpacker
2018-10-05 09:55:13 +02:00
Paul Chavard
44511acfed
Do not reload page when instructeur change dossier state
...
fix #2425
2018-10-04 11:12:43 +02:00
Pierre de La Morinerie
cd938b4c36
dropdown: refactor to make the button an actual button
2018-09-27 17:43:08 +02:00
Paul Chavard
3c66fceba5
Replace password strength js with ujs
2018-09-27 16:00:14 +02:00
Mathieu Magnin
d1d8d9afe2
[ Fix #1285 ] Add JS to dynamically check the password strength
2018-09-26 09:51:30 +02:00
Paul Chavard
55a9b31b93
Cleanup SIRET champ
2018-09-12 15:53:02 +02:00
Paul Chavard
2f189826ab
Add some usefull polyfills for old browsers
2018-09-11 20:37:08 +02:00
gregoirenovel
f8a6765367
[ Fix #2540 ] Allow an instructeur to send a dossier to several instructeurs
2018-09-11 18:00:24 +02:00
gregoirenovel
523edac4c5
Scope the select2 config call
2018-09-11 18:00:23 +02:00
Paul Chavard
212dee1565
Drop unused js
2018-09-07 19:41:33 +01:00
Paul Chavard
8c8e7f3ef3
Patch remote ujs handler with debounced input support
2018-09-06 15:09:02 +01:00
Paul Chavard
72dded2a5a
Fix safari bug
...
Fix #2452
2018-08-31 11:58:33 +01:00
Paul Chavard
3d506a8cdc
Fix autocomplete
2018-08-28 11:04:44 +01:00
Paul Chavard
e1f1827320
Replace typeahead with simpler autocomplete
2018-08-22 17:17:33 +02:00
Paul Chavard
2500cd516b
Use delegation in SIRET champ code
2018-08-22 16:42:55 +02:00
Paul Chavard
e8e62b0e63
Remove unused modules from old design
2018-08-22 16:42:46 +02:00
Paul Chavard
a17fb60aea
Include select2 from the file where it is used
2018-08-22 16:42:29 +02:00
Paul Chavard
1109a4500f
Add csrf token protection to jQuery initiated requests
2018-08-22 14:13:10 +02:00
Paul Chavard
13470e9781
Remove unused JavaScript
2018-08-14 17:03:00 +02:00
Pierre de La Morinerie
40d0986a82
javascript: transpile activestorage files (instead of copying them)
2018-08-14 11:40:33 +02:00
Paul Chavard
008d84f107
Explicitly import jQuery
2018-08-13 15:17:13 +02:00
Paul Chavard
541df2d961
Add support for in browser sentry
2018-08-13 11:44:32 +02:00
Paul Chavard
e7e616ae5b
Fix transpiling issues in IE
2018-08-09 21:05:07 +02:00
Paul Chavard
8b79c32a55
Do not rely on javascript for form submits without direct upload
2018-08-07 16:58:49 +02:00
Paul Chavard
c91abe73c5
Remove old user dossier form
2018-08-07 14:13:27 +02:00
Pierre de La Morinerie
4f9384d6bd
webpack: add babel-polyfill at runtime
...
This includes the polyfills for features that need to be emulated at
runtime (see https://github.com/babel/babel-preset-env/issues/203#issuecomment-285820866 )
It fixes a "Symbol not defined" error when using `for… in` loops on
Internet Explorer 11. This caused the dossiers not to be submitted.
Fix #2300
2018-08-06 16:30:36 +02:00
Paul Chavard
78a9365fe1
Package mailjet widget with webpack
2018-08-01 16:54:39 +02:00
Paul Chavard
872e07b5e6
Fix global jQuery usage
2018-08-01 11:55:35 +02:00
Pierre de La Morinerie
b7382375e2
specs: fix disabling jQuery animations during tests
2018-08-01 11:46:04 +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