From 535c94e9a8c416fff75d9e2de09bb503009e9c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Brala?= Date: Mon, 13 Jun 2016 15:51:09 +0200 Subject: [PATCH] Preparing 2.2.0 release --- README.md | 3 +-- dist/font/context-menu-icons.eot | Bin 3380 -> 3396 bytes dist/font/context-menu-icons.ttf | Bin 3172 -> 3188 bytes dist/font/context-menu-icons.woff | Bin 2068 -> 2076 bytes dist/font/context-menu-icons.woff2 | Bin 1560 -> 1612 bytes dist/jquery.contextMenu.css | 4 ++-- dist/jquery.contextMenu.js | 6 +++--- dist/jquery.contextMenu.min.css | 4 ++-- dist/jquery.contextMenu.min.css.map | 2 +- dist/jquery.contextMenu.min.js | 6 +++--- dist/jquery.contextMenu.min.js.map | 2 +- package.json | 2 +- src/sass/icons/_variables.scss | 2 +- 13 files changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 72fdc516..6af6fafc 100644 --- a/README.md +++ b/README.md @@ -103,8 +103,7 @@ Font-Awesome icons used from [encharm/Font-Awesome-SVG-PNG](https://github.com/e ## Changelog ## - -### [Unreleased] +### 2.2.0 ### #### Added * Add option to show item title as HTML (thanks @brassard) diff --git a/dist/font/context-menu-icons.eot b/dist/font/context-menu-icons.eot index aa09af5b37138e18edc9d9a97445469d7b58c174..d915c2dd13b97985083e26d1b19d022710680e10 100644 GIT binary patch delta 271 zcmdlYbwrBQg_nV$WFo6M%RFb5l8Fur>J@raD;XFVEf^RWLi~gEjU4j*PXhTpKz>+q zZeqb}=Usga3`{IQu_Ng@m1(YA=h+z;nC~z!u&&8SO-$iZk$ekO`v8c|GJpc?`)kOM31{ zUtnP1kpN0YGB5&_9r%BMfnoAAMkSdN73X>J{5D@1xPeXqg3B#gJ7DzWD~#5%1`Ku# rOgV`qc?^6mZayIlQVbAiwMB~6gqMLKWg@FN%Yk(dgC;sGsNe8!^IHZ6MhgZ81}FbueIti*|C2y|4Uiv} zoSRti+Id$WkpBgUkEG{Rrnz#RXJ=qwKEuGkx+WtvF@^KpHBF$}2S99=0TkenWRz^%dk7m-O6^ zzQDl1!vU0xWMBj;JMjMiL(Jr9j7l;=57!-t=ePOFz|8`bWnj3RdEy$3o_vMTnp=)R ihk?<>%_oF`W3mpDAve%c<_5+I46Fr7)tZ(Fy?|%}=?*a0|l5-Oa zUOVsVV_;xn0g4?-pv*fptwrYGMlKyK9<2wGV*UECVROA6e*_N^V0UEGlVu!qZ1p@<9UqOCxNzeW03k(cA96(i( zAQv(p_baC?uVc?h? X!)VA2w2ZldaRLJ?1IOlRjQ6+z=k!Bk diff --git a/dist/font/context-menu-icons.woff b/dist/font/context-menu-icons.woff index 88032fe506b9026f63ecfae2062d5640ef0457b3..37ccb0bc5e70b6ae071c6a83f0db9364c0602407 100644 GIT binary patch delta 408 zcmbOtFh@Y7+~3WOfsp|SIAj>OK{QXvL=okBYalB`p+~jSKUm+0fq~Hl$OqvthkXB& z$+?LIK(P)WKNCnFdF{NbFFmI+4aok&z`(-7z`(l3mFqlvMrvXTko^Ow&Jc*rxKt$H zW&i~l7}#`xd<7s@Vc*YuJR`TH0x0GK zpv7!J%pea^$SBFsmzS8E3KW|FaU@gULg!+!g8bqV1_t&sKsByF9NBX}`a;E=QISKt^L0=1)AwHg_;qvUo3Ozgzw2XYM|ug3SgE2cDi0zMk;qfBb*`4F-nt z3`Ld_GaME%G`sR;0UZFf+wQ}E24^1b!$4L4HyRi+xCSt=Gpr9{d%4+%?E)hJa&~s& diff --git a/dist/font/context-menu-icons.woff2 b/dist/font/context-menu-icons.woff2 index aab79c8fbec8fe1cff6cf8a1c09649a7ceeb41eb..6ee8ef4e85d409575a2fa80d6c60cef8c357f88c 100644 GIT binary patch literal 1612 zcmV-S2DABhPew8T0RR9100v9|3jhEB01R{h00sa60RR9100000000000000000000 z0000SR0dW6gG368EQu-sHUcCAAPW)z1Rw>44hLBqm9gvTxX)rmMRtOFry^e!H zEUDCK5KKr%MS)vQ?x3^UV4yk-s+H|NtHF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=laQc=H0}#OMS^}q5ltqZ*|G?MJ5(3^najrUR_ogp_fD1ci1p`3j^8l6P1mVd% za|l9W8vsTQF+p{C2?(o>rW_>XQVl{-K}AGk5uC z7BTjS!|^3mF?svyLsQnN_~3S@<}rCi_7E diff --git a/dist/jquery.contextMenu.css b/dist/jquery.contextMenu.css index c25ccbf7..ca426d00 100644 --- a/dist/jquery.contextMenu.css +++ b/dist/jquery.contextMenu.css @@ -2,7 +2,7 @@ /*! * jQuery contextMenu - Plugin for simple contextMenu handling * - * Version: v2.1.1 + * Version: v2.2.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-05-24T13:08:41.760Z + * Date: 2016-06-13T13:50:47.218Z */ @font-face { font-family: "context-menu-icons"; diff --git a/dist/jquery.contextMenu.js b/dist/jquery.contextMenu.js index be98a5ae..956143fd 100755 --- a/dist/jquery.contextMenu.js +++ b/dist/jquery.contextMenu.js @@ -1,7 +1,7 @@ /*! - * jQuery contextMenu v2.1.1 - Plugin for simple contextMenu handling + * jQuery contextMenu v2.2.0 - Plugin for simple contextMenu handling * - * Version: v2.1.1 + * Version: v2.2.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-05-24T20:50:18.774Z + * Date: 2016-06-13T13:50:47.616Z */ (function (factory) { diff --git a/dist/jquery.contextMenu.min.css b/dist/jquery.contextMenu.min.css index 7e8fd333..9be2735f 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.1.1 + * Version: v2.2.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-05-24T13:08:41.760Z + * Date: 2016-06-13T13:50:47.218Z */.context-menu-icon.context-menu-icon--fa::before,.context-menu-icon::before{left:0;width:2em;font-size:1em;font-style:normal;font-weight:400;line-height:1;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?1rzc4);src:url(font/context-menu-icons.eot?1rzc4#iefix) format("embedded-opentype"),url(font/context-menu-icons.woff2?1rzc4) format("woff2"),url(font/context-menu-icons.woff?1rzc4) format("woff"),url(font/context-menu-icons.ttf?1rzc4) 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-paste:before{content:"\EA06"}.context-menu-icon-quit:before{content:"\EA07"}.context-menu-icon::before{font-family:context-menu-icons;color:#2980b9;transform:translateY(-50%)}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon--fa{display:list-item}.context-menu-icon.context-menu-icon--fa::before{font-family:FontAwesome;color:#2980b9;transform:translateY(-50%)}.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-icon.context-menu-icon--fa span{font-family:sans-serif}.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;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{cursor:default;background-color:#eee}.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 7a051181..11ce8cdc 100644 --- a/dist/jquery.contextMenu.min.css.map +++ b/dist/jquery.contextMenu.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["jquery.contextMenu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,iBChBA,QDmBF,yCCfA,MAAA,KDiBE,OAAQ,QACR,iBChBC,KDmBH,uCCfA,OAAA,QACA,iBAAA,KAGA,4BACA,SAAA,SDiBE,IAAK,ICfL,MAAA,KACA,QAAA,EACA,MAAA,EDiBA,OAAQ,ECfV,QAAA,GACE,aAAY,YAAA,YAAA,YAAA,QDiBZ,aAAc,MCfhB,aAAA,MAAA,EAAA,MAAA,MDiBE,kBAAmB,iBACf,cAAe,iBACd,aAAc,iBCfnB,UAAA,iBAIF,sCACE,QAAA,KAAc,KDsBhB,4BCjBE,eAAa,IDsBf,+CACA,4CCjBA,SAAA,SACE,IAAA,MDmBA,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,MAAuH,MACvH,QAAS,KAGX,2DACE,QAAS,MAGX,wBACE,gBAAiB","file":"jquery.contextMenu.min.css","sourcesContent":["@charset \"UTF-8\";/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.1.1\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-2016 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2016-05-24T13:06:10.304Z\n */.context-menu-icon.context-menu-icon--fa::before,.context-menu-icon::before{left:0;width:2em;font-size:1em;font-style:normal;font-weight:400;line-height:1;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?1rzc4);src:url(font/context-menu-icons.eot?1rzc4#iefix) format(\"embedded-opentype\"),url(font/context-menu-icons.woff2?1rzc4) format(\"woff2\"),url(font/context-menu-icons.woff?1rzc4) format(\"woff\"),url(font/context-menu-icons.ttf?1rzc4) 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-paste:before{content:\"\\EA06\"}.context-menu-icon-quit:before{content:\"\\EA07\"}.context-menu-icon::before{font-family:context-menu-icons;color:#2980b9;transform:translateY(-50%)}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon--fa::before{font-family:FontAwesome;color:#2980b9;transform:translateY(-50%)}.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-icon.context-menu-icon--fa span{font-family:sans-serif}.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;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{cursor:default;background-color:#eee}.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","@charset \"UTF-8\";\n/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.1.1\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-2016 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2016-05-24T13:08:41.760Z\n */\n@font-face {\n font-family: \"context-menu-icons\";\n src: url(\"font/context-menu-icons.eot?1rzc4\");\n src: url(\"font/context-menu-icons.eot?1rzc4#iefix\") format(\"embedded-opentype\"), url(\"font/context-menu-icons.woff2?1rzc4\") format(\"woff2\"), url(\"font/context-menu-icons.woff?1rzc4\") format(\"woff\"), url(\"font/context-menu-icons.ttf?1rzc4\") 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-paste:before {\n content: \"\\EA06\"; }\n\n.context-menu-icon-quit:before {\n content: \"\\EA07\"; }\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--fa {\n display: list-item; }\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-icon.context-menu-icon--fa span {\n font-family: sans-serif; }\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 font-family: inherit;\n font-size: inherit;\n display: inline-block;\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 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 background-color: #EEE;\n cursor: default; }\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"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["jquery.contextMenu.min.css","jquery.contextMenu.css"],"names":[],"mappings":";;;;;;;;;;;;;;AAqFA,iDAhCA,2BAmCE,KCNE,EACF,MAAA,IAEA,UAAA,IDOA,WCNE,ODOF,YAAa,ICLf,YAAA,EDQE,WAAY,OA/BZ,kBAAmB,iBCFrB,cAAA,iBACE,aAAiB,iBDsCjB,uBCPA,YACA,wBAAqB,UAcrB,SAAA,SDmEA,IAAK,ICjKP,WACE,YAAA,mBACA,WAAA,OACA,YAAA,IAEA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nB,UAAA,iBAIF,sCACE,QAAA,KAAc,KDsBhB,4BCjBE,eAAa,IDsBf,+CACA,4CCjBA,SAAA,SACE,IAAA,MDmBA,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,MAAuH,MACvH,QAAS,KAGX,2DACE,QAAS,MAGX,wBACE,gBAAiB","file":"jquery.contextMenu.min.css","sourcesContent":["@charset \"UTF-8\";/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.1.1\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-2016 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2016-05-24T13:08:41.760Z\n */.context-menu-icon.context-menu-icon--fa::before,.context-menu-icon::before{left:0;width:2em;font-size:1em;font-style:normal;font-weight:400;line-height:1;text-align:center;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%}@font-face{font-family:context-menu-icons;font-style:normal;font-weight:400;src:url(font/context-menu-icons.eot?1rzc4);src:url(font/context-menu-icons.eot?1rzc4#iefix) format(\"embedded-opentype\"),url(font/context-menu-icons.woff2?1rzc4) format(\"woff2\"),url(font/context-menu-icons.woff?1rzc4) format(\"woff\"),url(font/context-menu-icons.ttf?1rzc4) 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-paste:before{content:\"\\EA06\"}.context-menu-icon-quit:before{content:\"\\EA07\"}.context-menu-icon::before{font-family:context-menu-icons;color:#2980b9;transform:translateY(-50%)}.context-menu-icon.context-menu-hover:before{color:#fff}.context-menu-icon.context-menu-disabled::before{color:#bbb}.context-menu-icon.context-menu-icon--fa{display:list-item}.context-menu-icon.context-menu-icon--fa::before{font-family:FontAwesome;color:#2980b9;transform:translateY(-50%)}.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-icon.context-menu-icon--fa span{font-family:sans-serif}.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;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{cursor:default;background-color:#eee}.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","@charset \"UTF-8\";\n/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: v2.2.0\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-2016 SWIS BV and contributors\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n * Date: 2016-06-13T13:50:47.218Z\n */\n@font-face {\n font-family: \"context-menu-icons\";\n src: url(\"font/context-menu-icons.eot?1rzc4\");\n src: url(\"font/context-menu-icons.eot?1rzc4#iefix\") format(\"embedded-opentype\"), url(\"font/context-menu-icons.woff2?1rzc4\") format(\"woff2\"), url(\"font/context-menu-icons.woff?1rzc4\") format(\"woff\"), url(\"font/context-menu-icons.ttf?1rzc4\") 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-paste:before {\n content: \"\\EA06\"; }\n\n.context-menu-icon-quit:before {\n content: \"\\EA07\"; }\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--fa {\n display: list-item; }\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-icon.context-menu-icon--fa span {\n font-family: sans-serif; }\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 font-family: inherit;\n font-size: inherit;\n display: inline-block;\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 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 background-color: #EEE;\n cursor: default; }\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"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/jquery.contextMenu.min.js b/dist/jquery.contextMenu.min.js index 56b1e2c7..7d9846b9 100755 --- a/dist/jquery.contextMenu.min.js +++ b/dist/jquery.contextMenu.min.js @@ -1,7 +1,7 @@ /*! - * jQuery contextMenu v2.1.1 - Plugin for simple contextMenu handling + * jQuery contextMenu v2.2.0 - Plugin for simple contextMenu handling * - * Version: v2.1.1 + * Version: v2.2.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-05-24T20:50:18.774Z + * Date: 2016-06-13T13:50:47.616Z */ !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!=n[s];s++){o=n[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){e(null===t.data.appendTo?"body":t.data.appendTo),t.target||t.srcElement||t.originalTarget;h.show.call(n,t.data,t.pageX,t.pageY)}}},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");break;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)||i.is(":hidden");)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)||i.is(":hidden");)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("."+s.classNames.hover).trigger("contextmenu:blur").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.hasClass(s.classNames.disabled)||n.hasClass(s.classNames.notSelectable)||(n.addClass([s.classNames.hover,s.classNames.visible].join(" ")).parent().find(".context-menu-item").not(n).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||setTimeout(function(){t.hovering||t.$menu.trigger("contextmenu:hide")},50)})},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,t.$menu.find("."+t.classNames.visible).removeClass(t.classNames.visible),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("");if(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));else if(t.isHtmlName){if("undefined"!=typeof t.accesskey)throw new Error("accesskeys are not compatible with HTML names and cannot be used together in the same item");n.html(t.name)}else n.text(t.name);return 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('')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || '')\r\n .appendTo($label);\r\n break;\r\n\r\n case 'textarea':\r\n $input = $('')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || '')\r\n .appendTo($label);\r\n\r\n if (item.height) {\r\n $input.height(item.height);\r\n }\r\n break;\r\n\r\n case 'checkbox':\r\n $input = $('')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || '')\r\n .prop('checked', !!item.selected)\r\n .prependTo($label);\r\n break;\r\n\r\n case 'radio':\r\n $input = $('')\r\n .attr('name', 'context-menu-input-' + item.radio)\r\n .val(item.value || '')\r\n .prop('checked', !!item.selected)\r\n .prependTo($label);\r\n break;\r\n\r\n case 'select':\r\n $input = $('\r\n if (item.type && item.type !== 'sub' && item.type !== 'html' && item.type !== 'cm_seperator') {\r\n $input\r\n .on('focus', handle.focusInput)\r\n .on('blur', handle.blurInput);\r\n\r\n if (item.events) {\r\n $input.on(item.events, opt);\r\n }\r\n }\r\n\r\n // add icons\r\n if (item.icon) {\r\n if ($.isFunction(item.icon)) {\r\n item._icon = item.icon.call(this, this, $t, key, item);\r\n } else {\r\n if ( typeof(item.icon) === 'string' && item.icon.substring(0,3) == 'fa-' ) {\r\n // to enable font awesome\r\n item._icon = root.classNames.icon + ' ' + root.classNames.icon + '--fa fa ' + item.icon;\r\n } else {\r\n item._icon = root.classNames.icon + ' ' + root.classNames.icon + '-' + item.icon;\r\n }\r\n }\r\n $t.addClass(item._icon);\r\n }\r\n }\r\n\r\n // cache contained elements\r\n item.$input = $input;\r\n item.$label = $label;\r\n\r\n // attach item to menu\r\n $t.appendTo(opt.$menu);\r\n\r\n // Disable text selection\r\n if (!opt.hasTypes && $.support.eventSelectstart) {\r\n // browsers support user-select: none,\r\n // IE has a special event for text-selection\r\n // browsers supporting neither will not be preventing text-selection\r\n $t.on('selectstart.disableTextSelect', handle.abortevent);\r\n }\r\n });\r\n // attach contextMenu to (to bypass any possible overflow:hidden issues on parents of the trigger element)\r\n if (!opt.$node) {\r\n opt.$menu.css('display', 'none').addClass('context-menu-root');\r\n }\r\n opt.$menu.appendTo(opt.appendTo || document.body);\r\n },\r\n resize: function ($menu, nested) {\r\n var domMenu;\r\n // determine widths of submenus, as CSS won't grow them automatically\r\n // position:absolute within position:absolute; min-width:100; max-width:200; results in width: 100;\r\n // kinda sucks hard...\r\n\r\n // determine width of absolutely positioned element\r\n $menu.css({position: 'absolute', display: 'block'});\r\n // don't apply yet, because that would break nested elements' widths\r\n $menu.data('width',\r\n (domMenu = $menu.get(0)).getBoundingClientRect ?\r\n Math.ceil(domMenu.getBoundingClientRect().width) :\r\n $menu.outerWidth() + 1); // outerWidth() returns rounded pixels\r\n // reset styles so they allow nested elements to grow/shrink naturally\r\n $menu.css({\r\n position: 'static',\r\n minWidth: '0px',\r\n maxWidth: '100000px'\r\n });\r\n // identify width of nested menus\r\n $menu.find('> li > ul').each(function () {\r\n op.resize($(this), true);\r\n });\r\n // reset and apply changes in the end because nested\r\n // elements' widths wouldn't be calculatable otherwise\r\n if (!nested) {\r\n $menu.find('ul').addBack().css({\r\n position: '',\r\n display: '',\r\n minWidth: '',\r\n maxWidth: ''\r\n }).outerWidth(function () {\r\n return $(this).data('width');\r\n });\r\n }\r\n },\r\n update: function (opt, root) {\r\n var $trigger = this;\r\n if (root === undefined) {\r\n root = opt;\r\n op.resize(opt.$menu);\r\n }\r\n // re-check disabled for each item\r\n opt.$menu.children().each(function () {\r\n var $item = $(this),\r\n key = $item.data('contextMenuKey'),\r\n item = opt.items[key],\r\n disabled = ($.isFunction(item.disabled) && item.disabled.call($trigger, key, root)) || item.disabled === true,\r\n visible;\r\n if ($.isFunction(item.visible)) {\r\n visible = item.visible.call($trigger, key, root);\r\n } else if (typeof item.visible !== 'undefined') {\r\n visible = item.visible === true;\r\n } else {\r\n visible = true;\r\n }\r\n $item[visible ? 'show' : 'hide']();\r\n\r\n // dis- / enable item\r\n $item[disabled ? 'addClass' : 'removeClass'](root.classNames.disabled);\r\n\r\n if ($.isFunction(item.icon)) {\r\n $item.removeClass(item._icon);\r\n item._icon = item.icon.call(this, $trigger, $item, key, item);\r\n $item.addClass(item._icon);\r\n }\r\n\r\n if (item.type) {\r\n // dis- / enable input elements\r\n $item.find('input, select, textarea').prop('disabled', disabled);\r\n\r\n // update input states\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n item.$input.val(item.value || '');\r\n break;\r\n\r\n case 'checkbox':\r\n case 'radio':\r\n item.$input.val(item.value || '').prop('checked', !!item.selected);\r\n break;\r\n\r\n case 'select':\r\n item.$input.val(item.selected || '');\r\n break;\r\n }\r\n }\r\n\r\n if (item.$menu) {\r\n // update sub-menu\r\n op.update.call($trigger, item, root);\r\n }\r\n });\r\n },\r\n layer: function (opt, zIndex) {\r\n // add transparent layer for click area\r\n // filter and background for Internet Explorer, Issue #23\r\n var $layer = opt.$layer = $('
    ')\r\n .css({height: $win.height(), width: $win.width(), display: 'block'})\r\n .data('contextMenuRoot', opt)\r\n .insertBefore(this)\r\n .on('contextmenu', handle.abortevent)\r\n .on('mousedown', handle.layerClick);\r\n\r\n // IE6 doesn't know position:fixed;\r\n if (document.body.style.maxWidth === undefined) { // IE6 doesn't support maxWidth\r\n $layer.css({\r\n 'position': 'absolute',\r\n 'height': $(document).height()\r\n });\r\n }\r\n\r\n return $layer;\r\n }\r\n };\r\n\r\n // split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key\r\n function splitAccesskey(val) {\r\n var t = val.split(/\\s+/),\r\n keys = [];\r\n\r\n for (var i = 0, k; k = t[i]; i++) {\r\n k = k.charAt(0).toUpperCase(); // first character only\r\n // theoretically non-accessible characters should be ignored, but different systems, different keyboard layouts, ... screw it.\r\n // a map to look up already used access keys would be nice\r\n keys.push(k);\r\n }\r\n\r\n return keys;\r\n }\r\n\r\n// handle contextMenu triggers\r\n $.fn.contextMenu = function (operation) {\r\n var $t = this, $o = operation;\r\n if (this.length > 0) { // this is not a build on demand menu\r\n if (operation === undefined) {\r\n this.first().trigger('contextmenu');\r\n } else if (operation.x !== undefined && operation.y !== undefined) {\r\n this.first().trigger($.Event('contextmenu', { pageX: operation.x, pageY: operation.y, mouseButton: operation.button }));\r\n } else if (operation === 'hide') {\r\n var $menu = this.first().data('contextMenu') ? this.first().data('contextMenu').$menu : null;\r\n if($menu){\r\n $menu.trigger('contextmenu:hide');\r\n }\r\n } else if (operation === 'destroy') {\r\n $.contextMenu('destroy', {context: this});\r\n } else if ($.isPlainObject(operation)) {\r\n operation.context = this;\r\n $.contextMenu('create', operation);\r\n } else if (operation) {\r\n this.removeClass('context-menu-disabled');\r\n } else if (!operation) {\r\n this.addClass('context-menu-disabled');\r\n }\r\n } else {\r\n $.each(menus, function () {\r\n if (this.selector === $t.selector) {\r\n $o.data = this;\r\n\r\n $.extend($o.data, {trigger: 'demand'});\r\n }\r\n });\r\n\r\n handle.contextmenu.call($o.target, $o);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n // manage contextMenu instances\r\n $.contextMenu = function (operation, options) {\r\n if (typeof operation !== 'string') {\r\n options = operation;\r\n operation = 'create';\r\n }\r\n\r\n if (typeof options === 'string') {\r\n options = {selector: options};\r\n } else if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // merge with default options\r\n var o = $.extend(true, {}, defaults, options || {});\r\n var $document = $(document);\r\n var $context = $document;\r\n var _hasContext = false;\r\n\r\n if (!o.context || !o.context.length) {\r\n o.context = document;\r\n } else {\r\n // you never know what they throw at you...\r\n $context = $(o.context).first();\r\n o.context = $context.get(0);\r\n _hasContext = o.context !== document;\r\n }\r\n\r\n switch (operation) {\r\n case 'create':\r\n // no selector no joy\r\n if (!o.selector) {\r\n throw new Error('No selector specified');\r\n }\r\n // make sure internal classes are not bound to\r\n if (o.selector.match(/.context-menu-(list|item|input)($|\\s)/)) {\r\n throw new Error('Cannot bind to selector \"' + o.selector + '\" as it contains a reserved className');\r\n }\r\n if (!o.build && (!o.items || $.isEmptyObject(o.items))) {\r\n throw new Error('No Items specified');\r\n }\r\n counter++;\r\n o.ns = '.contextMenu' + counter;\r\n if (!_hasContext) {\r\n namespaces[o.selector] = o.ns;\r\n }\r\n menus[o.ns] = o;\r\n\r\n // default to right click\r\n if (!o.trigger) {\r\n o.trigger = 'right';\r\n }\r\n\r\n if (!initialized) {\r\n var itemClick = o.itemClickEvent === 'click' ? 'click.contextMenu' : 'mouseup.contextMenu'\r\n var contextMenuItemObj = {\r\n // 'mouseup.contextMenu': handle.itemClick,\r\n // 'click.contextMenu': handle.itemClick,\r\n 'contextmenu:focus.contextMenu': handle.focusItem,\r\n 'contextmenu:blur.contextMenu': handle.blurItem,\r\n 'contextmenu.contextMenu': handle.abortevent,\r\n 'mouseenter.contextMenu': handle.itemMouseenter,\r\n 'mouseleave.contextMenu': handle.itemMouseleave\r\n };\r\n contextMenuItemObj[itemClick] = handle.itemClick\r\n // make sure item click is registered first\r\n $document\r\n .on({\r\n 'contextmenu:hide.contextMenu': handle.hideMenu,\r\n 'prevcommand.contextMenu': handle.prevItem,\r\n 'nextcommand.contextMenu': handle.nextItem,\r\n 'contextmenu.contextMenu': handle.abortevent,\r\n 'mouseenter.contextMenu': handle.menuMouseenter,\r\n 'mouseleave.contextMenu': handle.menuMouseleave\r\n }, '.context-menu-list')\r\n .on('mouseup.contextMenu', '.context-menu-input', handle.inputClick)\r\n .on(contextMenuItemObj, '.context-menu-item');\r\n\r\n initialized = true;\r\n }\r\n\r\n // engage native contextmenu event\r\n $context\r\n .on('contextmenu' + o.ns, o.selector, o, handle.contextmenu);\r\n\r\n if (_hasContext) {\r\n // add remove hook, just in case\r\n $context.on('remove' + o.ns, function () {\r\n $(this).contextMenu('destroy');\r\n });\r\n }\r\n\r\n switch (o.trigger) {\r\n case 'hover':\r\n $context\r\n .on('mouseenter' + o.ns, o.selector, o, handle.mouseenter)\r\n .on('mouseleave' + o.ns, o.selector, o, handle.mouseleave);\r\n break;\r\n\r\n case 'left':\r\n $context.on('click' + o.ns, o.selector, o, handle.click);\r\n break;\r\n /*\r\n default:\r\n // http://www.quirksmode.org/dom/events/contextmenu.html\r\n $document\r\n .on('mousedown' + o.ns, o.selector, o, handle.mousedown)\r\n .on('mouseup' + o.ns, o.selector, o, handle.mouseup);\r\n break;\r\n */\r\n }\r\n\r\n // create menu\r\n if (!o.build) {\r\n op.create(o);\r\n }\r\n break;\r\n\r\n case 'destroy':\r\n var $visibleMenu;\r\n if (_hasContext) {\r\n // get proper options\r\n var context = o.context;\r\n $.each(menus, function (ns, o) {\r\n if (o.context !== context) {\r\n return true;\r\n }\r\n\r\n $visibleMenu = $('.context-menu-list').filter(':visible');\r\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is($(o.context).find(o.selector))) {\r\n $visibleMenu.trigger('contextmenu:hide', {force: true});\r\n }\r\n\r\n try {\r\n if (menus[o.ns].$menu) {\r\n menus[o.ns].$menu.remove();\r\n }\r\n\r\n delete menus[o.ns];\r\n } catch (e) {\r\n menus[o.ns] = null;\r\n }\r\n\r\n $(o.context).off(o.ns);\r\n\r\n return true;\r\n });\r\n } else if (!o.selector) {\r\n $document.off('.contextMenu .contextMenuAutoHide');\r\n $.each(menus, function (ns, o) {\r\n $(o.context).off(o.ns);\r\n });\r\n\r\n namespaces = {};\r\n menus = {};\r\n counter = 0;\r\n initialized = false;\r\n\r\n $('#context-menu-layer, .context-menu-list').remove();\r\n } else if (namespaces[o.selector]) {\r\n $visibleMenu = $('.context-menu-list').filter(':visible');\r\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is(o.selector)) {\r\n $visibleMenu.trigger('contextmenu:hide', {force: true});\r\n }\r\n\r\n try {\r\n if (menus[namespaces[o.selector]].$menu) {\r\n menus[namespaces[o.selector]].$menu.remove();\r\n }\r\n\r\n delete menus[namespaces[o.selector]];\r\n } catch (e) {\r\n menus[namespaces[o.selector]] = null;\r\n }\r\n\r\n $document.off(namespaces[o.selector]);\r\n }\r\n break;\r\n\r\n case 'html5':\r\n // if or are not handled by the browser,\r\n // or options was a bool true,\r\n // initialize $.contextMenu for them\r\n if ((!$.support.htmlCommand && !$.support.htmlMenuitem) || (typeof options === 'boolean' && options)) {\r\n $('menu[type=\"context\"]').each(function () {\r\n if (this.id) {\r\n $.contextMenu({\r\n selector: '[contextmenu=' + this.id + ']',\r\n items: $.contextMenu.fromMenu(this)\r\n });\r\n }\r\n }).css('display', 'none');\r\n }\r\n break;\r\n\r\n default:\r\n throw new Error('Unknown operation \"' + operation + '\"');\r\n }\r\n\r\n return this;\r\n };\r\n\r\n// import values into commands\r\n $.contextMenu.setInputValues = function (opt, data) {\r\n if (data === undefined) {\r\n data = {};\r\n }\r\n\r\n $.each(opt.inputs, function (key, item) {\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n item.value = data[key] || '';\r\n break;\r\n\r\n case 'checkbox':\r\n item.selected = data[key] ? true : false;\r\n break;\r\n\r\n case 'radio':\r\n item.selected = (data[item.radio] || '') === item.value;\r\n break;\r\n\r\n case 'select':\r\n item.selected = data[key] || '';\r\n break;\r\n }\r\n });\r\n };\r\n\r\n// export values from commands\r\n $.contextMenu.getInputValues = function (opt, data) {\r\n if (data === undefined) {\r\n data = {};\r\n }\r\n\r\n $.each(opt.inputs, function (key, item) {\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n case 'select':\r\n data[key] = item.$input.val();\r\n break;\r\n\r\n case 'checkbox':\r\n data[key] = item.$input.prop('checked');\r\n break;\r\n\r\n case 'radio':\r\n if (item.$input.prop('checked')) {\r\n data[item.radio] = item.value;\r\n }\r\n break;\r\n }\r\n });\r\n\r\n return data;\r\n };\r\n\r\n// find