           button.removeClass 'disabled'
         disabled
       else
-        !!button.is('.disabled')+        !!button.is('.disabled')
+  
+  @method 'itemsForAlternatives', (alternatives) ->
+    (full) ->
+      items = []
+      for alt in alternatives
+        items.push [alt.title, alt.action] if !alt.secret || full
+      items
+  
    }, options)
    @_buttons.length - 1
  
  @method 'alternative', (title, action) ->
    @_buttons[@_buttons.length - 1].alternatives.push {
      title:  title
      action: action
    }
    @_buttons.length - 1
  

    $('a', @_element).each ->
      index = $(this).attr 'data-index'
      if $(this).is('.' + ST.ButtonBarView.ALT_BUTTON_MORE_CLASS)
        $(this).popup self.itemsForAlternatives(self._buttons[index].alternatives)
      else
        $(this).click self._buttons[index].action
  
