Big refactoring.
Removed ControlBox model, and instead only create ChatBox models inside ChatBoxes collection (the Controlbox is now also a ChatBox). This enables us to use backbone.localStorage for saving open chatboxes (saving and fetching currently not implemented). createChatBox now doesn't return a ChatBoxView instance anymore. In the case where a view was needed (to append a message), we create the message on the ChatBox and let the view update via an event trigger. This is much more Backbonic ;) Also created a Message model. This will most likely enable us to in the future also store messages via backbone.localStorage.
Showing
This diff is collapsed.
Please register or sign in to comment