refactoring onclick event
refactoring several javascript convention issues
Merge pull request #369 from DonutWorks/feature/onclick-refactoring

#359 refactoring onclick event