With the new views, the barcode mechanisms were completely broken, because the view and widget JS code was totally changed. This commit update and refactor all that code to make it work with the new design philosophy. Also, it update the coding style.