A pattern for doclock
A Patternslib pattern.
For example:
``html`
data-pat-doclock="url: mock/toggle-lock.html"
>
...
For standalone development run (installation and starting a server):
`shell`
> make all
To clean up local directory (after running make all) run:
`shell`
> make clean
This pattern is Quaive specific and is meant to lock
a document in order to prevent concurrent edits.
Every time a user starts typing or pastes content in a form that
has the class pat-doclock, an ajax call to the url specifieddata-pat-doclock
using the option is performed.url`
When the form is replaced or the user leaves the page, the same
is called to unlock the document.