Skip to content

Instantly share code, notes, and snippets.

@unamashana
Last active December 31, 2015 16:49
Show Gist options
  • Save unamashana/8016310 to your computer and use it in GitHub Desktop.
Save unamashana/8016310 to your computer and use it in GitHub Desktop.
SB.Views.TicketSummary = Backbone.View.extend(
events:
"click .name": "openTicket"
"click .subject": "openTicket"
initialize: ->
@model = @options.model
_.bindAll this, 'openTicket'
$(@el).html SB.Utils.renderTemplate("tickets/summary")(@model.toJSON())
openTicket: ->
ticket_view = new SB.Views.Ticket model: @model
$('body').html ticket_view.el
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment