diff --git a/CHANGELOG.md b/CHANGELOG.md index 8270cc56..44c0003f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Changelog ## -### Unreleased +### 2.6.4 #### Fixed @@ -8,7 +8,7 @@ * LayerClick sometimes breaks when the source is not a mouseevent ([Issue #132](https://github.com/swisnl/jQuery-contextMenu/issues/132)). * The contextmenu now checks `visible` on items once instead of twice. Fixes [issue 612](https://github.com/swisnl/jQuery-contextMenu/issues/612). * Font awesome li height is now consistent again ([Issue #610](https://github.com/swisnl/jQuery-contextMenu/issues/610)). - + ### 2.6.3 diff --git a/dist/font/context-menu-icons.eot b/dist/font/context-menu-icons.eot index 02278c27..9a5e3130 100644 Binary files a/dist/font/context-menu-icons.eot and b/dist/font/context-menu-icons.eot differ diff --git a/dist/font/context-menu-icons.ttf b/dist/font/context-menu-icons.ttf index aae7d7d9..4775bb4e 100644 Binary files a/dist/font/context-menu-icons.ttf and b/dist/font/context-menu-icons.ttf differ diff --git a/dist/font/context-menu-icons.woff b/dist/font/context-menu-icons.woff index 5ab6f162..71c473a0 100644 Binary files a/dist/font/context-menu-icons.woff and b/dist/font/context-menu-icons.woff differ diff --git a/dist/font/context-menu-icons.woff2 b/dist/font/context-menu-icons.woff2 index 15c310bd..24e2f102 100644 Binary files a/dist/font/context-menu-icons.woff2 and b/dist/font/context-menu-icons.woff2 differ diff --git a/dist/jquery.contextMenu.css b/dist/jquery.contextMenu.css index c5fceb84..465d222e 100644 --- a/dist/jquery.contextMenu.css +++ b/dist/jquery.contextMenu.css @@ -2,7 +2,7 @@ /*! * jQuery contextMenu - Plugin for simple contextMenu handling * - * Version: v2.6.3 + * Version: v2.6.4 * * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) * Web: http://swisnl.github.io/jQuery-contextMenu/ @@ -12,7 +12,7 @@ * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - * Date: 2018-03-16T11:08:31.415Z + * Date: 2018-03-16T11:13:46.072Z */ @-webkit-keyframes cm-spin { 0% { @@ -54,8 +54,8 @@ font-style: normal; font-weight: normal; - src: url("font/context-menu-icons.eot?4mls"); - src: url("font/context-menu-icons.eot?4mls#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?4mls") format("woff2"), url("font/context-menu-icons.woff?4mls") format("woff"), url("font/context-menu-icons.ttf?4mls") format("truetype"); + src: url("font/context-menu-icons.eot?1s39y"); + src: url("font/context-menu-icons.eot?1s39y#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?1s39y") format("woff2"), url("font/context-menu-icons.woff?1s39y") format("woff"), url("font/context-menu-icons.ttf?1s39y") format("truetype"); } .context-menu-icon-add:before { diff --git a/dist/jquery.contextMenu.js b/dist/jquery.contextMenu.js index a8ec6896..30671bc7 100755 --- a/dist/jquery.contextMenu.js +++ b/dist/jquery.contextMenu.js @@ -1,7 +1,7 @@ /** - * jQuery contextMenu v2.6.3 - Plugin for simple contextMenu handling + * jQuery contextMenu v2.6.4 - Plugin for simple contextMenu handling * - * Version: v2.6.3 + * Version: v2.6.4 * * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) * Web: http://swisnl.github.io/jQuery-contextMenu/ @@ -11,7 +11,7 @@ * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - * Date: 2018-03-16T11:08:31.358Z + * Date: 2018-03-16T11:13:45.992Z */ // jscs:disable diff --git a/dist/jquery.contextMenu.min.css b/dist/jquery.contextMenu.min.css index b943aa8a..26e144eb 100644 --- a/dist/jquery.contextMenu.min.css +++ b/dist/jquery.contextMenu.min.css @@ -1,7 +1,7 @@ @charset "UTF-8";/*! * jQuery contextMenu - Plugin for simple contextMenu handling * - * Version: v2.6.3 + * Version: v2.6.4 * * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) * Web: http://swisnl.github.io/jQuery-contextMenu/ @@ -11,6 +11,6 @@ * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * - * Date: 2018-03-16T11:08:31.415Z - */@-webkit-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@-o-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?4mls);src:url(font/context-menu-icons.eot?4mls#iefix) format("embedded-opentype"),url(font/context-menu-icons.woff2?4mls) format("woff2"),url(font/context-menu-icons.woff?4mls) format("woff"),url(font/context-menu-icons.ttf?4mls) format("truetype")}.context-menu-icon-add:before{content:"\EA01"}.context-menu-icon-copy:before{content:"\EA02"}.context-menu-icon-cut:before{content:"\EA03"}.context-menu-icon-delete:before{content:"\EA04"}.context-menu-icon-edit:before{content:"\EA05"}.context-menu-icon-loading:before{content:"\EA06"}.context-menu-icon-paste:before{content:"\EA07"}.context-menu-icon-quit:before{content:"\EA08"}.context-menu-icon::before{position:absolute;top:50%;left:0;width:2em;font-family:context-menu-icons;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon-loading:before{-webkit-animation:cm-spin 2s infinite;-o-animation:cm-spin 2s infinite;animation:cm-spin 2s infinite}.context-menu-icon.context-menu-icon--fa{display:list-item;font-family:inherit;line-height:inherit}.context-menu-icon.context-menu-icon--fa::before{position:absolute;top:50%;left:0;width:2em;font-family:FontAwesome;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-icon--fa.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline} + * Date: 2018-03-16T11:13:46.072Z + */@-webkit-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@-o-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?1s39y);src:url(font/context-menu-icons.eot?1s39y#iefix) format("embedded-opentype"),url(font/context-menu-icons.woff2?1s39y) format("woff2"),url(font/context-menu-icons.woff?1s39y) format("woff"),url(font/context-menu-icons.ttf?1s39y) format("truetype")}.context-menu-icon-add:before{content:"\EA01"}.context-menu-icon-copy:before{content:"\EA02"}.context-menu-icon-cut:before{content:"\EA03"}.context-menu-icon-delete:before{content:"\EA04"}.context-menu-icon-edit:before{content:"\EA05"}.context-menu-icon-loading:before{content:"\EA06"}.context-menu-icon-paste:before{content:"\EA07"}.context-menu-icon-quit:before{content:"\EA08"}.context-menu-icon::before{position:absolute;top:50%;left:0;width:2em;font-family:context-menu-icons;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon-loading:before{-webkit-animation:cm-spin 2s infinite;-o-animation:cm-spin 2s infinite;animation:cm-spin 2s infinite}.context-menu-icon.context-menu-icon--fa{display:list-item;font-family:inherit;line-height:inherit}.context-menu-icon.context-menu-icon--fa::before{position:absolute;top:50%;left:0;width:2em;font-family:FontAwesome;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-icon--fa.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline} /*# sourceMappingURL=jquery.contextMenu.min.css.map */ diff --git a/dist/jquery.contextMenu.min.css.map b/dist/jquery.contextMenu.min.css.map index 411bcd4f..8446f931 100644 --- a/dist/jquery.contextMenu.min.css.map +++ b/dist/jquery.contextMenu.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["jquery.contextMenu.css","jquery.contextMenu.min.css"],"names":[],"mappings":"iBACA;;;;;;;;;;;;;;AAeA,2BACE,GACE,kBAAA,iBAAA,UACA,UAAA,iBAAA,UCEF,KDCE,kBAAA,iBAAA,eANJ,UAAA,iBAAA,gBCUA,sBACE,GDPA,kBAAA,iBAAA,UACE,aAAA,iBAAA,UACA,UAAA,iBAAA,UANJ,KACE,kBAAA,iBAAA,eACE,aAAA,iBAAA,eACA,UAAA,iBAAA,gBCmBJ,mBACE,GACE,kBDlBA,iBAAA,UCmBK,aAAc,iBAAiB,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AAI,MAAM,QDlCpB,cAAA,KACE,mBAAA,EAAA,IAA0B,IAAA,eAC1B,WAAY,EAAA,IAAA,IAAA,eAGd,mBACE,SAAA,SACA,mBAAe,YACf,gBAAkB,YCoCV,WAAY,YDlCtB,QAAA,KAAA,IACE,MAAA,QACA,oBAAiB,KCoCd,iBAAkB,KDlCvB,gBAAA,KACE,YAAY,KACZ,iBAAA,KCsCF,wBDlCE,QAAA,EACA,OAAA,MAAY,EACZ,cAAS,IAAA,MAAA,QCsCX,+BACA,kCDrCE,oBAAS,KACT,iBAAa,KCuCT,gBAAiB,KDrCvB,YAAA,KAGA,sCACE,MAAA,KCuCA,OAAQ,QDrCV,iBAAA,QCyCA,yCDrCA,MAAA,KACA,OAAA,QCuCE,iBAAkB,KAGpB,uCACE,MAAO,QDrCT,OAAA,QAGA,4BCuCE,SAAU,SACV,IAAK,IACL,MAAO,KDrCP,QAAA,ECuCA,MDvCA,ECwCA,ODxCA,EACA,QAAA,GACA,aAAc,YAAA,YAAA,YAAA,QCyCd,aAAc,MDvChB,aAAA,MAAA,EAAA,MAAA,MACE,kBAAc,iBCyCV,cAAe,iBDvCrB,aAAA,iBACE,UAAc,iBC8ChB,sCACE,QAAS,KAAK,KAIhB,4BACE,eAAgB,IAIlB,+CACA,4CACE,SAAU,SACV,IAAK,MACL,aAAc,KAGhB,0BACE,OAAQ,EAGV,0BACA,2CAEA,iCADA,mCAEE,QAAS,MACT,MAAO,KACP,mBAAoB,WACjB,gBAAiB,WACZ,WAAY,WAGtB,mCACE,OAAQ,IAGV,sCACE,IAAK,KAEL,MAAO,MACP,QAAS,KAGX,2DACE,QAAS,MAGX,wBACE,gBAAiB","file":"jquery.contextMenu.min.css","sourcesContent":["@charset \"UTF-8\";\n/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.6.3\n *\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\n * Web: http://swisnl.github.io/jQuery-contextMenu/\n *\n * Copyright (c) 2011-2018 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2018-03-16T11:08:31.415Z\n */\n@keyframes cm-spin {\n 0% {\n -webkit-transform: translateY(-50%) rotate(0deg);\n transform: translateY(-50%) rotate(0deg); }\n 100% {\n -webkit-transform: translateY(-50%) rotate(359deg);\n transform: translateY(-50%) rotate(359deg); } }\n\n@font-face {\n font-family: \"context-menu-icons\";\n src: url(\"font/context-menu-icons.eot?4mls\");\n src: url(\"font/context-menu-icons.eot?4mls#iefix\") format(\"embedded-opentype\"), url(\"font/context-menu-icons.woff2?4mls\") format(\"woff2\"), url(\"font/context-menu-icons.woff?4mls\") format(\"woff\"), url(\"font/context-menu-icons.ttf?4mls\") format(\"truetype\");\n font-weight: normal;\n font-style: normal; }\n\n.context-menu-icon-add:before {\n content: \"\\EA01\"; }\n\n.context-menu-icon-copy:before {\n content: \"\\EA02\"; }\n\n.context-menu-icon-cut:before {\n content: \"\\EA03\"; }\n\n.context-menu-icon-delete:before {\n content: \"\\EA04\"; }\n\n.context-menu-icon-edit:before {\n content: \"\\EA05\"; }\n\n.context-menu-icon-loading:before {\n content: \"\\EA06\"; }\n\n.context-menu-icon-paste:before {\n content: \"\\EA07\"; }\n\n.context-menu-icon-quit:before {\n content: \"\\EA08\"; }\n\n.context-menu-icon::before {\n color: #2980B9;\n font-family: \"context-menu-icons\";\n font-style: normal;\n font-weight: normal;\n font-size: 1em;\n left: 0;\n line-height: 1;\n position: absolute;\n text-align: center;\n top: 50%;\n transform: translateY(-50%);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 2em; }\n\n.context-menu-icon.context-menu-hover:before {\n color: #FFF; }\n\n.context-menu-icon.context-menu-disabled::before {\n color: #bbbbbb; }\n\n.context-menu-icon.context-menu-icon-loading:before {\n animation: cm-spin 2s infinite; }\n\n.context-menu-icon.context-menu-icon--fa {\n display: list-item;\n font-family: inherit;\n line-height: inherit; }\n .context-menu-icon.context-menu-icon--fa::before {\n color: #2980B9;\n font-family: FontAwesome;\n font-style: normal;\n font-weight: normal;\n font-size: 1em;\n left: 0;\n line-height: 1;\n position: absolute;\n text-align: center;\n top: 50%;\n transform: translateY(-50%);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 2em; }\n .context-menu-icon.context-menu-icon--fa.context-menu-hover:before {\n color: #FFF; }\n .context-menu-icon.context-menu-icon--fa.context-menu-disabled::before {\n color: #bbbbbb; }\n\n.context-menu-list {\n background: #FFF;\n border: 1px solid #bebebe;\n border-radius: 0.2em;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n display: inline-block;\n font-family: inherit;\n font-size: inherit;\n list-style-type: none;\n margin: 0.3em;\n max-width: 26em;\n min-width: 13em;\n padding: 0.25em 0;\n position: absolute; }\n\n.context-menu-item {\n background-color: #FFF;\n box-sizing: content-box;\n color: #2F2F2F;\n padding: 0.2em 2em;\n position: relative;\n user-select: none; }\n\n.context-menu-separator {\n border-bottom: 1px solid #e6e6e6;\n margin: 0.35em 0;\n padding: 0; }\n\n.context-menu-item > label > input,\n.context-menu-item > label > textarea {\n user-select: text; }\n\n.context-menu-item.context-menu-hover {\n background-color: #2980B9;\n color: #FFF;\n cursor: pointer; }\n\n.context-menu-item.context-menu-disabled {\n background-color: #FFF;\n color: #bbbbbb;\n cursor: default; }\n\n.context-menu-input.context-menu-hover {\n cursor: default;\n color: #2F2F2F; }\n\n.context-menu-submenu:after {\n content: '';\n border-style: solid;\n border-width: .25em 0 .25em .25em;\n border-color: transparent transparent transparent #2F2F2F;\n height: 0;\n position: absolute;\n right: .5em;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n z-index: 1; }\n\n/**\n * Inputs\n */\n.context-menu-item.context-menu-input {\n padding: .3em .6em; }\n\n/* vertically align inside labels */\n.context-menu-input > label > * {\n vertical-align: top; }\n\n/* position checkboxes and radios as icons */\n.context-menu-input > label > input[type=\"checkbox\"],\n.context-menu-input > label > input[type=\"radio\"] {\n margin-right: .4em;\n position: relative;\n top: .12em; }\n\n.context-menu-input > label {\n margin: 0; }\n\n.context-menu-input > label,\n.context-menu-input > label > input[type=\"text\"],\n.context-menu-input > label > textarea,\n.context-menu-input > label > select {\n box-sizing: border-box;\n display: block;\n width: 100%; }\n\n.context-menu-input > label > textarea {\n height: 7em; }\n\n.context-menu-item > .context-menu-list {\n display: none;\n /* re-positioned by js */\n right: -.3em;\n top: .3em; }\n\n.context-menu-item.context-menu-visible > .context-menu-list {\n display: block; }\n\n.context-menu-accesskey {\n text-decoration: underline; }\n","@charset \"UTF-8\";/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.6.3\n *\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\n * Web: http://swisnl.github.io/jQuery-contextMenu/\n *\n * Copyright (c) 2011-2018 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2018-03-16T10:50:09.648Z\n */@-webkit-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@-o-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?1z485);src:url(font/context-menu-icons.eot?1z485#iefix) format(\"embedded-opentype\"),url(font/context-menu-icons.woff2?1z485) format(\"woff2\"),url(font/context-menu-icons.woff?1z485) format(\"woff\"),url(font/context-menu-icons.ttf?1z485) format(\"truetype\")}.context-menu-icon-add:before{content:\"\\EA01\"}.context-menu-icon-copy:before{content:\"\\EA02\"}.context-menu-icon-cut:before{content:\"\\EA03\"}.context-menu-icon-delete:before{content:\"\\EA04\"}.context-menu-icon-edit:before{content:\"\\EA05\"}.context-menu-icon-loading:before{content:\"\\EA06\"}.context-menu-icon-paste:before{content:\"\\EA07\"}.context-menu-icon-quit:before{content:\"\\EA08\"}.context-menu-icon::before{position:absolute;top:50%;left:0;width:2em;font-family:context-menu-icons;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon-loading:before{-webkit-animation:cm-spin 2s infinite;-o-animation:cm-spin 2s infinite;animation:cm-spin 2s infinite}.context-menu-icon.context-menu-icon--fa{display:list-item;font-family:inherit}.context-menu-icon.context-menu-icon--fa::before{position:absolute;top:50%;left:0;width:2em;font-family:FontAwesome;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-icon--fa.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\n/*# sourceMappingURL=jquery.contextMenu.min.css.map */\n"]} \ No newline at end of file +{"version":3,"sources":["jquery.contextMenu.css","jquery.contextMenu.min.css"],"names":[],"mappings":"iBACA;;;;;;;;;;;;;;AAeA,2BACE,GACE,kBAAA,iBAAA,UACA,UAAA,iBAAA,UCEF,KDCE,kBAAA,iBAAA,eANJ,UAAA,iBAA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contextMenu.min.css","sourcesContent":["@charset \"UTF-8\";\n/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.6.4\n *\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\n * Web: http://swisnl.github.io/jQuery-contextMenu/\n *\n * Copyright (c) 2011-2018 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2018-03-16T11:13:46.072Z\n */\n@keyframes cm-spin {\n 0% {\n -webkit-transform: translateY(-50%) rotate(0deg);\n transform: translateY(-50%) rotate(0deg); }\n 100% {\n -webkit-transform: translateY(-50%) rotate(359deg);\n transform: translateY(-50%) rotate(359deg); } }\n\n@font-face {\n font-family: \"context-menu-icons\";\n src: url(\"font/context-menu-icons.eot?1s39y\");\n src: url(\"font/context-menu-icons.eot?1s39y#iefix\") format(\"embedded-opentype\"), url(\"font/context-menu-icons.woff2?1s39y\") format(\"woff2\"), url(\"font/context-menu-icons.woff?1s39y\") format(\"woff\"), url(\"font/context-menu-icons.ttf?1s39y\") format(\"truetype\");\n font-weight: normal;\n font-style: normal; }\n\n.context-menu-icon-add:before {\n content: \"\\EA01\"; }\n\n.context-menu-icon-copy:before {\n content: \"\\EA02\"; }\n\n.context-menu-icon-cut:before {\n content: \"\\EA03\"; }\n\n.context-menu-icon-delete:before {\n content: \"\\EA04\"; }\n\n.context-menu-icon-edit:before {\n content: \"\\EA05\"; }\n\n.context-menu-icon-loading:before {\n content: \"\\EA06\"; }\n\n.context-menu-icon-paste:before {\n content: \"\\EA07\"; }\n\n.context-menu-icon-quit:before {\n content: \"\\EA08\"; }\n\n.context-menu-icon::before {\n color: #2980B9;\n font-family: \"context-menu-icons\";\n font-style: normal;\n font-weight: normal;\n font-size: 1em;\n left: 0;\n line-height: 1;\n position: absolute;\n text-align: center;\n top: 50%;\n transform: translateY(-50%);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 2em; }\n\n.context-menu-icon.context-menu-hover:before {\n color: #FFF; }\n\n.context-menu-icon.context-menu-disabled::before {\n color: #bbbbbb; }\n\n.context-menu-icon.context-menu-icon-loading:before {\n animation: cm-spin 2s infinite; }\n\n.context-menu-icon.context-menu-icon--fa {\n display: list-item;\n font-family: inherit;\n line-height: inherit; }\n .context-menu-icon.context-menu-icon--fa::before {\n color: #2980B9;\n font-family: FontAwesome;\n font-style: normal;\n font-weight: normal;\n font-size: 1em;\n left: 0;\n line-height: 1;\n position: absolute;\n text-align: center;\n top: 50%;\n transform: translateY(-50%);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 2em; }\n .context-menu-icon.context-menu-icon--fa.context-menu-hover:before {\n color: #FFF; }\n .context-menu-icon.context-menu-icon--fa.context-menu-disabled::before {\n color: #bbbbbb; }\n\n.context-menu-list {\n background: #FFF;\n border: 1px solid #bebebe;\n border-radius: 0.2em;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n display: inline-block;\n font-family: inherit;\n font-size: inherit;\n list-style-type: none;\n margin: 0.3em;\n max-width: 26em;\n min-width: 13em;\n padding: 0.25em 0;\n position: absolute; }\n\n.context-menu-item {\n background-color: #FFF;\n box-sizing: content-box;\n color: #2F2F2F;\n padding: 0.2em 2em;\n position: relative;\n user-select: none; }\n\n.context-menu-separator {\n border-bottom: 1px solid #e6e6e6;\n margin: 0.35em 0;\n padding: 0; }\n\n.context-menu-item > label > input,\n.context-menu-item > label > textarea {\n user-select: text; }\n\n.context-menu-item.context-menu-hover {\n background-color: #2980B9;\n color: #FFF;\n cursor: pointer; }\n\n.context-menu-item.context-menu-disabled {\n background-color: #FFF;\n color: #bbbbbb;\n cursor: default; }\n\n.context-menu-input.context-menu-hover {\n cursor: default;\n color: #2F2F2F; }\n\n.context-menu-submenu:after {\n content: '';\n border-style: solid;\n border-width: .25em 0 .25em .25em;\n border-color: transparent transparent transparent #2F2F2F;\n height: 0;\n position: absolute;\n right: .5em;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n z-index: 1; }\n\n/**\n * Inputs\n */\n.context-menu-item.context-menu-input {\n padding: .3em .6em; }\n\n/* vertically align inside labels */\n.context-menu-input > label > * {\n vertical-align: top; }\n\n/* position checkboxes and radios as icons */\n.context-menu-input > label > input[type=\"checkbox\"],\n.context-menu-input > label > input[type=\"radio\"] {\n margin-right: .4em;\n position: relative;\n top: .12em; }\n\n.context-menu-input > label {\n margin: 0; }\n\n.context-menu-input > label,\n.context-menu-input > label > input[type=\"text\"],\n.context-menu-input > label > textarea,\n.context-menu-input > label > select {\n box-sizing: border-box;\n display: block;\n width: 100%; }\n\n.context-menu-input > label > textarea {\n height: 7em; }\n\n.context-menu-item > .context-menu-list {\n display: none;\n /* re-positioned by js */\n right: -.3em;\n top: .3em; }\n\n.context-menu-item.context-menu-visible > .context-menu-list {\n display: block; }\n\n.context-menu-accesskey {\n text-decoration: underline; }\n","@charset \"UTF-8\";/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.6.3\n *\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\n * Web: http://swisnl.github.io/jQuery-contextMenu/\n *\n * Copyright (c) 2011-2018 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2018-03-16T11:08:31.415Z\n */@-webkit-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@-o-keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes cm-spin{0%{-webkit-transform:translateY(-50%) rotate(0);-o-transform:translateY(-50%) rotate(0);transform:translateY(-50%) rotate(0)}100%{-webkit-transform:translateY(-50%) rotate(359deg);-o-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?4mls);src:url(font/context-menu-icons.eot?4mls#iefix) format(\"embedded-opentype\"),url(font/context-menu-icons.woff2?4mls) format(\"woff2\"),url(font/context-menu-icons.woff?4mls) format(\"woff\"),url(font/context-menu-icons.ttf?4mls) format(\"truetype\")}.context-menu-icon-add:before{content:\"\\EA01\"}.context-menu-icon-copy:before{content:\"\\EA02\"}.context-menu-icon-cut:before{content:\"\\EA03\"}.context-menu-icon-delete:before{content:\"\\EA04\"}.context-menu-icon-edit:before{content:\"\\EA05\"}.context-menu-icon-loading:before{content:\"\\EA06\"}.context-menu-icon-paste:before{content:\"\\EA07\"}.context-menu-icon-quit:before{content:\"\\EA08\"}.context-menu-icon::before{position:absolute;top:50%;left:0;width:2em;font-family:context-menu-icons;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon-loading:before{-webkit-animation:cm-spin 2s infinite;-o-animation:cm-spin 2s infinite;animation:cm-spin 2s infinite}.context-menu-icon.context-menu-icon--fa{display:list-item;font-family:inherit;line-height:inherit}.context-menu-icon.context-menu-icon--fa::before{position:absolute;top:50%;left:0;width:2em;font-family:FontAwesome;font-size:1em;font-style:normal;font-weight:400;line-height:1;color:#2980b9;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.context-menu-icon.context-menu-icon--fa.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\n/*# sourceMappingURL=jquery.contextMenu.min.css.map */\n"]} \ No newline at end of file diff --git a/dist/jquery.contextMenu.min.js.map b/dist/jquery.contextMenu.min.js.map index 18608084..d2879223 100644 --- a/dist/jquery.contextMenu.min.js.map +++ b/dist/jquery.contextMenu.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["jquery.contextMenu.min.js"],"names":["factory","define","amd","exports","require","jQuery","$","orig","support","htmlMenuitem","window","htmlCommand","eventSelectstart","document","documentElement","ui","widget","cleanData","elems","events","elem","i","_data","remove","triggerHandler","e","$currentTrigger","initialized","$win","counter","namespaces","menus","types","defaults","selector","appendTo","trigger","autoHide","delay","reposition","hideOnSecondTrigger","selectableSubMenu","classNames","hover","disabled","visible","notSelectable","icon","iconEdit","iconCut","iconCopy","iconPaste","iconDelete","iconAdd","iconQuit","iconLoadingClass","determinePosition","$menu","position","css","my","at","of","this","offset","collision","top","outerHeight","left","outerWidth","opt","x","y","offsetParentOffset","offsetParent","bottom","scrollTop","height","right","scrollLeft","width","call","positionSubmenu","zIndex","animation","duration","show","hide","noop","activated","callback","items","hoveract","timer","pageX","pageY","handle","abortevent","preventDefault","stopImmediatePropagation","contextmenu","$this","data","originalEvent","mouseButton","hasClass","build","built","extend","isEmptyObject","console","error","log","Error","$trigger","op","create","click","Event","mousedown","length","is","button","mouseup","removeData","mouseenter","$related","relatedTarget","$document","closest","on","mousemove","setTimeout","off","mouseleave","clearTimeout","layerClick","target","root","fakeClick","undefined","$window","triggerAction","elementFromPoint","$layer","isContentEditable","range","createRange","sel","getSelection","selectNode","collapse","removeAllRanges","addRange","one","contextMenu","keyStop","isInput","stopPropagation","key","targetZIndex","getZIndexOfTriggerTarget","style","parentElement","parseInt","keyCode","shiftKey","$selected","find","blur","prop","parent","$parent","itemdata","children","k","String","fromCharCode","toUpperCase","accesskeys","$node","prevItem","$s","$children","$prev","prev","last","$round","itemMouseleave","get","itemMouseenter","$input","focus","nextItem","$next","next","first","focusInput","contextMenuRoot","blurInput","menuMouseenter","hovering","menuMouseleave","itemClick","contextMenuKey","isFunction","callbacks","Object","prototype","hasOwnProperty","update","inputClick","hideMenu","force","focusItem","addClass","join","not","removeClass","filter","blurItem","additionalZValue","$t","zin","$tt","Math","max","indexOf","toLowerCase","zindex","layer","pos","each","createNameNode","item","$name","_accesskey","_beforeAccesskey","append","createTextNode","text","_afterAccesskey","isHtmlName","accesskey","html","name","className","$label","type","ak","aks","val","t","split","keys","charAt","push","splitAccesskey","matched","match","RegExp","commands","hasTypes","inputs","attr","value","selected","prependTo","radio","options","then","processPromises","_icon","substring","body","resize","nested","domMenu","display","getBoundingClientRect","ceil","minWidth","maxWidth","addBack","hasVisibleItems","$item","z-index","opacity","background-color","insertBefore","promise","errorPromise","errorItem","finishPromiseProcess","bind","$menuOffset","winHeight","winScrollTop","menuHeight","overflow-x","overflow-y","inputLabel","node","id","fn","operation","$o","context","isPlainObject","o","$context","_hasContext","menu","ns","itemClickEvent","contextMenuItemObj","contextmenu:focus.contextMenu","contextmenu:blur.contextMenu","contextmenu.contextMenu","mouseenter.contextMenu","mouseleave.contextMenu","contextmenu:hide.contextMenu","prevcommand.contextMenu","nextcommand.contextMenu","$visibleMenu","fromMenu","setInputValues","getInputValues","element","menuChildren","label","nodeName","clone"],"mappings":"CAkBA,SAAWA,GACe,mBAAXC,QAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACO,iBAAZG,QAEdH,EAAQI,QAAQ,WAGhBJ,EAAQK,QAThB,CAWG,SAAUC,GAET,aAmCkB,IAAWC,EA5B7BD,EAAEE,QAAQC,aAAgB,wBAAyBC,OACnDJ,EAAEE,QAAQG,YAAe,uBAAwBD,OACjDJ,EAAEE,QAAQI,iBAAoB,kBAAmBC,SAASC,gBAwBrDR,EAAES,IAAOT,EAAEU,SAEZV,EAAEW,WAAuBV,EAkBtBD,EAAEW,UAjBM,SAAUC,GACb,IAAIC,EAAQC,EAAMC,EAClB,IAAKA,EAAI,EAAe,MAAZH,EAAMG,GAAYA,IAAK,CAC/BD,EAAOF,EA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YAAYxC,GAAKA,EACnB7G,EAAEqJ,YAAY5H,MAAQA","file":"jquery.contextMenu.min.js","sourcesContent":["/**\n * jQuery contextMenu v2.6.3 - Plugin for simple contextMenu handling\n *\n * Version: v2.6.3\n *\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\n * Web: http://swisnl.github.io/jQuery-contextMenu/\n *\n * Copyright (c) 2011-2018 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2018-03-16T11:08:31.358Z\n */\n\n// jscs:disable\n/* jshint ignore:start */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as anonymous module.\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n // Node / CommonJS\n factory(require('jquery'));\n } else {\n // Browser globals.\n factory(jQuery);\n }\n})(function ($) {\n\n 'use strict';\n\n // TODO: -\n // ARIA stuff: menuitem, menuitemcheckbox und menuitemradio\n // create structure if $.support[htmlCommand || htmlMenuitem] and !opt.disableNative\n\n // determine html5 compatibility\n $.support.htmlMenuitem = ('HTMLMenuItemElement' in window);\n $.support.htmlCommand = ('HTMLCommandElement' in window);\n $.support.eventSelectstart = ('onselectstart' in document.documentElement);\n /* // should the need arise, test for css user-select\n $.support.cssUserSelect = (function(){\n var t = false,\n e = document.createElement('div');\n\n $.each('Moz|Webkit|Khtml|O|ms|Icab|'.split('|'), function(i, prefix) {\n var propCC = prefix + (prefix ? 'U' : 'u') + 'serSelect',\n prop = (prefix ? ('-' + prefix.toLowerCase() + '-') : '') + 'user-select';\n\n e.style.cssText = prop + ': text;';\n if (e.style[propCC] == 'text') {\n t = true;\n return false;\n }\n\n return true;\n });\n\n return t;\n })();\n */\n\n\n if (!$.ui || !$.widget) {\n // duck punch $.cleanData like jQueryUI does to get that remove event\n $.cleanData = (function (orig) {\n return function (elems) {\n var events, elem, i;\n for (i = 0; elems[i] != null; i++) {\n elem = elems[i];\n try {\n // Only trigger remove when necessary to save time\n events = $._data(elem, 'events');\n if (events && events.remove) {\n $(elem).triggerHandler('remove');\n }\n\n // Http://bugs.jquery.com/ticket/8235\n } catch (e) {\n }\n }\n orig(elems);\n };\n })($.cleanData);\n }\n /* jshint ignore:end */\n // jscs:enable\n\n var // currently active contextMenu trigger\n $currentTrigger = null,\n // is contextMenu initialized with at least one menu?\n initialized = false,\n // window handle\n $win = $(window),\n // number of registered menus\n counter = 0,\n // mapping selector to namespace\n namespaces = {},\n // mapping namespace to options\n menus = {},\n // custom command type handlers\n types = {},\n // default values\n defaults = {\n // selector of contextMenu trigger\n selector: null,\n // where to append the menu to\n appendTo: null,\n // method to trigger context menu [\"right\", \"left\", \"hover\"]\n trigger: 'right',\n // hide menu when mouse leaves trigger / menu elements\n autoHide: false,\n // ms to wait before showing a hover-triggered context menu\n delay: 200,\n // flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu\n // as long as the trigger happened on one of the trigger-element's child nodes\n reposition: true,\n // Flag denoting if a second trigger should close the menu, as long as \n // the trigger happened on one of the trigger-element's child nodes.\n // This overrides the reposition option.\n hideOnSecondTrigger: false,\n\n //ability to select submenu\n selectableSubMenu: false,\n\n // Default classname configuration to be able avoid conflicts in frameworks\n classNames: {\n hover: 'context-menu-hover', // Item hover\n disabled: 'context-menu-disabled', // Item disabled\n visible: 'context-menu-visible', // Item visible\n notSelectable: 'context-menu-not-selectable', // Item not selectable\n\n icon: 'context-menu-icon',\n iconEdit: 'context-menu-icon-edit',\n iconCut: 'context-menu-icon-cut',\n iconCopy: 'context-menu-icon-copy',\n iconPaste: 'context-menu-icon-paste',\n iconDelete: 'context-menu-icon-delete',\n iconAdd: 'context-menu-icon-add',\n iconQuit: 'context-menu-icon-quit',\n iconLoadingClass: 'context-menu-icon-loading'\n },\n\n // determine position to show menu at\n determinePosition: function ($menu) {\n // position to the lower middle of the trigger element\n if ($.ui && $.ui.position) {\n // .position() is provided as a jQuery UI utility\n // (...and it won't work on hidden elements)\n $menu.css('display', 'block').position({\n my: 'center top',\n at: 'center bottom',\n of: this,\n offset: '0 5',\n collision: 'fit'\n }).css('display', 'none');\n } else {\n // determine contextMenu position\n var offset = this.offset();\n offset.top += this.outerHeight();\n offset.left += this.outerWidth() / 2 - $menu.outerWidth() / 2;\n $menu.css(offset);\n }\n },\n // position menu\n position: function (opt, x, y) {\n var offset;\n // determine contextMenu position\n if (!x && !y) {\n opt.determinePosition.call(this, opt.$menu);\n return;\n } else if (x === 'maintain' && y === 'maintain') {\n // x and y must not be changed (after re-show on command click)\n offset = opt.$menu.position();\n } else {\n // x and y are given (by mouse event)\n var offsetParentOffset = opt.$menu.offsetParent().offset();\n offset = {top: y - offsetParentOffset.top, left: x -offsetParentOffset.left};\n }\n\n // correct offset if viewport demands it\n var bottom = $win.scrollTop() + $win.height(),\n right = $win.scrollLeft() + $win.width(),\n height = opt.$menu.outerHeight(),\n width = opt.$menu.outerWidth();\n\n if (offset.top + height > bottom) {\n offset.top -= height;\n }\n\n if (offset.top < 0) {\n offset.top = 0;\n }\n\n if (offset.left + width > right) {\n offset.left -= width;\n }\n\n if (offset.left < 0) {\n offset.left = 0;\n }\n\n opt.$menu.css(offset);\n },\n // position the sub-menu\n positionSubmenu: function ($menu) {\n if (typeof $menu === 'undefined') {\n // When user hovers over item (which has sub items) handle.focusItem will call this.\n // but the submenu does not exist yet if opt.items is a promise. just return, will\n // call positionSubmenu after promise is completed.\n return;\n }\n if ($.ui && $.ui.position) {\n // .position() is provided as a jQuery UI utility\n // (...and it won't work on hidden elements)\n $menu.css('display', 'block').position({\n my: 'left top-5',\n at: 'right top',\n of: this,\n collision: 'flipfit fit'\n }).css('display', '');\n } else {\n // determine contextMenu position\n var offset = {\n top: -9,\n left: this.outerWidth() - 5\n };\n $menu.css(offset);\n }\n },\n // offset to add to zIndex\n zIndex: 1,\n // show hide animation settings\n animation: {\n duration: 50,\n show: 'slideDown',\n hide: 'slideUp'\n },\n // events\n events: {\n show: $.noop,\n hide: $.noop,\n activated: $.noop\n },\n // default callback\n callback: null,\n // list of contextMenu items\n items: {}\n },\n // mouse position for hover activation\n hoveract = {\n timer: null,\n pageX: null,\n pageY: null\n },\n // determine zIndex\n zindex = function ($t) {\n var zin = 0,\n $tt = $t;\n\n while (true) {\n zin = Math.max(zin, parseInt($tt.css('z-index'), 10) || 0);\n $tt = $tt.parent();\n if (!$tt || !$tt.length || 'html body'.indexOf($tt.prop('nodeName').toLowerCase()) > -1) {\n break;\n }\n }\n return zin;\n },\n // event handlers\n handle = {\n // abort anything\n abortevent: function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n },\n // contextmenu show dispatcher\n contextmenu: function (e) {\n var $this = $(this);\n\n // disable actual context-menu if we are using the right mouse button as the trigger\n if (e.data.trigger === 'right') {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n\n // abort native-triggered events unless we're triggering on right click\n if ((e.data.trigger !== 'right' && e.data.trigger !== 'demand') && e.originalEvent) {\n return;\n }\n\n // Let the current contextmenu decide if it should show or not based on its own trigger settings\n if (typeof e.mouseButton !== 'undefined' && e.data) {\n if (!(e.data.trigger === 'left' && e.mouseButton === 0) && !(e.data.trigger === 'right' && e.mouseButton === 2)) {\n // Mouse click is not valid.\n return;\n }\n }\n\n // abort event if menu is visible for this trigger\n if ($this.hasClass('context-menu-active')) {\n return;\n }\n\n if (!$this.hasClass('context-menu-disabled')) {\n // theoretically need to fire a show event at \n // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus\n // var evt = jQuery.Event(\"show\", { data: data, pageX: e.pageX, pageY: e.pageY, relatedTarget: this });\n // e.data.$menu.trigger(evt);\n\n $currentTrigger = $this;\n if (e.data.build) {\n var built = e.data.build($currentTrigger, e);\n // abort if build() returned false\n if (built === false) {\n return;\n }\n\n // dynamically build menu on invocation\n e.data = $.extend(true, {}, defaults, e.data, built || {});\n\n // abort if there are no items to display\n if (!e.data.items || $.isEmptyObject(e.data.items)) {\n // Note: jQuery captures and ignores errors from event handlers\n if (window.console) {\n (console.error || console.log).call(console, 'No items specified to show in contextMenu');\n }\n\n throw new Error('No Items specified');\n }\n\n // backreference for custom command type creation\n e.data.$trigger = $currentTrigger;\n\n op.create(e.data);\n }\n op.show.call($this, e.data, e.pageX, e.pageY);\n }\n },\n // contextMenu left-click trigger\n click: function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n $(this).trigger($.Event('contextmenu', {data: e.data, pageX: e.pageX, pageY: e.pageY}));\n },\n // contextMenu right-click trigger\n mousedown: function (e) {\n // register mouse down\n var $this = $(this);\n\n // hide any previous menus\n if ($currentTrigger && $currentTrigger.length && !$currentTrigger.is($this)) {\n $currentTrigger.data('contextMenu').$menu.trigger('contextmenu:hide');\n }\n\n // activate on right click\n if (e.button === 2) {\n $currentTrigger = $this.data('contextMenuActive', true);\n }\n },\n // contextMenu right-click trigger\n mouseup: function (e) {\n // show menu\n var $this = $(this);\n if ($this.data('contextMenuActive') && $currentTrigger && $currentTrigger.length && $currentTrigger.is($this) && !$this.hasClass('context-menu-disabled')) {\n e.preventDefault();\n e.stopImmediatePropagation();\n $currentTrigger = $this;\n $this.trigger($.Event('contextmenu', {data: e.data, pageX: e.pageX, pageY: e.pageY}));\n }\n\n $this.removeData('contextMenuActive');\n },\n // contextMenu hover trigger\n mouseenter: function (e) {\n var $this = $(this),\n $related = $(e.relatedTarget),\n $document = $(document);\n\n // abort if we're coming from a menu\n if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {\n return;\n }\n\n // abort if a menu is shown\n if ($currentTrigger && $currentTrigger.length) {\n return;\n }\n\n hoveract.pageX = e.pageX;\n hoveract.pageY = e.pageY;\n hoveract.data = e.data;\n $document.on('mousemove.contextMenuShow', handle.mousemove);\n hoveract.timer = setTimeout(function () {\n hoveract.timer = null;\n $document.off('mousemove.contextMenuShow');\n $currentTrigger = $this;\n $this.trigger($.Event('contextmenu', {\n data: hoveract.data,\n pageX: hoveract.pageX,\n pageY: hoveract.pageY\n }));\n }, e.data.delay);\n },\n // contextMenu hover trigger\n mousemove: function (e) {\n hoveract.pageX = e.pageX;\n hoveract.pageY = e.pageY;\n },\n // contextMenu hover trigger\n mouseleave: function (e) {\n // abort if we're leaving for a menu\n var $related = $(e.relatedTarget);\n if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {\n return;\n }\n\n try {\n clearTimeout(hoveract.timer);\n } catch (e) {\n }\n\n hoveract.timer = null;\n },\n // click on layer to hide contextMenu\n layerClick: function (e) {\n var $this = $(this),\n root = $this.data('contextMenuRoot'),\n button = e.button,\n x = e.pageX,\n y = e.pageY,\n fakeClick = x === undefined,\n target,\n offset;\n\n e.preventDefault();\n\n setTimeout(function () {\n // If the click is not real, things break: https://github.com/swisnl/jQuery-contextMenu/issues/132\n if(fakeClick){\n if (root !== null && typeof root !== 'undefined' && root.$menu !== null && typeof root.$menu !== 'undefined') {\n root.$menu.trigger('contextmenu:hide');\n }\n return;\n }\n\n var $window;\n var triggerAction = ((root.trigger === 'left' && button === 0) || (root.trigger === 'right' && button === 2));\n\n // find the element that would've been clicked, wasn't the layer in the way\n if (document.elementFromPoint && root.$layer) {\n root.$layer.hide();\n target = document.elementFromPoint(x - $win.scrollLeft(), y - $win.scrollTop());\n\n // also need to try and focus this element if we're in a contenteditable area,\n // as the layer will prevent the browser mouse action we want\n if (target.isContentEditable) {\n var range = document.createRange(),\n sel = window.getSelection();\n range.selectNode(target);\n range.collapse(true);\n sel.removeAllRanges();\n sel.addRange(range);\n }\n $(target).trigger(e);\n root.$layer.show();\n }\n \n if (root.hideOnSecondTrigger && triggerAction && root.$menu !== null && typeof root.$menu !== 'undefined') {\n root.$menu.trigger('contextmenu:hide');\n return;\n }\n \n if (root.reposition && triggerAction) {\n if (document.elementFromPoint) {\n if (root.$trigger.is(target)) {\n root.position.call(root.$trigger, root, x, y);\n return;\n }\n } else {\n offset = root.$trigger.offset();\n $window = $(window);\n // while this looks kinda awful, it's the best way to avoid\n // unnecessarily calculating any positions\n offset.top += $window.scrollTop();\n if (offset.top <= e.pageY) {\n offset.left += $window.scrollLeft();\n if (offset.left <= e.pageX) {\n offset.bottom = offset.top + root.$trigger.outerHeight();\n if (offset.bottom >= e.pageY) {\n offset.right = offset.left + root.$trigger.outerWidth();\n if (offset.right >= e.pageX) {\n // reposition\n root.position.call(root.$trigger, root, x, y);\n return;\n }\n }\n }\n }\n }\n }\n\n if (target && triggerAction) {\n root.$trigger.one('contextmenu:hidden', function () {\n $(target).contextMenu({x: x, y: y, button: button});\n });\n }\n\n if (root !== null && typeof root !== 'undefined' && root.$menu !== null && typeof root.$menu !== 'undefined') {\n root.$menu.trigger('contextmenu:hide');\n }\n }, 50);\n },\n // key handled :hover\n keyStop: function (e, opt) {\n if (!opt.isInput) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n },\n key: function (e) {\n\n var opt = {};\n\n // Only get the data from $currentTrigger if it exists\n if ($currentTrigger) {\n opt = $currentTrigger.data('contextMenu') || {};\n }\n // If the trigger happen on a element that are above the contextmenu do this\n if (typeof opt.zIndex === 'undefined') {\n opt.zIndex = 0;\n }\n var targetZIndex = 0;\n var getZIndexOfTriggerTarget = function (target) {\n if (target.style.zIndex !== '') {\n targetZIndex = target.style.zIndex;\n } else {\n if (target.offsetParent !== null && typeof target.offsetParent !== 'undefined') {\n getZIndexOfTriggerTarget(target.offsetParent);\n }\n else if (target.parentElement !== null && typeof target.parentElement !== 'undefined') {\n getZIndexOfTriggerTarget(target.parentElement);\n }\n }\n };\n getZIndexOfTriggerTarget(e.target);\n // If targetZIndex is heigher then opt.zIndex dont progress any futher.\n // This is used to make sure that if you are using a dialog with a input / textarea / contenteditable div\n // and its above the contextmenu it wont steal keys events\n if (opt.$menu && parseInt(targetZIndex,10) > parseInt(opt.$menu.css(\"zIndex\"),10)) {\n return;\n }\n switch (e.keyCode) {\n case 9:\n case 38: // up\n handle.keyStop(e, opt);\n // if keyCode is [38 (up)] or [9 (tab) with shift]\n if (opt.isInput) {\n if (e.keyCode === 9 && e.shiftKey) {\n e.preventDefault();\n if (opt.$selected) {\n opt.$selected.find('input, textarea, select').blur();\n }\n if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {\n opt.$menu.trigger('prevcommand');\n }\n return;\n } else if (e.keyCode === 38 && opt.$selected.find('input, textarea, select').prop('type') === 'checkbox') {\n // checkboxes don't capture this key\n e.preventDefault();\n return;\n }\n } else if (e.keyCode !== 9 || e.shiftKey) {\n if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {\n opt.$menu.trigger('prevcommand');\n }\n return;\n }\n break;\n // omitting break;\n // case 9: // tab - reached through omitted break;\n case 40: // down\n handle.keyStop(e, opt);\n if (opt.isInput) {\n if (e.keyCode === 9) {\n e.preventDefault();\n if (opt.$selected) {\n opt.$selected.find('input, textarea, select').blur();\n }\n if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {\n opt.$menu.trigger('nextcommand');\n }\n return;\n } else if (e.keyCode === 40 && opt.$selected.find('input, textarea, select').prop('type') === 'checkbox') {\n // checkboxes don't capture this key\n e.preventDefault();\n return;\n }\n } else {\n if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {\n opt.$menu.trigger('nextcommand');\n }\n return;\n }\n break;\n\n case 37: // left\n handle.keyStop(e, opt);\n if (opt.isInput || !opt.$selected || !opt.$selected.length) {\n break;\n }\n\n if (!opt.$selected.parent().hasClass('context-menu-root')) {\n var $parent = opt.$selected.parent().parent();\n opt.$selected.trigger('contextmenu:blur');\n opt.$selected = $parent;\n return;\n }\n break;\n\n case 39: // right\n handle.keyStop(e, opt);\n if (opt.isInput || !opt.$selected || !opt.$selected.length) {\n break;\n }\n\n var itemdata = opt.$selected.data('contextMenu') || {};\n if (itemdata.$menu && opt.$selected.hasClass('context-menu-submenu')) {\n opt.$selected = null;\n itemdata.$selected = null;\n itemdata.$menu.trigger('nextcommand');\n return;\n }\n break;\n\n case 35: // end\n case 36: // home\n if (opt.$selected && opt.$selected.find('input, textarea, select').length) {\n return;\n } else {\n (opt.$selected && opt.$selected.parent() || opt.$menu)\n .children(':not(.' + opt.classNames.disabled + ', .' + opt.classNames.notSelectable + ')')[e.keyCode === 36 ? 'first' : 'last']()\n .trigger('contextmenu:focus');\n e.preventDefault();\n return;\n }\n break;\n\n case 13: // enter\n handle.keyStop(e, opt);\n if (opt.isInput) {\n if (opt.$selected && !opt.$selected.is('textarea, select')) {\n e.preventDefault();\n return;\n }\n break;\n }\n if (typeof opt.$selected !== 'undefined' && opt.$selected !== null) {\n opt.$selected.trigger('mouseup');\n }\n return;\n\n case 32: // space\n case 33: // page up\n case 34: // page down\n // prevent browser from scrolling down while menu is visible\n handle.keyStop(e, opt);\n return;\n\n case 27: // esc\n handle.keyStop(e, opt);\n if (opt.$menu !== null && typeof opt.$menu !== 'undefined') {\n opt.$menu.trigger('contextmenu:hide');\n }\n return;\n\n default: // 0-9, a-z\n var k = (String.fromCharCode(e.keyCode)).toUpperCase();\n if (opt.accesskeys && opt.accesskeys[k]) {\n // according to the specs accesskeys must be invoked immediately\n opt.accesskeys[k].$node.trigger(opt.accesskeys[k].$menu ? 'contextmenu:focus' : 'mouseup');\n return;\n }\n break;\n }\n // pass event to selected item,\n // stop propagation to avoid endless recursion\n e.stopPropagation();\n if (typeof opt.$selected !== 'undefined' && opt.$selected !== null) {\n opt.$selected.trigger(e);\n }\n },\n // select previous possible command in menu\n prevItem: function (e) {\n e.stopPropagation();\n var opt = $(this).data('contextMenu') || {};\n var root = $(this).data('contextMenuRoot') || {};\n\n // obtain currently selected menu\n if (opt.$selected) {\n var $s = opt.$selected;\n opt = opt.$selected.parent().data('contextMenu') || {};\n opt.$selected = $s;\n }\n\n var $children = opt.$menu.children(),\n $prev = !opt.$selected || !opt.$selected.prev().length ? $children.last() : opt.$selected.prev(),\n $round = $prev;\n\n // skip disabled or hidden elements\n while ($prev.hasClass(root.classNames.disabled) || $prev.hasClass(root.classNames.notSelectable) || $prev.is(':hidden')) {\n if ($prev.prev().length) {\n $prev = $prev.prev();\n } else {\n $prev = $children.last();\n }\n if ($prev.is($round)) {\n // break endless loop\n return;\n }\n }\n\n // leave current\n if (opt.$selected) {\n handle.itemMouseleave.call(opt.$selected.get(0), e);\n }\n\n // activate next\n handle.itemMouseenter.call($prev.get(0), e);\n\n // focus input\n var $input = $prev.find('input, textarea, select');\n if ($input.length) {\n $input.focus();\n }\n },\n // select next possible command in menu\n nextItem: function (e) {\n e.stopPropagation();\n var opt = $(this).data('contextMenu') || {};\n var root = $(this).data('contextMenuRoot') || {};\n\n // obtain currently selected menu\n if (opt.$selected) {\n var $s = opt.$selected;\n opt = opt.$selected.parent().data('contextMenu') || {};\n opt.$selected = $s;\n }\n\n var $children = opt.$menu.children(),\n $next = !opt.$selected || !opt.$selected.next().length ? $children.first() : opt.$selected.next(),\n $round = $next;\n\n // skip disabled\n while ($next.hasClass(root.classNames.disabled) || $next.hasClass(root.classNames.notSelectable) || $next.is(':hidden')) {\n if ($next.next().length) {\n $next = $next.next();\n } else {\n $next = $children.first();\n }\n if ($next.is($round)) {\n // break endless loop\n return;\n }\n }\n\n // leave current\n if (opt.$selected) {\n handle.itemMouseleave.call(opt.$selected.get(0), e);\n }\n\n // activate next\n handle.itemMouseenter.call($next.get(0), e);\n\n // focus input\n var $input = $next.find('input, textarea, select');\n if ($input.length) {\n $input.focus();\n }\n },\n // flag that we're inside an input so the key handler can act accordingly\n focusInput: function () {\n var $this = $(this).closest('.context-menu-item'),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot;\n\n root.$selected = opt.$selected = $this;\n root.isInput = opt.isInput = true;\n },\n // flag that we're inside an input so the key handler can act accordingly\n blurInput: function () {\n var $this = $(this).closest('.context-menu-item'),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot;\n\n root.isInput = opt.isInput = false;\n },\n // :hover on menu\n menuMouseenter: function () {\n var root = $(this).data().contextMenuRoot;\n root.hovering = true;\n },\n // :hover on menu\n menuMouseleave: function (e) {\n var root = $(this).data().contextMenuRoot;\n if (root.$layer && root.$layer.is(e.relatedTarget)) {\n root.hovering = false;\n }\n },\n // :hover done manually so key handling is possible\n itemMouseenter: function (e) {\n var $this = $(this),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot;\n\n root.hovering = true;\n\n // abort if we're re-entering\n if (e && root.$layer && root.$layer.is(e.relatedTarget)) {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n\n // make sure only one item is selected\n (opt.$menu ? opt : root).$menu\n .children('.' + root.classNames.hover).trigger('contextmenu:blur')\n .children('.hover').trigger('contextmenu:blur');\n\n if ($this.hasClass(root.classNames.disabled) || $this.hasClass(root.classNames.notSelectable)) {\n opt.$selected = null;\n return;\n }\n\n\n $this.trigger('contextmenu:focus');\n },\n // :hover done manually so key handling is possible\n itemMouseleave: function (e) {\n var $this = $(this),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot;\n\n if (root !== opt && root.$layer && root.$layer.is(e.relatedTarget)) {\n if (typeof root.$selected !== 'undefined' && root.$selected !== null) {\n root.$selected.trigger('contextmenu:blur');\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n root.$selected = opt.$selected = opt.$node;\n return;\n }\n\n if(opt && opt.$menu && opt.$menu.hasClass('context-menu-visible')){\n return;\n }\n\n $this.trigger('contextmenu:blur');\n },\n // contextMenu item click\n itemClick: function (e) {\n var $this = $(this),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot,\n key = data.contextMenuKey,\n callback;\n\n // abort if the key is unknown or disabled or is a menu\n if (!opt.items[key] || $this.is('.' + root.classNames.disabled + ', .context-menu-separator, .' + root.classNames.notSelectable) || ($this.is('.context-menu-submenu') && root.selectableSubMenu === false )) {\n return;\n }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if ($.isFunction(opt.callbacks[key]) && Object.prototype.hasOwnProperty.call(opt.callbacks, key)) {\n // item-specific callback\n callback = opt.callbacks[key];\n } else if ($.isFunction(root.callback)) {\n // default callback\n callback = root.callback;\n } else {\n // no callback, no action\n return;\n }\n\n // hide menu if callback doesn't stop that\n if (callback.call(root.$trigger, key, root, e) !== false) {\n root.$menu.trigger('contextmenu:hide');\n } else if (root.$menu.parent().length) {\n op.update.call(root.$trigger, root);\n }\n },\n // ignore click events on input elements\n inputClick: function (e) {\n e.stopImmediatePropagation();\n },\n // hide \n hideMenu: function (e, data) {\n var root = $(this).data('contextMenuRoot');\n op.hide.call(root.$trigger, root, data && data.force);\n },\n // focus \n focusItem: function (e) {\n e.stopPropagation();\n var $this = $(this),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot;\n\n if ($this.hasClass(root.classNames.disabled) || $this.hasClass(root.classNames.notSelectable)) {\n return;\n }\n\n $this\n .addClass([root.classNames.hover, root.classNames.visible].join(' '))\n // select other items and included items\n .parent().find('.context-menu-item').not($this)\n .removeClass(root.classNames.visible)\n .filter('.' + root.classNames.hover)\n .trigger('contextmenu:blur');\n\n // remember selected\n opt.$selected = root.$selected = $this;\n\n\n if(opt && opt.$node && opt.$node.hasClass('context-menu-submenu')){\n opt.$node.addClass(root.classNames.hover);\n }\n\n // position sub-menu - do after show so dumb $.ui.position can keep up\n if (opt.$node) {\n root.positionSubmenu.call(opt.$node, opt.$menu);\n }\n },\n // blur \n blurItem: function (e) {\n e.stopPropagation();\n var $this = $(this),\n data = $this.data(),\n opt = data.contextMenu,\n root = data.contextMenuRoot;\n\n if (opt.autoHide) { // for tablets and touch screens this needs to remain\n $this.removeClass(root.classNames.visible);\n }\n $this.removeClass(root.classNames.hover);\n opt.$selected = null;\n }\n },\n // operations\n op = {\n show: function (opt, x, y) {\n var $trigger = $(this),\n css = {};\n\n // hide any open menus\n $('#context-menu-layer').trigger('mousedown');\n\n // backreference for callbacks\n opt.$trigger = $trigger;\n\n // show event\n if (opt.events.show.call($trigger, opt) === false) {\n $currentTrigger = null;\n return;\n }\n\n // create or update context menu\n var hasVisibleItems = op.update.call($trigger, opt);\n if (hasVisibleItems === false) {\n $currentTrigger = null;\n return;\n }\n\n // position menu\n opt.position.call($trigger, opt, x, y);\n\n // make sure we're in front\n if (opt.zIndex) {\n var additionalZValue = opt.zIndex;\n // If opt.zIndex is a function, call the function to get the right zIndex.\n if (typeof opt.zIndex === 'function') {\n additionalZValue = opt.zIndex.call($trigger, opt);\n }\n css.zIndex = zindex($trigger) + additionalZValue;\n }\n\n // add layer\n op.layer.call(opt.$menu, opt, css.zIndex);\n\n // adjust sub-menu zIndexes\n opt.$menu.find('ul').css('zIndex', css.zIndex + 1);\n\n // position and show context menu\n opt.$menu.css(css)[opt.animation.show](opt.animation.duration, function () {\n $trigger.trigger('contextmenu:visible');\n \n op.activated(opt);\n opt.events.activated(opt);\n });\n // make options available and set state\n $trigger\n .data('contextMenu', opt)\n .addClass('context-menu-active');\n\n // register key handler\n $(document).off('keydown.contextMenu').on('keydown.contextMenu', handle.key);\n // register autoHide handler\n if (opt.autoHide) {\n // mouse position handler\n $(document).on('mousemove.contextMenuAutoHide', function (e) {\n // need to capture the offset on mousemove,\n // since the page might've been scrolled since activation\n var pos = $trigger.offset();\n pos.right = pos.left + $trigger.outerWidth();\n pos.bottom = pos.top + $trigger.outerHeight();\n\n if (opt.$layer && !opt.hovering && (!(e.pageX >= pos.left && e.pageX <= pos.right) || !(e.pageY >= pos.top && e.pageY <= pos.bottom))) {\n /* Additional hover check after short time, you might just miss the edge of the menu */\n setTimeout(function () {\n if (!opt.hovering && opt.$menu !== null && typeof opt.$menu !== 'undefined') {\n opt.$menu.trigger('contextmenu:hide');\n }\n }, 50);\n }\n });\n }\n },\n hide: function (opt, force) {\n var $trigger = $(this);\n if (!opt) {\n opt = $trigger.data('contextMenu') || {};\n }\n\n // hide event\n if (!force && opt.events && opt.events.hide.call($trigger, opt) === false) {\n return;\n }\n\n // remove options and revert state\n $trigger\n .removeData('contextMenu')\n .removeClass('context-menu-active');\n\n if (opt.$layer) {\n // keep layer for a bit so the contextmenu event can be aborted properly by opera\n setTimeout((function ($layer) {\n return function () {\n $layer.remove();\n };\n })(opt.$layer), 10);\n\n try {\n delete opt.$layer;\n } catch (e) {\n opt.$layer = null;\n }\n }\n\n // remove handle\n $currentTrigger = null;\n // remove selected\n opt.$menu.find('.' + opt.classNames.hover).trigger('contextmenu:blur');\n opt.$selected = null;\n // collapse all submenus\n opt.$menu.find('.' + opt.classNames.visible).removeClass(opt.classNames.visible);\n // unregister key and mouse handlers\n // $(document).off('.contextMenuAutoHide keydown.contextMenu'); // http://bugs.jquery.com/ticket/10705\n $(document).off('.contextMenuAutoHide').off('keydown.contextMenu');\n // hide menu\n if (opt.$menu) {\n opt.$menu[opt.animation.hide](opt.animation.duration, function () {\n // tear down dynamically built menu after animation is completed.\n if (opt.build) {\n opt.$menu.remove();\n $.each(opt, function (key) {\n switch (key) {\n case 'ns':\n case 'selector':\n case 'build':\n case 'trigger':\n return true;\n\n default:\n opt[key] = undefined;\n try {\n delete opt[key];\n } catch (e) {\n }\n return true;\n }\n });\n }\n\n setTimeout(function () {\n $trigger.trigger('contextmenu:hidden');\n }, 10);\n });\n }\n },\n create: function (opt, root) {\n if (typeof root === 'undefined') {\n root = opt;\n }\n\n // create contextMenu\n opt.$menu = $('
    ').addClass(opt.className || '').data({\n 'contextMenu': opt,\n 'contextMenuRoot': root\n });\n\n $.each(['callbacks', 'commands', 'inputs'], function (i, k) {\n opt[k] = {};\n if (!root[k]) {\n root[k] = {};\n }\n });\n\n if (!root.accesskeys) {\n root.accesskeys = {};\n }\n\n function createNameNode(item) {\n var $name = $('');\n if (item._accesskey) {\n if (item._beforeAccesskey) {\n $name.append(document.createTextNode(item._beforeAccesskey));\n }\n $('')\n .addClass('context-menu-accesskey')\n .text(item._accesskey)\n .appendTo($name);\n if (item._afterAccesskey) {\n $name.append(document.createTextNode(item._afterAccesskey));\n }\n } else {\n if (item.isHtmlName) {\n // restrict use with access keys\n if (typeof item.accesskey !== 'undefined') {\n throw new Error('accesskeys are not compatible with HTML names and cannot be used together in the same item');\n }\n $name.html(item.name);\n } else {\n $name.text(item.name);\n }\n }\n return $name;\n }\n\n // create contextMenu items\n $.each(opt.items, function (key, item) {\n var $t = $('
  • ').addClass(item.className || ''),\n $label = null,\n $input = null;\n\n // iOS needs to see a click-event bound to an element to actually\n // have the TouchEvents infrastructure trigger the click event\n $t.on('click', $.noop);\n\n // Make old school string seperator a real item so checks wont be\n // akward later.\n // And normalize 'cm_separator' into 'cm_seperator'.\n if (typeof item === 'string' || item.type === 'cm_separator') {\n item = {type: 'cm_seperator'};\n }\n\n item.$node = $t.data({\n 'contextMenu': opt,\n 'contextMenuRoot': root,\n 'contextMenuKey': key\n });\n\n // register accesskey\n // NOTE: the accesskey attribute should be applicable to any element, but Safari5 and Chrome13 still can't do that\n if (typeof item.accesskey !== 'undefined') {\n var aks = splitAccesskey(item.accesskey);\n for (var i = 0, ak; ak = aks[i]; i++) {\n if (!root.accesskeys[ak]) {\n root.accesskeys[ak] = item;\n var matched = item.name.match(new RegExp('^(.*?)(' + ak + ')(.*)$', 'i'));\n if (matched) {\n item._beforeAccesskey = matched[1];\n item._accesskey = matched[2];\n item._afterAccesskey = matched[3];\n }\n break;\n }\n }\n }\n\n if (item.type && types[item.type]) {\n // run custom type handler\n types[item.type].call($t, item, opt, root);\n // register commands\n $.each([opt, root], function (i, k) {\n k.commands[key] = item;\n // Overwrite only if undefined or the item is appended to the root. This so it\n // doesn't overwrite callbacks of root elements if the name is the same.\n if ($.isFunction(item.callback) && (typeof k.callbacks[key] === 'undefined' || typeof opt.type === 'undefined')) {\n k.callbacks[key] = item.callback;\n }\n });\n } else {\n // add label for input\n if (item.type === 'cm_seperator') {\n $t.addClass('context-menu-separator ' + root.classNames.notSelectable);\n } else if (item.type === 'html') {\n $t.addClass('context-menu-html ' + root.classNames.notSelectable);\n } else if (item.type === 'sub') {\n // We don't want to execute the next else-if if it is a sub.\n } else if (item.type) {\n $label = $('').appendTo($t);\n createNameNode(item).appendTo($label);\n\n $t.addClass('context-menu-input');\n opt.hasTypes = true;\n $.each([opt, root], function (i, k) {\n k.commands[key] = item;\n k.inputs[key] = item;\n });\n } else if (item.items) {\n item.type = 'sub';\n }\n\n switch (item.type) {\n case 'cm_seperator':\n break;\n\n case 'text':\n $input = $('')\n .attr('name', 'context-menu-input-' + key)\n .val(item.value || '')\n .appendTo($label);\n break;\n\n case 'textarea':\n $input = $('')\n .attr('name', 'context-menu-input-' + key)\n .val(item.value || '')\n .appendTo($label);\n\n if (item.height) {\n $input.height(item.height);\n }\n break;\n\n case 'checkbox':\n $input = $('')\n .attr('name', 'context-menu-input-' + key)\n .val(item.value || '')\n .prop('checked', !!item.selected)\n .prependTo($label);\n break;\n\n case 'radio':\n $input = $('')\n .attr('name', 'context-menu-input-' + item.radio)\n .val(item.value || '')\n .prop('checked', !!item.selected)\n .prependTo($label);\n break;\n\n case 'select':\n $input = $('')\n .attr('name', 'context-menu-input-' + key)\n .appendTo($label);\n if (item.options) {\n $.each(item.options, function (value, text) {\n $('').val(value).text(text).appendTo($input);\n });\n $input.val(item.selected);\n }\n break;\n\n case 'sub':\n createNameNode(item).appendTo($t);\n item.appendTo = item.$node;\n $t.data('contextMenu', item).addClass('context-menu-submenu');\n item.callback = null;\n\n // If item contains items, and this is a promise, we should create it later\n // check if subitems is of type promise. If it is a promise we need to create\n // it later, after promise has been resolved.\n if ('function' === typeof item.items.then) {\n // probably a promise, process it, when completed it will create the sub menu's.\n op.processPromises(item, root, item.items);\n } else {\n // normal submenu.\n op.create(item, root);\n }\n break;\n\n case 'html':\n $(item.html).appendTo($t);\n break;\n\n default:\n $.each([opt, root], function (i, k) {\n k.commands[key] = item;\n // Overwrite only if undefined or the item is appended to the root. This so it\n // doesn't overwrite callbacks of root elements if the name is the same.\n if ($.isFunction(item.callback) && (typeof k.callbacks[key] === 'undefined' || typeof opt.type === 'undefined')) {\n k.callbacks[key] = item.callback;\n }\n });\n createNameNode(item).appendTo($t);\n break;\n }\n\n // disable key listener in \n if (item.type && item.type !== 'sub' && item.type !== 'html' && item.type !== 'cm_seperator') {\n $input\n .on('focus', handle.focusInput)\n .on('blur', handle.blurInput);\n\n if (item.events) {\n $input.on(item.events, opt);\n }\n }\n\n // add icons\n if (item.icon) {\n if ($.isFunction(item.icon)) {\n item._icon = item.icon.call(this, this, $t, key, item);\n } else {\n if (typeof(item.icon) === 'string' && item.icon.substring(0, 3) === 'fa-') {\n // to enable font awesome\n item._icon = root.classNames.icon + ' ' + root.classNames.icon + '--fa fa ' + item.icon;\n } else {\n item._icon = root.classNames.icon + ' ' + root.classNames.icon + '-' + item.icon;\n }\n }\n $t.addClass(item._icon);\n }\n }\n\n // cache contained elements\n item.$input = $input;\n item.$label = $label;\n\n // attach item to menu\n $t.appendTo(opt.$menu);\n\n // Disable text selection\n if (!opt.hasTypes && $.support.eventSelectstart) {\n // browsers support user-select: none,\n // IE has a special event for text-selection\n // browsers supporting neither will not be preventing text-selection\n $t.on('selectstart.disableTextSelect', handle.abortevent);\n }\n });\n // attach contextMenu to (to bypass any possible overflow:hidden issues on parents of the trigger element)\n if (!opt.$node) {\n opt.$menu.css('display', 'none').addClass('context-menu-root');\n }\n opt.$menu.appendTo(opt.appendTo || document.body);\n },\n resize: function ($menu, nested) {\n var domMenu;\n // determine widths of submenus, as CSS won't grow them automatically\n // position:absolute within position:absolute; min-width:100; max-width:200; results in width: 100;\n // kinda sucks hard...\n\n // determine width of absolutely positioned element\n $menu.css({position: 'absolute', display: 'block'});\n // don't apply yet, because that would break nested elements' widths\n $menu.data('width',\n (domMenu = $menu.get(0)).getBoundingClientRect ?\n Math.ceil(domMenu.getBoundingClientRect().width) :\n $menu.outerWidth() + 1); // outerWidth() returns rounded pixels\n // reset styles so they allow nested elements to grow/shrink naturally\n $menu.css({\n position: 'static',\n minWidth: '0px',\n maxWidth: '100000px'\n });\n // identify width of nested menus\n $menu.find('> li > ul').each(function () {\n op.resize($(this), true);\n });\n // reset and apply changes in the end because nested\n // elements' widths wouldn't be calculatable otherwise\n if (!nested) {\n $menu.find('ul').addBack().css({\n position: '',\n display: '',\n minWidth: '',\n maxWidth: ''\n }).outerWidth(function () {\n return $(this).data('width');\n });\n }\n },\n update: function (opt, root) {\n var $trigger = this;\n if (typeof root === 'undefined') {\n root = opt;\n op.resize(opt.$menu);\n }\n\n var hasVisibleItems = false;\n\n // re-check disabled for each item\n opt.$menu.children().each(function () {\n var $item = $(this),\n key = $item.data('contextMenuKey'),\n item = opt.items[key],\n disabled = ($.isFunction(item.disabled) && item.disabled.call($trigger, key, root)) || item.disabled === true,\n visible;\n if ($.isFunction(item.visible)) {\n visible = item.visible.call($trigger, key, root);\n } else if (typeof item.visible !== 'undefined') {\n visible = item.visible === true;\n } else {\n visible = true;\n }\n\n if (visible) {\n hasVisibleItems = true;\n }\n\n $item[visible ? 'show' : 'hide']();\n\n // dis- / enable item\n $item[disabled ? 'addClass' : 'removeClass'](root.classNames.disabled);\n\n if ($.isFunction(item.icon)) {\n $item.removeClass(item._icon);\n item._icon = item.icon.call(this, $trigger, $item, key, item);\n $item.addClass(item._icon);\n }\n\n if (item.type) {\n // dis- / enable input elements\n $item.find('input, select, textarea').prop('disabled', disabled);\n\n // update input states\n switch (item.type) {\n case 'text':\n case 'textarea':\n item.$input.val(item.value || '');\n break;\n\n case 'checkbox':\n case 'radio':\n item.$input.val(item.value || '').prop('checked', !!item.selected);\n break;\n\n case 'select':\n item.$input.val((item.selected === 0 ? \"0\" : item.selected) || '');\n break;\n }\n }\n\n if (item.$menu) {\n // update sub-menu\n var subMenuHasVisibleItems = op.update.call($trigger, item, root);\n if (subMenuHasVisibleItems) {\n hasVisibleItems = true;\n }\n }\n });\n return hasVisibleItems;\n },\n layer: function (opt, zIndex) {\n // add transparent layer for click area\n // filter and background for Internet Explorer, Issue #23\n var $layer = opt.$layer = $('
    ')\n .css({\n height: $win.height(),\n width: $win.width(),\n display: 'block',\n position: 'fixed',\n 'z-index': zIndex,\n top: 0,\n left: 0,\n opacity: 0,\n filter: 'alpha(opacity=0)',\n 'background-color': '#000'\n })\n .data('contextMenuRoot', opt)\n .insertBefore(this)\n .on('contextmenu', handle.abortevent)\n .on('mousedown', handle.layerClick);\n\n // IE6 doesn't know position:fixed;\n if (typeof document.body.style.maxWidth === 'undefined') { // IE6 doesn't support maxWidth\n $layer.css({\n 'position': 'absolute',\n 'height': $(document).height()\n });\n }\n\n return $layer;\n },\n processPromises: function (opt, root, promise) {\n // Start\n opt.$node.addClass(root.classNames.iconLoadingClass);\n\n function completedPromise(opt, root, items) {\n // Completed promise (dev called promise.resolve). We now have a list of items which can\n // be used to create the rest of the context menu.\n if (typeof items === 'undefined') {\n // Null result, dev should have checked\n errorPromise(undefined);//own error object\n }\n finishPromiseProcess(opt, root, items);\n }\n\n function errorPromise(opt, root, errorItem) {\n // User called promise.reject() with an error item, if not, provide own error item.\n if (typeof errorItem === 'undefined') {\n errorItem = {\n \"error\": {\n name: \"No items and no error item\",\n icon: \"context-menu-icon context-menu-icon-quit\"\n }\n };\n if (window.console) {\n (console.error || console.log).call(console, 'When you reject a promise, provide an \"items\" object, equal to normal sub-menu items');\n }\n } else if (typeof errorItem === 'string') {\n errorItem = {\"error\": {name: errorItem}};\n }\n finishPromiseProcess(opt, root, errorItem);\n }\n\n function finishPromiseProcess(opt, root, items) {\n if (typeof root.$menu === 'undefined' || !root.$menu.is(':visible')) {\n return;\n }\n opt.$node.removeClass(root.classNames.iconLoadingClass);\n opt.items = items;\n op.create(opt, root, true); // Create submenu\n op.update(opt, root); // Correctly update position if user is already hovered over menu item\n root.positionSubmenu.call(opt.$node, opt.$menu); // positionSubmenu, will only do anything if user already hovered over menu item that just got new subitems.\n }\n\n // Wait for promise completion. .then(success, error, notify) (we don't track notify). Bind the opt\n // and root to avoid scope problems\n promise.then(completedPromise.bind(this, opt, root), errorPromise.bind(this, opt, root));\n },\n // operation that will run after contextMenu showed on screen\n activated: function(opt){\n var $menu = opt.$menu;\n var $menuOffset = $menu.offset();\n var winHeight = $(window).height();\n var winScrollTop = $(window).scrollTop();\n var menuHeight = $menu.height();\n if(menuHeight > winHeight){\n $menu.css({\n 'height' : winHeight + 'px',\n 'overflow-x': 'hidden',\n 'overflow-y': 'auto',\n 'top': winScrollTop + 'px'\n });\n } else if(($menuOffset.top < winScrollTop) || ($menuOffset.top + menuHeight > winScrollTop + winHeight)){\n $menu.css({\n 'top': '0px'\n });\n } \n }\n };\n\n // split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key\n function splitAccesskey(val) {\n var t = val.split(/\\s+/);\n var keys = [];\n\n for (var i = 0, k; k = t[i]; i++) {\n k = k.charAt(0).toUpperCase(); // first character only\n // theoretically non-accessible characters should be ignored, but different systems, different keyboard layouts, ... screw it.\n // a map to look up already used access keys would be nice\n keys.push(k);\n }\n\n return keys;\n }\n\n// handle contextMenu triggers\n $.fn.contextMenu = function (operation) {\n var $t = this, $o = operation;\n if (this.length > 0) { // this is not a build on demand menu\n if (typeof operation === 'undefined') {\n this.first().trigger('contextmenu');\n } else if (typeof operation.x !== 'undefined' && typeof operation.y !== 'undefined') {\n this.first().trigger($.Event('contextmenu', {\n pageX: operation.x,\n pageY: operation.y,\n mouseButton: operation.button\n }));\n } else if (operation === 'hide') {\n var $menu = this.first().data('contextMenu') ? this.first().data('contextMenu').$menu : null;\n if ($menu) {\n $menu.trigger('contextmenu:hide');\n }\n } else if (operation === 'destroy') {\n $.contextMenu('destroy', {context: this});\n } else if ($.isPlainObject(operation)) {\n operation.context = this;\n $.contextMenu('create', operation);\n } else if (operation) {\n this.removeClass('context-menu-disabled');\n } else if (!operation) {\n this.addClass('context-menu-disabled');\n }\n } else {\n $.each(menus, function () {\n if (this.selector === $t.selector) {\n $o.data = this;\n\n $.extend($o.data, {trigger: 'demand'});\n }\n });\n\n handle.contextmenu.call($o.target, $o);\n }\n\n return this;\n };\n\n // manage contextMenu instances\n $.contextMenu = function (operation, options) {\n if (typeof operation !== 'string') {\n options = operation;\n operation = 'create';\n }\n\n if (typeof options === 'string') {\n options = {selector: options};\n } else if (typeof options === 'undefined') {\n options = {};\n }\n\n // merge with default options\n var o = $.extend(true, {}, defaults, options || {});\n var $document = $(document);\n var $context = $document;\n var _hasContext = false;\n\n if (!o.context || !o.context.length) {\n o.context = document;\n } else {\n // you never know what they throw at you...\n $context = $(o.context).first();\n o.context = $context.get(0);\n _hasContext = !$(o.context).is(document);\n }\n\n switch (operation) {\n\n case 'update':\n // Updates visibility and such\n if(_hasContext){\n op.update($context);\n } else {\n for(var menu in menus){\n if(menus.hasOwnProperty(menu)){\n op.update(menus[menu]);\n }\n }\n }\n break;\n\n case 'create':\n // no selector no joy\n if (!o.selector) {\n throw new Error('No selector specified');\n }\n // make sure internal classes are not bound to\n if (o.selector.match(/.context-menu-(list|item|input)($|\\s)/)) {\n throw new Error('Cannot bind to selector \"' + o.selector + '\" as it contains a reserved className');\n }\n if (!o.build && (!o.items || $.isEmptyObject(o.items))) {\n throw new Error('No Items specified');\n }\n counter++;\n o.ns = '.contextMenu' + counter;\n if (!_hasContext) {\n namespaces[o.selector] = o.ns;\n }\n menus[o.ns] = o;\n\n // default to right click\n if (!o.trigger) {\n o.trigger = 'right';\n }\n\n if (!initialized) {\n var itemClick = o.itemClickEvent === 'click' ? 'click.contextMenu' : 'mouseup.contextMenu';\n var contextMenuItemObj = {\n // 'mouseup.contextMenu': handle.itemClick,\n // 'click.contextMenu': handle.itemClick,\n 'contextmenu:focus.contextMenu': handle.focusItem,\n 'contextmenu:blur.contextMenu': handle.blurItem,\n 'contextmenu.contextMenu': handle.abortevent,\n 'mouseenter.contextMenu': handle.itemMouseenter,\n 'mouseleave.contextMenu': handle.itemMouseleave\n };\n contextMenuItemObj[itemClick] = handle.itemClick;\n // make sure item click is registered first\n $document\n .on({\n 'contextmenu:hide.contextMenu': handle.hideMenu,\n 'prevcommand.contextMenu': handle.prevItem,\n 'nextcommand.contextMenu': handle.nextItem,\n 'contextmenu.contextMenu': handle.abortevent,\n 'mouseenter.contextMenu': handle.menuMouseenter,\n 'mouseleave.contextMenu': handle.menuMouseleave\n }, '.context-menu-list')\n .on('mouseup.contextMenu', '.context-menu-input', handle.inputClick)\n .on(contextMenuItemObj, '.context-menu-item');\n\n initialized = true;\n }\n\n // engage native contextmenu event\n $context\n .on('contextmenu' + o.ns, o.selector, o, handle.contextmenu);\n\n if (_hasContext) {\n // add remove hook, just in case\n $context.on('remove' + o.ns, function () {\n $(this).contextMenu('destroy');\n });\n }\n\n switch (o.trigger) {\n case 'hover':\n $context\n .on('mouseenter' + o.ns, o.selector, o, handle.mouseenter)\n .on('mouseleave' + o.ns, o.selector, o, handle.mouseleave);\n break;\n\n case 'left':\n $context.on('click' + o.ns, o.selector, o, handle.click);\n break;\n\t\t\t\t case 'touchstart':\n $context.on('touchstart' + o.ns, o.selector, o, handle.click);\n break;\n /*\n default:\n // http://www.quirksmode.org/dom/events/contextmenu.html\n $document\n .on('mousedown' + o.ns, o.selector, o, handle.mousedown)\n .on('mouseup' + o.ns, o.selector, o, handle.mouseup);\n break;\n */\n }\n\n // create menu\n if (!o.build) {\n op.create(o);\n }\n break;\n\n case 'destroy':\n var $visibleMenu;\n if (_hasContext) {\n // get proper options\n var context = o.context;\n $.each(menus, function (ns, o) {\n\n if (!o) {\n return true;\n }\n\n // Is this menu equest to the context called from\n if (!$(context).is(o.selector)) {\n return true;\n }\n\n $visibleMenu = $('.context-menu-list').filter(':visible');\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is($(o.context).find(o.selector))) {\n $visibleMenu.trigger('contextmenu:hide', {force: true});\n }\n\n try {\n if (menus[o.ns].$menu) {\n menus[o.ns].$menu.remove();\n }\n\n delete menus[o.ns];\n } catch (e) {\n menus[o.ns] = null;\n }\n\n $(o.context).off(o.ns);\n\n return true;\n });\n } else if (!o.selector) {\n $document.off('.contextMenu .contextMenuAutoHide');\n $.each(menus, function (ns, o) {\n $(o.context).off(o.ns);\n });\n\n namespaces = {};\n menus = {};\n counter = 0;\n initialized = false;\n\n $('#context-menu-layer, .context-menu-list').remove();\n } else if (namespaces[o.selector]) {\n $visibleMenu = $('.context-menu-list').filter(':visible');\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is(o.selector)) {\n $visibleMenu.trigger('contextmenu:hide', {force: true});\n }\n\n try {\n if (menus[namespaces[o.selector]].$menu) {\n menus[namespaces[o.selector]].$menu.remove();\n }\n\n delete menus[namespaces[o.selector]];\n } catch (e) {\n menus[namespaces[o.selector]] = null;\n }\n\n $document.off(namespaces[o.selector]);\n }\n break;\n\n case 'html5':\n // if and are not handled by the browser,\n // or options was a bool true,\n // initialize $.contextMenu for them\n if ((!$.support.htmlCommand && !$.support.htmlMenuitem) || (typeof options === 'boolean' && options)) {\n $('menu[type=\"context\"]').each(function () {\n if (this.id) {\n $.contextMenu({\n selector: '[contextmenu=' + this.id + ']',\n items: $.contextMenu.fromMenu(this)\n });\n }\n }).css('display', 'none');\n }\n break;\n\n default:\n throw new Error('Unknown operation \"' + operation + '\"');\n }\n\n return this;\n };\n\n// import values into commands\n $.contextMenu.setInputValues = function (opt, data) {\n if (typeof data === 'undefined') {\n data = {};\n }\n\n $.each(opt.inputs, function (key, item) {\n switch (item.type) {\n case 'text':\n case 'textarea':\n item.value = data[key] || '';\n break;\n\n case 'checkbox':\n item.selected = data[key] ? true : false;\n break;\n\n case 'radio':\n item.selected = (data[item.radio] || '') === item.value;\n break;\n\n case 'select':\n item.selected = data[key] || '';\n break;\n }\n });\n };\n\n// export values from commands\n $.contextMenu.getInputValues = function (opt, data) {\n if (typeof data === 'undefined') {\n data = {};\n }\n\n $.each(opt.inputs, function (key, item) {\n switch (item.type) {\n case 'text':\n case 'textarea':\n case 'select':\n data[key] = item.$input.val();\n break;\n\n case 'checkbox':\n data[key] = item.$input.prop('checked');\n break;\n\n case 'radio':\n if (item.$input.prop('checked')) {\n data[item.radio] = item.value;\n }\n break;\n }\n });\n\n return data;\n };\n\n// find