| 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/imobles/application/plugins/module_imobles/assets/js/ |
Upload File : |
/* global ind_mil, curr_code, ind_decimal, bootbox */
function getTowers(unitTypeID){
var unitTypeID = $("#module_imobles_enterprise_units_type_id").val();
if (unitTypeID != null){
findDataSelect("#module_imobles_enterprise_towers_id", 'module_imobles/unity/towersUnity/' + unitTypeID, '');
}
}
$(document).ready(function ()
{
var _url = $("#_url").val();
$("#emsg").hide();
findDataSelect("#module_imobles_enterprise_units_type_id", 'module_imobles/ajax/type_unity', '');
findDataSelect("#module_imobles_units_amenities_id", 'module_imobles/ajax/units_amenities', '');
// Carrego as torres na entrada da página e ao selecionar Tipo de Unidade
getTowers();
$("#module_imobles_enterprise_units_type_id").on("change", function(){
getTowers();
});
$(".monetary").maskMoney({
thousands: ind_mil,
decimal: ind_decimal
});
$("#submit_unity").click(function (e) {
$.ajax(
{
type: 'POST',
url: _url + "module_imobles/unity/post",
data: new FormData($("#form-unity")[0]),
processData: false,
contentType: false,
success: function (data) {
if (data == "OK") {
location.reload();
} else {
var body = $("html, body");
body.animate({scrollTop: 0}, '1000', 'swing');
$("#emsgbody").html(data);
$("#emsg").show("slow");
}
}
});
});
//NOVO AMENITES
var _msg_add_new_unity_amenities = $("#_msg_add_new_unity_amenities").val();
var _msg_unity_amenities_name = $("#_msg_unity_amenities_name").val();
var _msg_edit = $("#_msg_edit").val();
var _msg_ok = $("#_msg_ok").val();
var _msg_cancel = $("#_msg_cancel").val();
var ib_form_bootbox_amenities_amenities = "<form class=\"form-horizontal push-10\" method=\"post\" onsubmit=\"return false;\">\n <div class=\"form-unity_amenities row\">\n <div class=\"col-xs-12\">\n <div class=\"form-material floating\">\n <input class=\"form-control\" unity_amenities=\"text\" id=\"unity_amenities_name\" name=\"unity_amenities_name\">\n <label for=\"unity_amenities_name\">" + _msg_unity_amenities_name + "</label>\n </div>\n </div>\n </div>\n\n</form>";
$("#add_new_unity_amenities").click(function (e) {
e.preventDefault();
var box_amenities = bootbox.dialog({
title: _msg_add_new_unity_amenities,
message: ib_form_bootbox_amenities_amenities,
buttons: {
success: {
label: $("#_msg_save").val(),
className: "btn-primary",
callback: function () {
var unity_amenities_name_val = $('#unity_amenities_name').val();
$.post(_url + "module_imobles/unitsamenities/post/", {name: unity_amenities_name_val})
.done(function (data) {
if (data == 'OK') {
toastr.success($('#_msg_saved').val());
} else {
bootbox.alert(data);
}
});
}
}
},
show: false
}
);
box_amenities.modal('show');
});
$("#module_imobles_enterprise_units_type_id").on('change', function () {
$("#module_imobles_enterprise_towers_id").val("").trigger("change");
});
});