| Server IP : 162.214.74.102 / Your IP : 216.73.216.192 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_apps/dialogo/application/plugins/module_fish/assets/js/ |
Upload File : |
function dropdown() {
$('.dropdown-advanced').click(function (event) {
event.stopPropagation();
});
$('.dropdown-period').click(function (event) {
event.stopPropagation();
});
}
function filter() {
// $('#module_fish_species_id').on('change', function(event) {
// event.preventDefault();
// $("input[name=module_fish_species_id]").val($("#module_fish_species_id").val());
// $('#form-filter').submit();
// });
// Period all, day, week, month
$('#filter-period a').on('click', function(event) {
event.preventDefault();
var period = $(this).data('val');
$("input[name=period]").val(period);
$('#form-filter').submit();
});
// Period interval datepicker close on selected
$('input[name=p_ini]').on('change', function() {
$(this).datepicker('hide');
});
$('input[name=p_end]').on('change', function() {
$(this).datepicker('hide');
});
// Period interval
$('#period-filter-interval').on('click', function(event) {
$('#form-filter').submit();
});
// Clear
$('#filter-clear').on('click', function(event) {
event.preventDefault();
limparSelecao();
$("input[name=module_fish_species_id]").val('');
$("input[name=period]").val('');
$("input[name=period_ini]").val('');
$("input[name=period_end]").val('');
$("input[name=average_weight_ini]").val('');
$("input[name=average_weight_end]").val('');
$("input[name=biomass_ini]").val('');
$("input[name=biomass_end]").val('');
$('#form-filter').submit();
});
$('#filter-search').on('click', function(event) {
event.preventDefault();
$('#form-filter').submit();
});
findDataSelect("#module_fish_species_id", $("#_client_view").val()+'module_fish/ajax/species', _L['Module_Fish Select Specie']);
}
$(function(){
filter();
dropdown();
$('.weight_kg').autoNumeric('init', {aSep: ind_mil, aDec: ind_decimal, mDec: 3, aSign:''});
$(".group_lote").change(function () {
$(".group_lote_"+$(this).val()).prop('checked', $(this).prop("checked"));
});
$(".lote").change(function () {
verifylotes();
});
verifylotes();
$(".open_close").on('click', function(event) {
$(this).toggleClass("fa-plus fa-minus");
$(".list_group_"+$(this).attr('data-group')).toggleClass("hide");
});
//função para abrir e mostrar caso exista selecionados dentro do grupo do lote
$(".group_lote").each(function (f) {
var open=false;
$(".group_lote_"+$(this).val()).each(function (f) {
if($(this).prop('checked')==true){
open=true;
}
});
if(open){
$('.open_close_'+$(this).val()).toggleClass("fa-plus fa-minus");
$(".list_group_"+$(this).val()).toggleClass("hide");
}
});
});
//função que veridica se o grupo do lote, todos estão selecionados ou se algum foi desmarcado, com isso, ele gerencia a marcação do grupo do lote
function verifylotes(){
$(".group_lote").each(function (f) {
var todos=true;
$(".group_lote_"+$(this).val()).each(function (f) {
if($(this).prop('checked')==false){
$("#lote_"+$(this).attr('data-group')).prop('checked', false);
todos=false;
}
});
if(todos){
$("#lote_"+$(this).val()).prop('checked', true);
}
});
}
function limparSelecao() {
$(".all_checks").prop('checked', false);
}
function selecionarTodos() {
$(".all_checks").prop('checked', true);
}