Sha256: e9e749241fbb4038a6e7f5dd5f6da05b959840d2aa2b79dc5aed34f4c74bae40

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

jQuery ->
  $('#form-translation textarea').autosize()

  $('.add-translation').click (event) ->
    event.preventDefault()
    $('#form-translation #locale').val('')
    $('#form-translation #key').val('')
    $('#form-translation #value').val('')
    $('#form-translation #value').trigger('autosize')
    $('#form-translation #value').focus()

  $('.edit-translation').click (event) ->
    event.preventDefault()
    $('#form-translation #locale').val($(@).data('locale'))
    $('#form-translation #key').val($(@).data('key'))
    $('#form-translation #value').val($(@).html().trim())

    $('#form-translation #value').trigger('autosize')
    $('#form-translation #value').focus()
    $('#form-translation #value')[0].setSelectionRange(0,0)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
i18n_dashboard-0.1.4 app/assets/javascripts/i18n_dashboard/translations.js.coffee
i18n_dashboard-0.1.3 app/assets/javascripts/i18n_dashboard/translations.js.coffee