Skip to content

Commit 1a74fee

Browse files
committed
Release 2.6.2, fixed dist folder generation.
1 parent 2a1a5d1 commit 1a74fee

13 files changed

+72
-19
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## Changelog ##
22

3+
### 2.6.3
4+
5+
#### Fixed
6+
7+
* Broke build script after 2.5.0 which ment no updates to dist folder ([Issue #578](https://github.com/swisnl/jQuery-contextMenu/issues/578)).
8+
39
### 2.6.2
410

511
#### Fixed

dist/font/context-menu-icons.eot

0 Bytes
Binary file not shown.

dist/font/context-menu-icons.ttf

0 Bytes
Binary file not shown.

dist/font/context-menu-icons.woff

0 Bytes
Binary file not shown.

dist/font/context-menu-icons.woff2

4 Bytes
Binary file not shown.

dist/jquery.contextMenu.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*!
33
* jQuery contextMenu - Plugin for simple contextMenu handling
44
*
5-
* Version: v2.5.0
5+
* Version: v2.6.3
66
*
77
* Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)
88
* Web: http://swisnl.github.io/jQuery-contextMenu/
@@ -12,7 +12,7 @@
1212
* Licensed under
1313
* MIT License http://www.opensource.org/licenses/mit-license
1414
*
15-
* Date: 2017-09-08T12:18:57.153Z
15+
* Date: 2017-10-30T19:03:13.936Z
1616
*/
1717
@-webkit-keyframes cm-spin {
1818
0% {
@@ -54,8 +54,8 @@
5454
font-style: normal;
5555
font-weight: normal;
5656

57-
src: url("font/context-menu-icons.eot?2u731");
58-
src: url("font/context-menu-icons.eot?2u731#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?2u731") format("woff2"), url("font/context-menu-icons.woff?2u731") format("woff"), url("font/context-menu-icons.ttf?2u731") format("truetype");
57+
src: url("font/context-menu-icons.eot?2wp27");
58+
src: url("font/context-menu-icons.eot?2wp27#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?2wp27") format("woff2"), url("font/context-menu-icons.woff?2wp27") format("woff"), url("font/context-menu-icons.ttf?2wp27") format("truetype");
5959
}
6060

6161
.context-menu-icon-add:before {

dist/jquery.contextMenu.js

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* jQuery contextMenu v2.5.0 - Plugin for simple contextMenu handling
2+
* jQuery contextMenu v2.6.3 - Plugin for simple contextMenu handling
33
*
4-
* Version: v2.5.0
4+
* Version: v2.6.3
55
*
66
* Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)
77
* Web: http://swisnl.github.io/jQuery-contextMenu/
@@ -11,7 +11,7 @@
1111
* Licensed under
1212
* MIT License http://www.opensource.org/licenses/mit-license
1313
*
14-
* Date: 2017-08-30T12:41:32.950Z
14+
* Date: 2017-10-30T19:03:13.804Z
1515
*/
1616

1717
// jscs:disable
@@ -116,6 +116,10 @@
116116
// flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu
117117
// as long as the trigger happened on one of the trigger-element's child nodes
118118
reposition: true,
119+
// Flag denoting if a second trigger should close the menu, as long as
120+
// the trigger happened on one of the trigger-element's child nodes.
121+
// This overrides the reposition option.
122+
hideOnSecondTrigger: false,
119123

120124
//ability to select submenu
121125
selectableSubMenu: false,
@@ -236,7 +240,8 @@
236240
// events
237241
events: {
238242
show: $.noop,
239-
hide: $.noop
243+
hide: $.noop,
244+
activated: $.noop
240245
},
241246
// default callback
242247
callback: null,
@@ -471,7 +476,12 @@
471476
$(target).trigger(e);
472477
root.$layer.show();
473478
}
474-
479+
480+
if (root.hideOnSecondTrigger && triggerAction && root.$menu !== null && typeof root.$menu !== 'undefined') {
481+
root.$menu.trigger('contextmenu:hide');
482+
return;
483+
}
484+
475485
if (root.reposition && triggerAction) {
476486
if (document.elementFromPoint) {
477487
if (root.$trigger.is(target)) {
@@ -997,6 +1007,9 @@
9971007
// position and show context menu
9981008
opt.$menu.css(css)[opt.animation.show](opt.animation.duration, function () {
9991009
$trigger.trigger('contextmenu:visible');
1010+
1011+
op.activated(opt);
1012+
opt.events.activated();
10001013
});
10011014
// make options available and set state
10021015
$trigger
@@ -1527,6 +1540,26 @@
15271540
// Wait for promise completion. .then(success, error, notify) (we don't track notify). Bind the opt
15281541
// and root to avoid scope problems
15291542
promise.then(completedPromise.bind(this, opt, root), errorPromise.bind(this, opt, root));
1543+
},
1544+
// operation that will run after contextMenu showed on screen
1545+
activated: function(opt){
1546+
var $menu = opt.$menu;
1547+
var $menuOffset = $menu.offset();
1548+
var winHeight = $(window).height();
1549+
var winScrollTop = $(window).scrollTop();
1550+
var menuHeight = $menu.height();
1551+
if(menuHeight > winHeight){
1552+
$menu.css({
1553+
'height' : winHeight + 'px',
1554+
'overflow-x': 'hidden',
1555+
'overflow-y': 'auto',
1556+
'top': winScrollTop + 'px'
1557+
});
1558+
} else if(($menuOffset.top < winScrollTop) || ($menuOffset.top + menuHeight > winScrollTop + winHeight)){
1559+
$menu.css({
1560+
'top': '0px'
1561+
});
1562+
}
15301563
}
15311564
};
15321565

@@ -1616,6 +1649,20 @@
16161649
}
16171650

16181651
switch (operation) {
1652+
1653+
case 'update':
1654+
// Updates visibility and such
1655+
if(_hasContext){
1656+
op.update($context);
1657+
} else {
1658+
for(var menu in menus){
1659+
if(menus.hasOwnProperty(menu)){
1660+
op.update(menus[menu]);
1661+
}
1662+
}
1663+
}
1664+
break;
1665+
16191666
case 'create':
16201667
// no selector no joy
16211668
if (!o.selector) {
@@ -1905,7 +1952,7 @@
19051952
disabled: !!$node.attr('disabled'),
19061953
callback: (function () {
19071954
return function () {
1908-
$node.get(0).click()
1955+
$node.get(0).click();
19091956
};
19101957
})()
19111958
};
@@ -1924,7 +1971,7 @@
19241971
icon: $node.attr('icon'),
19251972
callback: (function () {
19261973
return function () {
1927-
$node.get(0).click()
1974+
$node.get(0).click();
19281975
};
19291976
})()
19301977
};

dist/jquery.contextMenu.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)