Fixes on unities, remove old code
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::label('categories', 'Catégories') }}<br>
|
||||
{{ Form::label('categories', 'Rayons') }}<br>
|
||||
@include('components.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => isset($categories) ? $categories : null, 'class' => 'select2 form-control', 'multiple' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user