| 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/hexagon/application/plugins/module_fish/assets/js/ |
Upload File : |
/* global _L */
function dropdown() {
$('.dropdown-advanced').click(function (event) {
event.stopPropagation();
});
$('.dropdown-period').click(function (event) {
event.stopPropagation();
});
}
function filter() {
$('#crm_accounts_id').on('change', function(event) {
event.preventDefault();
$("#module_fish_lots_id").val("");
$("#module_fish_tank_id").val("");
$('#form-filter').submit();
});
$('#module_fish_lots_id').on('change', function(event) {
event.preventDefault();
$("#module_fish_tank_id").val("");
$('#form-filter').submit();
});
$('#module_fish_tank_id').on('change', function(event) {
event.preventDefault();
$('#form-filter').submit();
});
$('#module_fish_species_id').on('change', function(event) {
event.preventDefault();
$('#form-filter').submit();
});
// Advanced
$('#items_per_page').on('change', function(event) {
event.preventDefault();
var items = $(this).find('option:selected').val();
$("input[name=items_per_page]").val(items);
$('#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) {
event.preventDefault();
var ini = $('input[name=p_ini]').val();
$("input[name=period_ini]").val(ini.split('/').reverse().join('-'));
var end = $('input[name=p_end]').val();
$("input[name=period_end]").val(end.split('/').reverse().join('-'));
if(ini.length > 0 && end.length > 0)
$("input[name=period]").val('interval');
$('#form-filter').submit();
});
// Clear
$('#filter-clear').on('click', function(event) {
event.preventDefault();
$("#crm_accounts_id").val('');
$("#module_fish_lots_id").val('');
$("#module_fish_tank_id").val('');
$("#module_fish_species_id").val('');
$("input[name=period]").val('');
$("input[name=period_ini]").val('');
$("input[name=period_end]").val('');
$('#form-filter').submit();
});
findDataSelect("#crm_accounts_id", $("#_client_view").val()+'module_fish/ajax/Associated', _L['Module_Fish Select Associated']);
findDataSelect("#module_fish_species_id", $("#_client_view").val()+'module_fish/ajax/species', _L['Module_Fish Select Specie']);
findDataSelect("#module_fish_lots_id", $("#_client_view").val()+'module_fish/ajax/lotsAssociated/'+$("#crm_accounts_id").val()+"/n", _L['Module_Fish Select Lote']);
findDataSelect("#module_fish_tank_id", $("#_client_view").val()+'module_fish/ajax/tankLots/'+$("#module_fish_lots_id").val(), _L['Module_Fish Select Tank']);
}
$(function(){
filter();
dropdown();
$("#nav_table").click();
});