diff --git a/.editorconfig b/.editorconfig index fe6e86c..a9d53aa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ root = true ; Unix-style newlines with a newline ending every file [*] -; end_of_line = lf +end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true @@ -16,11 +16,11 @@ indent_size = 4 ; Tab indentation (no size specified) [*.js] -; indent_style = tab -indent_style = space -indent_size = 4 +indent_style = tab +;indent_style = space +;indent_size = 4 ; Indentation override for all JS under lib directory -[lib/**.js] -indent_style = space -indent_size = 2 +;[lib/**.js] +;indent_style = space +;indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..00404d1 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,4 @@ +Thanks for contributing :+1: + +In lieu of an own guideline, please have a look at the +[Fancytree Contributing Guidelines](https://github.com/mar10/fancytree/wiki/HowtoContribute#report-issues). diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..e6fc770 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,24 @@ +Thanks for contributing :-) + +Please add info below, then remove all unneeded lines from this issue report. + + +### Expected and actual behavior + +... (Maybe even a screenshot? Any hints on the browser's debug console?) + + +### Steps to reproduce the problem + + 1. ... + 2. ... + +Could you set up a jsFiddle (http://jsfiddle.net/mar10/6o3u8a88/) or +Plunker (http://plnkr.co/edit/Bbcoqy?p=preview) ? + + +### Environment + + - Browser type and version: + - jQuery and jQuery UI versions: + - ui-contextmenu version: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..5c9953a --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,30 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: | + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + Thank you for your contributions. + stale-pr-message: | + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + Thank you for your contributions. + stale-issue-label: 'stale' + exempt-issue-label: 'pinned' + stale-pr-label: 'stale' + exempt-pr-label: 'pinned' + days-before-stale: 90 + days-before-close: 14 + operations-per-run: 5 diff --git a/.gitignore b/.gitignore index 2f5829a..242a85d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,12 @@ /.settings -/.project /node_modules +/test/triage/ .DS_Store npm-debug.log .sizecache.json sauce_connect.log +sc_*.log + +demo/.pyftpsync-meta.json + +.pyftpsync-meta.json diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..25ba9b9 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,82 @@ +{ + "requireCurlyBraces": [ + "if", + "else", + "for", + "while", + "do", + "try", + "catch" + ], + "requireOperatorBeforeLineBreak": true, + "requireParenthesesAroundIIFE": true, + "requireMultipleVarDecl": "onevar", + "requireCommaBeforeLineBreak": true, + "requireCamelCaseOrUpperCaseIdentifiers": true, + "requireDotNotation": true, + "maximumLineLength": { + "value": 100, + "tabSize": 4, + "allowUrlComments": true, + "allowRegex": true + }, + "validateQuoteMarks": { "mark": "\"", "escape": true }, + + "disallowMixedSpacesAndTabs": "smart", + "disallowTrailingWhitespace": true, + "disallowMultipleLineStrings": true, + "disallowTrailingComma": true, + + + "requireSpacesInFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do", + "switch", + "return", + "try", + "catch" + ], + "requireSpacesInsideObjectBrackets": "all", + "requireSpacesInsideArrayBrackets": "all", + "requireSpacesInConditionalExpression": true, + "requireSpaceAfterBinaryOperators": true, + "requireLineFeedAtFileEnd": true, + "requireSpaceBeforeBinaryOperators": [ + "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", + "&=", "|=", "^=", "+=", + + "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", + "|", "^", "&&", "||", "===", "==", ">=", + "<=", "<", ">", "!=", "!==" + ], + "requireSpacesInAnonymousFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "requireSpacesInNamedFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "validateLineBreaks": "LF", + + "disallowKeywords": [ "with" ], + "disallowKeywordsOnNewLine": [ "else" ], + "disallowSpacesInFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + "disallowSpacesInNamedFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + "disallowSpacesInAnonymousFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + "disallowSpaceAfterObjectKeys": true, + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowSpaceBeforePostfixUnaryOperators": true, + "disallowSpaceBeforeBinaryOperators": [ ",", ":" ], + "disallowMultipleLineBreaks": true +} diff --git a/.project b/.project new file mode 100644 index 0000000..5b0bef8 --- /dev/null +++ b/.project @@ -0,0 +1,22 @@ + + + jquery-ui-contextmenu + + + + + + + + + + 1373147558008 + + 10 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-node_modules + + + + diff --git a/.travis.yml b/.travis.yml index 62faf66..a238abe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: node_js node_js: - - 0.10 + # - 0.10 + - "8" +sudo: false before_script: - npm install -g grunt-cli script: grunt travis --verbose diff --git a/CHANGELOG.md b/CHANGELOG.md index 3934fd1..f1655ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,131 @@ -# 1.3.0 / unreleased +# 1.19.0 / Unreleased + - [FEATURE] Add `appendTo` option. -* [FEATURE] New optional parameter open(..., extraData) +# 1.18.1 / 2017-08-28 + +* [BUGFIX] Fix deprecation warnings when menu with `title` callback is opened + +# 1.18.0 / 2017-08-26 + +* [CHANGE] Refactored entry update methods + - `setEntry(cmd, data)`: + Clarify that this method resets all attributes *not* passed in + `data` are reset to defaults.
+ Also, passing a plain title string as `data` is deprecated: use `setTitle()` instead. + - Add method `updateEntry(cmd, data)`.
+ Example: `updateEntry("info", {title: "Show info...", enable: false})`
+ Unlike `setEntry()`, this method only updates menu attibutes that are + passed in `data`, leaving other attributes intact. + - Add methods `getEntry()`, `getEntryWrapper()`, `setIcon`, `setTitle` + (in addition to the existing `enableEntry` and `showEntry`). + +# 1.17.0 / 2017-04-17 + +* [FEATURE] #59 Allow callbacks for `disabled`, `title`, and `tooltip` options +* [FEATURE] #116 `autoFocus` skips leading disabled entries. +* [FEATURE] #118 New option `closeOnWindowBlur` +* Use `.on()` / `.off()` syntax +* Add check for missing `.delegate` option +* Set @VERSION in minified script + +# 1.16.0 / 2017-03-30 + +* [FEATURE] #114: Pass `extraData` argument to `select` and other events. + The same ui.extraData instance is passed to all events of a open-select-close + sequence, so it can also be used to pass data between events. + +# 1.15.0 / 2017-03-18 + +* [FEATURE] #113: Pass `ui` argument to `open` event. + +# 1.14.0 / 2017-01-30 + +* #108: Update AMD dependency to be compatible with the jQuery 1.12 layout: + "jquery-ui/ui/widgets/menu" + NOTE: this is not backwards compatible with jQuery 1.11 and before: + http://jqueryui.com/upgrade-guide/1.12/#official-package-on-npm + +# 1.13.1 / 2017-01-27 + +* [BUGFIX] #109 Fix `setEntry(title)` for titles containing icons +* [BUGFIX] #110 Fix `setEntry({...})` for jQuery UI 1.12 + +# 1.13.0 / 2016-08-21 + +* [FEATURE] Test with jQuery 3 +* [FEATURE] #104 Allow to pass mouse click events to `open()` +* Update grunt to 1.0 +* Upate QUnit to 1.23 and refactor tests to use `assert` + +# 1.12.0 / 2016-05-18 + +* [FEATURE] Support jQuery UI 1.12 (wrap menu items in separate `
` tags) +* [FEATURE] #100 new menu option `isHeader` for category headers. +* Add jQuery UI 1.12 sample with new 'Base' theme + +# 1.11.0 / 2015-09-10 + +* [CHANGE] #98 Allow to show/hide separators +* [FEATURE] #94 Add `main` field to package.json + +# 1.10.0 / 2015-06-27 + +* [FEATURE] New option `tooltip`, adds a `title` attribute to the menu markup + +# 1.9.0 / 2015-04-20 + +* [FEATURE] New option `autoFocus`, defaults to *false* +* [BUGFIX] #82 Fixed AMD dependencies + +# 1.8.2 / 2015-02-08 + +* [CHANGE] #82 Add "jquery-ui/menu" as AMD dependency +* [FEATURE] #85 Allow custom classes per entry +* [BUGFIX] #88 Exception when target element is deleted in select event + +# 1.8.1 / 2014-12-21 + +* [FEATURE] Publish on npm Registry +* [FEATURE] Publish on [cdnjs](https://cdnjs.com/libraries/jquery.ui-contextmenu) +* [FEATURE] Include a source map file +* [FEATURE] New option `addClass`, defaults to "ui-contextmenu" + +# 1.8.0 / 2014-11-23 + +* [FEATURE] #80 setEntry() supports creating nested menus +* [FEATURE] #81 beforeOpen event accepts deferred as return value +* [BUGFIX] entry data attached to parentLi instead of `` +* Use jscs + +# 1.7.0 / 2014-09-09 + +* [FEATURE] AMD support (topolm). +* [FEATURE] CDN support on [jsDelivr](http://www.jsdelivr.com/#!jquery.ui-contextmenu). + +# 1.6.1 / 2014-08-18 + +* [FEATURE] #27: New option `uiMenuOptions` allows to pass custom options to UI Menu Widget. + +# 1.5.0 / 2014-07-06 + +* [CHANGE] Use data-command="copy" instead of `` to store command ids. +* [FEATURE] Support jQuery UI 1.11. + +# 1.4.0 / 2014-06-22 + +* [FEATURE] Support bower. +* [BUGFIX] #58: 'replaceMenu' in beforeOpen causing select event to lose ui.target + +# 1.3.0 / 2014-03-09 + +* [FEATURE] New optional parameter open(..., extraData). +* [FEATURE] New option `autoTrigger: true` can be set to `false` to prevent + opening menus on browser's `contextmenu` event (if you want to use the `open()` + method instead). +* [FEATURE] New option `preventContextMenuForPopup`to prevent opening the browser's + system context menu on menu entries. +* [CHANGE] `setEntry()` and `replaceMenu()` now allow to define titles with HTML + markup. # 1.2.4 / 2013-12-25 @@ -11,7 +136,8 @@ # 1.2.3 / 2013-10-19 * [CHANGE] Detection of separators compliant with UI Menu 1.10 -* [BUGFIX] Fixed setEntry for entries that don't have icons and handlemissing `cmd` option. +* [BUGFIX] Fixed setEntry for entries that don't have icons and handle missing + `cmd` option. # 1.2.2 / 2013-07-28 @@ -50,3 +176,7 @@ * [FEATURE] Support `taphold` events. * [FEATURE] Show / hide effects configurable. * [BUGFIX] Fixed markup for disabled entries. + +# 0.2.0 / 2013-05-10 + +* First release. diff --git a/Gruntfile.coffee b/Gruntfile.coffee index c460e2c..bb281e4 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,8 +1,10 @@ -#jshint node: true, camelcase: false +#jshint node: true, camelcase: false "use strict" module.exports = (grunt) -> grunt.initConfig - pkg: grunt.file.readJSON("package.json") + pkg: + grunt.file.readJSON("package.json") + connect: demo: options: @@ -10,7 +12,11 @@ module.exports = (grunt) -> port: 8080 base: "./" keepalive: true - + dev: # pass on, so subsequent tastks (like watch) can start + options: + port: 8080 + base: "./" + keepalive: false sauce: options: hostname: "localhost" @@ -22,65 +28,161 @@ module.exports = (grunt) -> tabfix: # Cleanup whitespace according to http://contribute.jquery.org/style-guide/js/ # (requires https://github.com/mar10/tabfix) - cmd: "tabfix -t -r -m *.js,*.css,*.html,*json,*.yaml -i node_modules ." + cmd: "tabfix -t -r -m *.js,*.css,*.html,*.yaml -i node_modules ." upload: # FTP upload the demo files (requires https://github.com/mar10/pyftpsync) - cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/demo/jquery-contextmenu --delete-unmatched --omit dist,node_modules,.*,_* -x" + stdin: true # Allow interactive console + cmd: "pyftpsync upload . ftp://www.wwwendt.de/tech/demo/jquery-contextmenu --delete-unmatched --exclude dist,node_modules,.*,_*" + # cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/demo/jquery-contextmenu --delete-unmatched --omit dist,node_modules,.*,_*" + + jscs: + src: ["jquery.ui-contextmenu.js", "test/tests.js"] + options: + config: ".jscsrc" + force: true jshint: - files: ["Gruntfile.js", "jquery.ui-contextmenu.js", "test/tests.js"] + files: ["jquery.ui-contextmenu.js", "test/tests.js"] options: jshintrc: ".jshintrc" qunit: - all: ["test/index.html"] + all: [ + "test/test-jquery-3-ui-1.12.html", + "test/test-jquery-1.12-ui-1.12.html", + "test/test-jquery-1.11-ui-1.11.html", + "test/test-jquery-1.9-ui-1.10.html", + ] "saucelabs-qunit": - all: + options: + build: process.env.TRAVIS_JOB_ID + throttled: 5 + # statusCheckAttempts: 180 + recordVideo: false + videoUploadOnPass: false + + ui_12: options: - urls: ["http://localhost:9999/test/index.html"] - - # username: process.env.SAUCE_USERNAME, - # key: process.env.SAUCE_ACCESS_KEY, - tunnelTimeout: 5 - build: process.env.TRAVIS_JOB_ID - concurrency: 3 + testname: "jquery.ui-contextmenu qunit tests (jQuery UI 12)" + urls: [ + "http://localhost:9999/test/test-jquery-3-ui-1.12.html" + ] browsers: [ - { browserName: "chrome", platform: "Windows 7" } - { browserName: "firefox", platform: "Windows 7" } - { browserName: "firefox", platform: "Windows XP" } + { browserName: "chrome", platform: "Windows 8.1" } + { browserName: "firefox", platform: "Windows 8.1" } { browserName: "firefox", platform: "Linux" } - { browserName: "internet explorer", version: "6", platform: "Windows XP" } - { browserName: "internet explorer", version: "7", platform: "Windows XP" } - { browserName: "internet explorer", version: "8", platform: "Windows XP" } + # jQuery UI 12+ stopped support for IE <= 10 + { browserName: "internet explorer", version: "11", platform: "Windows 8.1" } + { browserName: "microsoftedge", platform: "Windows 10" } + # { browserName: "safari", version: "6", platform: "OS X 10.8" } + # { browserName: "safari", version: "7", platform: "OS X 10.9" } + # { browserName: "safari", version: "8", platform: "OS X 10.10" } + { browserName: "safari", version: "9", platform: "OS X 10.11" } + { browserName: "safari", version: "10", platform: "OS X 10.12" } + { browserName: "safari", version: "11", platform: "OS X 10.12" } + ] + + ui_11: # UI Menu 11+ dropped support for IE7 + options: + testname: "jquery.ui-contextmenu qunit tests (jQuery UI 11+)" + urls: [ + "http://localhost:9999/test/test-jquery-1.11-ui-1.11.html" + ] + browsers: [ + { browserName: "chrome", platform: "Windows 8.1" } + { browserName: "firefox", platform: "Linux" } + # jQuery UI 11+ stopped support for IE <= 7 + # { browserName: "internet explorer", version: "8", platform: "Windows 7" } { browserName: "internet explorer", version: "9", platform: "Windows 7" } { browserName: "internet explorer", version: "10", platform: "Windows 8" } { browserName: "internet explorer", version: "11", platform: "Windows 8.1" } - { browserName: "safari", platform: "OS X 10.8" } + { browserName: "microsoftedge", platform: "Windows 10" } + { browserName: "safari", version: "10", platform: "OS X 10.12" } + ] + + ui_10: + options: + testname: "jquery.ui-contextmenu qunit tests (jQuery UI 10)" + urls: [ + "http://localhost:9999/test/test-jquery-1.9-ui-1.10.html" + ] + browsers: [ + { browserName: "chrome", platform: "Windows 8.1" } + { browserName: "firefox", platform: "Linux" } + { browserName: "internet explorer", version: "11", platform: "Windows 8.1" } + { browserName: "microsoftedge", platform: "Windows 10" } + { browserName: "safari", version: "10", platform: "OS X 10.12" } ] - testname: "jquery.ui-contextmenu qunit tests" uglify: options: - banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " + "<%= grunt.template.today('yyyy-mm-dd') %> | " + "<%= pkg.homepage ? ' ' + pkg.homepage + ' | ' : '' %>" + " Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" + " Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n" + banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " + "<%= grunt.template.today('yyyy-mm-dd') %> | " + "<%= pkg.homepage ? ' ' + pkg.homepage + ' | ' : '' %>" + " Copyright (c) 2013 -<%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" + " Licensed <%= _.map(pkg.licenses, 'type').join(', ') %> */\n" report: "gzip" build: + options: + sourceMap: true src: "jquery.ui-contextmenu.js" dest: "jquery.ui-contextmenu.min.js" - + watch: + dev: + options: + atBegin: true + files: ["jquery.ui-contextmenu.js", "test/tests.js"] + tasks: ["jshint", "jscs"] + # jshint: + # options: + # atBegin: true + # files: ["jquery.ui-contextmenu.js"] + # tasks: ["jshint"] + + yabs: + release: + common: # defaults for all tools + manifests: ['package.json', 'bower.json'] + # The following tools are run in order: + check: { branch: ['master'], canPush: true, clean: true, cmpVersion: 'gte' } + run_test: { tasks: ['test'] } + bump: {} # 'bump' uses the increment mode `yabs:release:MODE` by default + run_build: { tasks: ['build'] } + replace_build: + files: ['jquery.ui-contextmenu.min.js'] + patterns: [ + { match: /@VERSION/g, replacement: '{%= version %}'} + ] + commit: {} + check_after_build: { clean: true } # Fails if new files are found + tag: {} + push: { tags: true, useFollowTags: true } + githubRelease: + repo: 'mar10/jquery-ui-contextmenu' + draft: false + npmPublish: {} + bump_develop: { inc: 'prepatch' } + commit_develop: { message: 'Bump prerelease ({%= version %}) [ci skip]' } + push_develop: {} # another push (append a suffix for a uniqu ename) + + # Load "grunt*" dependencies for key of grunt.file.readJSON("package.json").devDependencies grunt.loadNpmTasks key if key isnt "grunt" and key.indexOf("grunt") is 0 - + grunt.registerTask "server", ["connect:demo"] - grunt.registerTask "test", ["jshint", "qunit"] - grunt.registerTask "sauce", ["connect:sauce", "saucelabs-qunit"] - grunt.registerTask "travis", ["test", "sauce"] + grunt.registerTask "dev", ["connect:dev", "watch:dev"] + grunt.registerTask "test", ["jshint", "jscs", "qunit"] + grunt.registerTask "sauce", ["connect:sauce", "saucelabs-qunit:ui_12", "saucelabs-qunit:ui_11", "saucelabs-qunit:ui_10"] + if parseInt(process.env.TRAVIS_PULL_REQUEST, 10) > 0 + # saucelab keys do not work on forks + # http://support.saucelabs.com/entries/25614798 + grunt.registerTask "travis", ["test"] + else + grunt.registerTask "travis", ["test", "sauce"] grunt.registerTask "default", ["test"] - + grunt.registerTask "ci", ["test"] # Called by 'npm test' + # "sauce", grunt.registerTask "build", ["exec:tabfix", "test", "uglify"] grunt.registerTask "upload", ["build", "exec:upload"] diff --git a/MIT-LICENSE.txt b/LICENSE.txt similarity index 93% rename from MIT-LICENSE.txt rename to LICENSE.txt index 211def7..ff1e001 100644 --- a/MIT-LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2013 Martin Wendt and others (see commiter list on GitHub) +Copyright 2013-2018 Martin Wendt and others (see commiter list on GitHub) https://github.com/mar10/jquery-ui-contextmenu Permission is hereby granted, free of charge, to any person obtaining diff --git a/README.md b/README.md index b11921e..bcbb8d6 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,67 @@ -# jquery.ui-contextmenu [![Build Status](https://travis-ci.org/mar10/jquery-ui-contextmenu.png?branch=master)](https://travis-ci.org/mar10/jquery-ui-contextmenu) [![Selenium Test Status](https://saucelabs.com/buildstatus/sauce-contextmenu)](https://saucelabs.com/u/sauce-contextmenu) +# jquery.ui-contextmenu +[![GitHub version](https://badge.fury.io/gh/mar10%2Fjquery-ui-contextmenu.svg)](https://github.com/mar10/jquery-ui-contextmenu/releases/latest) +[![Build Status](https://travis-ci.org/mar10/jquery-ui-contextmenu.svg?branch=master)](https://travis-ci.org/mar10/jquery-ui-contextmenu) +[![Selenium Test Status](https://saucelabs.com/buildstatus/sauce-contextmenu)](https://saucelabs.com/u/sauce-contextmenu) +[![npm](https://img.shields.io/npm/dm/ui-contextmenu.svg)](https://www.npmjs.com/package/ui-contextmenu) +[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/ui-contextmenu/badge)](https://www.jsdelivr.com/package/npm/ui-contextmenu), -A jQuery plugin that provides a context menu (based on the standard [jQueryUI menu] widget). +> A jQuery plugin that provides a context menu (based on the standard [jQueryUI menu] widget). - * Define menus from `