separato javascript e view