| Server IP : 162.214.74.102 / Your IP : 216.73.217.46 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 : |
/* global ind_mil, curr_code, ind_decimal */
$(document).ready(function ()
{
initFormTypeUnit();
});
function initFormTypeUnit() {
var _url = $("#_url").val();
$("#emsg").hide();
findDataSelect("#crm_account_id", 'module_imobles/ajax/accounts/1', '');
$('#module_imobles_task_category_id').select2({
theme: "bootstrap",
placeholder: _L['Select'],
ajax: {
url: $("#_url").val() + 'module_imobles/ajax/task_category/Selecione',
dataType: "json",
delay: 250,
method: "POST",
placeholder: 'Selecione',
data: function (params) {
var queryParameters = {
term: params.term,
type: returnFields('#type')
};
return queryParameters;
},
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.text,
id: item.id
}
})
};
},
cache: true,
}
});
$('#module_imobles_tasks_id').select2({
theme: "bootstrap",
placeholder: _L['Select'],
ajax: {
url: $("#_url").val() + 'module_imobles/ajax/task',
dataType: "json",
delay: 250,
method: "POST",
placeholder: 'Selecione',
data: function (params) {
var queryParameters = {
term: params.term,
module_imobles_task_category_id: returnFields('#module_imobles_task_category_id')
};
return queryParameters;
},
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.text,
id: item.id
}
})
};
},
cache: true,
}
});
$('.clockpicker').clockpicker({
donetext: 'Adicionar'
});
$("#module_imobles_task_category_id").on("change", function (e) {
$("#module_imobles_tasks_id").val("");
});
$("#type").on("change", function (e) {
$("#module_imobles_task_category_id").val("");
$("#module_imobles_tasks_id").val("");
});
$("#submit_taskcustomer").click(function (e) {
$.ajax(
{
type: 'POST',
url: _url + "module_imobles/taskcustomer/post",
data: new FormData($("#form-taskcustomer")[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");
}
}
});
});
$('#details').redactor(
{
minHeight: 200,
}
);
}