move javascript event to view class
Merge branch 'master' into gh-pages