diff --git a/README.md b/README.md index c711134b..903474f6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ $.contextMenu is a management facility for - you guessed it - context menus. It ## Dependencies ## -* jQuery 1.8.2 +* jQuery >=1.8.2 * jQuery UI position (optional but recommended) ## Usage ## @@ -103,7 +103,7 @@ Font-Awesome icons used from [encharm/Font-Awesome-SVG-PNG](https://github.com/e ## Changelog ## -### Unreleased ### +### 2.1.0 ### * Added support for providing a function as zIndex value in options object (thanks @eivindga) * Fixed a switch to use the correct type for separators (thanks @RareDevil) diff --git a/bower.json b/bower.json index 634c8946..b2edd0b3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jQuery-contextMenu", - "version": "2.0.1", + "version": "2.1.0", "main": [ "dist/jquery.contextMenu.js", "dist/jquery.contextMenu.min.js", diff --git a/dist/font/context-menu-icons.eot b/dist/font/context-menu-icons.eot index 79683944..54b4938d 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 3ce505a9..bf7c9ca4 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 a6bdf2e0..01ab877b 100644 Binary files a/dist/font/context-menu-icons.woff and b/dist/font/context-menu-icons.woff differ diff --git a/dist/jquery.contextMenu.css b/dist/jquery.contextMenu.css index 376984c5..de954d89 100644 --- a/dist/jquery.contextMenu.css +++ b/dist/jquery.contextMenu.css @@ -2,7 +2,7 @@ /*! * jQuery contextMenu - Plugin for simple contextMenu handling * - * Version: v2.0.1 + * Version: v2.1.0 * * 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: 2016-01-05T21:48:32.310Z + * Date: 2016-01-08T20:22:20.182Z */ @font-face { font-family: "context-menu-icons"; diff --git a/dist/jquery.contextMenu.js b/dist/jquery.contextMenu.js index 7c79b870..21bfa3e3 100644 --- a/dist/jquery.contextMenu.js +++ b/dist/jquery.contextMenu.js @@ -1,7 +1,7 @@ /*! - * jQuery contextMenu v2.0.1 - Plugin for simple contextMenu handling + * jQuery contextMenu v2.1.0 - Plugin for simple contextMenu handling * - * Version: v2.0.1 + * Version: v2.1.0 * * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) * Web: http://swisnl.github.io/jQuery-contextMenu/ @@ -12,7 +12,7 @@ * MIT License http://www.opensource.org/licenses/mit-license * GPL v3 http://opensource.org/licenses/GPL-3.0 * - * Date: 2016-01-08T20:05:11.169Z + * Date: 2016-01-08T20:22:21.900Z */ (function (factory) { diff --git a/dist/jquery.contextMenu.min.css b/dist/jquery.contextMenu.min.css index 28ffe1ab..66a3b0dd 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.0.1 + * Version: v2.1.0 * * 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: 2016-01-05T21:48:32.310Z + * Date: 2016-01-08T20:22:20.182Z */@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?4cx9p);src:url(font/context-menu-icons.eot?4cx9p#iefix) format("embedded-opentype"),url(font/context-menu-icons.woff2?4cx9p) format("woff2"),url(font/context-menu-icons.woff?4cx9p) format("woff"),url(font/context-menu-icons.ttf?4cx9p) format("truetype")}.context-menu-icon:before{position:absolute;top:50%;left:0;width:28px;font-family:context-menu-icons;font-size:16px;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-add:before{content:""}.context-menu-icon-copy:before{content:""}.context-menu-icon-cut:before{content:""}.context-menu-icon-delete:before{content:""}.context-menu-icon-edit:before{content:""}.context-menu-icon-paste:before{content:""}.context-menu-icon-quit:before{content:""}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-list{position:absolute;display:inline-block;min-width:180px;max-width:360px;padding:4px 0;margin:5px;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:3px;-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;padding:3px 28px;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:5px 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{background-color:#fff;color:#626262}.context-menu-input.context-menu-hover,.context-menu-item.context-menu-disabled.context-menu-hover{cursor:default;background-color:#eee}.context-menu-submenu:after{position:absolute;top:50%;right:8px;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:4px 0 4px 4px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:5px 10px}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:3px}.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:100px}.context-menu-item>.context-menu-list{top:5px;right:-5px;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 32e30bf1..61622cbb 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":";;;;;;;;;;;;;;AAgBA,WACE,YAAA,mBACA,WAAA,OACA,YAAA,IAEA,IAAA,uCCCA,IAAK,6CAA4C,4BAA6B,yCAAwC,gBAAiB,wCAAuC,eAAgB,uCAAsC,mBAGtO,0BDCE,SAAA,SACA,IAAA,IACA,KAAA,EACA,MAAA,KACA,YAAA,mBACA,UAAA,KACA,WAAA,OACA,YAAS,IACT,YAAA,ECCA,MDDA,QCEA,WDFA,OCGA,kBDHA,iBACA,cAAA,iBACA,aAAA,iBACA,UAAc,iBAEhB,uBAAA,YACE,wBAAe,UCMjB,8BACE,QAAS,IAGX,+BDFA,QAAA,IAGA,8BACE,QAAA,ICMF,iCACE,QAAS,IAGX,+BDFA,QAAA,IAGA,gCACE,QAAA,ICMF,+BACE,QDJA,ICOF,6CDHE,MAAA,KCOF,mBDHE,SAAA,SACA,QAAA,aCKA,UAAW,MDHb,UAAA,MACE,QAAA,IAAA,EACA,OAAA,IACA,YAAA,QACA,UAAA,QACA,gBAAA,KCKA,WDLA,KCMA,ODNA,IAAA,MAAA,QCOA,cDPA,ICQA,mBAAoB,EAAE,IAAI,IAAI,eDNhC,WAAA,EAAA,IAAA,IAAA,eCUA,mBACE,SAAU,SDNZ,QAAA,IAAA,KCQE,MAAO,QDNP,oBAAA,KAAA,iBAAA,KAAA,gBAAA,KAAA,YAAA,KCWA,iBAAkB,KAGpB,wBDTE,QAAA,ECWA,OAAQ,IAAI,EDTd,cAAA,IAAA,MAAA,QCaA,+BDTA,kCACE,oBAAiB,KCWd,iBAAkB,KDTvB,gBAAA,KCWU,YAAa,KAGvB,sCDTA,MAAA,KACE,OAAA,QACA,iBAAA,QCaF,yCDRE,iBAAW,KCcX,MDZA,QCeF,uCACA,4DDZA,OAAA,QCcE,iBAAkB,KAGpB,4BACE,SAAU,SDZZ,IAAA,IACA,MAAA,IACE,QAAA,ECcA,MAAO,EDZT,OAAA,EACA,QAAA,GCcE,aAAc,YAAY,YAAY,YAAY,QDZlD,aAAA,MACA,aAAW,IAAA,EAAA,IAAA,ICcX,kBAAmB,iBDZrB,cAAA,iBCcO,aAAc,iBACX,UAAW,iBAMrB,sCACE,QAAS,IAAI,KDXf,4BACE,eAAc,ICmBhB,+CDdA,4CACE,SAAA,SCgBA,IAAK,IAGP,0BACA,2CAEA,iCADA,mCAEE,QAAS,MACT,MAAO,KACP,mBAAoB,WACjB,gBAAiB,WACZ,WAAY,WAGtB,mCACE,OAAQ,MAGV,sCACE,IAAK,IAEL,MAAuH,KACvH,QAAS,KAGX,2DACE,QAAS,MAGX,wBACE,gBAAiB","file":"jquery.contextMenu.min.css","sourcesContent":["@charset \"UTF-8\";\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: v@VERSION\r\n *\r\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://swisnl.github.io/jQuery-contextMenu/\r\n *\r\n * Copyright (c) 2011-@YEAR SWIS BV and contributors\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n *\r\n * Date: @DATE\r\n */\n@font-face {\n font-family: \"context-menu-icons\";\n src: url(\"font/context-menu-icons.eot?4cx9p\");\n src: url(\"font/context-menu-icons.eot?4cx9p#iefix\") format(\"embedded-opentype\"), url(\"font/context-menu-icons.woff2?4cx9p\") format(\"woff2\"), url(\"font/context-menu-icons.woff?4cx9p\") format(\"woff\"), url(\"font/context-menu-icons.ttf?4cx9p\") format(\"truetype\");\n font-weight: normal;\n font-style: normal; }\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: 16px;\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: 28px; }\n\n.context-menu-icon-add:before {\n content: \"\"; }\n\n.context-menu-icon-copy:before {\n content: \"\"; }\n\n.context-menu-icon-cut:before {\n content: \"\"; }\n\n.context-menu-icon-delete:before {\n content: \"\"; }\n\n.context-menu-icon-edit:before {\n content: \"\"; }\n\n.context-menu-icon-paste:before {\n content: \"\"; }\n\n.context-menu-icon-quit:before {\n content: \"\"; }\n\n.context-menu-icon.context-menu-hover:before {\n color: #FFF; }\n\n.context-menu-list {\n background: #FFF;\n border: 1px solid #bebebe;\n border-radius: 3px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n font-family: inherit;\n font-size: inherit;\n display: inline-block;\n list-style-type: none;\n margin: 5px;\n max-width: 360px;\n min-width: 180px;\n padding: 4px 0;\n position: absolute; }\n\n.context-menu-item {\n background-color: #FFF;\n color: #2F2F2F;\n padding: 3px 28px;\n position: relative;\n user-select: none; }\n\n.context-menu-separator {\n border-bottom: 1px solid #e6e6e6;\n margin: 5px 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: #626262; }\n\n.context-menu-item.context-menu-disabled {\n color: #626262; }\n\n.context-menu-input.context-menu-hover,\n.context-menu-item.context-menu-disabled.context-menu-hover {\n background-color: #EEE;\n cursor: default; }\n\n.context-menu-submenu:after {\n content: '';\n border-style: solid;\n border-width: 4px 0 4px 4px;\n border-color: transparent transparent transparent #2F2F2F;\n height: 0;\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n z-index: 1; }\n\n/**\r\n * Inputs\r\n */\n.context-menu-item.context-menu-input {\n padding: 5px 10px; }\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 position: relative;\n top: 3px; }\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: 100px; }\n\n.context-menu-item > .context-menu-list {\n display: none;\n /* re-positioned by js */\n right: -5px;\n top: 5px; }\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\";/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: v2.0.1\r\n *\r\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://swisnl.github.io/jQuery-contextMenu/\r\n *\r\n * Copyright (c) 2011-2016 SWIS BV and contributors\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n *\r\n * Date: 2016-01-05T21:43:31.423Z\r\n */@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?4cx9p);src:url(font/context-menu-icons.eot?4cx9p#iefix) format(\"embedded-opentype\"),url(font/context-menu-icons.woff2?4cx9p) format(\"woff2\"),url(font/context-menu-icons.woff?4cx9p) format(\"woff\"),url(font/context-menu-icons.ttf?4cx9p) format(\"truetype\")}.context-menu-icon:before{position:absolute;top:50%;left:0;width:28px;font-family:context-menu-icons;font-size:16px;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-add:before{content:\"\"}.context-menu-icon-copy:before{content:\"\"}.context-menu-icon-cut:before{content:\"\"}.context-menu-icon-delete:before{content:\"\"}.context-menu-icon-edit:before{content:\"\"}.context-menu-icon-paste:before{content:\"\"}.context-menu-icon-quit:before{content:\"\"}.context-menu-list{position:absolute;display:inline-block;min-width:180px;max-width:360px;padding:4px 0;margin:5px;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:3px;-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;padding:3px 28px;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:5px 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{background-color:#fff;color:#626262}.context-menu-input.context-menu-hover,.context-menu-item.context-menu-disabled.context-menu-hover{cursor:default;background-color:#eee}.context-menu-submenu:after{position:absolute;top:50%;right:8px;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:4px 0 4px 4px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:5px 10px}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:3px}.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:100px}.context-menu-item>.context-menu-list{top:5px;right:-5px;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}.context-menu-icon.context-menu-hover:before{color:#fff}\n/*# sourceMappingURL=jquery.contextMenu.min.css.map */\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["jquery.contextMenu.css","jquery.contextMenu.min.css"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBA,WACE,YAAA,mBACA,WAAA,OACA,YAAA,IAEA,IAAA,uCCCA,IAAK,6CAA4C,4BAA6B,yCAAwC,gBAAiB,wCAAuC,eAAgB,uCAAsC,mBAGtO,0BDCE,SAAA,SACA,IAAA,IACA,KAAA,EACA,MAAA,KACA,YAAA,mBACA,UAAA,KACA,WAAA,OACA,YAAS,IACT,YAAA,ECCA,MDDA,QCEA,WDFA,OCGA,kBDHA,iBACA,cAAA,iBACA,aAAA,iBACA,UAAc,iBAEhB,uBAAA,YACE,wBAAe,UCMjB,8BACE,QAAS,IAGX,+BDFA,QAAA,IAGA,8BACE,QAAA,ICMF,iCACE,QAAS,IAGX,+BDFA,QAAA,IAGA,gCACE,QAAA,ICMF,+BACE,QDJA,ICOF,6CDHE,MAAA,KCOF,mBDHE,SAAA,SACA,QAAA,aCKA,UAAW,MDHb,UAAA,MACE,QAAA,IAAA,EACA,OAAA,IACA,YAAA,QACA,UAAA,QACA,gBAAA,KCKA,WDLA,KCMA,ODNA,IAAA,MAAA,QCOA,cDPA,ICQA,mBAAoB,EAAE,IAAI,IAAI,eDNhC,WAAA,EAAA,IAAA,IAAA,eCUA,mBACE,SAAU,SDNZ,QAAA,IAAA,KCQE,MAAO,QDNP,oBAAA,KAAA,iBAAA,KAAA,gBAAA,KAAA,YAAA,KCWA,iBAAkB,KAGpB,wBDTE,QAAA,ECWA,OAAQ,IAAI,EDTd,cAAA,IAAA,MAAA,QCaA,+BDTA,kCACE,oBAAiB,KCWd,iBAAkB,KDTvB,gBAAA,KCWU,YAAa,KAGvB,sCDTA,MAAA,KACE,OAAA,QACA,iBAAA,QCaF,yCDRE,iBAAW,KCcX,MDZA,QCeF,uCACA,4DDZA,OAAA,QCcE,iBAAkB,KAGpB,4BACE,SAAU,SDZZ,IAAA,IACA,MAAA,IACE,QAAA,ECcA,MAAO,EDZT,OAAA,EACA,QAAA,GCcE,aAAc,YAAY,YAAY,YAAY,QDZlD,aAAA,MACA,aAAW,IAAA,EAAA,IAAA,ICcX,kBAAmB,iBDZrB,cAAA,iBCcO,aAAc,iBACX,UAAW,iBAMrB,sCACE,QAAS,IAAI,KDXf,4BACE,eAAc,ICmBhB,+CDdA,4CACE,SAAA,SCgBA,IAAK,IAGP,0BACA,2CAEA,iCADA,mCAEE,QAAS,MACT,MAAO,KACP,mBAAoB,WACjB,gBAAiB,WACZ,WAAY,WAGtB,mCACE,OAAQ,MAGV,sCACE,IAAK,IAEL,MAAuH,KACvH,QAAS,KAGX,2DACE,QAAS,MAGX,wBACE,gBAAiB","file":"jquery.contextMenu.min.css","sourcesContent":["@charset \"UTF-8\";\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: v2.1.0\r\n *\r\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://swisnl.github.io/jQuery-contextMenu/\r\n *\r\n * Copyright (c) 2011-2016 SWIS BV and contributors\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n *\r\n * Date: 2016-01-08T20:22:20.182Z\r\n */\n@font-face {\n font-family: \"context-menu-icons\";\n src: url(\"font/context-menu-icons.eot?4cx9p\");\n src: url(\"font/context-menu-icons.eot?4cx9p#iefix\") format(\"embedded-opentype\"), url(\"font/context-menu-icons.woff2?4cx9p\") format(\"woff2\"), url(\"font/context-menu-icons.woff?4cx9p\") format(\"woff\"), url(\"font/context-menu-icons.ttf?4cx9p\") format(\"truetype\");\n font-weight: normal;\n font-style: normal; }\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: 16px;\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: 28px; }\n\n.context-menu-icon-add:before {\n content: \"\"; }\n\n.context-menu-icon-copy:before {\n content: \"\"; }\n\n.context-menu-icon-cut:before {\n content: \"\"; }\n\n.context-menu-icon-delete:before {\n content: \"\"; }\n\n.context-menu-icon-edit:before {\n content: \"\"; }\n\n.context-menu-icon-paste:before {\n content: \"\"; }\n\n.context-menu-icon-quit:before {\n content: \"\"; }\n\n.context-menu-icon.context-menu-hover:before {\n color: #FFF; }\n\n.context-menu-list {\n background: #FFF;\n border: 1px solid #bebebe;\n border-radius: 3px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n font-family: inherit;\n font-size: inherit;\n display: inline-block;\n list-style-type: none;\n margin: 5px;\n max-width: 360px;\n min-width: 180px;\n padding: 4px 0;\n position: absolute; }\n\n.context-menu-item {\n background-color: #FFF;\n color: #2F2F2F;\n padding: 3px 28px;\n position: relative;\n user-select: none; }\n\n.context-menu-separator {\n border-bottom: 1px solid #e6e6e6;\n margin: 5px 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: #626262; }\n\n.context-menu-item.context-menu-disabled {\n color: #626262; }\n\n.context-menu-input.context-menu-hover,\n.context-menu-item.context-menu-disabled.context-menu-hover {\n background-color: #EEE;\n cursor: default; }\n\n.context-menu-submenu:after {\n content: '';\n border-style: solid;\n border-width: 4px 0 4px 4px;\n border-color: transparent transparent transparent #2F2F2F;\n height: 0;\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n z-index: 1; }\n\n/**\r\n * Inputs\r\n */\n.context-menu-item.context-menu-input {\n padding: 5px 10px; }\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 position: relative;\n top: 3px; }\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: 100px; }\n\n.context-menu-item > .context-menu-list {\n display: none;\n /* re-positioned by js */\n right: -5px;\n top: 5px; }\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\";/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: v2.0.1\r\n *\r\n * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://swisnl.github.io/jQuery-contextMenu/\r\n *\r\n * Copyright (c) 2011-2016 SWIS BV and contributors\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n *\r\n * Date: 2016-01-05T21:48:32.310Z\r\n */@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?4cx9p);src:url(font/context-menu-icons.eot?4cx9p#iefix) format(\"embedded-opentype\"),url(font/context-menu-icons.woff2?4cx9p) format(\"woff2\"),url(font/context-menu-icons.woff?4cx9p) format(\"woff\"),url(font/context-menu-icons.ttf?4cx9p) format(\"truetype\")}.context-menu-icon:before{position:absolute;top:50%;left:0;width:28px;font-family:context-menu-icons;font-size:16px;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-add:before{content:\"\"}.context-menu-icon-copy:before{content:\"\"}.context-menu-icon-cut:before{content:\"\"}.context-menu-icon-delete:before{content:\"\"}.context-menu-icon-edit:before{content:\"\"}.context-menu-icon-paste:before{content:\"\"}.context-menu-icon-quit:before{content:\"\"}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-list{position:absolute;display:inline-block;min-width:180px;max-width:360px;padding:4px 0;margin:5px;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:3px;-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;padding:3px 28px;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:5px 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{background-color:#fff;color:#626262}.context-menu-input.context-menu-hover,.context-menu-item.context-menu-disabled.context-menu-hover{cursor:default;background-color:#eee}.context-menu-submenu:after{position:absolute;top:50%;right:8px;z-index:1;width:0;height:0;content:'';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:4px 0 4px 4px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:5px 10px}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{position:relative;top:3px}.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:100px}.context-menu-item>.context-menu-list{top:5px;right:-5px;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\r\n/*# sourceMappingURL=jquery.contextMenu.min.css.map */\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/jquery.contextMenu.min.js b/dist/jquery.contextMenu.min.js index d656e0bf..f3976dad 100644 --- a/dist/jquery.contextMenu.min.js +++ b/dist/jquery.contextMenu.min.js @@ -1,7 +1,7 @@ /*! - * jQuery contextMenu v2.0.1 - Plugin for simple contextMenu handling + * jQuery contextMenu v2.1.0 - Plugin for simple contextMenu handling * - * Version: v2.0.1 + * Version: v2.1.0 * * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) * Web: http://swisnl.github.io/jQuery-contextMenu/ @@ -12,7 +12,7 @@ * MIT License http://www.opensource.org/licenses/mit-license * GPL v3 http://opensource.org/licenses/GPL-3.0 * - * Date: 2016-01-08T20:05:11.169Z + * Date: 2016-01-08T20:22:21.900Z */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){"use strict";function t(e){for(var t,n=e.split(/\s+/),a=[],o=0;t=n[o];o++)t=t.charAt(0).toUpperCase(),a.push(t);return a}function n(t){return t.id&&e('label[for="'+t.id+'"]').val()||t.name}function a(t,o,s){return s||(s=0),o.each(function(){var o,i,c=e(this),r=this,l=this.nodeName.toLowerCase();switch("label"===l&&c.find("input, textarea, select").length&&(o=c.text(),c=c.children().first(),r=c.get(0),l=r.nodeName.toLowerCase()),l){case"menu":i={name:c.attr("label"),items:{}},s=a(i.items,c.children(),s);break;case"a":case"button":i={name:c.text(),disabled:!!c.attr("disabled"),callback:function(){return function(){c.click()}}()};break;case"menuitem":case"command":switch(c.attr("type")){case void 0:case"command":case"menuitem":i={name:c.attr("label"),disabled:!!c.attr("disabled"),icon:c.attr("icon"),callback:function(){return function(){c.click()}}()};break;case"checkbox":i={type:"checkbox",disabled:!!c.attr("disabled"),name:c.attr("label"),selected:!!c.attr("checked")};break;case"radio":i={type:"radio",disabled:!!c.attr("disabled"),name:c.attr("label"),radio:c.attr("radiogroup"),value:c.attr("id"),selected:!!c.attr("checked")};break;default:i=void 0}break;case"hr":i="-------";break;case"input":switch(c.attr("type")){case"text":i={type:"text",name:o||n(r),disabled:!!c.attr("disabled"),value:c.val()};break;case"checkbox":i={type:"checkbox",name:o||n(r),disabled:!!c.attr("disabled"),selected:!!c.attr("checked")};break;case"radio":i={type:"radio",name:o||n(r),disabled:!!c.attr("disabled"),radio:!!c.attr("name"),value:c.val(),selected:!!c.attr("checked")};break;default:i=void 0}break;case"select":i={type:"select",name:o||n(r),disabled:!!c.attr("disabled"),selected:c.val(),options:{}},c.children().each(function(){i.options[this.value]=e(this).text()});break;case"textarea":i={type:"textarea",name:o||n(r),disabled:!!c.attr("disabled"),value:c.val()};break;case"label":break;default:i={type:"html",html:c.clone(!0)}}i&&(s++,t["key"+s]=i)}),s}e.support.htmlMenuitem="HTMLMenuItemElement"in window,e.support.htmlCommand="HTMLCommandElement"in window,e.support.eventSelectstart="onselectstart"in document.documentElement,e.ui&&e.widget||(e.cleanData=function(t){return function(n){var a,o,s;for(s=0;null!=(o=n[s]);s++)try{a=e._data(o,"events"),a&&a.remove&&e(o).triggerHandler("remove")}catch(i){}t(n)}}(e.cleanData));var o=null,s=!1,i=e(window),c=0,r={},l={},u={},d={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:200,reposition:!0,classNames:{hover:"context-menu-hover",disabled:"context-menu-disabled",visible:"context-menu-visible",notSelectable:"context-menu-not-selectable",icon:"context-menu-icon",iconEdit:"context-menu-icon-edit",iconCut:"context-menu-icon-cut",iconCopy:"context-menu-icon-copy",iconPaste:"context-menu-icon-paste",iconDelete:"context-menu-icon-delete",iconAdd:"context-menu-icon-add",iconQuit:"context-menu-icon-quit"},determinePosition:function(t){if(e.ui&&e.ui.position)t.css("display","block").position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css("display","none");else{var n=this.offset();n.top+=this.outerHeight(),n.left+=this.outerWidth()/2-t.outerWidth()/2,t.css(n)}},position:function(e,t,n){var a;if(!t&&!n)return void e.determinePosition.call(this,e.$menu);a="maintain"===t&&"maintain"===n?e.$menu.position():{top:n,left:t};var o=i.scrollTop()+i.height(),s=i.scrollLeft()+i.width(),c=e.$menu.outerHeight(),r=e.$menu.outerWidth();a.top+c>o&&(a.top-=c),a.top<0&&(a.top=0),a.left+r>s&&(a.left-=r),a.left<0&&(a.left=0),e.$menu.css(a)},positionSubmenu:function(t){if(e.ui&&e.ui.position)t.css("display","block").position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var n={top:0,left:this.outerWidth()};t.css(n)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{show:e.noop,hide:e.noop},callback:null,items:{}},m={timer:null,pageX:null,pageY:null},p=function(e){for(var t=0,n=e;;)if(t=Math.max(t,parseInt(n.css("z-index"),10)||0),n=n.parent(),!n||!n.length||"html body".indexOf(n.prop("nodeName").toLowerCase())>-1)break;return t},f={abortevent:function(e){e.preventDefault(),e.stopImmediatePropagation()},contextmenu:function(t){var n=e(this);if("right"===t.data.trigger&&(t.preventDefault(),t.stopImmediatePropagation()),!("right"!==t.data.trigger&&"demand"!==t.data.trigger&&t.originalEvent||!(void 0===t.mouseButton||!t.data||"left"==t.data.trigger&&0===t.mouseButton||"right"==t.data.trigger&&2===t.mouseButton)||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled"))){if(o=n,t.data.build){var a=t.data.build(o,t);if(a===!1)return;if(t.data=e.extend(!0,{},d,t.data,a||{}),!t.data.items||e.isEmptyObject(t.data.items))throw window.console&&(console.error||console.log).call(console,"No items specified to show in contextMenu"),new Error("No Items specified");t.data.$trigger=o,h.create(t.data)}var s=!1;for(var i in t.data.items)if(t.data.items.hasOwnProperty(i)){var c;c=e.isFunction(t.data.items[i].visible)?t.data.items[i].visible.call(e(t.currentTarget),i,t.data):"undefined"!=typeof i.visible?t.data.items[i].visible===!0:!0,c&&(s=!0)}if(s){var r=e(null===t.data.appendTo?"body":t.data.appendTo),l=t.target||t.srcElement||t.originalTarget;h.show.call(n,t.data,e(l).offset().left-r.offset().left+t.offsetX,e(l).offset().top-r.offset().top+t.offsetY)}}},click:function(t){t.preventDefault(),t.stopImmediatePropagation(),e(this).trigger(e.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))},mousedown:function(t){var n=e(this);o&&o.length&&!o.is(n)&&o.data("contextMenu").$menu.trigger("contextmenu:hide"),2===t.button&&(o=n.data("contextMenuActive",!0))},mouseup:function(t){var n=e(this);n.data("contextMenuActive")&&o&&o.length&&o.is(n)&&!n.hasClass("context-menu-disabled")&&(t.preventDefault(),t.stopImmediatePropagation(),o=n,n.trigger(e.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))),n.removeData("contextMenuActive")},mouseenter:function(t){var n=e(this),a=e(t.relatedTarget),s=e(document);a.is(".context-menu-list")||a.closest(".context-menu-list").length||o&&o.length||(m.pageX=t.pageX,m.pageY=t.pageY,m.data=t.data,s.on("mousemove.contextMenuShow",f.mousemove),m.timer=setTimeout(function(){m.timer=null,s.off("mousemove.contextMenuShow"),o=n,n.trigger(e.Event("contextmenu",{data:m.data,pageX:m.pageX,pageY:m.pageY}))},t.data.delay))},mousemove:function(e){m.pageX=e.pageX,m.pageY=e.pageY},mouseleave:function(t){var n=e(t.relatedTarget);if(!n.is(".context-menu-list")&&!n.closest(".context-menu-list").length){try{clearTimeout(m.timer)}catch(t){}m.timer=null}},layerClick:function(t){var n,a,o=e(this),s=o.data("contextMenuRoot"),c=t.button,r=t.pageX,l=t.pageY;t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){var o,u="left"===s.trigger&&0===c||"right"===s.trigger&&2===c;if(document.elementFromPoint&&s.$layer&&(s.$layer.hide(),n=document.elementFromPoint(r-i.scrollLeft(),l-i.scrollTop()),s.$layer.show()),s.reposition&&u)if(document.elementFromPoint){if(s.$trigger.is(n)||s.$trigger.has(n).length)return void s.position.call(s.$trigger,s,r,l)}else if(a=s.$trigger.offset(),o=e(window),a.top+=o.scrollTop(),a.top<=t.pageY&&(a.left+=o.scrollLeft(),a.left<=t.pageX&&(a.bottom=a.top+s.$trigger.outerHeight(),a.bottom>=t.pageY&&(a.right=a.left+s.$trigger.outerWidth(),a.right>=t.pageX))))return void s.position.call(s.$trigger,s,r,l);n&&u&&s.$trigger.one("contextmenu:hidden",function(){e(n).contextMenu({x:r,y:l,button:c})}),s.$menu.trigger("contextmenu:hide")},50)},keyStop:function(e,t){t.isInput||e.preventDefault(),e.stopPropagation()},key:function(e){var t={};o&&(t=o.data("contextMenu")||{}),void 0===t.zIndex&&(t.zIndex=0);var n=0,a=function(e){""!==e.style.zIndex?n=e.style.zIndex:null!==e.offsetParent&&void 0!==e.offsetParent?a(e.offsetParent):null!==e.parentElement&&void 0!==e.parentElement&&a(e.parentElement)};if(a(e.target),!(n>t.zIndex)){switch(e.keyCode){case 9:case 38:if(f.keyStop(e,t),t.isInput){if(9===e.keyCode&&e.shiftKey)return e.preventDefault(),t.$selected&&t.$selected.find("input, textarea, select").blur(),void t.$menu.trigger("prevcommand");if(38===e.keyCode&&"checkbox"===t.$selected.find("input, textarea, select").prop("type"))return void e.preventDefault()}else if(9!==e.keyCode||e.shiftKey)return void t.$menu.trigger("prevcommand");case 40:if(f.keyStop(e,t),!t.isInput)return void t.$menu.trigger("nextcommand");if(9===e.keyCode)return e.preventDefault(),t.$selected&&t.$selected.find("input, textarea, select").blur(),void t.$menu.trigger("nextcommand");if(40===e.keyCode&&"checkbox"===t.$selected.find("input, textarea, select").prop("type"))return void e.preventDefault();break;case 37:if(f.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;if(!t.$selected.parent().hasClass("context-menu-root")){var s=t.$selected.parent().parent();return t.$selected.trigger("contextmenu:blur"),void(t.$selected=s)}break;case 39:if(f.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;var i=t.$selected.data("contextMenu")||{};if(i.$menu&&t.$selected.hasClass("context-menu-submenu"))return t.$selected=null,i.$selected=null,void i.$menu.trigger("nextcommand");break;case 35:case 36:return t.$selected&&t.$selected.find("input, textarea, select").length?void 0:((t.$selected&&t.$selected.parent()||t.$menu).children(":not(."+t.classNames.disabled+", ."+t.classNames.notSelectable+")")[36===e.keyCode?"first":"last"]().trigger("contextmenu:focus"),void e.preventDefault());case 13:if(f.keyStop(e,t),t.isInput){if(t.$selected&&!t.$selected.is("textarea, select"))return void e.preventDefault();break}return void("undefined"!=typeof t.$selected&&null!==t.$selected&&t.$selected.trigger("mouseup"));case 32:case 33:case 34:return void f.keyStop(e,t);case 27:return f.keyStop(e,t),void t.$menu.trigger("contextmenu:hide");default:var c=String.fromCharCode(e.keyCode).toUpperCase();if(t.accesskeys&&t.accesskeys[c])return void t.accesskeys[c].$node.trigger(t.accesskeys[c].$menu?"contextmenu:focus":"mouseup")}e.stopPropagation(),"undefined"!=typeof t.$selected&&null!==t.$selected&&t.$selected.trigger(e)}},prevItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{},a=e(this).data("contextMenuRoot")||{};if(n.$selected){var o=n.$selected;n=n.$selected.parent().data("contextMenu")||{},n.$selected=o}for(var s=n.$menu.children(),i=n.$selected&&n.$selected.prev().length?n.$selected.prev():s.last(),c=i;i.hasClass(a.classNames.disabled)||i.hasClass(a.classNames.notSelectable);)if(i=i.prev().length?i.prev():s.last(),i.is(c))return;n.$selected&&f.itemMouseleave.call(n.$selected.get(0),t),f.itemMouseenter.call(i.get(0),t);var r=i.find("input, textarea, select");r.length&&r.focus()},nextItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{},a=e(this).data("contextMenuRoot")||{};if(n.$selected){var o=n.$selected;n=n.$selected.parent().data("contextMenu")||{},n.$selected=o}for(var s=n.$menu.children(),i=n.$selected&&n.$selected.next().length?n.$selected.next():s.first(),c=i;i.hasClass(a.classNames.disabled)||i.hasClass(a.classNames.notSelectable);)if(i=i.next().length?i.next():s.first(),i.is(c))return;n.$selected&&f.itemMouseleave.call(n.$selected.get(0),t),f.itemMouseenter.call(i.get(0),t);var r=i.find("input, textarea, select");r.length&&r.focus()},focusInput:function(){var t=e(this).closest(".context-menu-item"),n=t.data(),a=n.contextMenu,o=n.contextMenuRoot;o.$selected=a.$selected=t,o.isInput=a.isInput=!0},blurInput:function(){var t=e(this).closest(".context-menu-item"),n=t.data(),a=n.contextMenu,o=n.contextMenuRoot;o.isInput=a.isInput=!1},menuMouseenter:function(){var t=e(this).data().contextMenuRoot;t.hovering=!0},menuMouseleave:function(t){var n=e(this).data().contextMenuRoot;n.$layer&&n.$layer.is(t.relatedTarget)&&(n.hovering=!1)},itemMouseenter:function(t){var n=e(this),a=n.data(),o=a.contextMenu,s=a.contextMenuRoot;return s.hovering=!0,t&&s.$layer&&s.$layer.is(t.relatedTarget)&&(t.preventDefault(),t.stopImmediatePropagation()),(o.$menu?o:s).$menu.children(".hover").trigger("contextmenu:blur"),n.hasClass(s.classNames.disabled)||n.hasClass(s.classNames.notSelectable)?void(o.$selected=null):void n.trigger("contextmenu:focus")},itemMouseleave:function(t){var n=e(this),a=n.data(),o=a.contextMenu,s=a.contextMenuRoot;return s!==o&&s.$layer&&s.$layer.is(t.relatedTarget)?("undefined"!=typeof s.$selected&&null!==s.$selected&&s.$selected.trigger("contextmenu:blur"),t.preventDefault(),t.stopImmediatePropagation(),void(s.$selected=o.$selected=o.$node)):void n.trigger("contextmenu:blur")},itemClick:function(t){var n,a=e(this),o=a.data(),s=o.contextMenu,i=o.contextMenuRoot,c=o.contextMenuKey;if(s.items[c]&&!a.is("."+i.classNames.disabled+", .context-menu-submenu, .context-menu-separator, ."+i.classNames.notSelectable)){if(t.preventDefault(),t.stopImmediatePropagation(),e.isFunction(i.callbacks[c])&&Object.prototype.hasOwnProperty.call(i.callbacks,c))n=i.callbacks[c];else{if(!e.isFunction(i.callback))return;n=i.callback}n.call(i.$trigger,c,i)!==!1?i.$menu.trigger("contextmenu:hide"):i.$menu.parent().length&&h.update.call(i.$trigger,i)}},inputClick:function(e){e.stopImmediatePropagation()},hideMenu:function(t,n){var a=e(this).data("contextMenuRoot");h.hide.call(a.$trigger,a,n&&n.force)},focusItem:function(t){t.stopPropagation();var n=e(this),a=n.data(),o=a.contextMenu,s=a.contextMenuRoot;n.addClass([s.classNames.hover,s.classNames.visible].join(" ")).siblings().removeClass(s.classNames.visible).filter(s.classNames.hover).trigger("contextmenu:blur"),o.$selected=s.$selected=n,o.$node&&s.positionSubmenu.call(o.$node,o.$menu)},blurItem:function(t){t.stopPropagation();var n=e(this),a=n.data(),o=a.contextMenu,s=a.contextMenuRoot;o.autoHide&&n.removeClass(s.classNames.visible),n.removeClass(s.classNames.hover),o.$selected=null}},h={show:function(t,n,a){var s=e(this),i={};if(e("#context-menu-layer").trigger("mousedown"),t.$trigger=s,t.events.show.call(s,t)===!1)return void(o=null);if(h.update.call(s,t),t.position.call(s,t,n,a),t.zIndex){var c=t.zIndex;"function"==typeof t.zIndex&&(c=t.zIndex.call(s,t)),i.zIndex=p(s)+c}h.layer.call(t.$menu,t,i.zIndex),t.$menu.find("ul").css("zIndex",i.zIndex+1),t.$menu.css(i)[t.animation.show](t.animation.duration,function(){s.trigger("contextmenu:visible")}),s.data("contextMenu",t).addClass("context-menu-active"),e(document).off("keydown.contextMenu").on("keydown.contextMenu",f.key),t.autoHide&&e(document).on("mousemove.contextMenuAutoHide",function(e){var n=s.offset();n.right=n.left+s.outerWidth(),n.bottom=n.top+s.outerHeight(),!t.$layer||t.hovering||e.pageX>=n.left&&e.pageX<=n.right&&e.pageY>=n.top&&e.pageY<=n.bottom||t.$menu.trigger("contextmenu:hide")})},hide:function(t,n){var a=e(this);if(t||(t=a.data("contextMenu")||{}),n||!t.events||t.events.hide.call(a,t)!==!1){if(a.removeData("contextMenu").removeClass("context-menu-active"),t.$layer){setTimeout(function(e){return function(){e.remove()}}(t.$layer),10);try{delete t.$layer}catch(s){t.$layer=null}}o=null,t.$menu.find("."+t.classNames.hover).trigger("contextmenu:blur"),t.$selected=null,e(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),t.$menu&&t.$menu[t.animation.hide](t.animation.duration,function(){t.build&&(t.$menu.remove(),e.each(t,function(e){switch(e){case"ns":case"selector":case"build":case"trigger":return!0;default:t[e]=void 0;try{delete t[e]}catch(n){}return!0}})),setTimeout(function(){a.trigger("contextmenu:hidden")},10)})}},create:function(n,a){function o(t){var n=e("");return t._accesskey?(t._beforeAccesskey&&n.append(document.createTextNode(t._beforeAccesskey)),e("").addClass("context-menu-accesskey").text(t._accesskey).appendTo(n),t._afterAccesskey&&n.append(document.createTextNode(t._afterAccesskey))):n.text(t.name),n}void 0===a&&(a=n),n.$menu=e('
').addClass(n.className||"").data({contextMenu:n,contextMenuRoot:a}),e.each(["callbacks","commands","inputs"],function(e,t){n[t]={},a[t]||(a[t]={})}),a.accesskeys||(a.accesskeys={}),e.each(n.items,function(s,i){var c=e('').addClass(i.className||""),r=null,l=null;if(c.on("click",e.noop),"string"==typeof i&&(i={type:"cm_seperator"}),i.$node=c.data({contextMenu:n,contextMenuRoot:a,contextMenuKey:s}),"undefined"!=typeof i.accesskey)for(var d,m=t(i.accesskey),p=0;d=m[p];p++)if(!a.accesskeys[d]){a.accesskeys[d]=i;var x=i.name.match(new RegExp("^(.*?)("+d+")(.*)$","i"));x&&(i._beforeAccesskey=x[1],i._accesskey=x[2],i._afterAccesskey=x[3]);break}if(i.type&&u[i.type])u[i.type].call(c,i,n,a),e.each([n,a],function(t,n){n.commands[s]=i,e.isFunction(i.callback)&&(n.callbacks[s]=i.callback)});else{switch("cm_seperator"===i.type?c.addClass("context-menu-separator "+a.classNames.notSelectable):"html"===i.type?c.addClass("context-menu-html "+a.classNames.notSelectable):i.type?(r=e("").appendTo(c),o(i).appendTo(r),c.addClass("context-menu-input"),n.hasTypes=!0,e.each([n,a],function(e,t){t.commands[s]=i,t.inputs[s]=i})):i.items&&(i.type="sub"),i.type){case"cm_seperator":break;case"text":l=e('').attr("name","context-menu-input-"+s).val(i.value||"").appendTo(r);break;case"textarea":l=e('').attr("name","context-menu-input-"+s).val(i.value||"").appendTo(r),i.height&&l.height(i.height);break;case"checkbox":l=e('').attr("name","context-menu-input-"+s).val(i.value||"").prop("checked",!!i.selected).prependTo(r);break;case"radio":l=e('').attr("name","context-menu-input-"+i.radio).val(i.value||"").prop("checked",!!i.selected).prependTo(r);break;case"select":l=e('