Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #7 from SlateFoundation/develop
Browse files Browse the repository at this point in the history
Release: slate-core-data v1.1.2
  • Loading branch information
themightychris authored Feb 7, 2018
2 parents 023057f + 52e10c2 commit 36afafd
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/sorter/Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ Ext.define('Slate.sorter.Code', {
numberRe: /^\d+$/,
numberDelim: '.',

codeFn: function(item) {
return item.get('Code');
},

sorterFn: function(a, b) {
var codeA = a.get('Code').toLowerCase(),
codeB = b.get('Code').toLowerCase(),
numberRe = this._numberRe, // eslint-disable-line no-underscore-dangle
numberDelim = this._numberDelim, // eslint-disable-line no-underscore-dangle
var me = this,
codeFn = me._codeFn, // eslint-disable-line no-underscore-dangle
numberRe = me._numberRe, // eslint-disable-line no-underscore-dangle
numberDelim = me._numberDelim, // eslint-disable-line no-underscore-dangle
codeA = codeFn(a).toLowerCase(),
codeB = codeFn(b).toLowerCase(),
dotIndexA, dotIndexB,
numberA, numberB;

Expand All @@ -37,4 +43,8 @@ Ext.define('Slate.sorter.Code', {
}
},


constructor: function(config) {
this.initConfig(config);
}
});

0 comments on commit 36afafd

Please sign in to comment.