Sha256: f1332e10eaaae1b6dadf69e379f73cfe4430b4c482007785b45a58407d1d40e1

Contents?: true

Size: 1.22 KB

Versions: 17

Compression:

Stored size: 1.22 KB

Contents

@UiBibzInterface = class Interface

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

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

  fileInputBrowser: ->
    bsCustomFileInput.init()

  popover: ->
    $('[data-toggle="popover"]').popover()

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

  dropdown: ->
    $('.dropdown-toggle').dropdown()
    # $('.dropdown-toggle').on 'click', ->
    #   $(this).next().toggle()
    # $('.dropdown-menu.keep-open').on 'click', (e) ->
    #   e.stopPropagation()

  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)

  toast: ->
    $('.toast').toast()

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ui_bibz-2.5.6 app/assets/javascripts/interface.coffee
ui_bibz-2.5.5 app/assets/javascripts/interface.coffee
ui_bibz-2.5.3 app/assets/javascripts/interface.coffee
ui_bibz-2.5.2 app/assets/javascripts/interface.coffee
ui_bibz-2.5.1 app/assets/javascripts/interface.coffee
ui_bibz-2.5.0 app/assets/javascripts/interface.coffee
ui_bibz-2.4.0 app/assets/javascripts/interface.coffee
ui_bibz-2.3.15 app/assets/javascripts/interface.coffee
ui_bibz-2.3.14 app/assets/javascripts/interface.coffee
ui_bibz-2.3.13 app/assets/javascripts/interface.coffee
ui_bibz-2.3.12 app/assets/javascripts/interface.coffee
ui_bibz-2.3.11 app/assets/javascripts/interface.coffee
ui_bibz-2.3.10 app/assets/javascripts/interface.coffee
ui_bibz-2.3.9 app/assets/javascripts/interface.coffee
ui_bibz-2.3.8 app/assets/javascripts/interface.coffee
ui_bibz-2.3.7 app/assets/javascripts/interface.coffee
ui_bibz-2.3.6 app/assets/javascripts/interface.coffee