LPS-47103 Move events.js to module

https://issues.liferay.com/browse/LPS-47103