Closed arbales closed 12 years ago
I don't understand this. What do you mean?
Sorry, I mean the station views. Are they still linked together?
All the templates are in the views
folder under application
or player
. The js view controllers are in scripts/ui
. Or are you talking about how they all are within a single #app
element? That does need to change, especially to fix all the extra delegateEvents
calls we're making.
delegateEvents
reloads event delegation after element insertion? Similar to Event.addBehaviors.reload
…
Yes, but you shouldn't have to explicitly call it as Backbone calls it after initialize
. However, all our views for the panel are sharing the same #add
element. So whichever view gets initialized last wins owning the events/behavior for #add
. That's why everytime a panel takes over (by having render called on it), it reloads its events/behaviors.
The right thing™ to do is to have individual elements for each panel, but keep them hidden. The controller class will then be responsible for hiding/showing/fading/sliding them in and out. That way the events/behaviors are fully loaded when the page is initialized and we don't need to worry event delegation anymore.
I will tackle it this weekend hopefully along with splitting up the stylesheet.
This is fixed on master.
So I can explore some UI changes more easily.