org.wicketstuff.datatables.res.js.dataTables.select.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wicketstuff-datatables Show documentation
Show all versions of wicketstuff-datatables Show documentation
DataTables jQuery integration for Wicket
/*!
Select for DataTables 1.1.0
2015 SpryMedia Ltd - datatables.net/license/mit
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(i){return e(i,window,document)}):"object"===typeof exports?module.exports=function(i,l){i||(i=window);if(!l||!l.fn.dataTable)l=require("datatables.net")(i,l).$;return e(l,i,i.document)}:e(jQuery,window,document)})(function(e,i,l,j){function q(c){var a=c.settings()[0]._select.selector;e(c.table().body()).off("mousedown.dtSelect",a).off("mouseup.dtSelect",a).off("click.dtSelect",a);e("body").off("click.dtSelect")}
function t(c){var a=e(c.table().body()),b=c.settings()[0],d=b._select.selector;a.on("mousedown.dtSelect",d,function(b){if(b.shiftKey)a.css("-moz-user-select","none").one("selectstart.dtSelect",d,function(){return!1})}).on("mouseup.dtSelect",d,function(){a.css("-moz-user-select","")}).on("click.dtSelect",d,function(b){var d=c.select.items(),f=c.settings()[0];if(e(b.target).closest("tbody")[0]==a[0]){var p=e(b.target).closest("td, th"),g=c.cell(p).index();c.cell(p).any()&&("row"===d?(d=g.row,s(b,c,
f,"row",d)):"column"===d?(d=c.cell(p).index().column,s(b,c,f,"column",d)):"cell"===d&&(d=c.cell(p).index(),s(b,c,f,"cell",d)),f._select_lastCell=g)}});e("body").on("click.dtSelect",function(a){b._select.blurable&&!e(a.target).parents().filter(c.table().container()).length&&(e(a.target).parents("div.DTE").length||n(b,!0))})}function k(c,a,b,d){if(!d||c.flatten().length)b.unshift(c),e(c.table().node()).triggerHandler(a+".dt",b)}function u(c){var a=c.settings()[0];if(a._select.info&&a.aanFeatures.i){var b=
e(''),d=function(a,d){b.append(e('').append(c.i18n("select."+a+"s",{_:"%d "+a+"s selected","0":"",1:"1 "+a+" selected"},d)))};d("row",c.rows({selected:!0}).flatten().length);d("column",c.columns({selected:!0}).flatten().length);d("cell",c.cells({selected:!0}).flatten().length);e.each(a.aanFeatures.i,function(a,d){var d=e(d),c=d.children("span.select-info");c.length&&c.remove();""!==b.text()&&d.append(b)})}}function n(c,a){if(a||"single"===c._select.style){var b=
new g.Api(c);b.rows({selected:!0}).deselect();b.columns({selected:!0}).deselect();b.cells({selected:!0}).deselect()}}function s(c,a,b,d,h){var r=a.select.style(),f=a[d](h,{selected:!0}).any();"os"===r?c.ctrlKey||c.metaKey?a[d](h).select(!f):c.shiftKey?"cell"===d?(d=b._select_lastCell||null,f=function(b,d){if(b>d)var c=d,d=b,b=c;var f=!1;return a.columns(":visible").indexes().filter(function(a){a===b&&(f=!0);return a===d?(f=!1,!0):f})},c=function(b,d){var c=a.rows({search:"applied"}).indexes();if(c.indexOf(b)>
c.indexOf(d))var f=d,d=b,b=f;var h=!1;return c.filter(function(a){a===b&&(h=!0);return a===d?(h=!1,!0):h})},!a.cells({selected:!0}).any()&&!d?(f=f(0,h.column),d=c(0,h.row)):(f=f(d.column,h.column),d=c(d.row,h.row)),d=a.cells(d,f).flatten(),a.cells(h,{selected:!0}).any()?a.cells(d).deselect():a.cells(d).select()):(c=b._select_lastCell?b._select_lastCell[d]:null,f=a[d+"s"]({search:"applied"}).indexes(),c=e.inArray(c,f),b=e.inArray(h,f),!a[d+"s"]({selected:!0}).any()&&-1===c?f.splice(e.inArray(h,f)+
1,f.length):(c>b&&(r=b,b=c,c=r),f.splice(b+1,f.length),f.splice(0,c)),a[d](h,{selected:!0}).any())?(f.splice(e.inArray(h,f),1),a[d+"s"](f).deselect()):a[d+"s"](f).select():(c=a[d+"s"]({selected:!0}),f&&1===c.flatten().length?a[d](h).deselect():(c.deselect(),a[d](h).select())):a[d](h).select(!f)}function o(c,a){return function(b){return b.i18n("buttons."+c,a)}}var g=e.fn.dataTable;g.select={};g.select.version="1.1.0";e.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(c,a){g.ext.selector[a.type].push(function(b,
d,c){var d=d.selected,e,f=[];if(d===j)return c;for(var g=0,i=c.length;g
© 2015 - 2025 Weber Informatics LLC | Privacy Policy