mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Parser: date month - other added language data no longer removed
This commit is contained in:
parent
684cc1faa8
commit
8f810ef4d9
2
dist/js/parsers/parser-date-month.min.js
vendored
2
dist/js/parsers/parser-date-month.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! Parser: Month - updated 11/2/2015 (v2.24.1) */
|
||||
!function(a){"use strict";var b=a.tablesorter;b.dates=a.extend({},{months:{en:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}}},b.dates),b.addParser({id:"month",is:function(){return!1},format:function(a,c,d,e){if(a){var f,g,h=c.config,i=h.globalize&&(h.globalize[e]||h.globalize)||{},j=b.dates.months[i.lang||"en"];h.ignoreCase&&(a=a.toLowerCase());for(g in j)if("string"==typeof g&&(f=j[g],h.ignoreCase&&(f=f.toLowerCase()),a.match(f)))return parseInt(g,10)}return a},type:"numeric"})}(jQuery);
|
||||
!function(a){"use strict";var b=a.tablesorter;b.dates.months=a.extend({},{en:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}},b.dates.months),b.addParser({id:"month",is:function(){return!1},format:function(a,c,d,e){if(a){var f,g,h=c.config,i=h.globalize&&(h.globalize[e]||h.globalize)||{},j=b.dates.months[i.lang||"en"];h.ignoreCase&&(a=a.toLowerCase());for(g in j)if("string"==typeof g&&(f=j[g],h.ignoreCase&&(f=f.toLowerCase()),a.match(f)))return parseInt(g,10)}return a},type:"numeric"})}(jQuery);
|
@ -189,6 +189,9 @@
|
||||
bottom : false
|
||||
},
|
||||
|
||||
// placeholder date parser data (globalize)
|
||||
dates : {},
|
||||
|
||||
// These methods can be applied on table.config instance
|
||||
instanceMethods : {},
|
||||
|
||||
|
@ -5,11 +5,10 @@
|
||||
'use strict';
|
||||
|
||||
var ts = $.tablesorter;
|
||||
ts.dates = $.extend( {}, {
|
||||
ts.dates.months = $.extend( {}, {
|
||||
// See http://mottie.github.io/tablesorter/docs/example-widget-grouping.html
|
||||
// for details on how to use CLDR data for a locale to add data for this parser
|
||||
// CLDR returns an object { 1: "Jan", 2: "Feb", 3: "Mar", ..., 12: "Dec" }
|
||||
months : {
|
||||
'en' : {
|
||||
1 : 'Jan',
|
||||
2 : 'Feb',
|
||||
@ -24,8 +23,7 @@
|
||||
11: 'Nov',
|
||||
12: 'Dec'
|
||||
}
|
||||
}
|
||||
}, ts.dates );
|
||||
}, ts.dates.months );
|
||||
|
||||
ts.addParser({
|
||||
id: 'month',
|
||||
|
Loading…
Reference in New Issue
Block a user