Fixing the problem that didn't allow us to close the dialog. Basically we didn't need the first script.
Using the tag in a file that is called by all views on application.
Removing reports' tag from here and using header instead. It's almost the same.