Last active
August 29, 2015 14:06
-
-
Save willianantunes/5e2ecc31fb716b0a8ef0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$.LABDT = new Object(); | |
$.LABDT.url = "<c:url value="/"/>"; | |
$.LABDT.dataTables_LanguageFile = $.LABDT.url + "js/dataTables/languages/" + "dataTables." + "<fmt:message key="config.language"/>" + ".txt"; | |
$.LABDT.dataTables_SearchName = "<fmt:message key="config.datatables.search.name"/>"; | |
$('#usersDataTable').dataTable({ | |
"bAutoWidth":true, | |
"bPaginate": true, | |
"bFilter": true, | |
"bSort": true, | |
"bInfo": true, | |
"bJQueryUI": false, | |
"sPaginationType": "full_numbers", | |
"aoColumns": [ | |
null, // Id | |
null, // Name | |
{ | |
"mData": null, | |
"bSortable": false, | |
"fnRender": function(oObj) | |
{ | |
return "<a href='" + $.LABDT.url + "users/delete/" + oObj.aData[0] + "'>Excluir</a> | " | |
+ "<a href='" + $.LABDT.url + "users/" + oObj.aData[0] + "'>Editar</a>"; | |
} | |
} | |
], | |
"bProcessing": true, | |
"oLanguage": { | |
"sUrl": $.LABDT.dataTables_LanguageFile, | |
"sSearch": $.LABDT.dataTables_SearchName | |
}, | |
"bServerSide": true, | |
"sAjaxSource": '/labdatatables/users/json/datatables/paginate', | |
"sServerMethod": "POST" | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment