mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-09 14:14:10 +01:00
Fix selezione categoria
This commit is contained in:
parent
e1943eba93
commit
134093eaac
@ -148,7 +148,7 @@ percentuale = 0;
|
||||
|
||||
$(document).ready(function () {
|
||||
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() {
|
||||
updateSelectOption("id_categoria", $(this).val());
|
||||
@ -157,11 +157,11 @@ $(document).ready(function () {
|
||||
sub.selectReset();
|
||||
|
||||
if($(this).val()){
|
||||
sub.parent().find(".input-group-addon 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").removeClass("hide");
|
||||
sub.parent().find(".input-group-append button").attr("onclick", original.replace('&ajax=yes', "&ajax=yes&id_original=" + $(this).val()));
|
||||
}
|
||||
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">
|
||||
$(document).ready(function () {
|
||||
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() {
|
||||
updateSelectOption("id_categoria", $(this).val());
|
||||
@ -80,11 +80,11 @@ $(document).ready(function () {
|
||||
sub.selectReset();
|
||||
|
||||
if($(this).val()){
|
||||
sub.parent().find(".input-group-addon 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").removeClass("hide");
|
||||
sub.parent().find(".input-group-append button").attr("onclick", original.replace('&ajax=yes', "&ajax=yes&id_original=" + $(this).val()));
|
||||
}
|
||||
else {
|
||||
sub.parent().find(".input-group-addon button").addClass("hide");
|
||||
sub.parent().find(".input-group-append button").addClass("hide");
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user