Posted by nod_ on July 14, 2012 at 9:58pm
6 followers
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | javascript |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | JavaScript clean-up, Needs JS testing |
Issue Summary
Move the summary jQuery plugin to it's own file and clean it up. Currently there is too much binding/unbinding going on.
Take formUpdated out of there and to it's own file while making it better: #1636992: General "changed" warning messages / dirty forms
Put fillUserInfoFromCookie behavior somewhere else maybe?
Replace form.js with 3 files and update the references to the proper file in the rest of the code.
Comments
#1
BONUS: Investigate if adding basic events and detach makes sense, as described in #1763812: [META] Provide complete attach/detach with basic events.
#2
tag
#3
The following modules use the summary functionality provided by `form.js`:
A couple questions regarding how to handle updating their library information:
#4
1. don't think so, i'd have to dig into but it's a small thing.
2. yes
:)
#5
Sweet, figured out how the drupal.form bit worked :)
Anyway, here's an initial patch that: removes the summary jQuery code to it's own file,
core/misc/drupal.summary.js; updates the system library info; updates the modules above so that there library info calls include the new file; and changes the bindings in the summary code to on/off calls. I have not rolled out any updates for the other two pieces of form.js code. Also I only addeddrupal.summaryas dependencies, I did not check if they code was using the other functionality and removedrupal.formas needed.I currently have this code push out to github at: https://github.com/robballou/drupal/tree/8.x-form-js
#6
#5: 1685146-refactor-form-js.patch queued for re-testing.
#7
The last submitted patch, 1685146-refactor-form-js.patch, failed testing.