Any plans in this direction?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | dirtyforms-D7.patch | 5.61 KB | smk-ka |
| #2 | 950736_dirtyforms_d7upgrade_v01.patch | 5.01 KB | seanbfuller |
Any plans in this direction?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | dirtyforms-D7.patch | 5.61 KB | smk-ka |
| #2 | 950736_dirtyforms_d7upgrade_v01.patch | 5.01 KB | seanbfuller |
Comments
Comment #1
geek-merlinsubscribe!
Comment #2
seanbfuller commentedAttached is a quick patch to upgrade to D7. The only things I changed in the JS were:
The rest of the changes are just a result of the indenting form the "attach" change.
See the patch I rolled for onbefureunload also: #1081552: D7 version of onbeforeunload
Basic functionality seems to be working so far, although it probably needs more testing. Needs review. Thanks!
Comment #3
seanbfuller commentedJust a quick follow-up for anyone else who finds this: I've been doing some testing of the patch above and I'm finding some inconsistent results. I'll need to do more to figure out if it is another module or something going on with the upgrade. Also, this currently doesn't work with the overlay. Some way to hook into the admin menu links and overlay would need to be examined for some people who use it.
Comment #4
seanbfuller commentedFor anyone else who comes across this issue: I updated #1081552: D7 version of onbeforeunload with some testing and development efforts I went through trying to get this to work with the overlay. Seems that the inconsistent results that I mention above are mostly due to the fact that the onbeforeunload event fires after the next page is already being loaded in the overlay. As most of the mechanics regarding that event are in that module, I moved where I left off over there.
As I mention in that module, the upgrade patch seems to work in D7, unless you have the overlay enabled. Not sure of the best next steps.
Comment #5
geek-merlin:-)
Comment #6
geek-merlini did test this extensively and used it in a production environment - no problems.
(i used it in a environment where i did not use overlays so this might still be an issue for others.)
i propose to commit and release (is this still maintained or might porter apply for maintainer status??)
about the issue that the module does not work with overlay:
we should add BIG warnings on both module pages for now and look for a good solution for this (if there is one).
releasing surely will give more momentum to finding such solutions.
Comment #7
smk-ka commentedFixed one bug: the form's class attributes are now stored in an array instead of a string, thus the 'dirtyforms-excluded' class needs to be appended to the array. The current code inserts
class="Array dirtyforms-excluded"for excluded forms. Otherwise the code is working good, so leaving at RTBC.Comment #8
mgiffordNode Edit Protection is a similar module that's already been ported to D7 - http://drupal.org/project/node_edit_protection
Would be really good to have both list each other on the project page so that it is easier for folks to compare.
Would be good to get this out as a stable release however.
Comment #9
geek-merlinalso: https://www.drupal.org/project/saveguard
Comment #10
rooby commentedSince there is already the two modules mentioned above I really think this module should be discontinued instead of making more duplicate modules.
Comment #11
jacob.embree commentedI created a fork here to contain the changes in #7 and whatever other changes I find necessary.