Voici le script d'origine http://www.jeasyui.com/tutorial/dd/dnd2.php
Le code de retirer un article du pagnier n'est pas développé.
J'ai changer les articles t shirt en lingerie
et voici le code de retrait des articles des pagniers
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 var data = {"total":0,"rows":[]}; var totalCost = 0; var price = 0; var row = 0; function destroyItem(){ var row = $('#cartcontent').datagrid('getSelected'); if (row){ $.messager.confirm('Confirm','Etes vous sur d enlever le et les articles selectionne(s)?',function(r){ if (r){ var index = $('#cartcontent').datagrid('getRowIndex',row); // alert("index "+index); // $.get('TextAjax',{id:index},function(){}); $.get('RetirerPannier',{id:index},function(){}); $('#cartcontent').datagrid('deleteRow',index); totalCost = totalCost - row.quantity*row.price; $('#cartcontent').datagrid('loadData', data); $('div.cart .total').html('Total: '+totalCost); }; }); } }
Partager