dirty_form icon indicating copy to clipboard operation
dirty_form copied to clipboard

Checkboxes?

Open jamietre opened this issue 13 years ago • 6 comments

I found dirty_form because jquery.bind("change") doesn't work for drop down lists, and I didn't want to use .change since I need to namespace the event.

Ironically, it works great on my select lists, but doesn't seem to work on checkboxes! I now have exactly the opposite problem I had before.

I looked at the source and it seems to only use the "blur" event. Perhaps this does not work with checkboxes, even though there seems to be code that inspects the value of checkboxes.

I hacked a fix pretty easily, by also binding to the change event, but this isn't great since it will run all that code twice for things that blur works on. Thought I would mention it.

jamietre avatar Apr 14 '11 20:04 jamietre

Thanks for the heads up. I'll take a look. For now you could also unbind the blur event, or fork the js code, fix it and submit a patch request. Hint, hint. ;)

acvwilson avatar Apr 19 '11 17:04 acvwilson

@jamietre: I've fixed this issue as well as a couple other ones on my fork. Feel free to use it.

https://github.com/lookfirst/dirty_form/commit/df56d0e7c751ee9e4819dc86d0d10f96a3a7bcc4

@acvwilson: This is a really great piece of software, I'm surprised more people aren't into it. It seems like you aren't willing to keep it up any longer?

lookfirst avatar Dec 02 '11 03:12 lookfirst

I had forgotten all about this but, its actually coming up again in something i'm working on. Thanks for the heads up.

jamietre avatar Dec 02 '11 03:12 jamietre

@jamietre: cool. I haven't had a usecase for radio buttons yet, but when I do, I'll fix that too.

I'm using this project all over my site to enable/disable Save buttons. Even with the minor issues, as far as I can tell, there really isn't anything else even remotely as good as this project. :heart:

lookfirst avatar Dec 02 '11 03:12 lookfirst

I'm not using it on any projects at the moment so it's fallen behind. I didn't know it had a lot of use, still. If you send me a pull request I'd be happy to include it and I'm planning on preping it for the new jquery plugin system with a manifest and all. Thanks for the love.

acvwilson avatar Jan 09 '12 19:01 acvwilson

I use this for every page on my site that has 'forms'. I don't know how else anyone would do good UI without it. This is the easiest way to enable/disable a 'Save' button. @acvwilson please take a look at my fork. I've done a fair amount of work on it.

lookfirst avatar Jan 09 '12 19:01 lookfirst