Move pagelet headers to parent view
Use relative selector instead of id attribute
Change the generate-dialog-script function from private to public