MCPcopy
hub / github.com/openstf/stf / TextCell

Function TextCell

res/app/device-list/column/device-column-service.js:394–415  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

392
393
394function 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
417function NumberCell(options) {
418 return _.defaults(options, {

Callers 1

Calls 2

filterIgnoreCaseFunction · 0.85
compareIgnoreCaseFunction · 0.70

Tested by

no test coverage detected