 $(document).on 'click', '.panel-heading', () -> make_primary_panel $(this).parent()
 
 #TODO why can't I do .click?
-$(document).on 'click', '#panel-dropdown > li > a', (e) ->
+$(document).on 'click', '.panel-dropup > li > a', (e) ->
     e.preventDefault()
     alert "TODO moving items to different buckets not yet implemented"
 

            <input id='first-input#{index}'
                   class='panel-input'
                   type='text'
                   tabindex=#{1 + tab_index}
                   value='#{bucket_item['first_name']}'
                   placeholder='first name'><br>
            <input class='panel-input'
                   type='text'
                   tabindex=#{2 + tab_index}
                   value='#{bucket_item['last_name']}'
                   placeholder='last name'><br>
        """
    bucket_item_panel = """
        <li class='panel panel-info'>
            <div class='panel-heading'
                 data-toggle='collapse'
                 data-parent='#accordion'

    $.when(populate_bucket_dropdown_and_items 'New Stuff').then ->
        make_primary_panel $('#sortable-bucket-item-list').find('.panel:first')
    $(document).keypress (e) ->
        if not e.altKey
            return
        switch get_hotkey_command(e)
            when 'l'
                if not $('.bucket-dropdown').hasClass 'open'
