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

View File

@ -29,7 +29,7 @@
<script type="text/html" id="tmpl-list-widget-child"> <script type="text/html" id="tmpl-list-widget-child">
<td><%=(item.length > 30) ? item.substr(0,27) + '...' : item %></td> <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>
<script type="text/html" id="tmpl-list-widget-child-empty"> <script type="text/html" id="tmpl-list-widget-child-empty">
@ -43,7 +43,7 @@
<tr> <tr>
<th class="control-group"> <th class="control-group">
<input type="text" value="" placeholder="<%=(placeholder) ? placeholder : ''%>"></th> <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> </tr>
</thead> </thead>
<tbody> <tbody>