add contract
This commit is contained in:
26
frontend/web/js/transfer.usercart.js
Normal file
26
frontend/web/js/transfer.usercart.js
Normal file
@@ -0,0 +1,26 @@
|
||||
function TransferUserCart(o){
|
||||
|
||||
var defaults = {};
|
||||
|
||||
init();
|
||||
|
||||
function init(){
|
||||
defaults = $.extend(defaults,o);
|
||||
$('.select-on-check-all').click(recalculate);
|
||||
$('.cart-item').click(recalculate);
|
||||
}
|
||||
|
||||
function recalculate(){
|
||||
var items = $('.cart-item');
|
||||
var money = 0;
|
||||
items.each(function(i,e){
|
||||
if ( $(e).is(':checked')){
|
||||
money += $(e).data('money');
|
||||
}
|
||||
});
|
||||
$('#usercartform-money').val(money);
|
||||
$('.selected-money').html(money);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user