Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 72b3c92

Browse files
authored
Merge pull request swisnl#512 from swisnl/andreasrosdal-master
Andreasrosdal master
2 parents 73dd2d2 + cc67817 commit 72b3c92

12 files changed

Lines changed: 60 additions & 60 deletions

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

8 Bytes
Binary file not shown.

dist/jquery.contextMenu.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Licensed under
1313
* MIT License http://www.opensource.org/licenses/mit-license
1414
*
15-
* Date: 2017-02-27T20:33:09.168Z
15+
* Date: 2017-03-15T09:06:18.381Z
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?3vjwq");
58-
src: url("font/context-menu-icons.eot?3vjwq#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?3vjwq") format("woff2"), url("font/context-menu-icons.woff?3vjwq") format("woff"), url("font/context-menu-icons.ttf?3vjwq") format("truetype");
57+
src: url("font/context-menu-icons.eot?4llt4");
58+
src: url("font/context-menu-icons.eot?4llt4#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?4llt4") format("woff2"), url("font/context-menu-icons.woff?4llt4") format("woff"), url("font/context-menu-icons.ttf?4llt4") format("truetype");
5959
}
6060

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

dist/jquery.contextMenu.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Licensed under
1212
* MIT License http://www.opensource.org/licenses/mit-license
1313
*
14-
* Date: 2017-02-27T20:33:08.614Z
14+
* Date: 2017-03-15T09:06:18.835Z
1515
*/
1616

