Updated plus and minus buttons in list views, addresses #202
parent
150c4032fd
commit
a88ae8258a
|
@ -33,7 +33,8 @@
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
events:{
|
events:{
|
||||||
"click .icon-minus-sign":function () {
|
"click .btn":function (e) {
|
||||||
|
e.preventDefault();
|
||||||
this.$el.tooltip('destroy');
|
this.$el.tooltip('destroy');
|
||||||
this.model.destroy();
|
this.model.destroy();
|
||||||
}
|
}
|
||||||
|
@ -60,7 +61,7 @@
|
||||||
}),
|
}),
|
||||||
|
|
||||||
events:{
|
events:{
|
||||||
"click button":"addItem",
|
"click .btn":"addItem",
|
||||||
"keypress input":function (e) {
|
"keypress input":function (e) {
|
||||||
// trap the enter key
|
// trap the enter key
|
||||||
if (e.which == 13) {
|
if (e.which == 13) {
|
||||||
|
@ -82,8 +83,10 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
addItem:function() {
|
addItem:function(e) {
|
||||||
var input_value = $("input", this.el).val().trim();
|
e.preventDefault();
|
||||||
|
|
||||||
|
var input_value = $("input", this.el).val().trim();
|
||||||
|
|
||||||
var model;
|
var model;
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
|
|
||||||
<script type="text/html" id="tmpl-list-widget-child">
|
<script type="text/html" id="tmpl-list-widget-child">
|
||||||
<td><%=(item.length > 27) ? item.substr(0,27) + '...' : item %></td>
|
<td><%=(item.length > 27) ? item.substr(0,27) + '...' : item %></td>
|
||||||
<td><i class="icon-minus-sign icon-gray"></i></td>
|
<td><a class="btn btn-small" href="#"><i class="icon-minus-sign icon-gray"></i></a></td>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="tmpl-list-widget">
|
<script type="text/html" id="tmpl-list-widget">
|
||||||
|
@ -253,7 +253,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><button class="btn btn-small" type="button">Add</button></th>
|
<th><a class="btn btn-small" href="#"><i class="icon-plus-sign icon-gray"></i></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
Loading…
Reference in New Issue