Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created January 20, 2011 01:46
Show Gist options
  • Save erichocean/787264 to your computer and use it in GitHub Desktop.
Save erichocean/787264 to your computer and use it in GitHub Desktop.
contentView: OI.MailboxSourceView.design({
layerId: 'mailbox-list',
classNames: 'mailbox-list'.w(),
// delegate: 'OI*mailboxesController',
contentValueKey: 'name',
contentUnreadCountKey: 'unreadCount',
contentBinding: 'OI*mailboxesController.arrangedObjects',
selectionBinding: 'OI*mailboxesController.selection',
selectOnMouseDown: YES,
acceptsFirstResponder: YES,
delegate: OI,
didBecomeFirstResponder: function() {
OI.didBecomeFirstResponder(this) ;
},
willLoseFirstResponder: function() {
OI.willLoseFirstResponder(this) ;
},
moveLeft: function(sender, evt) {
return OI.moveLeft(sender, evt) ;
},
moveRight: function(sender, evt) {
return OI.moveRight(sender, evt) ;
},
exampleView: SC.ListItemView.design({
layoutStyle: function() {
var layout = this.layout ;
var oldHeight = layout.height ;
layout.height = oldHeight - 2 ;
var res = sc_super() ;
layout.height = oldHeight ;
return res ;
}.property().cacheable()
})
})
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment