Sha256: f0dc3c35365ddca76f823bc67560095a6b0baf490f9cd84e8c5c04f7dcffa8f7

Contents?: true

Size: 973 Bytes

Versions: 13

Compression:

Stored size: 973 Bytes

Contents

@UiBibzInterface = class Interface

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

  nav: ->
    #$('.nav-tabs .nav-item .nav-link').tab('show')

  popover: ->
    $('[data-toggle="popover"]').popover({ html: true })

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

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

  notify: ->
    $('.alert').each ->
      timeoutValue = $(this).data('timeout')
      if timeoutValue?
        me = $(this)
        setTimeout ->
          me.addClass('fade')
        , timeoutValue


  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.1.5 app/assets/javascripts/interface.coffee
ui_bibz-2.1.4 app/assets/javascripts/interface.coffee
ui_bibz-2.1.3 app/assets/javascripts/interface.coffee
ui_bibz-2.1.2 app/assets/javascripts/interface.coffee
ui_bibz-2.1.1 app/assets/javascripts/interface.coffee
ui_bibz-2.0.10 app/assets/javascripts/interface.coffee
ui_bibz-2.0.9 app/assets/javascripts/interface.coffee
ui_bibz-2.1.0 app/assets/javascripts/interface.coffee
ui_bibz-2.0.8 app/assets/javascripts/interface.coffee
ui_bibz-2.0.7 app/assets/javascripts/interface.coffee
ui_bibz-2.0.5 app/assets/javascripts/interface.coffee
ui_bibz-2.0.4 app/assets/javascripts/interface.coffee
ui_bibz-2.0.3 app/assets/javascripts/interface.coffee