Reformat modal JS, remove useless resources from demo popup
Merge pull request #1877 from darkwing/modal-control-js

Reformat modal JS, remove useless resources from demo popup