Sha256: c04da70b2e52e416eba8ac493ed15721afdf9da36a01bc89530c05986f0f5c1c

Contents?: true

Size: 1.22 KB

Versions: 10

Compression:

Stored size: 1.22 KB

Contents

setupDropdowns = ->
  $extraActionsList = $('.action-buttons .extra-actions')
  $se_option_list = $('ul#selector_engine_options')
  $se_option_input = $('input#selector_engine')

  $('button#selector_engine_dropdown').on 'click', (e)->
    e.stopPropagation()
    $se_option_list.toggleClass('shown')

  $('li', $se_option_list).on 'click', (e)->
    $se_option_input.val( $(e.target).text() )

  $('.action-buttons .drop-indicator').on 'click', (e)->
    e.stopPropagation()
    $extraActionsList.toggleClass('shown')

  $('button',$extraActionsList).on 'click', ->
    $selectedButton = $(this)
    $currentTopButton = $('.action-buttons > button')

    return if $selectedButton[0] == $currentTopButton[0]

    # shove the button that was just selected into the 'top'
    # action button area
    $currentTopButton.after($selectedButton)
    # push the current top button to the top of the 'extra'
    # action button area. This will also remove it from the 'top' area
    $extraActionsList.prepend($currentTopButton)
    

    # remove button from top and but to top of extra buttons
    # move tapped butotn

  $('body').on 'click', ->
    $extraActionsList.removeClass('shown')
    $se_option_list.removeClass('shown')

$ -> 
  setupDropdowns()

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
frank-cucumber-0.9.6 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre8 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre7 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre6 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre5 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre4 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre3 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre2 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee
frank-cucumber-0.9.5.pre1 frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee