Skip to content

Commit d2da929

Browse files
committed
No fun developing on 3 different machines.
1 parent 2c0c8d5 commit d2da929

31 files changed

+0
-1479
lines changed

documentation/website/default.twig

-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191
<div role="main" class="document">
9292
{#<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github maintained-by-swis fa fa-home"> Maintained by SWIS</a>#}
9393
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
94-
95-
{{ content|raw }}
9694
{{ content|raw }}
9795
</div>
9896

test/integration/html/accesskeys.html

-35
Original file line numberDiff line numberDiff line change
@@ -290,41 +290,6 @@
290290
<div class="rst-content">
291291
<div role="main" class="document">
292292
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
293-
294-
<h1 id="demo-accesskeys">Demo: Accesskeys</h1>
295-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
296-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
297-
<ul>
298-
<li><a href="#example-code">Example code</a></li>
299-
<li><a href="#example-html">Example HTML</a></li>
300-
</ul>
301-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
302-
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
303-
<h2 id="example-code">Example code</h2>
304-
<script type="text/javascript" class="showcase">
305-
$(function(){
306-
$.contextMenu({
307-
selector: '.context-menu-one',
308-
callback: function(key, options) {
309-
var m = "clicked: " + key;
310-
window.console && console.log(m) || alert(m);
311-
},
312-
items: {
313-
"edit": {name: "Edit", icon: "edit", accesskey: "e"},
314-
"cut": {name: "Cut", icon: "cut", accesskey: "c"},
315-
// first unused character is taken (here: o)
316-
"copy": {name: "Copy", icon: "copy", accesskey: "c o p y"},
317-
// words are truncated to their first letter (here: p)
318-
"paste": {name: "Paste", icon: "paste", accesskey: "cool paste"},
319-
"delete": {name: "Delete", icon: "delete"},
320-
"sep1": "---------",
321-
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
322-
}
323-
});
324-
});
325-
</script>
326-
<h2 id="example-html">Example HTML</h2>
327-
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
328293
<h1 id="demo-accesskeys">Demo: Accesskeys</h1>
329294
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
330295
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

test/integration/html/accesskeys_test.html

-39
Original file line numberDiff line numberDiff line change
@@ -290,45 +290,6 @@
290290
<div class="rst-content">
291291
<div role="main" class="document">
292292
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
293-
294-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
295-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
296-
<ul>
297-
<li><a href="#demo-accesskeys">Demo: Accesskeys</a>
298-
<ul>
299-
<li><a href="#example-code">Example code</a></li>
300-
<li><a href="#example-html">Example HTML</a></li>
301-
</ul></li>
302-
</ul>
303-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
304-
<h1 id="demo-accesskeys">Demo: Accesskeys</h1>
305-
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
306-
<h2 id="example-code">Example code</h2>
307-
<script type="text/javascript" class="showcase">
308-
$(function(){
309-
$.contextMenu({
310-
selector: '.context-menu-one',
311-
callback: function(key, options) {
312-
var message = "clicked: " + key;
313-
$('#msg').text(message);
314-
},
315-
items: {
316-
"edit": {name: "Edit", icon: "edit", accesskey: "e"},
317-
"cut": {name: "Cut", icon: "cut", accesskey: "c"},
318-
// first unused character is taken (here: o)
319-
"copy": {name: "Copy", icon: "copy", accesskey: "c o p y"},
320-
// words are truncated to their first letter (here: p)
321-
"paste": {name: "Paste", icon: "paste", accesskey: "cool paste"},
322-
"delete": {name: "Delete", icon: "delete"},
323-
"sep1": "---------",
324-
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
325-
}
326-
});
327-
});
328-
</script>
329-
<h2 id="example-html">Example HTML</h2>
330-
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
331-
<div id="msg"></div>
332293
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
333294
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
334295
<ul>

test/integration/html/async-create.html

-55
Original file line numberDiff line numberDiff line change
@@ -290,61 +290,6 @@
290290
<div class="rst-content">
291291
<div role="main" class="document">
292292
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
293-
294-
<h1 id="demo-create-context-menu-asynchronous">Demo: Create Context Menu (asynchronous)</h1>
295-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
296-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
297-
<ul>
298-
<li><a href="#example-code">Example code</a></li>
299-
<li><a href="#example-html">Example HTML</a></li>
300-
</ul>
301-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
302-
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
303-
<h2 id="example-code">Example code</h2>
304-
<script type="text/javascript" class="showcase">
305-
$(function(){
306-
// some build handler to call asynchronously
307-
function createSomeMenu() {
308-
return {
309-
callback: function(key, options) {
310-
var m = "clicked: " + key;
311-
window.console && console.log(m) || alert(m);
312-
},
313-
items: {
314-
"edit": {name: "Edit", icon: "edit"},
315-
"cut": {name: "Cut", icon: "cut"},
316-
"copy": {name: "Copy", icon: "copy"}
317-
}
318-
};
319-
}
320-
321-
// some asynchronous click handler
322-
$('.context-menu-one').on('mouseup', function(e){
323-
var $this = $(this);
324-
// store a callback on the trigger
325-
$this.data('runCallbackThingie', createSomeMenu);
326-
var _offset = $this.offset(),
327-
position = {
328-
x: _offset.left + 10,
329-
y: _offset.top + 10
330-
}
331-
// open the contextMenu asynchronously
332-
setTimeout(function(){ $this.contextMenu(position); }, 1000);
333-
});
334-
335-
// setup context menu
336-
$.contextMenu({
337-
selector: '.context-menu-one',
338-
trigger: 'none',
339-
build: function($trigger, e) {
340-
// pull a callback from the trigger
341-
return $trigger.data('runCallbackThingie')();
342-
}
343-
});
344-
});
345-
</script>
346-
<h2 id="example-html">Example HTML</h2>
347-
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
348293
<h1 id="demo-create-context-menu-asynchronous">Demo: Create Context Menu (asynchronous)</h1>
349294
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
350295
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

test/integration/html/callback.html

-41
Original file line numberDiff line numberDiff line change
@@ -290,47 +290,6 @@
290290
<div class="rst-content">
291291
<div role="main" class="document">
292292
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
293-
294-
<h1 id="demo-callback">Demo: Callback</h1>
295-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
296-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
297-
<ul>
298-
<li><a href="#example-code">Example code</a></li>
299-
<li><a href="#example-html">Example HTML</a></li>
300-
</ul>
301-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
302-
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
303-
<h2 id="example-code">Example code</h2>
304-
<script type="text/javascript" class="showcase">
305-
$(function(){
306-
$.contextMenu({
307-
selector: '.context-menu-one',
308-
callback: function(key, options) {
309-
var m = "global: " + key;
310-
window.console && console.log(m) || alert(m);
311-
},
312-
items: {
313-
"edit": {
314-
name: "Edit",
315-
icon: "edit",
316-
// superseeds "global" callback
317-
callback: function(key, options) {
318-
var m = "edit was clicked";
319-
window.console && console.log(m) || alert(m);
320-
}
321-
},
322-
"cut": {name: "Cut", icon: "cut"},
323-
"copy": {name: "Copy", icon: "copy"},
324-
"paste": {name: "Paste", icon: "paste"},
325-
"delete": {name: "Delete", icon: "delete"},
326-
"sep1": "---------",
327-
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
328-
}
329-
});
330-
});
331-
</script>
332-
<h2 id="example-html">Example HTML</h2>
333-
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
334293
<h1 id="demo-callback">Demo: Callback</h1>
335294
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
336295
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

test/integration/html/callback_test.html

-45
Original file line numberDiff line numberDiff line change
@@ -290,51 +290,6 @@
290290
<div class="rst-content">
291291
<div role="main" class="document">
292292
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
293-
294-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
295-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
296-
<ul>
297-
<li><a href="#demo-callback">Demo: Callback</a>
298-
<ul>
299-
<li><a href="#example-code">Example code</a></li>
300-
<li><a href="#example-html">Example HTML</a></li>
301-
</ul></li>
302-
</ul>
303-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
304-
<h1 id="demo-callback">Demo: Callback</h1>
305-
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
306-
<h2 id="example-code">Example code</h2>
307-
<script type="text/javascript" class="showcase">
308-
$(function(){
309-
$.contextMenu({
310-
selector: '.context-menu-one',
311-
callback: function(key, options) {
312-
var message = "global: " + key;
313-
$('#msg').text(message);
314-
},
315-
items: {
316-
"edit": {
317-
name: "Edit",
318-
icon: "edit",
319-
// superseeds "global" callback
320-
callback: function(key, options) {
321-
var m = "edit was clicked";
322-
$('#msg').text(m);
323-
}
324-
},
325-
"cut": {name: "Cut", icon: "cut"},
326-
"copy": {name: "Copy", icon: "copy"},
327-
"paste": {name: "Paste", icon: "paste"},
328-
"delete": {name: "Delete", icon: "delete"},
329-
"sep1": "---------",
330-
"quit": {name: "Quit", icon: function($element, key, item){ return 'context-menu-icon context-menu-icon-quit'; }}
331-
}
332-
});
333-
});
334-
</script>
335-
<h2 id="example-html">Example HTML</h2>
336-
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
337-
<div id="msg"></div>
338293
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
339294
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
340295
<ul>

test/integration/html/custom-command.html

-84
Original file line numberDiff line numberDiff line change
@@ -290,90 +290,6 @@
290290
<div class="rst-content">
291291
<div role="main" class="document">
292292
<a href="https://github.com/swisnl/jQuery-contextMenu" class="edit-on-github fa fa-github"> Fork on GitHub</a>
293-
294-
<h1 id="demo-custom-command">Demo: Custom command</h1>
295-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
296-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
297-
<ul>
298-
<li><a href="#example-code">Example code</a></li>
299-
<li><a href="#example-html">Example HTML</a></li>
300-
</ul>
301-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
302-
<p><span class="context-menu-one btn btn-neutral">right click me</span></p>
303-
<h2 id="example-code">Example code</h2>
304-
<script type="text/javascript" class="showcase">
305-
$(function(){
306-
/**************************************************
307-
* Custom Command Handler
308-
**************************************************/
309-
$.contextMenu.types.label = function(item, opt, root) {
310-
// this === item.$node
311-
312-
$('<span>Label<ul>'
313-
+ '<li class="label1" title="label 1">label 1'
314-
+ '<li class="label2" title="label 2">label 2'
315-
+ '<li class="label3" title="label 3">label 3'
316-
+ '<li class="label4" title="label 4">label 4')
317-
.appendTo(this)
318-
.on('click', 'li', function() {
319-
// do some funky stuff
320-
console.log('Clicked on ' + $(this).text());
321-
// hide the menu
322-
root.$menu.trigger('contextmenu:hide');
323-
});
324-
325-
this.addClass('labels').on('contextmenu:focus', function(e) {
326-
// setup some awesome stuff
327-
}).on('contextmenu:blur', function(e) {
328-
// tear down whatever you did
329-
}).on('keydown', function(e) {
330-
// some funky key handling, maybe?
331-
});
332-
};
333-
334-
/**************************************************
335-
* Context-Menu with custom command "label"
336-
**************************************************/
337-
$.contextMenu({
338-
selector: '.context-menu-one',
339-
callback: function(key, options) {
340-
var m = "clicked: " + key;
341-
window.console && console.log(m) || alert(m);
342-
},
343-
items: {
344-
open: {name: "Open", callback: $.noop},
345-
label: {type: "label", customName: "Label"},
346-
edit: {name: "Edit", callback: $.noop}
347-
}
348-
});
349-
});
350-
</script>
351-
<h2 id="example-html">Example HTML</h2>
352-
<div style="display:none;" class="showcase" data-showcase-import=".context-menu-one"></div>
353-
<style type="text/css" class="showcase">
354-
.labels > ul {
355-
margin: 0;
356-
padding: 0;
357-
list-style: none;
358-
display: block;
359-
float: none;
360-
}
361-
.labels > ul > li {
362-
display: inline-block;
363-
width: 20px;
364-
height: 20px;
365-
border: 1px solid #CCC;
366-
overflow: hidden;
367-
text-indent: -2000px;
368-
}
369-
.labels > ul > li.selected,
370-
.labels > ul > li:hover { border: 1px solid #000; }
371-
.labels > ul > li + li { margin-left: 5px; }
372-
.labels > ul > li.label1 { background: red; }
373-
.labels > ul > li.label2 { background: green; }
374-
.labels > ul > li.label3 { background: blue; }
375-
.labels > ul > li.label4 { background: yellow; }
376-
</style>
377293
<h1 id="demo-custom-command">Demo: Custom command</h1>
378294
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
379295
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

0 commit comments

Comments
 (0)