Created
June 7, 2012 17:44
-
-
Save bittersweetryan/2890286 to your computer and use it in GitHub Desktop.
deferred to control animation timings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
displayMessage: function(ev){ | |
var id = ev.currentTarget.id, | |
dfd = $.Deferred(), | |
self = this, | |
statusCell = this.getStatusCell($(ev.currentTarget)); | |
this.model.set('id',id); | |
if(statusCell.find('img').attr('alt') === 'unread'){ | |
this.removeBold($(ev.currentTarget)); | |
iris.tabView.decrementUnreadMessageCount(); | |
} | |
this.setIcon(statusCell,true); | |
$.when( | |
this.model.fetch(), | |
this.hide(dfd) | |
).then(function(){ | |
iris.messageView.render(self.model); | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment