mirror of https://github.com/helloxz/onenav.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
129 KiB
1 line
129 KiB
3 years ago
|
{"version":3,"file":"jquery.contextMenu.min.js","sources":["jquery.contextMenu.min.js"],"sourcesContent":["/**\r\n * jQuery contextMenu v2.9.2 - Plugin for simple contextMenu handling\r\n *\r\n * Version: v2.9.2\r\n *\r\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://swisnl.github.io/jQuery-contextMenu/\r\n *\r\n * Copyright (c) 2011-2020 SWIS BV and contributors\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n *\r\n * Date: 2020-05-13T13:55:36.983Z\r\n */\r\n\r\n// jscs:disable\r\n/* jshint ignore:start */\r\n(function (factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as anonymous module.\r\n define(['jquery'], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node / CommonJS\r\n factory(require('jquery'));\r\n } else {\r\n // Browser globals.\r\n factory(jQuery);\r\n }\r\n})(function ($) {\r\n\r\n 'use strict';\r\n\r\n // TODO: -\r\n // ARIA stuff: menuitem, menuitemcheckbox und menuitemradio\r\n // create <menu> structure if $.support[htmlCommand || htmlMenuitem] and !opt.disableNative\r\n\r\n // determine html5 compatibility\r\n $.support.htmlMenuitem = ('HTMLMenuItemElement' in window);\r\n $.support.htmlCommand = ('HTMLCommandElement' in window);\r\n $.support.eventSelectstart = ('onselectstart' in document.documentElement);\r\n /* // should the need arise, test for css user-select\r\n $.support.cssUserSelect = (function(){\r\n var t = false,\r\n e = document.createElement('div');\r\n\r\n $.each('Moz|Webkit|Khtml|O|ms|Icab|'.split('|'), function(i, prefix) {\r\n var propCC = prefix + (prefix ? 'U' : 'u') + 'serSelect',\r\n prop = (prefix ? ('-' + prefix.toLowerCase() + '-') : '') + 'user-select';\r\n\r\n e.style.cssText = prop + ': text;';\r\n if (e.style[propCC] == 'text') {\r\n t = true;\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n return t;\r\n })();\r\n */\r\n\r\n\r\n if (!$.ui || !$.widget) {\r\n // duck punch $.cleanData like jQueryUI does to get that remove event\r\n $.cleanData = (function (orig) {\r\n return function (elems) {\r\n var events, elem, i;\r\n for (i = 0; elems[i] != null; i++) {\r\n elem = elems[i];\r\n try {\r\n // Only trigger remove when necessary to save time\r\n events = $._data(elem, 'events');\r\n if (events && events.remove) {\r\n $(elem).triggerHandler('remove');\r\n }\r\n\r\n // Http://bugs.jquery.com/ticket/8235\r\n } catch (e) {\r\n }\r\n }\r\n orig(elems);\r\n };\r\n })($.cleanData);\r\n }\r\n /* jshint ignore:end */\r\n // jscs:enable\r\n\r\n var // currently active contextMenu trigger\r\n $currentTrigger = null,\r\n // is contextMenu initialized with at least one menu?\r\n initialized = false,\r\n // window handle\r\n $win = $(window),\r\n // number of registered menus\r\n counter = 0,\r\n // mapping selector to namespace\r\n namespaces = {},\r\n // mapping namespace to options\r\n menus = {},\r\n // custom command type handlers\r\n types = {},\r\n // default values\r\n defaults = {\r\n // selector of contextMenu trigger\r\n selector: null,\r\n // where to append the menu to\r\n appendTo: null,\r\n // method to trigger context menu [\"right\", \"left\", \"hover\"]\r\n trigger: 'right',\r\n // hide menu when mouse leaves trigger / menu elements\r\n autoHide: false,\r\n // ms to wait before showing a hover-triggered context menu\r\n del
|