2
* Ext JS Library 3.0 RC2
3
* Copyright(c) 2006-2009, Ext JS, LLC.
6
* http://extjs.com/license
11
* @class Ext.data.SortTypes
13
* Defines the default sorting (casting?) comparison functions used when sorting data.
15
Ext.data.SortTypes = {
17
* Default sort that does nothing
18
* @param {Mixed} s The value being converted
19
* @return {Mixed} The comparison value
26
* The regular expression used to strip tags
30
stripTagsRE : /<\/?[^>]+>/gi,
33
* Strips all HTML tags to sort on text only
34
* @param {Mixed} s The value being converted
35
* @return {String} The comparison value
38
return String(s).replace(this.stripTagsRE, "");
42
* Strips all HTML tags to sort on text only - Case insensitive
43
* @param {Mixed} s The value being converted
44
* @return {String} The comparison value
46
asUCText : function(s){
47
return String(s).toUpperCase().replace(this.stripTagsRE, "");
51
* Case insensitive string
52
* @param {Mixed} s The value being converted
53
* @return {String} The comparison value
55
asUCString : function(s) {
56
return String(s).toUpperCase();
61
* @param {Mixed} s The value being converted
62
* @return {Number} The comparison value
64
asDate : function(s) {
71
return Date.parse(String(s));
76
* @param {Mixed} s The value being converted
77
* @return {Float} The comparison value
79
asFloat : function(s) {
80
var val = parseFloat(String(s).replace(/,/g, ""));
81
if(isNaN(val)) val = 0;
87
* @param {Mixed} s The value being converted
88
* @return {Number} The comparison value
91
var val = parseInt(String(s).replace(/,/g, ""));
92
if(isNaN(val)) val = 0;
b'\\ No newline at end of file'