Sha256: b5250a510ab272be47ca283f8b32e52b6bc7526735efc6f71744142a51cb96aa

Contents?: true

Size: 658 Bytes

Versions: 1

Compression:

Stored size: 658 Bytes

Contents

@UiBibzInterface = class Interface

  constructor: ->
    @nav()
    @tooltip()
    @dropdown()
    @checkbox()

  nav: ->
    $('.nav-tabs a').click (e) ->
      e.preventDefault()
      $(this).tab('show')

  tooltip: ->
    $('[data-toggle="tooltip"], [title]').tooltip()

  dropdown: ->
    $('.dropdown-toggle').dropdown()

  checkbox: ->
    $('.abc-checkbox.indeterminate input[type=checkbox]').on 'click', ->
      el = $(this)
      if (el.attr('readonly') == 'readonly')
        el.prop('checked', false)
        el.prop('readonly', false)
      else if (!el.is(':checked'))
        el.prop('readonly', true)
        el.prop('indeterminate', true)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.beta2.6 app/assets/javascripts/interface.coffee