| 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/leo/application/plugins/module_imobles/assets/js/ |
Upload File : |
var _url = $("#_url").val();
function filter() {
// findDataSelect("#city_id", 'module_imobles/enterprise_unitys/cities', '');
// findDataSelectAndIn("#neighborhoods", 'module_imobles/enterprise_unitys/neighborhoods', '', "#city_id");
// findDataSelect("#module_imobles_enterprise_unity_standard_id", 'module_imobles/ajax/enterprise_unity_standard', '');
findDataSelect("#module_imobles_enterprise_id", 'module_imobles/ajax/enterprises', '');
findDataSelect("#module_imobles_unity_type_id", 'module_imobles/ajax/unity_types/'+$('#module_imobles_enterprise_id').val(), '');
// findDataSelect("#module_imobles_units_amenities", 'module_imobles/ajax/units_amenities', '');
// 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();
});
// Clear
$('#filter-clear').on('click', function (event) {
event.preventDefault();
$("#module_imobles_enterprise_id").val('');
$("#module_imobles_unity_type_id").val('');
$("#unavailable").val('all');
$('#form-filter').submit();
});
$('body').on('click', '#filter-post', function (event) {
event.preventDefault();
$('#form-filter').submit();
});
$('#city_id').on('change', function (event) {
event.preventDefault();
$('#form-filter').submit();
});
$('#module_imobles_enterprise_id').on('change', function (event) {
event.preventDefault();
$("#module_imobles_unity_type_id").empty();
findDataSelect("#module_imobles_unity_type_id", 'module_imobles/ajax/unity_types/'+$('#module_imobles_enterprise_id').val(), '');
});
$('#module_imobles_unity_type_id').on('click', function (event) {
event.preventDefault();
findDataSelect("#module_imobles_unity_type_id", 'module_imobles/ajax/unity_types/'+$('#module_imobles_enterprise_id').val(), '');
});
$('#unavailable').on('change', function (event) {
event.preventDefault();
$('#form-filter').submit();
});
$('body').on('click', ".alter_enable", function (event) {
event.preventDefault();
var id = $(this).data("id");
$.post(_url + "module_imobles/enterprise_unitys/alterenable", {id: $(this).data("id"), value: $(this).data("value")})
.done(function (result) {
var data = JSON.parse(result);
if (data.status == "OK") {
toastr.success(data.msg);
$(".alter_table_" + id).toggleClass("hide");
} else {
var body = $("html, body");
body.animate({scrollTop: 0}, '1000', 'swing');
$("#emsgbody").html(data.msg);
$("#emsg").show("slow");
}
});
});
$('body').on('click', ".alter_disponible", function (event) {
event.preventDefault();
var id = $(this).data("id");
var value = $(this).data("value");
var msg = $(this).data("msg");
bootbox.dialog({
message: msg,
buttons: {
'cancel': {
label: "Cancelar"
},
'confirm': {
label: "Enviar",
callback: function () {
$.post(_url + "module_imobles/unity/alterdisponible", {id: id, value: value})
.done(function (result) {
var data = JSON.parse(result);
if (data.status == "OK") {
toastr.success(data.msg);
$(".alter_disponible_" + id + "_0").addClass("hide");
$(".alter_disponible_" + id + "_1").addClass("hide");
$(".alter_disponible_" + id + "_" + value).removeClass("hide");
} else {
var body = $("html, body");
body.animate({scrollTop: 0}, '1000', 'swing');
$("#emsgbody").html(data.msg);
$("#emsg").show("slow");
}
});
}}}});
});
}
$(function () {
filter();
});