Merge branch 'master' of github.com:DataTables/Plugins

pull/207/merge
Allan Jardine 7 years ago
commit 389a989060

@ -1,4 +1,42 @@
/*! Deep linking options parsing support for DataTables
* 2017 SpryMedia Ltd - datatables.net/license
*/
/*!
Copyright 2017 SpryMedia Ltd.
License MIT - http://datatables.net/license/mit
This feature plug-in for DataTables provides a function which will
take DataTables options from the browser's URL search string and
return an object that can be used to construct a DataTable. This
allows deep linking to be easily implemented with DataTables - for
example a URL might be `myTable?displayStart=10` which will
automatically cause the second page of the DataTable to be displayed.
This plug-in works on a whitelist basis - you must specify which
[initialisation parameters](//datatables.net/reference/option) you
want the URL search string to specify. Any parameter given in the
URL which is not listed will be ignored (e.g. you are unlikely to
want to let the URL search string specify the `ajax` option).
This specification is done by passing an array of property names
to the `$.fn.dataTable.ext.deepLink` function. If you do which to
allow _every_ parameter (I wouldn't recommend it) you can use `all`
instead of an array.
@example
// Allow a display start point and search string to be specified
$('#myTable').DataTable(
$.fn.dataTable.ext.deepLink( [ 'displayStart', 'search.search' ] )
);
@example
// As above, but with a default search
var options = $.fn.dataTable.ext.deepLink(['displayStart', 'search.search']);
$('#myTable').DataTable(
$.extend( true, {
search: { search: 'Initial search value' }
}, options )
);
Deep linking options parsing support for DataTables
2017 SpryMedia Ltd - datatables.net/license
*/
(function(l,m,b,n){var h=b.fn.dataTable.ext.internal._fnSetObjectDataFn;b.fn.dataTable.ext.deepLink=function(d){for(var e=location.search.replace(/^\?/,"").split("&"),f={},c=0,k=e.length;c<k;c++){var a=e[c].split("="),g=decodeURIComponent(a[0]),a=decodeURIComponent(a[1]);if("true"===a)a=!0;else if("false"===a)a=!1;else if(!a.match(/[^\d]/))a*=1;else if(0===a.indexOf("{")||0===a.indexOf("["))try{a=b.parseJSON(a)}catch(p){}"all"!==d&&-1===b.inArray(g,d)||h(g)(f,a)}return f}})(window,document,jQuery);

