Created
May 3, 2011 21:28
-
-
Save igustafson/954291 to your computer and use it in GitHub Desktop.
Settings TableView with delete link
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 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