Refactor the show_dialog() JS function

Accepts now an object with all parameters instead of a list of parameters.

Improves readability