@ -37,7 +37,7 @@
(function($){
var PageResize = function ( dt )
var PageResize = function ( dt, pageResizeManualDelta )
{
var table = dt.table();
@ -48,7 +48,8 @@ var PageResize = function ( dt )
footer: $(table.footer()),
body: $(table.body()),
container: $(table.container()),
table: $(table.node())
table: $(table.node()),
delta: pageResizeManualDelta
};
var host = this.s.host;
@ -71,16 +72,25 @@ PageResize.prototype = {
var rowHeight = $( 'tr', settings.body ).eq(0).height();
var availableHeight = settings.host.height();
var scrolling = t.header().parentNode !== t.body().parentNode;
var delta = settings.delta;
// Subtract the height of the header, footer and the elements
// surrounding the table
if ( ! scrolling ) {
availableHeight -= settings.header.height();
availableHeight -= settings.footer.height();
if ( t.header() ) {
availableHeight -= settings.header.height();
}
if ( t.footer() ) {
availableHeight -= settings.footer.height();
}
}
availableHeight -= offsetTop;
availableHeight -= settings.container.height() - ( offsetTop + settings.table.height() );
if ( !isNaN( parseFloat( delta ) ) && isFinite( delta ) ) {
availableHeight -= delta;
}
var drawRows = Math.floor( availableHeight / rowHeight );
if ( drawRows !== Infinity && drawRows !== -Infinity &&
@ -145,7 +155,7 @@ $(document).on( 'init.dt', function ( e, settings ) {
settings.oInit.pageResize ||
$.fn.dataTable.defaults.pageResize )
{
new PageResize( api );
new PageResize( api, settings.oInit.pageResizeManualDelta );
}
} );

@ -25,6 +25,6 @@
PageResize for DataTables v1.0.0
2015 SpryMedia Ltd - datatables.net/license
*/
(function(c){var d=function(a){var b=a.table();this.s={dt:a,host:c(b.container()).parent(),header:c(b.header()),footer:c(b.footer()),body:c(b.body()),container:c(b.container()),table:c(b.node())};a=this.s.host;"static"===a.css("position")&&a.css("position","relative");this._attach();this._size()};d.prototype={_size:function(){var a=this.s,b=a.dt,f=b.table(),g=c(a.table).offset().top,d=c("tr",a.body).eq(0).height(),e=a.host.height();f.header().parentNode===f.body().parentNode&&(e-=a.header.height(),
e-=a.footer.height());e=e-g-(a.container.height()-(g+a.table.height()));a=Math.floor(e/d);Infinity!==a&&-Infinity!==a&&!isNaN(a)&&0<a&&a!==b.page.len()&&b.page.len(a).draw()},_attach:function(){var a=this,b=c("<object/>").css({position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:-1}).attr("type","text/html");b[0].onload=function(){var b=this.contentDocument.body,c=b.offsetHeight;this.contentDocument.defaultView.onresize=function(){var d=b.clientHeight||b.offsetHeight;d!==c&&(c=d,a._size())}};
b.appendTo(this.s.host).attr("data","about:blank")}};c.fn.dataTable.PageResize=d;c.fn.DataTable.PageResize=d;c(document).on("init.dt",function(a,b){"dt"===a.namespace&&(a=new c.fn.dataTable.Api(b),(c(a.table().node()).hasClass("pageResize")||b.oInit.pageResize||c.fn.dataTable.defaults.pageResize)&&new d(a))})})(jQuery);
(function(b){var e=function(a,c){var d=a.table();this.s={dt:a,host:b(d.container()).parent(),header:b(d.header()),footer:b(d.footer()),body:b(d.body()),container:b(d.container()),table:b(d.node()),delta:c};a=this.s.host;"static"===a.css("position")&&a.css("position","relative");this._attach();this._size()};e.prototype={_size:function(){var a=this.s,c=a.dt,d=c.table(),h=b(a.table).offset().top,e=b("tr",a.body).eq(0).height(),f=a.host.height(),k=d.header().parentNode!==d.body().parentNode,g=a.delta;
k||(d.header()&&(f-=a.header.height()),d.footer()&&(f-=a.footer.height()));f=f-h-(a.container.height()-(h+a.table.height()));!isNaN(parseFloat(g))&&isFinite(g)&&(f-=g);a=Math.floor(f/e);Infinity!==a&&-Infinity!==a&&!isNaN(a)&&0<a&&a!==c.page.len()&&c.page.len(a).draw()},_attach:function(){var a=this,c=b("<object/>").css({position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:-1}).attr("type","text/html");c[0].onload=function(){var b=this.contentDocument.body,c=b.offsetHeight;this.contentDocument.defaultView.onresize=
function(){var d=b.clientHeight||b.offsetHeight;d!==c&&(c=d,a._size())}};c.appendTo(this.s.host).attr("data","about:blank")}};b.fn.dataTable.PageResize=e;b.fn.DataTable.PageResize=e;b(document).on("init.dt",function(a,c){"dt"===a.namespace&&(a=new b.fn.dataTable.Api(c),(b(a.table().node()).hasClass("pageResize")||c.oInit.pageResize||b.fn.dataTable.defaults.pageResize)&&new e(a,c.oInit.pageResizeManualDelta))})})(jQuery);

@ -1,6 +1,28 @@
/*!
Copyright 2014 SpryMedia Ltd.
License MIT - http://datatables.net/license/mit
This feature plug-in for DataTables will highlight search terms in the
DataTable as they are entered into the main search input element, or via the
`search()` API method.
It depends upon the jQuery Highlight plug-in by Bartek Szopka:
http://bartaz.github.io/sandbox.js/jquery.highlight.js
Search highlighting in DataTables can be enabled by:
* Adding the class `searchHighlight` to the HTML table
* Setting the `searchHighlight` parameter in the DataTables initialisation to
be true
* Setting the `searchHighlight` parameter to be true in the DataTables
defaults (thus causing all tables to have this feature) - i.e.
`$.fn.dataTable.defaults.searchHighlight = true`.
For more detailed information please see:
http://datatables.net/blog/2014-10-22
SearchHighlight for DataTables v1.0.1
2014 SpryMedia Ltd - datatables.net/license
*/
(function(h,g,a){function e(d,c){d.unhighlight();c.rows({filter:"applied"}).data().length&&(c.columns().every(function(){this.nodes().flatten().to$().unhighlight({className:"column_highlight"});this.nodes().flatten().to$().highlight(a.trim(this.search()).split(/\s+/),{className:"column_highlight"})}),d.highlight(a.trim(c.search()).split(/\s+/)))}a(g).on("init.dt.dth",function(d,c){if("dt"===d.namespace){var b=new a.fn.dataTable.Api(c),f=a(b.table().body());if(a(b.table().node()).hasClass("searchHighlight")||
c.oInit.searchHighlight||a.fn.dataTable.defaults.searchHighlight)b.on("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",function(){e(f,b)}).on("destroy",function(){b.off("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth")}),b.search()&&e(f,b)}})})(window,document,jQuery);
(function(h,e,a){function f(d,c){d.unhighlight();c.rows({filter:"applied"}).data().length&&(c.columns().every(function(){this.nodes().flatten().to$().unhighlight({className:"column_highlight"});this.nodes().flatten().to$().highlight(a.trim(this.search()).split(/\s+/),{className:"column_highlight"})}),d.highlight(a.trim(c.search()).split(/\s+/)))}a(e).on("init.dt.dth",function(d,c,e){if("dt"===d.namespace){var b=new a.fn.dataTable.Api(c),g=a(b.table().body());if(a(b.table().node()).hasClass("searchHighlight")||
c.oInit.searchHighlight||a.fn.dataTable.defaults.searchHighlight)b.on("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",function(){f(g,b)}).on("destroy",function(){b.off("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth")}),b.search()&&f(g,b)}})})(window,document,jQuery);

@ -1,5 +1,8 @@
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(c){return b(c,window,document)}):"object"===typeof exports?module.exports=function(c,a){c||(c=window);if(!a||!a.fn.dataTable)a=require("datatables.net")(c,a).$;return b(a,c,c.document)}:b(jQuery,window,document)})(function(b,c,a){function f(c,a){var j=this,d=new k.Api(c),g=b('<div class="dt-searchPane"/>').appendTo(a.container);d.columns(a.columns).eq(0).each(function(l){for(var e=d.column(l),c=b("<ul/>"),
a=b(e.header()).hasClass("tags"),n=j._binData(e.data().flatten(),a),h=e.search(),h=h.length&&h[0]?h[0].substr(1,h[0].length-2).split("|"):[],a=a?d.ajax.json().tags:e.data().unique().sort().toArray(),i=0,m=a.length;i<m;i++)if(a[i]){var f=b("<li/>").html('<span class="label">'+a[i]+"</span>").data("filter",a[i]).append(b('<span class="count" />').html(n[a[i]]));-1!==b.inArray(a[i],h)&&f.addClass("selected");c.append(f)}b(g).append(b('<div class="pane"/>').data("column",l).addClass(h.length?"filtering":
"").append('<button type="button" class="close">&times;</button>').append(b('<div class="title"/>').html(b(e.header()).text())).append(b('<div class="scroller"/>').append(c)))});b(g).on("click","li",function(){b(this).hasClass("selected")?b(this).removeClass("selected"):b(this).addClass("selected");var a=b(this).closest("div.pane"),c=a.find("li.selected");0===c.length?(a.removeClass("filtering"),d.column(a.data("column")).search("").draw()):(a.addClass("filtering"),d.column(a.data("column")).search(b.map(c,
function(a){return b(a).data("filter")}).join("|"),!0,!1).draw())});b(g).on("click","button.close",function(){var a=b(this).closest("div.pane");a.find("li.selected").removeClass("selected");a.removeClass("filtering");d.column(a.data("column")).search("").draw()})}var k=b.fn.dataTable;b.extend(f.prototype,{_binData:function(a,b){var c={};a.each(function(a){if(a)if(b)for(var a=a.split(","),g=0,f=a.length;g<f;g++){var e=a[g];c[e]?c[e]++:c[e]=1}else c[a]?c[a]++:c[a]=1});return c}});b(a).on("init.dt",
function(a,c){if("dt"===a.namespace){var j=c.oInit.searchPane,d=k.defaults.searchPane;if(j||d)d=b.extend({},j,d),!1!==j&&new f(c,d)}})});
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);c&&c.fn.dataTable||(c=require("datatables.net")(b,c).$);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a,b,c,d){function e(c,b){var p=this,k=new f.Api(c),e=a('<div class="dt-searchPane"/>').appendTo(b.container);k.columns(b.columns).eq(0).each(function(c){for(var b=k.column(c),m=a("<ul/>"),
d=a(b.header()).hasClass("tags"),n=p._binData(b.data().flatten(),d),g=b.search(),g=g.length&&g[0]?g[0].substr(1,g[0].length-2).split("|"):[],d=d?k.ajax.json().tags:b.data().unique().sort().toArray(),h=0,f=d.length;h<f;h++)if(d[h]){var l=a("<li/>").html('<span class="label">'+d[h]+"</span>").data("filter",d[h]).append(a('<span class="count" />').html(n[d[h]]));-1!==a.inArray(d[h],g)&&l.addClass("selected");m.append(l)}a(e).append(a('<div class="pane"/>').data("column",c).addClass(g.length?"filtering":
"").append('<button type="button" class="close">&times;</button>').append(a('<div class="title"/>').html(a(b.header()).text())).append(a('<div class="scroller"/>').append(m)))});a(e).on("click","li",function(){a(this).hasClass("selected")?a(this).removeClass("selected"):a(this).addClass("selected");var b=a(this).closest("div.pane"),c=b.find("li.selected");0===c.length?(b.removeClass("filtering"),k.column(b.data("column")).search("").draw()):(b.addClass("filtering"),k.column(b.data("column")).search(a.map(c,
function(b){return a(b).data("filter")}).join("|"),!0,!1).draw())});a(e).on("click","button.close",function(){var b=a(this).closest("div.pane");b.find("li.selected").removeClass("selected");b.removeClass("filtering");k.column(b.data("column")).search("").draw()})}var f=a.fn.dataTable;a.extend(e.prototype,{_binData:function(a,b){var c={};a.each(function(a){if(a)if(b){a=a.split(",");for(var d=0,e=a.length;d<e;d++){var f=a[d];c[f]?c[f]++:c[f]=1}}else c[a]?c[a]++:c[a]=1});return c}});a(c).on("init.dt",
function(b,c,d){"dt"===b.namespace&&(b=c.oInit.searchPane,d=f.defaults.searchPane,b||d)&&(d=a.extend({},b,d),!1!==b&&new e(c,d))})});

