File: demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/sorting/turkish-string.js

Recommend this page to a friend!
  Classes of Emmanuel Podvin   Blapy   demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/sorting/turkish-string.js   Download  
File: demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/sorting/turkish-string.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Blapy
jQuery plugin to load linked pages using AJAX
Author: By
Last change: Update of demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/sorting/turkish-string.js
Date: 2 years ago
Size: 1,002 bytes
 

Contents

Class file image Download
/** * Sorting in Javascript for Turkish Characters. This plug-in will replace the special * turkish letters (non english characters) and replace in English. * * * @name Turkish * @summary Sort Turkish characters * @author [Yuksel Beyti](http://yukselbeyti.com) * * @example * $('#example').dataTable({ * 'aoColumns' : [ * {'sType' : 'turkish'} * ] * }); */ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "turkish-pre": function ( a ) { var special_letters = { "?": "ib", "I": "ia", "?": "sa", "?": "ga", "Ü": "ua", "Ö": "oa", "Ç": "ca", "i": "ia", "?": "ia", "?": "sa", "?": "ga", "ü": "ua", "ö": "oa", "ç": "ca" }; for (var val in special_letters) a = a.split(val).join(special_letters[val]).toLowerCase(); return a; }, "turkish-asc": function ( a, b ) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }, "turkish-desc": function ( a, b ) { return ((a < b) ? 1 : ((a > b) ? -1 : 0)); } } );