| 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/mundotennis/application/plugins/module_events/assets/js/ |
Upload File : |
$(document).ready(function()
{
$('#interval').mask('99');
$('#simultaneous').mask('9');
$(".select2").select2({});
$(".date-picker").datepicker().on('changeDate',function(e) {
$('.date-picker').datepicker('hide');
});
var _url = $("#_url").val();
$("#emsg").hide();
$("#submit").on('click', function (e) {
e.preventDefault();
$("#ibox-form").block({message: block_msg});
$.post(_url + "module_events/diary/post", $("#form-diary").serialize())
.done(function (data) {
if ($.isNumeric(data)) {
location.reload();
} else {
$("#ibox-form").unblock();
var body = $("html, body");
body.animate({scrollTop: 0}, '1000', 'swing');
$("#emsgbody").html(data);
$("#emsg").show("slow");
}
});
});
$(".clss_hr").on("keyup", function () {
validate = $(this).val().split(":");
if ((validate[0] > 23) ||
(validate[1] > 59)) {
$(this).val('');
$(this).focus();
return;
}
});
$('.redf_hr_on').hide();
$('.redf_hr').on('click', function () {
$('.redf_hr_on').show();
});
$('.clse_redf_hr').on('click', function () {
$('.redf_hr_on').hide();
});
$('.redf_hr_func').on('click', function () {
if ($('#nv_hr_ini_mn').val() != '') {
$('.hr_ini_manha').val($('#nv_hr_ini_mn').val());
}
if ($('#nv_hr_fim_mn').val() != '') {
$('.hr_fim_manha').val($('#nv_hr_fim_mn').val());
}
if ($('#nv_hr_ini_tr').val() != '') {
$('.hr_ini_tard').val($('#nv_hr_ini_tr').val());
}
if ($('#nv_hr_fim_tr').val() != '') {
$('.hr_fim_tard').val($('#nv_hr_fim_tr').val());
}
});
//set interval para atualizar a hora do servidor
setInterval( function () {
$.get($("#_url").val()+"ajax/date_time", function(dados){
$("#hour").html(dados);
});
}, 5000 );
$.get($("#_url").val()+"ajax/date_time", function(dados){
$("#hour").html(dados);
});
// Acrescenta linha de tipo de Ticket
var rowNumTicketType = 0;
$('.add_ticket_type').on('click', function () {
console.log(rowNumTicketType);
if(rowNumTicketType == 0)
{
$("#ticket_type_tbody")
.append(
'<tr>\n\
<td class="col-md-1">Titulo</td>\
<td class="col-md-1">Descrição</td>\
</tr>'
);
}
$("#ticket_type_tbody")
.append(
'<tr class="itm_nm_ftura" id="ticket_type_row_' + rowNumTicketType + '">\n\
<td class="">\n\
<input type="text" data-row="' + rowNumTicketType + '" class="form-control" value="" name="ticket_type_title[]" maxlength="60" id="ticket_type_title_' + rowNumTicketType + '">\n\
</td>\
<td class="">\n\
<input type="text" data-row="' + rowNumTicketType + '" class="form-control" value="" name="ticket_type_description[]" maxlength="60" id="ticket_type_description_' + rowNumTicketType + '">\n\
</td>\
</tr>'
);
rowNumTicketType = rowNumTicketType+1;
});
// Retira linha de tipo de ticket
$('.remove_ticket_type').on('click', function ()
{
$('#ticket_type_row_' + (rowNumTicketType-1)).remove();
rowNumTicketType = rowNumTicketType-1;
if(rowNumTicketType == 0)
{
$('#ticket_type_tbody').children().last().remove();
}
});
// Acrescenta linha de tipo de Ticket
var rowNumHotelType = 0;
$('.add_hotel_type').on('click', function () {
if(rowNumHotelType == 0)
{
$("#hotel_type_tbody")
.append(
'<tr>\n\
<td class="col-md-1">Nome</td>\
<td class="col-md-1">Endereço</td>\
<td class="col-md-1">Link</td>\
<td class="col-md-1">Descrição</td>\
</tr>'
);
}
$("#hotel_type_tbody")
.append(
'<tr class="itm_nm_ftura" id="hotel_type_row_' + rowNumHotelType + '">\n\
<td class="">\n\
<input type="text" class="form-control" value="" name="hotel_type_name[]" maxlength="120" id="hotel_type_name_' + rowNumHotelType + '">\n\
</td>\
<td class="">\n\
<input type="text" class="form-control" value="" name="hotel_type_address[]" maxlength="600" id="hotel_type_address_' + rowNumHotelType + '">\n\
</td>\
<td class="">\n\
<input type="text" class="form-control" value="" name="hotel_type_link[]" maxlength="600" id="hotel_type_link_' + rowNumHotelType + '">\n\
</td>\
<td class="">\
<textarea class="form-control" value="" name="hotel_type_description[]" id="hotel_type_description_' + rowNumHotelType + '"></textarea>\
</td>\
</tr>'
);
rowNumHotelType = rowNumHotelType+1;
});
// Retira linha de tipo de ticket
$('.remove_hotel_type').on('click', function ()
{
$('#hotel_type_row_' + (rowNumHotelType-1)).remove();
rowNumHotelType = rowNumHotelType-1;
if(rowNumHotelType == 0)
{
$('#hotel_type_tbody').children().last().remove();
}
});
});