Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Commit0ceb959
committed
minor#14340 [Collection forms] Make javascript generic (tcheymol)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.Discussion----------[Collection forms] Make javascript genericThis pull request aims at making javascript code on the "embeded collection form" section reusable in any form collection* The aim is that we only need to add a `<ul>` tag, and add one init line in javascript if we embed another form collection* Also, I think that the `$addLinkLi` can perfectly be added in Twig instead of javascript, it reduces the size of the js function and improoves reusabilityWhat I did is* Remove the `$addLinkLi` from javacripts* Add a data attribute to it so it can reference the list container class : `data-collection-holder-class`I created a sample project implementing my working solution [here](https://github.com/tcheymol/embeed_form_collection_test)Commits-------3abeceb [Collection forms] Make javascript generic1 file changed
+19
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
| |||
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 296 | + | |
301 | 297 | | |
302 | 298 | | |
303 | | - | |
| 299 | + | |
304 | 300 | | |
305 | | - | |
| 301 | + | |
| 302 | + | |
306 | 303 | | |
307 | | - | |
308 | | - | |
| 304 | + | |
| 305 | + | |
309 | 306 | | |
310 | 307 | | |
311 | 308 | | |
| |||
319 | 316 | | |
320 | 317 | | |
321 | 318 | | |
322 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
| 345 | + | |
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| |||
0 commit comments
Comments
(0)