Fix selezione categoria
This commit is contained in:
parent
e1943eba93
commit
134093eaac
|
@ -148,7 +148,7 @@ percentuale = 0;
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var sub = $('#add-form').find('#subcategoria_add');
|
var sub = $('#add-form').find('#subcategoria_add');
|
||||||
var original = sub.parent().find(".input-group-addon button").attr("onclick");
|
var original = sub.parent().find(".input-group-append button").attr("onclick");
|
||||||
|
|
||||||
$('#add-form').find('#categoria').change(function() {
|
$('#add-form').find('#categoria').change(function() {
|
||||||
updateSelectOption("id_categoria", $(this).val());
|
updateSelectOption("id_categoria", $(this).val());
|
||||||
|
@ -157,11 +157,11 @@ $(document).ready(function () {
|
||||||
sub.selectReset();
|
sub.selectReset();
|
||||||
|
|
||||||
if($(this).val()){
|
if($(this).val()){
|
||||||
sub.parent().find(".input-group-addon button").removeClass("hide");
|
sub.parent().find(".input-group-append button").removeClass("hide");
|
||||||
sub.parent().find(".input-group-addon button").attr("onclick", original.replace('&ajax=yes', "&ajax=yes&id_original=" + $(this).val()));
|
sub.parent().find(".input-group-append button").attr("onclick", original.replace('&ajax=yes', "&ajax=yes&id_original=" + $(this).val()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sub.parent().find(".input-group-addon button").addClass("hide");
|
sub.parent().find(".input-group-append button").addClass("hide");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ $id_modulo_categorie_impianti = Module::where('name', 'Categorie impianti')->fir
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var sub = $('#add-form').find('#sottocategoria_add');
|
var sub = $('#add-form').find('#sottocategoria_add');
|
||||||
var original = sub.parent().find(".input-group-addon button").attr("onclick");
|
var original = sub.parent().find(".input-group-append button").attr("onclick");
|
||||||
|
|
||||||
$('#add-form').find('#id_categoria').change(function() {
|
$('#add-form').find('#id_categoria').change(function() {
|
||||||
updateSelectOption("id_categoria", $(this).val());
|
updateSelectOption("id_categoria", $(this).val());
|
||||||
|
@ -80,11 +80,11 @@ $(document).ready(function () {
|
||||||
sub.selectReset();
|
sub.selectReset();
|
||||||
|
|
||||||
if($(this).val()){
|
if($(this).val()){
|
||||||
sub.parent().find(".input-group-addon button").removeClass("hide");
|
sub.parent().find(".input-group-append button").removeClass("hide");
|
||||||
sub.parent().find(".input-group-addon button").attr("onclick", original.replace('&ajax=yes', "&ajax=yes&id_original=" + $(this).val()));
|
sub.parent().find(".input-group-append button").attr("onclick", original.replace('&ajax=yes', "&ajax=yes&id_original=" + $(this).val()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sub.parent().find(".input-group-addon button").addClass("hide");
|
sub.parent().find(".input-group-append button").addClass("hide");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue