Sha256: 1a881b49c13e21b0a17f2021ef10c072bbcc7f2a84137b6438298c8e0212bca0

Contents?: true

Size: 1.6 KB

Versions: 6

Compression:

Stored size: 1.6 KB

Contents

$(document).on 'turbolinks:load', ->

  toggleMenu = ->
    $slice = $('#sidebar-footer .brand')
    $slice.toggleClass 'hidden'

  $('.sidebar-toggle').click ->
    toggleMenu()

  searchButton = ->
    $('.search-button').click ->
      # if $(window).width() < 992
      if $(this).hasClass ('submit')
        $('#search form').submit()
      $('#search')
        .removeClass 'hidding-search'
        .addClass 'display-search'
      if $(window).width() < 992
        $('.navbar-custom-menu').addClass 'translate'
      $('.hide-search').addClass 'appear'
      $('.search-bar').focus()
      $(this).addClass 'submit'
      # else
      #   $('#search form').submit()


    $('.hide-search').click ->
      $('#search')
        .removeClass 'display-search'
        .addClass 'hidding-search'
      $('.navbar-custom-menu').removeClass 'translate'
      $('.hide-search').removeClass 'appear'
      $('.search-button').removeClass 'submit'

  $('.datepicker').datepicker({
    dateFormat: 'yy-mm-dd', # formato obligatorio para Keppler
    showOtherMonths: true,
    selectOtherMonths: true,
    changeMonth: true,
    changeYear: true

    # Ver documentación en https://jqueryui.com/datepicker
  })

  $('.close-index-show').click ->
    $('.index-show').css 'right', -$('.index-show').outerWidth()

  $('#open-historial').click ->
    $('.listing-show .control-sidebar').toggleClass 'control-sidebar-open'

  $('.customize-index .icon-trash').click ->
    $('.spinner').css('display', 'block')
  
  searchButton()
  return

$(document).ready ->
  $('.spinner').css 'display', 'block'

$(window).load ->
  $('.spinner').fadeOut 500

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
keppler-2.0.7 installer/core/app/assets/javascripts/admin/main.coffee
keppler-2.0.6 installer/core/app/assets/javascripts/admin/main.coffee
keppler-2.0.5 installer/core/app/assets/javascripts/admin/main.coffee
keppler-2.0.4.p1 installer/core/app/assets/javascripts/admin/main.coffee
keppler-2.0.4.pre.p1 installer/core/app/assets/javascripts/admin/main.coffee
keppler-2.0.4 installer/core/app/assets/javascripts/admin/main.coffee