Aún no tienes ningúna página creada, empieza a crear tus páginas haciendo clic en el botón de agregar
',
closeable: true,
backdrop: true,
style: "",
width: 500,
multi: true
});
$(".btnAgregar").webuiPopover("show");
}
},
autoWidth: false,
responsive: {
"details": {
"type": "column",
"target": 0
}
},
columnDefs: [{
"data": null,
"defaultContent": "",
"className": "control",
"orderable": false,
"width": "9%",
"targets": 0
}],
select: {
style: "multi",
selector: "td:not(.control)"
},
dom: "Blfrtip",
buttons: [
{
text: "
",
action: function(){
tabla.rows().select();
},
titleAttr: "Seleccionar todos los elementos"
},
{
text: "
",
action: function(){
tabla.rows().deselect();
},
titleAttr: "Deseleccionar todos los elementos seleccionados"
}
],
order: [[ 1, "asc" ]]
}).on("select", function (e, dt, type, indexes){
var seleccionados = tabla.rows({ selected: true }).count();
if( seleccionados > 0 ){
$("#btnEliminarSeleccionados").show();
}
else{
$("#btnEliminarSeleccionados").hide();
}
}).on("deselect", function(e, dt, type, indexes){
var seleccionados = tabla.rows({ selected: true }).count();
if( seleccionados > 0 ){
$("#btnEliminarSeleccionados").show();
}
else{
$("#btnEliminarSeleccionados").hide();
}
});
$("#btnEliminarSeleccionados").click(function(e){
var mensaje = "
";
BootstrapDialog.show({
title: "Eliminar registro",
type: BootstrapDialog.TYPE_DANGER,
message: mensaje,
draggable: true,
cssClass: "ModalEliminar",
buttons: [{
id: "btnEliminar",
label: "Eliminar",
cssClass: "btn-danger",
action: function(dialogItself){
$.isLoading({ text: "Cargando..." }); NProgress.start();
var ids = new Array();
$("#tblPaginasxCliente").find(".selected").each(function(e){ ids.push($(this).find(".hdnid").val()); });
$("#btnEliminarSeleccionados").prop("disabled", true).html('
Eliminando...');
$("#btnEliminar").prop("disabled", true).html('
Eliminando...');
$.post(
"{{ URL::route('SysWebPAterrizajePlantillaxClienteBorrar') }}",
{idP:ids},
function(data){
$.isLoading("hide"); NProgress.done();
$("#btnEliminarSeleccionados").prop("disabled", false).html("Eliminar seleccionados").hide();
$("#btnEliminar").prop("disabled", false).html("Eliminar");
if(data.success){
new PNotify({ title: "Felicidades!", text: data.mensaje, type: "success" });
dialogItself.close();
var table = $("#tblPaginasxCliente").DataTable();
table.ajax.reload(null, false);
}
else{
if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); }
$.each(data.errMensajes, function(key, value){ if(value != ''){ $("#err"+key).html(value); } else{ $("#err"+key).html(""); } });
}
},
"json"
);
}
}]
});
});
@stop