Fixes on unities, remove old code

This commit is contained in:
Ludovic CANDELLIER
2021-04-01 22:26:50 +02:00
parent a7881e4261
commit ce50d2da5e
26 changed files with 253 additions and 609 deletions

View File

@@ -10,10 +10,9 @@
<script>
function append_price() {
// handle_append_attribute();
$('.select2').select2();
handle_change_package();
load_unities($('.unities'), $('.package').val());
load_unities($('.unities'), $('.packages').val());
}
$("#append_price").appender({
@@ -30,7 +29,7 @@
});
function handle_change_package() {
$('.package').change( function() {
$('.packages').change( function() {
var package_id = $(this).val();
var $package = $(this);
var $parent = $package.parent().parent();
@@ -40,7 +39,7 @@
}
function init_unities() {
$('.package').each( function() {
$('.packages').each( function() {
var package_id = $(this).val();
var $package = $(this);
var $parent = $package.parent().parent();
@@ -91,7 +90,9 @@
})
}
$(function() {
handle_change_package();
});
</script>
@endpush