Skip to content

Context Menu Plugin #114

@PeterChaplin

Description

@PeterChaplin

Acceptance Criteria:

  1. Create "qcode.contextMenu(options)" utility function, which should:
  2. Create a "context menu" div
  3. Absolutely position the menu based on options.position (co-ordinates array)
  4. Populate menu with a ul based on options.menuItems
  5. Expect options.menuItems to be an array of objects, each with a "label" property and an "action" property.
  6. When a menu item is clicked, run the associated action, then close the menu
  7. Close and destroy the menu on any "click", "focus", or "scroll" event happening outside the menu.
  8. Give the first menu item focus by default
  9. Support arrow key & tab navigation between the menu items.
  10. Test plugin on DEV branch of mla-erp (part of table copy work).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions