Skip to content

Instantly share code, notes, and snippets.

@igustafson
Created May 3, 2011 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save igustafson/954291 to your computer and use it in GitHub Desktop.
Save igustafson/954291 to your computer and use it in GitHub Desktop.
Settings TableView with delete link
class TableView extends Sagamore.Views.CollectionTable
className: "settings"
fields: [
{id: 'actions', title: '', render: (options) ->
$('<a href="#" class="delete">Delete</a>').click ->
if confirm("Are you sure you want to delete user '" + options.model.get("login") + "'?")
options.model.destroy
}
{id: 'id', title: 'Name', sort: true, template: idTemplate}
{id: 'stringValue', title: 'Value'}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment