fixes spaces into tabs from the initial commit

pull/514/head
Przemysław Kłys 4 years ago committed by GitHub
parent a1b1d7fec0
commit a3a061e8be

@ -57,15 +57,15 @@ $.fn.dataTable.ext.search.push( function ( context, searchData ) {
var caseSensitive = false var caseSensitive = false
} }
if (caseSensitive) { if (caseSensitive) {
if ( searchData[columnId].charAt(0) === context.alphabetSearch ) { if ( searchData[columnId].charAt(0) === context.alphabetSearch ) {
return true; return true;
} }
} else { } else {
if ( searchData[columnId].charAt(0).toUpperCase() === context.alphabetSearch ) { if ( searchData[columnId].charAt(0).toUpperCase() === context.alphabetSearch ) {
return true; return true;
} }
} }
return false; return false;
} ); } );
@ -76,17 +76,17 @@ function bin ( data, options ) {
var letter, bins = {}; var letter, bins = {};
for ( var i=0, ien=data.length ; i<ien ; i++ ) { for ( var i=0, ien=data.length ; i<ien ; i++ ) {
if (options.caseSensitive) { if (options.caseSensitive) {
letter = data[i] letter = data[i]
.toString() .toString()
.replace(/<.*?>/g, '') .replace(/<.*?>/g, '')
.charAt(0); .charAt(0);
} else { } else {
letter = data[i] letter = data[i]
.toString() .toString()
.replace(/<.*?>/g, '') .replace(/<.*?>/g, '')
.charAt(0).toUpperCase(); .charAt(0).toUpperCase();
} }
if ( bins[letter] ) { if ( bins[letter] ) {
bins[letter]++; bins[letter]++;
} }
@ -112,18 +112,18 @@ function draw ( table, alphabet, options )
.html( 'None' ) .html( 'None' )
.appendTo( alphabet ); .appendTo( alphabet );
if (options.numbers) { if (options.numbers) {
for (var i = 0; i < 10; i++) { for (var i = 0; i < 10; i++) {
var letter = String.fromCharCode(48 + i); var letter = String.fromCharCode(48 + i);
$('<span/>') $('<span/>')
.data('letter', letter) .data('letter', letter)
.data('match-count', bins[letter] || 0) .data('match-count', bins[letter] || 0)
.addClass(!bins[letter] ? 'empty' : '') .addClass(!bins[letter] ? 'empty' : '')
.html(letter) .html(letter)
.appendTo(alphabet); .appendTo(alphabet);
} }
} }
for ( var i=0 ; i<26 ; i++ ) { for ( var i=0 ; i<26 ; i++ ) {
var letter = String.fromCharCode( 65 + i ); var letter = String.fromCharCode( 65 + i );
@ -134,18 +134,18 @@ function draw ( table, alphabet, options )
.html( letter ) .html( letter )
.appendTo( alphabet ); .appendTo( alphabet );
} }
if (options.caseSensitive) { if (options.caseSensitive) {
for (var i = 0; i < 26; i++) { for (var i = 0; i < 26; i++) {
var letter = String.fromCharCode(97 + i); var letter = String.fromCharCode(97 + i);
$('<span/>') $('<span/>')
.data('letter', letter) .data('letter', letter)
.data('match-count', bins[letter] || 0) .data('match-count', bins[letter] || 0)
.addClass(!bins[letter] ? 'empty' : '') .addClass(!bins[letter] ? 'empty' : '')
.html(letter) .html(letter)
.appendTo(alphabet); .appendTo(alphabet);
} }
} }
$('<div class="alphabetInfo"></div>') $('<div class="alphabetInfo"></div>')
.appendTo( alphabet ); .appendTo( alphabet );

Loading…
Cancel
Save