Any plans in this direction?

Comments

geek-merlin’s picture

subscribe!

seanbfuller’s picture

Status: Active » Needs review
StatusFileSize
new5.01 KB

Attached 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!

seanbfuller’s picture

Just 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.

seanbfuller’s picture

For 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.

geek-merlin’s picture

Title: Port to Drupal 7 » DirtyForm Port to D7

:-)

geek-merlin’s picture

Status: Needs review » Reviewed & tested by the community

i 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.

smk-ka’s picture

StatusFileSize
new5.61 KB

Fixed 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.

mgifford’s picture

Node 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.

geek-merlin’s picture

rooby’s picture

Since there is already the two modules mentioned above I really think this module should be discontinued instead of making more duplicate modules.

jacob.embree’s picture

I created a fork here to contain the changes in #7 and whatever other changes I find necessary.