| Server IP : 162.214.74.102 / Your IP : 216.73.217.80 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/public_html/lrsys_apps/imobles/ui/theme/lrsys/lib/ |
Upload File : |
$(document).ready(function () {
$('#txtsearch').on('focus', function(event)
{
$(document).keypress(function(e) {
if(e.which == 13)
{
$("#search").click();
}
});
});
$('#btn-clear').on('click', function(event)
{
$("#txtsearch").val('');
$("#search").click();
});
var pbar = $('#progressbar');
pbar.hide();
pbar.progressbar({
warningMarker: 100,
dangerMarker: 100,
maximum: 100,
step: 15
});
function updateDiv(){
// $("#application_ajaxrender").html('Loading...');
$('#ibox_form').block({ message: null });
$('#progressbar').show();
var timer = setInterval(function () {
pbar.progressbar('stepIt');
}, 250);
var btnsearch = $("#search");
$('.progress').show();
$('.progress .progress-bar').progressbar();
//btnsearch.html(_L['Searching']);
//btnsearch.addClass("btn-danger");
var _url = $("#_url").val();
$.post(_url + 'search/ps/', {
txtsearch: $('#txtsearch').val(),
stype: $('#stype').val(),
type: $('input[name=type]').val()
})
.done(function (data) {
setTimeout(function () {
var sbutton = $("#search");
var result = $("#application_ajaxrender");
//sbutton.html('Search');
//sbutton.removeClass("btn-danger");
$('.progress').hide();
$('#ibox_form').unblock();
result.html(data);
result.show();
}, 200);
});
}
updateDiv();
function filter() {
// Situation
$('#filter-type a').on('click', function(event) {
event.preventDefault();
var situation = $(this).data('val');
$("input[name=type]").val(situation);
// coloco o filtro como ativo
$('#filter-type li').removeClass('active');
$('#filter-type_aux').html('');
$(this).parent().addClass('active');
if(situation != 'all')
{
$('#filter-type_aux').html('('+$(this).html()+')');
}
updateDiv();
// $('#form-filter').submit();
});
}
filter();
$("#search").click(function (e) {
e.preventDefault();
updateDiv();
});
var $modal = $('#ajax-modal');
var sysrender = $('#application_ajaxrender');
sysrender.on('click', '.cdelete', function(e){
e.preventDefault();
var id = this.id;
var lan_msg = $("#_lan_are_you_sure").val();
bootbox.confirm(lan_msg, function(result) {
if(result){
var _url = $("#_url").val();
window.location.href = _url + "delete/ps/" + id + '/';
}
});
});
sysrender.on('click', '.cedit', function(e){
e.preventDefault();
var vid = this.id;
var id = vid.replace("e", "");
var id = id.replace("t", "");
// var id = $(this).closest('tr').attr('id');
// create the backdrop and wait for next modal to be triggered
$('body').modalmanager('loading');
var _url = $("#_url").val();
setTimeout(function(){
$modal.load(_url + 'ps/edit-form/' + id, '', function(){
$modal.modal();
$('#sales_price').autoNumeric('init');
});
}, 1000);
});
$modal.on('click', '#update', function(){
$modal.modal('loading');
setTimeout(function(){
var _url = $("#_url").val();
$.post(_url + 'ps/edit-post/', $('#edit_form').serialize(), function(data){
setTimeout(function () {
var _url = $("#_url").val();
if ($.isNumeric(data)) {
location.reload();
}
else {
$modal
.modal('loading')
.find('.modal-body')
.prepend('<div class="alert alert-danger fade in">' + data +
'</div>');
}
}, 2000);
});
}, 1000);
});
});