META-INF.resources.bower_components.datatables.net-bs.js.dataTables.bootstrap.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-data-tables Show documentation
Show all versions of jwebmp-data-tables Show documentation
The JWebSwing implementation for Data Tables
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","datatables.net"],function($){return factory($,window,document)})}else if(typeof exports==="object"){module.exports=function(root,$){if(!root){root=window}if(!$||!$.fn.dataTable){$=require("datatables.net")(root,$).$}return factory($,root,root.document)}}else{factory(jQuery,window,document)}})(function($,window,document,undefined){"use strict";var DataTable=$.fn.dataTable;$.extend(true,DataTable.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>>"+"<'row'<'col-sm-12'tr>>"+"<'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});$.extend(DataTable.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});DataTable.ext.renderer.pageButton.bootstrap=function(settings,host,idx,buttons,page,pages){var api=new DataTable.Api(settings);var classes=settings.oClasses;var lang=settings.oLanguage.oPaginate;var aria=settings.oLanguage.oAria.paginate||{};var btnDisplay,btnClass,counter=0;var attach=function(container,buttons){var i,ien,node,button;var clickHandler=function(e){e.preventDefault();if(!$(e.currentTarget).hasClass("disabled")&&api.page()!=e.data.action){api.page(e.data.action).draw("page")}};for(i=0,ien=buttons.length;i0?"":" disabled");break;case"previous":btnDisplay=lang.sPrevious;btnClass=button+(page>0?"":" disabled");break;case"next":btnDisplay=lang.sNext;btnClass=button+(page",{class:classes.sPageButton+" "+btnClass,id:idx===0&&typeof button==="string"?settings.sTableId+"_"+button:null}).append($("",{href:"#","aria-controls":settings.sTableId,"aria-label":aria[button],"data-dt-idx":counter,tabindex:settings.iTabIndex}).html(btnDisplay)).appendTo(container);settings.oApi._fnBindAction(node,{action:button},clickHandler);counter++}}}};var activeEl;try{activeEl=$(host).find(document.activeElement).data("dt-idx")}catch(e){}attach($(host).empty().html('
').children("ul"),buttons);if(activeEl!==undefined){$(host).find("[data-dt-idx="+activeEl+"]").focus()}};return DataTable});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy