Skip to content

Instantly share code, notes, and snippets.

@e1senh0rn
Created December 16, 2011 09:54
Show Gist options
  • Save e1senh0rn/1485408 to your computer and use it in GitHub Desktop.
Save e1senh0rn/1485408 to your computer and use it in GitHub Desktop.
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