Requires

Provides

Toolbar.Menu.js

Dropdown menu in a toolbar

License:
Public domain (http://unlicense.org).
Authors:
Yaroslaff Fedin
  1. 27
  2. 28
  3. 29
  4. 30
  5. 31
  6. 32
  7. 33
  8. 34
  9. 35
  10. 36
  11. 37
  12. 38
  13. 39
  14. 40
  15. 41
  16. 42
LSD.Widget.Menu.Toolbar.Menu = new Class({ Includes: [ LSD.Widget.Button, LSD.Trait.Menu.Stateful, LSD.Trait.List, //Look ma, list and item at once! LSD.Trait.Item.Stateful, LSD.Trait.Accessibility, LSD.Trait.Proxies ], options: { layout: { item: 'menu-context-item' }, events: { element: {

mousedown: ‘retain’

  1. 44
  2. 45
  3. 46
  4. 47
  5. 48
  6. 49
  7. 50
  8. 51
  9. 52
  10. 53
  11. 54
  12. 55
  13. 56
  14. 57
  15. 58
  16. 59
  17. 60
  18. 61
  19. 62
  20. 63
  21. 64
  22. 65
  23. 66
  24. 67
  25. 68
  26. 69
  27. 70
  28. 71
  29. 72
  30. 73
  31. 74
  32. 75
  33. 76
  34. 77
  35. 78
  36. 79
  37. 80
  38. 81
  39. 82
  40. 83
  41. 84
  42. 85
  43. 86
  44. 87
  45. 88
}, _items: { element: { 'mousemove:on(command)': function() { if (!this.chosen) this.listWidget.selectItem(this) }, 'click:on(command)': function() { if (!this.selected) this.listWidget.selectItem(this) this.listWidget.collapse(); } } }, self: { click: 'expand', expand: 'unselectItem' } }, menu: { position: 'bottom' } }, click: function() { this.select(); return this.parent.apply(this, arguments); }, render: Macro.onion(function() { if (this.attributes.label && this.attributes.label != this.label) { this.label = this.attributes.label; this.setContent(this.label) } }), processValue: function(item) { return item.value; } }); LSD.Widget.Menu.Toolbar.Menu.Label = new Class({ Extends: LSD.Widget.Button }); LSD.Widget.Menu.Toolbar.Menu.Command = LSD.Widget.Menu.Context.Command;