use a dialog when the new button in the footer is clicked, update footer too when opening a document with Ajax.