-
-
Save jstotz/954294 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
rowView = | |
events: | |
'click .destroy': 'destroy' | |
destroy: (event)-> | |
event.preventDefault() | |
if confirm("Are you sure you want to delete " + setting.get("id") + "?") | |
@model.destroy() | |
class TableView extends Sagamore.Views.CollectionTable | |
className: "settings" | |
fields: [ | |
{id: 'actions', title: '', template: '<a href="#" class="destroy">Delete</a>'} | |
{id: 'id', title: 'Name', sort: true, template: idTemplate} | |
{id: 'stringValue', title: 'Value'} | |
] | |
rowView: rowView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment