Configure globally
Closed this issue · 7 comments
It would be good if we could set global defaults for the configuration, particularly for language
$.fn.yadcf.defaults = {}
I think it would just be a simple case of adding $.extend({}, $.fn.yadcf.defaults, params)
here https://github.com/vedmack/yadcf/blob/master/dist/jquery.dataTables.yadcf.js#L4642
Do you mean like this (it's from the yadcf js file docs)?
* Global Parameters (per table rather than per column)
*
* Usage example yadcf.init(oTable,[{column_number : 0}, {column_number: 3}],{cumulative_filtering: true});
The third argument is being applied to all columns
No, I mean global for every table. #287 requires you to set lang
on every table you want to change the language? I just want to set a languages definition once and it apply to every yadcf instance.
@vedmack will you accept a PR for this? and when is the next release expected?
I need a single place to set languages rather than
// template1.html
oTable.yadcf([/* unique column definition */], {
language = {'select': 'Select value'}
});
// template2.html
oTable.yadcf([/* unique column defintion */], {
language = {'select': 'Select value'}
});
Sure, a PR is always welcomed
Sent #617
thanks! I will try to merge it when I'll find some spare time
@vedmack sorry to ping but any chance of seeing this merged and released?