forked from DGNum/gestioCOF
use switch + move text
This commit is contained in:
parent
db94a8904c
commit
fc2de20ab8
1 changed files with 29 additions and 22 deletions
|
@ -15,18 +15,22 @@ function KHistory(options={}) {
|
||||||
|
|
||||||
var trigramme = opegroup['on_acc_trigramme'];
|
var trigramme = opegroup['on_acc_trigramme'];
|
||||||
var is_cof = opegroup['is_cof'];
|
var is_cof = opegroup['is_cof'];
|
||||||
if (opegroup['type'] == 'opegroup') {
|
var type = opegroup['type']
|
||||||
for (var i=0; i<opegroup['opes'].length; i++) {
|
switch (type) {
|
||||||
var $ope = this._opeHtml(opegroup['opes'][i], is_cof, trigramme);
|
case 'opegroup':
|
||||||
$ope.data('opegroup', opegroup['id']);
|
for (var i=0; i<opegroup['opes'].length; i++) {
|
||||||
$opegroup.after($ope);
|
var $ope = this._opeHtml(opegroup['opes'][i], is_cof, trigramme);
|
||||||
}
|
$ope.data('opegroup', opegroup['id']);
|
||||||
} else {
|
$opegroup.after($ope);
|
||||||
for (var i=0; i<opegroup['opes'].length; i++) {
|
}
|
||||||
var $transfer = this._transferHtml(opegroup['opes'][i]);
|
break;
|
||||||
$transfer.data('transfergroup', opegroup['id']);
|
case 'transfergroup':
|
||||||
$opegroup.after($transfer);
|
for (var i=0; i<opegroup['opes'].length; i++) {
|
||||||
}
|
var $transfer = this._transferHtml(opegroup['opes'][i]);
|
||||||
|
$transfer.data('transfergroup', opegroup['id']);
|
||||||
|
$opegroup.after($transfer);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,15 +108,19 @@ function KHistory(options={}) {
|
||||||
var type = opegroup['type'];
|
var type = opegroup['type'];
|
||||||
|
|
||||||
|
|
||||||
if (type == 'opegroup') {
|
switch (type) {
|
||||||
var $opegroup_html = $(this.template_opegroup);
|
case 'opegroup':
|
||||||
var trigramme = opegroup['on_acc__trigramme'];
|
var $opegroup_html = $(this.template_opegroup);
|
||||||
var amount = amountDisplay(
|
var trigramme = opegroup['on_acc__trigramme'];
|
||||||
parseFloat(opegroup['amount']), opegroup['is_cof'], trigramme);
|
var amount = amountDisplay(
|
||||||
} else {
|
parseFloat(opegroup['amount']), opegroup['is_cof'], trigramme);
|
||||||
var $opegroup_html = $(this.template_transfergroup);
|
break;
|
||||||
var trigramme = '';
|
case 'transfergroup':
|
||||||
var amount = '' ;
|
var $opegroup_html = $(this.template_transfergroup);
|
||||||
|
$opegroup_html.find('.infos').text('Transferts').end()
|
||||||
|
var trigramme = '';
|
||||||
|
var amount = '' ;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var at = dateUTCToParis(opegroup['at']).format('HH:mm:ss');
|
var at = dateUTCToParis(opegroup['at']).format('HH:mm:ss');
|
||||||
|
@ -123,7 +131,6 @@ function KHistory(options={}) {
|
||||||
.data('id', opegroup['id'])
|
.data('id', opegroup['id'])
|
||||||
.find('.time').text(at).end()
|
.find('.time').text(at).end()
|
||||||
.find('.trigramme').text(trigramme).end()
|
.find('.trigramme').text(trigramme).end()
|
||||||
.find('.infos').text("Transferts").end()
|
|
||||||
.find('.amount').text(amount).end()
|
.find('.amount').text(amount).end()
|
||||||
.find('.comment').text(comment).end();
|
.find('.comment').text(comment).end();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue