(options)
| 392 | |
| 393 | |
| 394 | function TextCell(options) { |
| 395 | return _.defaults(options, { |
| 396 | title: options.title |
| 397 | , defaultOrder: 'asc' |
| 398 | , build: function() { |
| 399 | var td = document.createElement('td') |
| 400 | td.appendChild(document.createTextNode('')) |
| 401 | return td |
| 402 | } |
| 403 | , update: function(td, item) { |
| 404 | var t = td.firstChild |
| 405 | t.nodeValue = options.value(item) |
| 406 | return td |
| 407 | } |
| 408 | , compare: function(a, b) { |
| 409 | return compareIgnoreCase(options.value(a), options.value(b)) |
| 410 | } |
| 411 | , filter: function(item, filter) { |
| 412 | return filterIgnoreCase(options.value(item), filter.query) |
| 413 | } |
| 414 | }) |
| 415 | } |
| 416 | |
| 417 | function NumberCell(options) { |
| 418 | return _.defaults(options, { |
no test coverage detected