Factorized modal dialogs javascript
Started category modification