forked from DGNum/gestioCOF
send data for cancel
This commit is contained in:
parent
0b61a48c65
commit
2c2da60e54
2 changed files with 7 additions and 5 deletions
|
@ -22,7 +22,6 @@ function KHistory(options={}) {
|
|||
$opegroup.after($ope);
|
||||
}
|
||||
} else {
|
||||
$opegroup.addClass("transfergroup");
|
||||
for (var i=0; i<opegroup['opes'].length; i++) {
|
||||
var $transfer = this._transferHtml(opegroup['opes'][i]);
|
||||
$transfer.data('transfergroup', opegroup['id']);
|
||||
|
@ -50,7 +49,8 @@ function KHistory(options={}) {
|
|||
}
|
||||
|
||||
$ope_html
|
||||
.data('ope', ope['id'])
|
||||
.data('type', 'ope')
|
||||
.data('id', ope['id'])
|
||||
.find('.amount').text(amount).end()
|
||||
.find('.infos1').text(infos1).end()
|
||||
.find('.infos2').text(infos2).end();
|
||||
|
@ -73,7 +73,8 @@ function KHistory(options={}) {
|
|||
var amount = parsed_amount.toFixed(2) + '€';
|
||||
|
||||
$transfer_html
|
||||
.data('transfer', transfer['id'])
|
||||
.data('type', 'transfer')
|
||||
.data('id', transfer['id'])
|
||||
.find('.amount').text(amount).end()
|
||||
.find('.infos1').text(transfer['from_acc']).end()
|
||||
.find('.infos2').text(transfer['to_acc']).end();
|
||||
|
@ -115,7 +116,8 @@ function KHistory(options={}) {
|
|||
var comment = opegroup['comment'] || '';
|
||||
|
||||
$opegroup_html
|
||||
.data(type, opegroup['id'])
|
||||
.data('type', type)
|
||||
.data('id', opegroup['id'])
|
||||
.find('.time').text(at).end()
|
||||
.find('.trigramme').text(trigramme).end()
|
||||
.find('.info').text("Transferts").end()
|
||||
|
|
|
@ -157,7 +157,7 @@ $(document).ready(function() {
|
|||
// DEL (Suppr)
|
||||
var opes_to_cancel = [];
|
||||
khistory.$container.find('.ope.ui-selected').each(function () {
|
||||
opes_to_cancel.push($(this).data('ope'));
|
||||
opes_to_cancel.push($(this).data('type')+' '+$(this).data('id'));
|
||||
});
|
||||
if (opes_to_cancel.length > 0)
|
||||
confirmCancel(opes_to_cancel);
|
||||
|
|
Loading…
Reference in a new issue