1717
// jscs:disable
@@ -200,7 +200,7 @@
200200
},
201201
// position the sub-menu
202202
positionSubmenu: function ($menu) {
203-
if ($menu === undefined) {
203+
if (typeof $menu === 'undefined') {
204204
// When user hovers over item (which has sub items) handle.focusItem will call this.
205205
// but the submenu does not exist yet if opt.items is a promise. just return, will
206206
// call positionSubmenu after promise is completed.
@@ -285,7 +285,7 @@
285285
}
286286

287287
// Let the current contextmenu decide if it should show or not based on its own trigger settings
288-
if (e.mouseButton !== undefined && e.data) {
288+
if (typeof e.mouseButton !== 'undefined' && e.data) {
289289
if (!(e.data.trigger === 'left' && e.mouseButton === 0) && !(e.data.trigger === 'right' && e.mouseButton === 2)) {
290290
// Mouse click is not valid.
291291
return;
@@ -507,7 +507,7 @@
507507
});
508508
}
509509

510-
if (root !== null && root.$menu !== null) {
510+
if (root !== null && typeof root !== 'undefined' && root.$menu !== null && typeof root.$menu !== 'undefined') {
511511
root.$menu.trigger('contextmenu:hide');
512512
}
513513
}, 50);
@@ -529,18 +529,18 @@
529529
opt = $currentTrigger.data('contextMenu') || {};
530530
}
531531
// If the trigger happen on a element that are above the contextmenu do this
532-
if (opt.zIndex === undefined) {
532+
if (typeof opt.zIndex === 'undefined') {
533533
opt.zIndex = 0;
534534
}
535535
var targetZIndex = 0;
536536
var getZIndexOfTriggerTarget = function (target) {
537537
if (target.style.zIndex !== '') {
538538
targetZIndex = target.style.zIndex;
539539
} else {
540-
if (target.offsetParent !== null && target.offsetParent !== undefined) {
540+
if (target.offsetParent !== null && typeof target.offsetParent !== 'undefined') {
541541
getZIndexOfTriggerTarget(target.offsetParent);
542542
}
543-
else if (target.parentElement !== null && target.parentElement !== undefined) {
543+
else if (target.parentElement !== null && typeof target.parentElement !== 'undefined') {
544544
getZIndexOfTriggerTarget(target.parentElement);
545545
}
546546
}
@@ -563,7 +563,7 @@
563563
if (opt.$selected) {
564564
opt.$selected.find('input, textarea, select').blur();
565565
}
566-
if (opt.$menu !== null) {
566+
if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {
567567
opt.$menu.trigger('prevcommand');
568568
}
569569
return;
@@ -573,7 +573,7 @@
573573
return;
574574
}
575575
} else if (e.keyCode !== 9 || e.shiftKey) {
576-
if (opt.$menu !== null) {
576+
if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {
577577
opt.$menu.trigger('prevcommand');
578578
}
579579
return;
@@ -589,7 +589,7 @@
589589
if (opt.$selected) {
590590
opt.$selected.find('input, textarea, select').blur();
591591
}
592-
if (opt.$menu !== null) {
592+
if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {
593593
opt.$menu.trigger('nextcommand');
594594
}
595595
return;
@@ -599,7 +599,7 @@
599599
return;
600600
}
601601
} else {
602-
if (opt.$menu !== null) {
602+
if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {
603603
opt.$menu.trigger('nextcommand');
604604
}
605605
return;
@@ -671,7 +671,7 @@
671671

672672
case 27: // esc
673673
handle.keyStop(e, opt);
674-
if (opt.$menu !== null) {
674+
if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {
675675
opt.$menu.trigger('contextmenu:hide');
676676
}
677677
return;
@@ -1008,7 +1008,7 @@
10081008
if (opt.$layer && !opt.hovering && (!(e.pageX >= pos.left && e.pageX <= pos.right) || !(e.pageY >= pos.top && e.pageY <= pos.bottom))) {
10091009
/* Additional hover check after short time, you might just miss the edge of the menu */
10101010
setTimeout(function () {
1011-
if (!opt.hovering && opt.$menu !== null) {
1011+
if (!opt.hovering && opt.$menu !== null && typeof opt.$menu !== 'undefined') {
10121012
opt.$menu.trigger('contextmenu:hide');
10131013
}
10141014
}, 50);
@@ -1089,7 +1089,7 @@
10891089
}
10901090
},
10911091
create: function (opt, root) {
1092-
if (root === undefined) {
1092+
if (typeof root === 'undefined') {
10931093
root = opt;
10941094
}
10951095
// create contextMenu
@@ -1185,7 +1185,7 @@
11851185
k.commands[key] = item;
11861186
// Overwrite only if undefined or the item is appended to the root. This so it
11871187
// doesn't overwrite callbacks of root elements if the name is the same.
1188-
if ($.isFunction(item.callback) && (k.callbacks[key] === undefined || opt.type === undefined)) {
1188+
if ($.isFunction(item.callback) && (typeof k.callbacks[key] === 'undefined' || typeof opt.type === 'undefined')) {
11891189
k.callbacks[key] = item.callback;
11901190
}
11911191
});
@@ -1288,7 +1288,7 @@
12881288
k.commands[key] = item;
12891289
// Overwrite only if undefined or the item is appended to the root. This so it
12901290
// doesn't overwrite callbacks of root elements if the name is the same.
1291-
if ($.isFunction(item.callback) && (k.callbacks[key] === undefined || opt.type === undefined)) {
1291+
if ($.isFunction(item.callback) && (typeof k.callbacks[key] === 'undefined' || typeof opt.type === 'undefined')) {
12921292
k.callbacks[key] = item.callback;
12931293
}
12941294
});
@@ -1382,7 +1382,7 @@
13821382
},
13831383
update: function (opt, root) {
13841384
var $trigger = this;
1385-
if (root === undefined) {
1385+
if (typeof root === 'undefined') {
13861386
root = opt;
13871387
op.resize(opt.$menu);
13881388
}
@@ -1461,7 +1461,7 @@
14611461
.on('mousedown', handle.layerClick);
14621462

14631463
// IE6 doesn't know position:fixed;
1464-
if (document.body.style.maxWidth === undefined) { // IE6 doesn't support maxWidth
1464+
if (typeof document.body.style.maxWidth === 'undefined') { // IE6 doesn't support maxWidth
14651465
$layer.css({
14661466
'position': 'absolute',
14671467
'height': $(document).height()
@@ -1477,7 +1477,7 @@
14771477
function completedPromise(opt, root, items) {
14781478
// Completed promise (dev called promise.resolve). We now have a list of items which can
14791479
// be used to create the rest of the context menu.
1480-
if (items === undefined) {
1480+
if (typeof items === 'undefined') {
14811481
// Null result, dev should have checked
14821482
errorPromise(undefined);//own error object
14831483
}
@@ -1486,7 +1486,7 @@
14861486

14871487
function errorPromise(opt, root, errorItem) {
14881488
// User called promise.reject() with an error item, if not, provide own error item.
1489-
if (errorItem === undefined) {
1489+
if (typeof errorItem === 'undefined') {
14901490
errorItem = {
14911491
"error": {
14921492
name: "No items and no error item",
@@ -1503,7 +1503,7 @@
15031503
}
15041504

15051505
function finishPromiseProcess(opt, root, items) {
1506-
if (root.$menu === undefined || !root.$menu.is(':visible')) {
1506+
if (typeof root.$menu === 'undefined' || !root.$menu.is(':visible')) {
15071507
return;
15081508
}
15091509
opt.$node.removeClass(root.classNames.iconLoadingClass);
@@ -1538,9 +1538,9 @@
15381538
$.fn.contextMenu = function (operation) {
15391539
var $t = this, $o = operation;
15401540
if (this.length > 0) { // this is not a build on demand menu
1541-
if (operation === undefined) {
1541+
if (typeof operation === 'undefined') {
15421542
this.first().trigger('contextmenu');
1543-
} else if (operation.x !== undefined && operation.y !== undefined) {
1543+
} else if (typeof operation.x !== 'undefined' && typeof operation.y !== 'undefined') {
15441544
this.first().trigger($.Event('contextmenu', {
15451545
pageX: operation.x,
15461546
pageY: operation.y,
@@ -1585,7 +1585,7 @@
15851585

15861586
if (typeof options === 'string') {
15871587
options = {selector: options};
1588-
} else if (options === undefined) {
1588+
} else if (typeof options === 'undefined') {
15891589
options = {};
15901590
}
15911591

@@ -1786,7 +1786,7 @@
17861786

17871787
// import values into <input> commands
17881788
$.contextMenu.setInputValues = function (opt, data) {
1789-
if (data === undefined) {
1789+
if (typeof data === 'undefined') {
17901790
data = {};
17911791
}
17921792

@@ -1814,7 +1814,7 @@
18141814

18151815
// export values from <input> commands
18161816
$.contextMenu.getInputValues = function (opt, data) {
1817-
if (data === undefined) {
1817+
if (typeof data === 'undefined') {
18181818
data = {};
18191819
}
18201820

0 commit comments

Comments
 (0)