Sha256: f31f6a0a9bafd814354e924c4e6c04d898c026feccfaaa985ebfda25304704a4

Contents?: true

Size: 775 Bytes

Versions: 9

Compression:

Stored size: 775 Bytes

Contents

#= require accounting/accounting

define 'aura/extensions/rivets/accounting', ['vendor/accounting'], (accounting) ->

  rivets = require 'mikeric-rivets/dist/rivets'

  # ### currency
  # ```data-text="user.accountBalance | currency"```
  #
  # You must include [accounting.js](http://josscrowcroft.github.com/accounting.js/) on your page to use this. It is not bundled.
  #
  # Returns the value currency formatted by accounting.js
  rivets.formatters.currency = (v) -> accounting.formatMoney v

  initialize: (application) ->
    {core} = application

    core.util.extend accounting.settings.currency,
      symbol: 'R$'
      format: '%s %v'
      thousand: '.'
      decimal: ','

    core.util.extend accounting.settings.number,
      thousand: '.'
      decimal: ','

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ende-0.3.13 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.12 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.11 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.10 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.9 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.8 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.7 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.6 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
ende-0.3.5 lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee