mod_base: fix dialog.js to cooperate with Bootstrap.
Fixes #798