showoff
showoff copied to clipboard
Refactor JS to Get it Out of Views
Some of the JS has ended up in the view files. We should refactor it so that the code is separate from the view. This can either be done by finding a way to better identify which view the user is in, or by creating a third JS file, audience.js, for that logic that only applies to the audience view.
The code that's in the views is (should be) in there because it has to be programmatically generated. Like keymap = <%= JSON.pretty_generate @keymap %>;
, for example. This part cannot be removed.
There's quite a bit though that can/should be refactored out.