snikch/jquery.dirtyforms — pull request #29 by NightOwl888 (2012-04-28 20:29:05+00:00)
Title: Fix for issue #28 deferred execution of decision

The title and issue explains all of it except that I also added all of the triggers to the documetaion, although it was difficult to describe when each trigger is fired.

Anyway, I decided to leave the $.DirtyForms.isDeciding(), $.DirtyForms.decidingCancel() and $.DirtyForms.decidingContinue() methods as *not* deprecated because it makes this plugin more flexible (although the naming is a bit confusing). With the 2 code examples in the documentation, there will hopefully be enough clarity to use them the right way.

I wanted to find a way to indicate that these 2 methods were related to each other and the other 3 are related to each other, and the naming convention was pretty much it. However, it would probably be better if there weren't both a **decisionContinue** property and a **decidingContinue()** method that are not related. I suppose the new property could just be **continue** and the new method called **commitDecision()** but then it is not clear that these 2 are related. Naming the property **decision** makes it clearer exept for it doesn't indicate what the true or false state mean. That is why I settled on **decisionContinue** and **decisionCommit**.