import vhost-audit
This commit is contained in:
365
contrib/contextmenu/test/integration/html/accesskeys.html
Normal file
365
contrib/contextmenu/test/integration/html/accesskeys.html
Normal file
@ -0,0 +1,365 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-accesskeys">Demo: Accesskeys</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit", accesskey: "e"},
|
||||
"cut": {name: "Cut", icon: "cut", accesskey: "c"},
|
||||
// first unused character is taken (here: o)
|
||||
"copy": {name: "Copy", icon: "copy", accesskey: "c o p y"},
|
||||
// words are truncated to their first letter (here: p)
|
||||
"paste": {name: "Paste", icon: "paste", accesskey: "cool paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
369
contrib/contextmenu/test/integration/html/accesskeys_test.html
Normal file
369
contrib/contextmenu/test/integration/html/accesskeys_test.html
Normal file
@ -0,0 +1,369 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-accesskeys">Demo: Accesskeys</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-accesskeys">Demo: Accesskeys</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "clicked: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit", accesskey: "e"},
|
||||
"cut": {name: "Cut", icon: "cut", accesskey: "c"},
|
||||
// first unused character is taken (here: o)
|
||||
"copy": {name: "Copy", icon: "copy", accesskey: "c o p y"},
|
||||
// words are truncated to their first letter (here: p)
|
||||
"paste": {name: "Paste", icon: "paste", accesskey: "cool paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
385
contrib/contextmenu/test/integration/html/async-create.html
Normal file
385
contrib/contextmenu/test/integration/html/async-create.html
Normal file
@ -0,0 +1,385 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-create-context-menu-asynchronous">Demo: Create Context Menu (asynchronous)</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
// some build handler to call asynchronously
|
||||
function createSomeMenu() {
|
||||
return {
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// some asynchronous click handler
|
||||
$('.context-menu-one').on('mouseup', function(e){
|
||||
var $this = $(this);
|
||||
// store a callback on the trigger
|
||||
$this.data('runCallbackThingie', createSomeMenu);
|
||||
var _offset = $this.offset(),
|
||||
position = {
|
||||
x: _offset.left + 10,
|
||||
y: _offset.top + 10
|
||||
}
|
||||
// open the contextMenu asynchronously
|
||||
setTimeout(function(){ $this.contextMenu(position); }, 1000);
|
||||
});
|
||||
|
||||
// setup context menu
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
trigger: 'none',
|
||||
build: function($trigger, e) {
|
||||
// pull a callback from the trigger
|
||||
return $trigger.data('runCallbackThingie')();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
371
contrib/contextmenu/test/integration/html/callback.html
Normal file
371
contrib/contextmenu/test/integration/html/callback.html
Normal file
@ -0,0 +1,371 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-callback">Demo: Callback</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "global: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {
|
||||
name: "Edit",
|
||||
icon: "edit",
|
||||
// superseeds "global" callback
|
||||
callback: function(key, options) {
|
||||
var m = "edit was clicked";
|
||||
window.console && console.log(m) || alert(m);
|
||||
}
|
||||
},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
375
contrib/contextmenu/test/integration/html/callback_test.html
Normal file
375
contrib/contextmenu/test/integration/html/callback_test.html
Normal file
@ -0,0 +1,375 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-callback">Demo: Callback</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-callback">Demo: Callback</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "global: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
"edit": {
|
||||
name: "Edit",
|
||||
icon: "edit",
|
||||
// superseeds "global" callback
|
||||
callback: function(key, options) {
|
||||
var m = "edit was clicked";
|
||||
$('#msg').text(m);
|
||||
}
|
||||
},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
414
contrib/contextmenu/test/integration/html/custom-command.html
Normal file
414
contrib/contextmenu/test/integration/html/custom-command.html
Normal file
@ -0,0 +1,414 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-custom-command">Demo: Custom command</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
/**************************************************
|
||||
* Custom Command Handler
|
||||
**************************************************/
|
||||
$.contextMenu.types.label = function(item, opt, root) {
|
||||
// this === item.$node
|
||||
|
||||
$('<span>Label<ul>'
|
||||
+ '<li class="label1" title="label 1">label 1'
|
||||
+ '<li class="label2" title="label 2">label 2'
|
||||
+ '<li class="label3" title="label 3">label 3'
|
||||
+ '<li class="label4" title="label 4">label 4')
|
||||
.appendTo(this)
|
||||
.on('click', 'li', function() {
|
||||
// do some funky stuff
|
||||
console.log('Clicked on ' + $(this).text());
|
||||
// hide the menu
|
||||
root.$menu.trigger('contextmenu:hide');
|
||||
});
|
||||
|
||||
this.addClass('labels').on('contextmenu:focus', function(e) {
|
||||
// setup some awesome stuff
|
||||
}).on('contextmenu:blur', function(e) {
|
||||
// tear down whatever you did
|
||||
}).on('keydown', function(e) {
|
||||
// some funky key handling, maybe?
|
||||
});
|
||||
};
|
||||
|
||||
/**************************************************
|
||||
* Context-Menu with custom command "label"
|
||||
**************************************************/
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
open: {name: "Open", callback: $.noop},
|
||||
label: {type: "label", customName: "Label"},
|
||||
edit: {name: "Edit", callback: $.noop}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<style type="text/css" class="showcase">
|
||||
.labels > ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
.labels > ul > li {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 1px solid #CCC;
|
||||
overflow: hidden;
|
||||
text-indent: -2000px;
|
||||
}
|
||||
.labels > ul > li.selected,
|
||||
.labels > ul > li:hover { border: 1px solid #000; }
|
||||
.labels > ul > li + li { margin-left: 5px; }
|
||||
.labels > ul > li.label1 { background: red; }
|
||||
.labels > ul > li.label2 { background: green; }
|
||||
.labels > ul > li.label3 { background: blue; }
|
||||
.labels > ul > li.label4 { background: yellow; }
|
||||
</style>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,419 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-custom-command">Demo: Custom command</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-custom-command">Demo: Custom command</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
/**************************************************
|
||||
* Custom Command Handler
|
||||
**************************************************/
|
||||
$.contextMenu.types.label = function(item, opt, root) {
|
||||
// this === item.$node
|
||||
|
||||
$('<span>Label<ul>'
|
||||
+ '<li class="label1" title="label 1">label 1'
|
||||
+ '<li class="label2" title="label 2">label 2'
|
||||
+ '<li class="label3" title="label 3">label 3'
|
||||
+ '<li class="label4" title="label 4">label 4')
|
||||
.appendTo(this)
|
||||
.on('click', 'li', function() {
|
||||
var message = "text: " + $(this).text();
|
||||
$('#msg').text($('#msg').text() + ' | ' + message);
|
||||
|
||||
// hide the menu
|
||||
root.$menu.trigger('contextmenu:hide');
|
||||
});
|
||||
|
||||
this.addClass('labels').on('contextmenu:focus', function(e) {
|
||||
// setup some awesome stuff
|
||||
}).on('contextmenu:blur', function(e) {
|
||||
// tear down whatever you did
|
||||
}).on('keydown', function(e) {
|
||||
// some funky key handling, maybe?
|
||||
});
|
||||
};
|
||||
|
||||
/**************************************************
|
||||
* Context-Menu with custom command "label"
|
||||
**************************************************/
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "clicked: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
open: {name: "Open", callback: $.noop},
|
||||
label: {type: "label", customName: "Label"},
|
||||
edit: {name: "Edit", callback: $.noop}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
<style type="text/css" class="showcase">
|
||||
.labels > ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
.labels > ul > li {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 1px solid #CCC;
|
||||
overflow: hidden;
|
||||
text-indent: -2000px;
|
||||
}
|
||||
.labels > ul > li.selected,
|
||||
.labels > ul > li:hover { border: 1px solid #000; }
|
||||
.labels > ul > li + li { margin-left: 5px; }
|
||||
.labels > ul > li.label1 { background: red; }
|
||||
.labels > ul > li.label2 { background: green; }
|
||||
.labels > ul > li.label3 { background: blue; }
|
||||
.labels > ul > li.label4 { background: yellow; }
|
||||
</style>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
366
contrib/contextmenu/test/integration/html/disabled-callback.html
Normal file
366
contrib/contextmenu/test/integration/html/disabled-callback.html
Normal file
@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-disabled-callback">Demo: Disabled Callback</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {
|
||||
name: "Clickable",
|
||||
icon: "edit",
|
||||
disabled: function(){ return false; }
|
||||
},
|
||||
"cut": {
|
||||
name: "Disabled",
|
||||
icon: "cut",
|
||||
disabled: function(){ return true; }
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-disabled-callback">Demo: Disabled Callback</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-disabled-callback">Demo: Disabled Callback</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "clicked: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
"edit": {
|
||||
name: "Clickable",
|
||||
icon: "edit",
|
||||
disabled: function(){ return false; }
|
||||
},
|
||||
"cut": {
|
||||
name: "Disabled",
|
||||
icon: "cut",
|
||||
disabled: function(){ return true; }
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
373
contrib/contextmenu/test/integration/html/disabled-changing.html
Normal file
373
contrib/contextmenu/test/integration/html/disabled-changing.html
Normal file
@ -0,0 +1,373 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-disabled-changing">Demo: Disabled changing</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Clickable", icon: "edit"},
|
||||
"cut": {
|
||||
name: "Disabled",
|
||||
icon: "cut",
|
||||
disabled: function(key, opt) {
|
||||
// this references the trigger element
|
||||
return !this.data('cutDisabled');
|
||||
}
|
||||
},
|
||||
"toggle": {
|
||||
name: "Toggle",
|
||||
callback: function() {
|
||||
// this references the trigger element
|
||||
this.data('cutDisabled', !this.data('cutDisabled'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,377 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-disabled-changing">Demo: Disabled changing</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-disabled-changing">Demo: Disabled changing</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "clicked: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Clickable", icon: "edit"},
|
||||
"cut": {
|
||||
name: "Disabled",
|
||||
icon: "cut",
|
||||
disabled: function(key, opt) {
|
||||
// this references the trigger element
|
||||
return !this.data('cutDisabled');
|
||||
}
|
||||
},
|
||||
"toggle": {
|
||||
name: "Toggle",
|
||||
callback: function() {
|
||||
// this references the trigger element
|
||||
this.data('cutDisabled', !this.data('cutDisabled'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
377
contrib/contextmenu/test/integration/html/disabled-menu.html
Normal file
377
contrib/contextmenu/test/integration/html/disabled-menu.html
Normal file
@ -0,0 +1,377 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-disabled-menu">Demo: Disabled menu</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral context-menu-disabled">right click me</span></p>
|
||||
<button type="button btn btn-neutral" id="toggle-disabled">Enable Menu</button>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
|
||||
$('#toggle-disabled').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this),
|
||||
$trigger = $('.context-menu-one');
|
||||
if ($trigger.hasClass('context-menu-disabled')) {
|
||||
$this.text("Disable Menu");
|
||||
$trigger.contextMenu(true);
|
||||
} else {
|
||||
$this.text("Enable Menu");
|
||||
$trigger.contextMenu(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
358
contrib/contextmenu/test/integration/html/disabled.html
Normal file
358
contrib/contextmenu/test/integration/html/disabled.html
Normal file
@ -0,0 +1,358 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-disabled">Demo: Disabled</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Clickable", icon: "edit", disabled: false},
|
||||
"cut": {name: "Disabled", icon: "cut", disabled: true}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
362
contrib/contextmenu/test/integration/html/disabled_test.html
Normal file
362
contrib/contextmenu/test/integration/html/disabled_test.html
Normal file
@ -0,0 +1,362 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-disabled">Demo: Disabled</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-disabled">Demo: Disabled</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "clicked: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Clickable", icon: "edit", disabled: false},
|
||||
"cut": {name: "Disabled", icon: "cut", disabled: true}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
370
contrib/contextmenu/test/integration/html/dynamic-create.html
Normal file
370
contrib/contextmenu/test/integration/html/dynamic-create.html
Normal file
@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-adding-new-context-menu-triggers">Demo: Adding new Context Menu Triggers</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
build: function($trigger, e) {
|
||||
// this callback is executed every time the menu is to be shown
|
||||
// its results are destroyed every time the menu is hidden
|
||||
// e is the original contextmenu event, containing e.pageX and e.pageY (amongst other data)
|
||||
return {
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
374
contrib/contextmenu/test/integration/html/dynamic.html
Normal file
374
contrib/contextmenu/test/integration/html/dynamic.html
Normal file
@ -0,0 +1,374 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-adding-new-context-menu-triggers">Demo: Adding new Context Menu Triggers</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><code>jQuery.contextMenu</code> allows you to define a <menu> before the trigger elements are available.</p>
|
||||
<div>
|
||||
<button id="add-trigger" class="btn btn-default" type="submit">Button</button>
|
||||
</div>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
// add new trigger
|
||||
$('#add-trigger').on('click', function(e) {
|
||||
$('<div class="context-menu-one clear btn btn-neutral menu-injected">'
|
||||
+ 'right click me <em>(injected)'
|
||||
+ '<br>').insertBefore(this);
|
||||
// not need for re-initializing $.contextMenu here :)
|
||||
});
|
||||
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
362
contrib/contextmenu/test/integration/html/html5-import.html
Normal file
362
contrib/contextmenu/test/integration/html/html5-import.html
Normal file
@ -0,0 +1,362 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-importing-html5">Demo: Importing HTML5 <code><menu type="context"></code></h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><code>jQuery.contextMenu</code> allows you to import HTML5's <code><menu></code> structures to use in older browsers. </p>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
items: $.contextMenu.fromMenu($('#html5menu'))
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<pre><code class="language-html"><menu id="html5menu" style="display:none" class="showcase">
|
||||
<command label="rotate" icon="edit" onclick="alert('rotate')">
|
||||
<command label="resize" onclick="alert('resize')">
|
||||
<command label="twitter" onclick="alert('twitter')">
|
||||
<hr>
|
||||
<command label="facebook" onclick="alert('facebook')">
|
||||
</menu>
|
||||
</menu></code></pre>
|
||||
<menu id="html5menu" type="context" style="display:none"><command label="rotate" icon="edit" onclick="alert('rotate')"><command label="resize" onclick="alert('resize')"><command label="twitter" onclick="alert('twitter')"><hr><command label="facebook" onclick="alert('facebook')"></command></command></command></command></menu>
|
||||
<p></menu></p>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-html5-polyfill-firefox">Demo: HTML5 Polyfill (Firefox)</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral" contextmenu="html5firefox8">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu('html5');
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<pre><code class="language-html"><menu id="html5firefox8" type="context" >
|
||||
<menuitem label="rotate" onclick="alert('rotate')" hint="I'm a hint"></menuitem>
|
||||
<menuitem label="resize" onclick="alert('resize')"></menuitem>
|
||||
<menuitem label="disabled" onclick="alert('disabled')" disabled></menuitem>
|
||||
<menu label="share">
|
||||
<menuitem label="twitter" onclick="alert('twitter')"></menuitem>
|
||||
<menuitem label="facebook" onclick="alert('facebook')"></menuitem>
|
||||
<hr>
|
||||
<menuitem type="checkbox" label="(checkbox) yes or no?"
|
||||
onclick="alert('checkbox: ' + (this.checked ? 'yep!' : 'nope'))"></menuitem>
|
||||
<hr>
|
||||
<menuitem type="radio" label="(radio) yes" radiogroup="alpha" checked
|
||||
onclick="alert('radio: yes')"></menuitem>
|
||||
<menuitem type="radio" label="(radio) no" radiogroup="alpha"
|
||||
onclick="alert('radio: no')"></menuitem>
|
||||
</menu>
|
||||
</menu></code></pre>
|
||||
<menu id="html5firefox8" type="context"><menuitem label="rotate" onclick="alert('rotate')" hint="I'm a hint"></menuitem><menuitem label="resize" onclick="alert('resize')"></menuitem><menuitem label="disabled" onclick="alert('disabled')" disabled></menuitem><menu label="share"><menuitem label="twitter" onclick="alert('twitter')"></menuitem><menuitem label="facebook" onclick="alert('facebook')"></menuitem><hr><menuitem type="checkbox" label="(checkbox) yes or no?" onclick="alert('checkbox: ' + (this.checked ? 'yep!' : 'nope'))"></menuitem><hr><menuitem type="radio" label="(radio) yes" radiogroup="alpha" checked onclick="alert('radio: yes')"></menuitem><menuitem type="radio" label="(radio) no" radiogroup="alpha" onclick="alert('radio: no')"></menuitem></menu></menu>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
362
contrib/contextmenu/test/integration/html/html5-polyfill.html
Normal file
362
contrib/contextmenu/test/integration/html/html5-polyfill.html
Normal file
@ -0,0 +1,362 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-html5-polyfill">Demo: HTML5 Polyfill</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><code>jQuery.contextMenu</code> allows you to import HTML5's <menu> structures to use in older browsers. </p>
|
||||
<p><span class="context-menu-one btn btn-neutral" contextmenu="html5polyfill">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu('html5');
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<pre><code class="language-html"><menu id="html5polyfill" type="context" style="display:none">
|
||||
<command label="rotate" onclick="alert('rotate')" icon="images/cut.png">
|
||||
<command label="resize" onclick="alert('resize')" icon="images/door.png">
|
||||
<menu label="share">
|
||||
<command label="twitter" onclick="alert('twitter')" icon="images/page_white_copy.png">
|
||||
<hr>
|
||||
<command label="facebook" onclick="alert('facebook')" icon="images/page_white_edit.png">
|
||||
<hr>
|
||||
<label>foo bar<input type="text" name="foo"></label>
|
||||
</menu>
|
||||
</menu></code></pre>
|
||||
<menu id="html5polyfill" type="context" style="display:none"><command label="rotate" onclick="alert('rotate')" icon="images/cut.png"><command label="resize" onclick="alert('resize')" icon="images/door.png"><menu label="share"><command label="twitter" onclick="alert('twitter')" icon="images/page_white_copy.png"><hr><command label="facebook" onclick="alert('facebook')" icon="images/page_white_edit.png"><hr><label>foo bar<input type="text" name="foo"></label>
|
||||
</command></command></menu></command></command></menu>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
442
contrib/contextmenu/test/integration/html/input.html
Normal file
442
contrib/contextmenu/test/integration/html/input.html
Normal file
@ -0,0 +1,442 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-input-commands">Demo: Input Commands</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
items: {
|
||||
// <input type="text">
|
||||
name: {
|
||||
name: "Text",
|
||||
type: 'text',
|
||||
value: "Hello World",
|
||||
events: {
|
||||
keyup: function(e) {
|
||||
// add some fancy key handling here?
|
||||
window.console && console.log('key: '+ e.keyCode);
|
||||
}
|
||||
}
|
||||
},
|
||||
sep1: "---------",
|
||||
// <input type="checkbox">
|
||||
yesno: {
|
||||
name: "Boolean",
|
||||
type: 'checkbox',
|
||||
selected: true
|
||||
},
|
||||
sep2: "---------",
|
||||
// <input type="radio">
|
||||
radio1: {
|
||||
name: "Radio1",
|
||||
type: 'radio',
|
||||
radio: 'radio',
|
||||
value: '1'
|
||||
},
|
||||
radio2: {
|
||||
name: "Radio2",
|
||||
type: 'radio',
|
||||
radio: 'radio',
|
||||
value: '2',
|
||||
selected: true
|
||||
},
|
||||
radio3: {
|
||||
name: "Radio3",
|
||||
type: 'radio',
|
||||
radio: 'radio',
|
||||
value: '3'
|
||||
},
|
||||
radio4: {
|
||||
name: "Radio3",
|
||||
type: 'radio',
|
||||
radio: 'radio',
|
||||
value: '4',
|
||||
disabled: true
|
||||
},
|
||||
sep3: "---------",
|
||||
// <select>
|
||||
select: {
|
||||
name: "Select",
|
||||
type: 'select',
|
||||
options: {1: 'one', 2: 'two', 3: 'three'},
|
||||
selected: 2
|
||||
},
|
||||
// <textarea>
|
||||
area1: {
|
||||
name: "Textarea with height",
|
||||
type: 'textarea',
|
||||
value: "Hello World",
|
||||
height: 40
|
||||
},
|
||||
area2: {
|
||||
name: "Textarea",
|
||||
type: 'textarea',
|
||||
value: "Hello World"
|
||||
},
|
||||
sep4: "---------",
|
||||
key: {
|
||||
name: "Something Clickable",
|
||||
callback: $.noop
|
||||
}
|
||||
},
|
||||
events: {
|
||||
show: function(opt) {
|
||||
// this is the trigger element
|
||||
var $this = this;
|
||||
// import states from data store
|
||||
$.contextMenu.setInputValues(opt, $this.data());
|
||||
// this basically fills the input commands from an object
|
||||
// like {name: "foo", yesno: true, radio: "3", …}
|
||||
},
|
||||
hide: function(opt) {
|
||||
// this is the trigger element
|
||||
var $this = this;
|
||||
// export states to data store
|
||||
$.contextMenu.getInputValues(opt, $this.data());
|
||||
// this basically dumps the input commands' values to an object
|
||||
// like {name: "foo", yesno: true, radio: "3", …}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-keeping-the-menu-visible">Demo: Keeping the Menu visible</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {
|
||||
name: "Closing on Click",
|
||||
icon: "edit",
|
||||
callback: function(){ return true; }
|
||||
},
|
||||
"cut": {
|
||||
name: "Open after Click",
|
||||
icon: "cut",
|
||||
callback: function(){ return false; }
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
452
contrib/contextmenu/test/integration/html/menu-title.html
Normal file
452
contrib/contextmenu/test/integration/html/menu-title.html
Normal file
@ -0,0 +1,452 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-menu-title">Demo: Menu Title</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-css">Example CSS</a></li>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span>
|
||||
<span class="context-menu-two btn btn-neutral">right click me</span>
|
||||
<span class="context-menu-three btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-css">Example CSS</h2>
|
||||
<style type="text/css" class="showcase">
|
||||
/* menu header */
|
||||
.css-title:before {
|
||||
content: "some CSS title";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
background: #DDD;
|
||||
padding: 2px;
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.css-title :first-child {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* menu header via data attribute */
|
||||
.data-title:before {
|
||||
content: attr(data-menutitle);
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
background: #DDD;
|
||||
padding: 2px;
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.data-title :first-child {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
// register regular menu
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
|
||||
// register menu with title provided by CSS
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-two',
|
||||
className: 'css-title',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
|
||||
// register menu with title provided by data-attribute
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-three',
|
||||
className: 'data-title',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
|
||||
// set a title
|
||||
$('.data-title').attr('data-menutitle', "Some JS Title");
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<pre><code class="language-html"><span class="context-menu-one btn btn-neutral">right click me</span>
|
||||
|
||||
<span class="context-menu-two btn btn-neutral">right click me</span>
|
||||
|
||||
<span class="context-menu-three btn btn-neutral">right click me</span></code></pre>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
373
contrib/contextmenu/test/integration/html/on-dom-element.html
Normal file
373
contrib/contextmenu/test/integration/html/on-dom-element.html
Normal file
@ -0,0 +1,373 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-context-menu-on-dom-element">Demo: Context Menu on DOM Element</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<ul id="the-node"><li><span class="context-menu-one btn btn-neutral">right click me 1</span></li>
|
||||
<li><span class="context-menu-one btn btn-neutral">right click me 2</span></li>
|
||||
<li>right click me 3</li>
|
||||
<li>right click me 4</li>
|
||||
</ul>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$('#the-node').contextMenu({
|
||||
selector: 'li',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key + " on " + $(this).text();
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<pre><code class="language-html"><ul id="the-node">
|
||||
<li><span class="context-menu-one btn btn-neutral">right click me 1</span></li>
|
||||
<li><span class="context-menu-one btn btn-neutral">right click me 2</span></li>
|
||||
<li>right click me 3</li>
|
||||
<li>right click me 4</li>
|
||||
</ul>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
387
contrib/contextmenu/test/integration/html/sub-menus.html
Normal file
387
contrib/contextmenu/test/integration/html/sub-menus.html
Normal file
@ -0,0 +1,387 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-submenus">Demo: Submenus</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
/**************************************************
|
||||
* Context-Menu with Sub-Menu
|
||||
**************************************************/
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {"name": "Edit", "icon": "edit"},
|
||||
"cut": {"name": "Cut", "icon": "cut"},
|
||||
"sep1": "---------",
|
||||
"quit": {"name": "Quit", "icon": "quit"},
|
||||
"sep2": "---------",
|
||||
"fold1": {
|
||||
"name": "Sub group",
|
||||
"items": {
|
||||
"fold1-key1": {"name": "Foo bar"},
|
||||
"fold2": {
|
||||
"name": "Sub group 2",
|
||||
"items": {
|
||||
"fold2-key1": {"name": "alpha"},
|
||||
"fold2-key2": {"name": "bravo"},
|
||||
"fold2-key3": {"name": "charlie"}
|
||||
}
|
||||
},
|
||||
"fold1-key3": {"name": "delta"}
|
||||
}
|
||||
},
|
||||
"fold1a": {
|
||||
"name": "Other group",
|
||||
"items": {
|
||||
"fold1a-key1": {"name": "echo"},
|
||||
"fold1a-key2": {"name": "foxtrot"},
|
||||
"fold1a-key3": {"name": "golf"}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
391
contrib/contextmenu/test/integration/html/sub-menus_test.html
Normal file
391
contrib/contextmenu/test/integration/html/sub-menus_test.html
Normal file
@ -0,0 +1,391 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#demo-submenus">Demo: Submenus</a>
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<h1 id="demo-submenus">Demo: Submenus</h1>
|
||||
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
/**************************************************
|
||||
* Context-Menu with Sub-Menu
|
||||
**************************************************/
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
callback: function(key, options) {
|
||||
var message = "clicked: " + key;
|
||||
$('#msg').text(message);
|
||||
},
|
||||
items: {
|
||||
"edit": {"name": "Edit", "icon": "edit"},
|
||||
"cut": {"name": "Cut", "icon": "cut"},
|
||||
"sep1": "---------",
|
||||
"quit": {"name": "Quit", "icon": "quit"},
|
||||
"sep2": "---------",
|
||||
"fold1": {
|
||||
"name": "Sub group",
|
||||
"items": {
|
||||
"fold1-key1": {"name": "Foo bar"},
|
||||
"fold2": {
|
||||
"name": "Sub group 2",
|
||||
"items": {
|
||||
"fold2-key1": {"name": "alpha"},
|
||||
"fold2-key2": {"name": "bravo"},
|
||||
"fold2-key3": {"name": "charlie"}
|
||||
}
|
||||
},
|
||||
"fold1-key3": {"name": "delta"}
|
||||
}
|
||||
},
|
||||
"fold1a": {
|
||||
"name": "Other group",
|
||||
"items": {
|
||||
"fold1a-key1": {"name": "echo"},
|
||||
"fold1a-key2": {"name": "foxtrot"},
|
||||
"fold1a-key3": {"name": "golf"}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
373
contrib/contextmenu/test/integration/html/trigger-custom.html
Normal file
373
contrib/contextmenu/test/integration/html/trigger-custom.html
Normal file
@ -0,0 +1,373 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-custom-activated-context-menu">Demo: Custom Activated Context Menu</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">press that button</span></p>
|
||||
<button id="activate-menu" class="btn btn-default" type="submit">Button</button>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
// make button open the menu
|
||||
$('#activate-menu').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.context-menu-one').contextMenu();
|
||||
// or $('.context-menu-one').trigger("contextmenu");
|
||||
// or $('.context-menu-one').contextMenu({x: 100, y: 100});
|
||||
});
|
||||
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
trigger: 'none',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-hover-activated-context-menu-with-autohide">Demo: Hover Activated Context Menu With Autohide</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">hover over me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
trigger: 'hover',
|
||||
delay: 500,
|
||||
autoHide: true,
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
365
contrib/contextmenu/test/integration/html/trigger-hover.html
Normal file
365
contrib/contextmenu/test/integration/html/trigger-hover.html
Normal file
@ -0,0 +1,365 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-hover-activated-context-menu">Demo: Hover Activated Context Menu</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">hover over me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
trigger: 'hover',
|
||||
delay: 500,
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,364 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-left-click-trigger">Demo: Left-Click Trigger</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<p><span class="context-menu-one btn btn-neutral">left click me</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
trigger: 'left',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"paste": {name: "Paste", icon: "paste"},
|
||||
"delete": {name: "Delete", icon: "delete"},
|
||||
"sep1": "---------",
|
||||
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
383
contrib/contextmenu/test/integration/html/trigger-swipe.html
Normal file
383
contrib/contextmenu/test/integration/html/trigger-swipe.html
Normal file
@ -0,0 +1,383 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>jQuery contextMenu</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
|
||||
rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/screen.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="http://swisnl.github.io/jQuery-contextMenu/css/theme-fixes.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
||||
<link href="../../../dist/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../../../src/jquery.contextMenu.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../../src/jquery.ui.position.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-66438984-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/"> jQuery contextMenu</a>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<ul>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu//">
|
||||
Introduction
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="https://www.swis.nl/over-ons/bjorn-brala">
|
||||
Author
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Documentation
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs.html">
|
||||
Options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/items.html">
|
||||
Defining menu items
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/plugin-commands.html">
|
||||
Plugin commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/customize.html">
|
||||
Customize icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/runtime-options.html">
|
||||
Runtime options
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/custom-command-types.html">
|
||||
Custom command types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/events.html">
|
||||
Events
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/docs/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Demo gallery
|
||||
</a>
|
||||
<ul>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo.html">
|
||||
Simple Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/accesskeys.html">
|
||||
Accesskeys
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/async-create.html">
|
||||
Create Context Menu (asynchronous)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/callback.html">
|
||||
Command's action (callbacks)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/custom-command.html">
|
||||
Custom Command Types
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled.html">
|
||||
Disabled Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-callback.html">
|
||||
Disabled Callback Command
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-changing.html">
|
||||
Changing Command's disabled status
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/disabled-menu.html">
|
||||
Disabled Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic.html">
|
||||
Adding new Context Menu Triggers
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/dynamic-create.html">
|
||||
Create Context Menu on demand
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-import.html">
|
||||
Importing HTML5 menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill.html">
|
||||
HTML5 polyfill
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/html5-polyfill-firefox8.html">
|
||||
HTML5 polyfill (Firefox)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/input.html">
|
||||
Input Commands
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/keeping-contextmenu-open.html">
|
||||
Keeping the context menu open
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/menu-title.html">
|
||||
Menus with titles
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html">
|
||||
Context Menu on DOM Element
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html">
|
||||
Submenus
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-custom.html">
|
||||
Custom Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover.html">
|
||||
Hover Activated Context Menu
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-hover-autohide.html">
|
||||
Hover Activated Context Menu With Autohide
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 ">
|
||||
<a class="reference internal "
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-left-click.html">
|
||||
Left-Click Trigger
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l2 current">
|
||||
<a class="reference internal current"
|
||||
href="http://swisnl.github.io/jQuery-contextMenu/demo/trigger-swipe.html">
|
||||
Swipe Trigger
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="swis-branding">
|
||||
<span>Maintained by:</span>
|
||||
<a href="http://www.swis.nl"><img src="http://swisnl.github.io/jQuery-contextMenu/images/swis-logo.jpg" class="swis-logo">Creative Digital Agency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="http://swisnl.github.io/jQuery-contextMenu/">jQuery contextMenu</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="main" class="document">
|
||||
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
|
||||
<h1 id="demo-swipe-trigger">Demo: Swipe Trigger</h1>
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
<ul>
|
||||
<li><a href="#example-code">Example code</a></li>
|
||||
<li><a href="#example-html">Example HTML</a></li>
|
||||
</ul>
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.12/jquery.touchSwipe.min.js"></script>
|
||||
<p>This demo uses the (third party) <a href="https://github.com/mattbryson/TouchSwipe-Jquery-Plugin">TouchSwipe</a> plugin.</p>
|
||||
<p><span class="context-menu-one btn btn-neutral">swype right</span></p>
|
||||
<h2 id="example-code">Example code</h2>
|
||||
<script type="text/javascript" class="showcase">
|
||||
$(function(){
|
||||
// make swipe right open the menu
|
||||
$('.context-menu-one').swipe({
|
||||
// see http://labs.skinkers.com/touchSwipe/
|
||||
swipe: function(event, direction, distance, duration, fingerCount) {
|
||||
if (fingerCount === 1) {
|
||||
$(this).contextMenu({
|
||||
x: event.changedTouches[0].screenX,
|
||||
y: event.changedTouches[0].screenY,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.contextMenu({
|
||||
selector: '.context-menu-one',
|
||||
trigger: 'none',
|
||||
callback: function(key, options) {
|
||||
var m = "clicked: " + key;
|
||||
window.console && console.log(m) || alert(m);
|
||||
},
|
||||
items: {
|
||||
"edit": {name: "Edit", icon: "edit"},
|
||||
"cut": {name: "Cut", icon: "cut"},
|
||||
"copy": {name: "Copy", icon: "copy"},
|
||||
"fold1a": {
|
||||
"name": "Some submenu",
|
||||
"items": {
|
||||
"fold1a-key1": {"name": "echo"},
|
||||
"fold1a-key2": {"name": "foxtrot"},
|
||||
"fold1a-key3": {"name": "golf"}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h2 id="example-html">Example HTML</h2>
|
||||
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<hr/>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
Find jQuery contextMenu on <a href="https://github.com/swisnl/jQuery-contextMenu">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
|
||||
<script src="http://swisnl.github.io/jQuery-contextMenu/js/theme.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
hljs.configure({
|
||||
tabReplace: ' ', // 4 spaces
|
||||
});
|
||||
hljs.initHighlightingOnLoad();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user