ECMS-6518: Open document make sure javascript loaded
ECMS-6518: Open document. improve DocumentTypeService