disambiguate list items in event model

pull/612/head
Justin Richer 2014-05-31 09:57:00 -04:00
parent ff3a210064
commit 1a7de8cf29
2 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ var ListWidgetChildView = Backbone.View.extend({
tagName: 'tr',
events:{
"click .btn-delete":'deleteItem'
"click .btn-delete-list-item":'deleteItem'
},
deleteItem:function (e) {
@ -137,7 +137,7 @@ var ListWidgetView = Backbone.View.extend({
childView:ListWidgetChildView,
events:{
"click .btn-add":"addItem",
"click .btn-add-list-item":"addItem",
"blur input": "addItem",
"keypress":function (e) {
// trap the enter key

View File

@ -29,7 +29,7 @@
<script type="text/html" id="tmpl-list-widget-child">
<td><%=(item.length > 30) ? item.substr(0,27) + '...' : item %></td>
<td><a class="btn btn-small btn-delete" href="#"><i class="icon-minus-sign"></i></a></td>
<td><a class="btn btn-small btn-delete-list-item" href="#"><i class="icon-minus-sign"></i></a></td>
</script>
<script type="text/html" id="tmpl-list-widget-child-empty">
@ -43,7 +43,7 @@
<tr>
<th class="control-group">
<input type="text" value="" placeholder="<%=(placeholder) ? placeholder : ''%>"></th>
<th><a class="btn btn-small btn-add" href="#"><i class="icon-plus-sign"></i></a></th>
<th><a class="btn btn-small btn-add-list-item" href="#"><i class="icon-plus-sign"></i></a></th>
</tr>
</thead>
<tbody>