Skip to content

Instantly share code, notes, and snippets.

@lightsofapollo
Created June 19, 2013 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightsofapollo/0f45edff83552a888797 to your computer and use it in GitHub Desktop.
Save lightsofapollo/0f45edff83552a888797 to your computer and use it in GitHub Desktop.
function MessageController() {
pubsubthingy.on('MagicStoreThingy', 'delete messages', this.ondelete.bind(this));
}
MessageController.prototype = {
ondelete: function(messages) {
// how do we ask the view for the messages?
var op = mailapi.deleteMessages(messages);
}
};
// toolbar
function MessageListCard() {
this.list = new List(....);
this.magicdeletebutton.onclick = function() {
pubsubthingy.emit('delete messages', this.list.getMessages());
}.bind(this)
}
// view
function List() {
}
List.prototype = {
getCheckedMessages: function() {
// who call this?
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment