Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created May 18, 2012 23:55
Show Gist options
  • Save eduardolundgren/2728226 to your computer and use it in GitHub Desktop.
Save eduardolundgren/2728226 to your computer and use it in GitHub Desktop.
A.DataTable.prototype.getColumn
A.DataTable.prototype.getColumn = (function (original) {
return function (seed) {
if (A.instanceOf(seed, A.Node)) {
var cell = this.getCell(seed),
prefix = this.getClassName('col', '');
seed = cell.get('className');
seed = seed.substring(seed.indexOf(prefix));
seed = seed.substring(prefix.length, seed.indexOf(' '));
}
return original.call(this, seed);
};
})(A.DataTable.prototype.getColumn);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment