Created
December 16, 2011 09:54
-
-
Save e1senh0rn/1485408 to your computer and use it in GitHub Desktop.
This file contains 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
class InboxProductOrderView extends Backbone.View | |
tagName: "div" | |
className: "list_view_item inbox_item" | |
template: _.template($('#inbox-product-order').html()) | |
events: | |
'click': 'show_inbox_product_order' | |
render: -> | |
$(@el).html @template(@model.toJSON()) | |
@ | |
show_inbox_product_order: -> | |
$('.inbox_item').css('background-color','#fcfcfc'); | |
$(@el).css('background-color','#ededed'); | |
new InboxProductOrderShow model: @model | |
class InboxProductOrderShow extends Backbone.View | |
el: "#seller_right_column" | |
template: _.template($('#show-inbox-product-order').html()) | |
events: | |
'click #create_offer': 'create_offer' | |
initialize: -> | |
@render() | |
render: -> | |
console.log "rendered..." | |
$(@el).html @template(@model.toJSON()) | |
@ | |
create_offer: (event) -> | |
event.preventDefault(); | |
console.log "new offer created..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment