Fixed coloring of edited rows.

This commit is contained in:
Alexis Lahouze 2013-01-25 01:02:00 +01:00
parent c7245581e3
commit c60462018e

View File

@ -167,13 +167,13 @@
<script id="editTmpl" type="text/html"> <script id="editTmpl" type="text/html">
<tr data-bind="css: { 'error': sold() < 0 }"> <tr data-bind="css: { 'warning': sold() < 0 && sold() >= $root.account().authorized_overdraft(), 'error': sold() < $root.account().authorized_overdraft() }">
<td><div class="date"><input type="text" class="input-small" data-bind="value: value_date" data-date-format="yyyy-mm-dd" id="value_date"></input></div></td> <td><div class="date"><input type="text" class="input-small" data-bind="value: value_date" data-date-format="yyyy-mm-dd" id="value_date"></input></div></td>
<td><div class="input-append date"><input type="text" class="input-small" data-bind="value: operation_date" data-date-format="yyyy-mm-dd" id="operation_date"></input><button class="btn" type="button" data-bind="click: function(item) { item.operation_date(null)}"><i class="icon-remove"></i></button></div></td> <td><div class="input-append date"><input type="text" class="input-small" data-bind="value: operation_date" data-date-format="yyyy-mm-dd" id="operation_date"></input><button class="btn" type="button" data-bind="click: function(item) { item.operation_date(null)}"><i class="icon-remove"></i></button></div></td>
<td><input type="text" class="input-xxlarge" data-bind="value: label"/></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><input type="text" class="input-mini" data-bind="value: value"/></td>
<td data-bind="text: sold"></td> <td data-bind="text: sold, css: {'text-warning': sold() < 0 && sold() >= $root.account().authorized_overdraft(), 'text-error': sold() < $root.account().authorized_overdraft() }"></td>
<td data-bind="text: pointedsold"></td> <td data-bind="text: operation_date() ? pointedsold : '', css: {'text-warning': pointedsold() < 0 && pointedsold() >= $root.account().authorized_overdraft(), 'text-error': pointedsold() < $root.account().authorized_overdraft() }"></td>
<td><input type="text" class="input-small" data-bind="value: category, typeahead: {source: $root.categories }" /></td> <td><input type="text" class="input-small" data-bind="value: category, typeahead: {source: $root.categories }" /></td>
<td class="buttons"> <td class="buttons">
<a class="btn btn-mini btn-success" data-bind="click: $root.save" href="#" title="save"><i class="icon-ok"></i></a> <a class="btn btn-mini btn-success" data-bind="click: $root.save" href="#" title="save"><i class="icon-ok"></i></a>