There is a series of samples that demonstrate how to build and customize workflows/hybrid apps.
They are available at the SUP Apps site https://cw.sdn.sap.com/cw/groups/sup-apps
This one is a good place to start and has links to many other samples.
Expense Tracking Sample https://cw.sdn.sap.com/cw/docs/DOC-148193
Specifically though, custom.js is the location to add custom JavaScript code.