Sha256: 47fe365da5b0c540350cf6f8d8844d4489a53b1f64d72fedcf33f206522dd4c7

Contents?: true

Size: 649 Bytes

Versions: 13

Compression:

Stored size: 649 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"]').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

13 entries across 13 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.beta2.5 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.beta2.4 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.beta2.3 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.beta2.2 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.beta2.1 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.beta2 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha32 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha31 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha30 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha29 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha28 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha27 app/assets/javascripts/interface.coffee
ui_bibz-2.0.0.alpha26 app/assets/javascripts/interface.coffee