mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-27 07:58:31 +01:00
presentation of details in tooltip
This commit is contained in:
parent
ca3f254608
commit
e4ebcf3ee8
1 changed files with 13 additions and 1 deletions
|
@ -23,7 +23,19 @@ app.controller( 'BalanceCtrl',
|
||||||
};
|
};
|
||||||
$scope.toolTipContentFunction = function() {
|
$scope.toolTipContentFunction = function() {
|
||||||
return function( key, x, y, e, graph ) {
|
return function( key, x, y, e, graph ) {
|
||||||
return $filter( 'json' )( $scope.balance.details[ key ] );
|
//return $filter( 'json' )( $scope.balance.details[ key ] );
|
||||||
|
var details = $scope.balance.details[ key ];
|
||||||
|
return '<h3>' + details.key + '</h3>'
|
||||||
|
+ '<table><tr><th>Date</th><th>Payee</th><th>Amount</th></tr>'
|
||||||
|
+ _(details.values).map( function( transaction ) {
|
||||||
|
return '<tr><td>'
|
||||||
|
+ transaction.date + '</td><td>'
|
||||||
|
+ transaction.payee + '</td><td style="text-align: right">'
|
||||||
|
+ transaction.amount + ' '
|
||||||
|
+ transaction.currency + '</td></tr>';
|
||||||
|
}).join( '' )
|
||||||
|
+ '</table>';
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue