removed barcode stuff and refactored js

moved js from view into product.js. Example with single-page edit and
create however create appends new table to the old one instead of just
reloading the table