Fix: modal close button execute the modal command

Make sure clicking the modal close button does not execute the modal command (such as remove)
Remove document only if the operation is remove

The modal handler for clicks on button is executed for all operations, thus removing document on update.
Fix: stupid quote missing
Merge pull request #2 from djhi/master

Fix: modal buttons handler