Sha256: c37d1ba905036c380355ecbe249e718e6a10fb5f0f5020c194813d137a8307e4

Contents?: true

Size: 543 Bytes

Versions: 10

Compression:

Stored size: 543 Bytes

Contents

$ ->
  $('.disabled').each ->
    $this = $ this
    # disable keyboard accessiblity on disabled elements
    $this.attr('tabindex','-1')
    # and on nested link items
    $this.find('a').attr('tabindex','-1')
    # also disable nested form fields
    $this.find('input, select, textarea').addClass('disabled').attr('tabindex','-1').attr('readonly','readyonly')
    
    return
  
  # remove ability to click on .disabled elements
  $('body').on 'click', '.disabled, .disabled *', (e) ->
    e.preventDefault()
    return false
    
  return

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
groundworkcss-0.4.4 app/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.4.3 app/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.4.2 app/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.4.1 app/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.4.0 app/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.3.2 app/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.3.0 vendor/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.2.4 vendor/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.2.3 vendor/assets/javascripts/groundworkcss/components/disabled.coffee
groundworkcss-0.2.2 vendor/assets/javascripts/groundworkcss/components/disabled.coffee