Changed the way we point entries. Closes #4.

This commit is contained in:
Alexis Lahouze
2013-01-26 01:15:07 +01:00
parent e4e74eea9f
commit 3cd9304689
8 changed files with 53 additions and 45 deletions

View File

@ -84,7 +84,7 @@
<thead>
<tr>
<th style="width: 100px">Date de valeur</th>
<th style="width: 100px">Date de l'op.</th>
<!--<th style="width: 100px">Date de l'op.</th>-->
<th>Libell&eacute; de l'op&eacute;ration</th>
<th style="width: 50px">Montant</th>
<th style="width: 50px">Solde</th>
@ -179,8 +179,6 @@
<!-- Displayed item template -->
<script id="itemsTmpl" type="text/html">
<tr data-bind="css: { 'warning': sold() < 0 && sold() >= $root.account().authorized_overdraft(), 'error': sold() < $root.account().authorized_overdraft() }">
<td data-bind="text: value_date"></td>
<td data-bind="text: operation_date"></td>
<td data-bind="text: label"></td>
@ -189,7 +187,7 @@
<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: operation_date() ? pointedsold : '', css: {'text-warning': pointedsold() < 0 && pointedsold() >= $root.account().authorized_overdraft(), 'text-error': pointedsold() < $root.account().authorized_overdraft() }"></td>
<td data-bind="text: pointed() ? pointedsold : '', css: {'text-warning': pointedsold() < 0 && pointedsold() >= $root.account().authorized_overdraft(), 'text-error': pointedsold() < $root.account().authorized_overdraft() }"></td>
<td data-bind="text: category"></td>
@ -197,6 +195,7 @@
<div class="btn-group">
<a class="btn btn-mini" data-bind="click: $root.edit" href="#" title="edit"><i class="icon-edit"></i></a>
<a class="btn btn-mini" data-bind="click: $root.remove" href="#" title="remove"><i class="icon-trash"></i></a>
<a class="btn btn-mini" data-bind="css: {'active': pointed}, click: $root.pointEntry" href="#" title="point"><i class="icon-pencil"></i></a>
</div>
</td>
</tr>
@ -205,8 +204,6 @@
<!-- New item template -->
<script id="newTmpl" type="text/html">
<tr class="form-inline">
<td><input type="date" class="input-small" data-bind="value: value_date" data-date-format="yyyy-mm-dd" id="new_value_date" /></td>
<td><input type="date" class="input-small" data-bind="value: operation_date" data-date-format="yyyy-mm-dd" id="new_operation_date" /></td>
<td><input type="text" class="input-xxlarge" data-bind="value: label"/></td>
@ -223,6 +220,7 @@
<div class="btn-group">
<a class="btn btn-mini btn-success" data-bind="click: $root.save" href="#" title="Add"><i class="icon-plus"></i></a>
<a class="btn btn-mini" data-bind="click: $root.cancel" href="#" title="Clear"><i class="icon-remove"></i></a>
<a class="btn btn-mini" data-bind="css: {'active': pointed}, click: $root.pointEntry" href="#" title="point"><i class="icon-pencil"></i></a>
</div>
</td>
</tr>
@ -231,8 +229,6 @@
<!-- Edit item template -->
<script id="editTmpl" type="text/html">
<tr class="form-inline" data-bind="css: { 'warning': sold() < 0 && sold() >= $root.account().authorized_overdraft(), 'error': sold() < $root.account().authorized_overdraft() }">
<td><input type="date" class="input-small" data-bind="value: value_date" data-date-format="yyyy-mm-dd" id="value_date" /></td>
<td><input type="date" class="input-small" data-bind="value: operation_date" data-date-format="yyyy-mm-dd" id="operation_date" /></td>
<td><input type="text" class="input-xxlarge" data-bind="value: label"/></td>
@ -245,10 +241,11 @@
<td><input type="text" class="input-small" data-bind="value: category, typeahead: {source: $root.categories }" /></td>
<td class="btn-group">
<td>
<div class="btn-group">
<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" data-bind="click: $root.cancel" href="#" title="Cancel"><i class="icon-ban-circle"></i></a>
<a class="btn btn-mini" data-bind="css: {'active': pointed}, click: $root.pointEntry" href="#" title="point"><i class="icon-pencil"></i></a>
</div>
</td>
</tr>