Added clear button on operation edit field.
This commit is contained in:
parent
30bf84480f
commit
318cc58074
@ -64,7 +64,7 @@
|
||||
<script id="editTmpl" type="text/html">
|
||||
<tr data-bind="css: { 'error': sold() < 0 }">
|
||||
<td><input type="text" class="input-small" data-bind="dateValue: value_date" data-date-format="yyyy-mm-dd" id="value_date"/></td>
|
||||
<td><input type="text" class="input-small" data-bind="dateValue: operation_date" data-date-format="yyyy-mm-dd" id="operation_date"/></td>
|
||||
<td><div class="input-append"><input type="text" class="input-small" data-bind="dateValue: operation_date" data-date-format="yyyy-mm-dd" id="operation_date"/><button class="btn" type="button"><i class="icon-remove" id="operation_date_clear"></i></button></div></td>
|
||||
<td><input type="text" class="input-xxlarge" data-bind="value: label"/></td>
|
||||
<td><input type="text" class="input-mini" data-bind="value: value"/></td>
|
||||
<td data-bind="text: sold"></td>
|
||||
|
@ -87,6 +87,10 @@ var ListViewModel = function() {
|
||||
$("#operation_date").datepicker({format: "yyyy-mm-dd"}).on('changeDate', function(ev){
|
||||
self.selectedItem().operation_date(new Date(ev.date.valueOf()));
|
||||
});
|
||||
|
||||
$("#operation_date_clear").click(function(e){
|
||||
self.selectedItem().operation_date(null);
|
||||
});
|
||||
};
|
||||
|
||||
self.cancel = function() {
|
||||
@ -122,6 +126,10 @@ var ListViewModel = function() {
|
||||
$("#operation_date").datepicker({format: "yyyy-mm-dd"}).on('changeDate', function(ev){
|
||||
self.selectedItem().operation_date(new Date(ev.date.valueOf()));
|
||||
});
|
||||
|
||||
$("#operation_date_clear").click(function(e){
|
||||
self.selectedItem().operation_date(null);
|
||||
});
|
||||
};
|
||||
|
||||
self.save = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user