Sha256: 7c0ae00e72f6aa0a560113b7e2aac6057352dad4ca7fd7a59e505c333d2bfad7

Contents?: true

Size: 768 Bytes

Versions: 2

Compression:

Stored size: 768 Bytes

Contents

Dataclips.Formatters =
  text:      (row, cell, value, columnDef, context) -> value
  integer:   (row, cell, value, columnDef, context) -> value
  float:     (row, cell, value, columnDef, context) -> value
  decimal:   (row, cell, value, columnDef, context) -> value
  date:      (row, cell, value, columnDef, context) -> value.format('L')
  time:      (row, cell, value, columnDef, context) -> value.format('h:mm:ss')
  datetime:  (row, cell, value, columnDef, context) -> value.format('L HH:mm:ss')
  binary:    (row, cell, value, columnDef, context) -> value
  boolean:   (row, cell, value, columnDef, context) ->
    if value is true then "&#9679" else "○"

  email:     (row, cell, value, columnDef, context) ->
    "<a href='mailto:#{value}'>#{value}</a>"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dataclips-0.0.2 app/assets/javascripts/dataclips/formatters.js.coffee
dataclips-0.0.1 app/assets/javascripts/dataclips/formatters.js.coffee