@ -28,11 +28,11 @@
"sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
"sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
},
select: {
rows: {
_: '%d Zeilen ausgewählt',
0: 'Zum Auswählen auf eine Zeile klicken',
1: '1 Zeile ausgewählt'
"select": {
"rows": {
"_": "%d Zeilen ausgewählt",
"0": "Zum Auswählen auf eine Zeile klicken",
"1": "1 Zeile ausgewählt"
}
}
}

@ -16,6 +16,7 @@ js_compress $DT_SRC/extensions/Plugins/features/searchHighlight/dataTables.searc
js_compress $DT_SRC/extensions/Plugins/features/alphabetSearch/dataTables.alphabetSearch.js
js_compress $DT_SRC/extensions/Plugins/features/lengthLinks/dataTables.lengthLinks.js
js_compress $DT_SRC/extensions/Plugins/features/pageResize/dataTables.pageResize.js
js_compress $DT_SRC/extensions/Plugins/features/deepLink/dataTables.deepLink.js
js_compress $DT_SRC/extensions/Plugins/integration/bootstrap/2/dataTables.bootstrap.js
js_compress $DT_SRC/extensions/Plugins/integration/bootstrap/3/dataTables.bootstrap.js

@ -71,7 +71,7 @@
$.fn.dataTable.ext.order.intl = function ( locales, options ) {
if ( window.Intl ) {
var collator = new window.Intl.Collator( locales, options );
var collator = new Intl.Collator( locales, options );
var types = $.fn.dataTable.ext.type;
delete types.order['string-pre'];

Loading…
Cancel
Save