| 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/dialogo/ui/lib/jslib/ |
Upload File : |
/* global _L */
$(document).ready(function () {
var _url = $("#_url").val();
var ib_form_bootbox = "<form class=\"form-horizontal push-10\" method=\"post\" onsubmit=\"return false;\">\n <div class=\"form-group\">\n <div class=\"col-xs-12\">\n <div class=\"form-material floating open\">\n <input class=\"form-control\" type=\"text\" id=\"location_name\" name=\"location_name\">\n <label for=\"envato_api_key\">" + _L['Location'] + "</label>\n </div>\n </div>\n </div>\n\n</form>";
///adiciona nova l9ocalização
$("#add_new_location").click(function(e){
e.preventDefault();
var box = bootbox.dialog({
title: _L['Add New Location'],
message: ib_form_bootbox,
buttons: {
success: {
label: _L['Save'],
className: "btn-primary",
callback: function () {
var name_val = $('#location_name').val();
$.post( _url + "product_location/add-post/msg", { location_name: name_val })
.done(function( data ) {
if ($.isNumeric(data)) {
location.reload();
}
else {
bootbox.alert(data);
}
});
}
}
},
show: false
}
);
box.modal('show');
});
$(".cdelete").click(function (e) {
e.preventDefault();
var id = this.id;
bootbox.confirm(_L['are_you_sure'], function(result) {
if(result){
var _url = $("#_url").val();
window.location.href = _url + "product_location/delete/" + id;
}
});
});
$(".edit_location").click(function (e) {
e.preventDefault();
var eid = this.id;
// alert(eid);
var name = $( this ).attr( "data-name" );
bootbox.prompt({
title: _L['Edit']+_L['Location'],
value: name,
buttons: {
'cancel': {
label: _L['Cancel']
},
'confirm': {
label: _L['OK']
}
},
callback: function(result) {
if (result === null) {
} else {
// alert(result);
$.post( _url + "product_location/edit-post/msg", { id: eid, name: result })
.done(function( data ) {
location.reload();
});
}
}
});
});
});