Sha256: 014f2d832b7176ee9839d11708d38ff0ae07c623f61d825dde9a1df5edbe92fe

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

window.enjoy_cms ||= {}
window.enjoy_cms.multiselect_dblclick = (selector)->
  $(document).delegate selector + ' .ra-multiselect-left select option', 'dblclick', (e)->
    $(e.currentTarget).closest('.ra-multiselect').find('.ra-multiselect-center .ra-multiselect-item-add').click()

  $(document).delegate selector + ' .ra-multiselect-right select option', 'dblclick', (e)->
    $(e.currentTarget).closest('.ra-multiselect').find('.ra-multiselect-center .ra-multiselect-item-remove').click()




$(document).delegate '.sidebar-nav .nav .dropdown-header', 'click', (e)->
  e.preventDefault()
  _target = $(e.currentTarget).toggleClass('opened')
  li = _target.next()
  loop
    li.toggleClass('visible')
    li = li.next()
    break if li.length == 0 or li.hasClass('dropdown-header')

$(document).on 'pjax:complete ready', ()->
  active_nav_element = $(".sidebar-nav .nav .active")
  if active_nav_element.length > 0
    _parent = active_nav_element.prevAll(".dropdown-header:first")
    if _parent.length > 0 and !_parent.hasClass('opened')
      _parent.click()

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
enjoy_cms-0.4.1 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0.5 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0.4 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0.3 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0.2 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0.1 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee
enjoy_cms-0.4.0.beta3 app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee