mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(bower) menu v0.7.7
This commit is contained in:
parent
aed8c978d2
commit
480a80f052
6 changed files with 17 additions and 14 deletions
|
|
@ -22,6 +22,6 @@
|
|||
"dependencies": {
|
||||
"fancybox": "~2.1.5",
|
||||
"jquery": "~2.1.3",
|
||||
"menu": "~0.7.6"
|
||||
"menu": "~0.7.7"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "menu",
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"homepage": "https://github.com/coderaiser/menu-io",
|
||||
"authors": [
|
||||
"coderaiser <mnemonic.enemy@gmail.com>"
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
"description": "Simple css-based multillevel context menu",
|
||||
"main": "menu-io.min.js",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
"globals",
|
||||
"node"
|
||||
],
|
||||
"keywords": [
|
||||
"menu"
|
||||
|
|
@ -19,14 +20,14 @@
|
|||
"gulpfile.js",
|
||||
"node_modules"
|
||||
],
|
||||
"_release": "0.7.6",
|
||||
"_release": "0.7.7",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.7.6",
|
||||
"commit": "923884d04e0d1157f495fbfa667a550be83b38e8"
|
||||
"tag": "v0.7.7",
|
||||
"commit": "c921ec69e4be593b5aefa52dfdd54341775b199e"
|
||||
},
|
||||
"_source": "git://github.com/coderaiser/menu-io.git",
|
||||
"_target": "~0.7.6",
|
||||
"_target": "~0.7.7",
|
||||
"_originalSource": "menu",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
2015.02.05, v0.7.6
|
||||
2015.02.06, v0.7.7
|
||||
|
||||
feature:
|
||||
- (menu) speed up rendy
|
||||
- (menu) speed up
|
||||
- (bower) ignore: add gulpfile
|
||||
- (bower) moduleType: add node
|
||||
|
||||
|
||||
2015.01.05, v0.7.5
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "menu",
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"homepage": "https://github.com/coderaiser/menu-io",
|
||||
"authors": [
|
||||
"coderaiser <mnemonic.enemy@gmail.com>"
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
"description": "Simple css-based multillevel context menu",
|
||||
"main": "menu-io.min.js",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
"globals",
|
||||
"node"
|
||||
],
|
||||
"keywords": [
|
||||
"menu"
|
||||
|
|
|
|||
2
modules/menu/menu-io.min.js
vendored
2
modules/menu/menu-io.min.js
vendored
|
|
@ -1 +1 @@
|
|||
var MenuIO;!function(e){"use strict";function t(){function e(e){var t;return e&&(t=n(e),t&&(e=e.parentElement)),e}function t(e){var t;return e&&(t=n(e),t||(e=e.querySelector("[data-menu-path]"))),e}function n(e){var t;return e&&(t=e.hasAttribute("data-menu-path")),t}function a(e){var t=i(e,"js-menu-item");return t}function u(e){var t=i(e,"js-menu");return t}function i(e,t,n){var a,u;return n||(n="data-name"),e&&(u=e.getAttribute(n),u===t&&(a=!0)),a}function r(t){var n,a,u="data-menu",r="js-submenu";return a=e(t),n=i(a,r,u)}this.getItem=e,this.getName=t,this.isName=n,this.isItem=a,this.isMenu=u,this.isSubMenu=r}function n(e){var t,n=[].slice.call(arguments,1);return"function"==typeof e&&(t=e.apply(null,n)),t}function a(e,t){var n,a,u,i=e;return Object.keys(t).forEach(function(e){n=t[e],u="{{\\s*"+e+"\\s*}}",a=RegExp(u,"g"),i=i.replace(a,n)}),~i.indexOf("{{")&&(i=i.replace(/{{\s*.*\s*}}/,"")),i}MenuIO=function(u,i,r){function s(){var e,t="object"==typeof r;t||(e=r,r={},r[e]=null),v=m(r),I.addEventListener("click",o),I.addEventListener("contextmenu",l)}function m(e){var t,n="",u=function(e,t){var n='data-menu="js-submenu"',i="data-key=",r="";return t?t+=".":t="",Object.keys(e).forEach(function(s){var m,c="",o="",l="",f="",d=t+s,b=e[s],h="object"==typeof b;h?(o=a(N.MAIN,{items:u(b,d)}),l=" menu-submenu",f=" "+n):x[d]=b,M.icon&&(m=s.replace(/\(|\)/g,"").replace(/\s/g,"-").toLowerCase(),l+=" icon icon-"+m),M.keys&&(c=M.keys[s],c&&(f=" "+i+c)),r+=a(N.ITEM,{name:s,subitems:o,className:l,attribute:f,path:d})}),r};return n=u(e),t=document.createElement("ul"),t.setAttribute("data-name","js-menu"),t.className="menu menu-hidden",t.innerHTML=n,y.appendChild(t),t}function c(e,t){var n,a=j.getItem(e),u=j.isName(a),i=j.isItem(a),r=j.isSubMenu(a);return u&&i||(a=document.elementFromPoint(t.x,t.y),r=j.isSubMenu(a),u=j.isName(a),i=j.isItem(a)),n={name:u,item:i,sub:r}}function o(e,t){var a,u,i=M.afterClick,r=M.beforeClick,s=M.name,m=e.target,o=t||c(m,{x:e.clientX,y:e.clientY});u=n(r,s),o.sub?e.preventDefault():(b(),u||!o.name&&!o.item||(a=h(m),n(a),n(i)))}function l(e){var t=e.target,n=e.clientX,a=e.clientY,u=c(t,{x:n,y:a});u.name||u.item||u.sub?o(e,u):(b(),d(n,a)),e.preventDefault()}function f(t,n){var a="number"==typeof t,u="number"==typeof n,i=p(),r=e.innerHeight;i+n>r&&(n-=i),a&&(v.style.left=t+"px"),u&&(v.style.top=n-14+"px")}function d(e,t){var a=M.beforeShow,u=M.name,i={x:e,y:t,name:u},r=n(a,i);r||(v.classList.remove("menu-hidden"),f(i.x,i.y))}function b(){var e=n(M.beforeClose);e||v.classList.add("menu-hidden")}function h(e){var t,n;return e=j.getName(e),e&&(t=e.getAttribute("data-menu-path")),n=x[t]}function p(){var e,t;return g||(e=getComputedStyle(v),t=e.height,g=parseInt(t,10)),g}if(!(this instanceof MenuIO))return new MenuIO(u,i,r);var v,y,g,I,M={},j=new t,x={},N={MAIN:'<ul data-name="js-menu" class="menu menu-hidden">{{ items }}</ul>',ITEM:'<li data-name="js-menu-item" class="menu-item{{ className }}"{{ attribute }}><label data-menu-path="{{ path }}">{{ name }}</label>{{ subitems }}</li>'};r?(y=I=u,M=i):i?(y=I=u,r=i):(y=document.body,I=e,r=u),this.show=d,this.hide=b,s()}}(window);
|
||||
var MenuIO;!function(e){"use strict";function t(){function e(e){var t;return e&&(t=n(e),t&&(e=e.parentElement)),e}function t(e){var t;return e&&(t=n(e),t||(e=e.querySelector("[data-menu-path]"))),e}function n(e){var t;return e&&(t=e.hasAttribute("data-menu-path")),t}function a(e){var t=i(e,"js-menu-item");return t}function u(e){var t=i(e,"js-menu");return t}function i(e,t,n){var a,u;return n||(n="data-name"),e&&(u=e.getAttribute(n),u===t&&(a=!0)),a}function r(t){var n,a,u="data-menu",r="js-submenu";return a=e(t),n=i(a,r,u)}this.getItem=e,this.getName=t,this.isName=n,this.isItem=a,this.isMenu=u,this.isSubMenu=r}function n(e){var t,n=[].slice.call(arguments,1);return"function"==typeof e&&(t=e.apply(null,n)),t}function a(e,t){var n,a,u,i=e;return Object.keys(t).forEach(function(e){n=t[e],u="{{\\s"+e+"\\s}}",a=RegExp(u,"g"),i=i.replace(a,n)}),~i.indexOf("{{")&&(i=i.replace(/{{\s.*\s}}/,"")),i}MenuIO=function(u,i,r){function s(){var e,t="object"==typeof r;t||(e=r,r={},r[e]=null),v=m(r),I.addEventListener("click",o),I.addEventListener("contextmenu",l)}function m(e){var t,n="",u=function(e,t){var n='data-menu="js-submenu"',i="data-key=",r="";return t?t+=".":t="",Object.keys(e).forEach(function(s){var m,c="",o="",l="",f="",d=t+s,b=e[s],h="object"==typeof b;h?(o=a(N.MAIN,{items:u(b,d)}),l=" menu-submenu",f=" "+n):x[d]=b,M.icon&&(m=s.replace(/\(|\)/g,"").replace(/\s/g,"-").toLowerCase(),l+=" icon icon-"+m),M.keys&&(c=M.keys[s],c&&(f=" "+i+c)),r+=a(N.ITEM,{name:s,subitems:o,className:l,attribute:f,path:d})}),r};return n=u(e),t=document.createElement("ul"),t.setAttribute("data-name","js-menu"),t.className="menu menu-hidden",t.innerHTML=n,y.appendChild(t),t}function c(e,t){var n,a=j.getItem(e),u=j.isName(a),i=j.isItem(a),r=j.isSubMenu(a);return u&&i||(a=document.elementFromPoint(t.x,t.y),r=j.isSubMenu(a),u=j.isName(a),i=j.isItem(a)),n={name:u,item:i,sub:r}}function o(e,t){var a,u,i=M.afterClick,r=M.beforeClick,s=M.name,m=e.target,o=t||c(m,{x:e.clientX,y:e.clientY});u=n(r,s),o.sub?e.preventDefault():(b(),u||!o.name&&!o.item||(a=h(m),n(a),n(i)))}function l(e){var t=e.target,n=e.clientX,a=e.clientY,u=c(t,{x:n,y:a});u.name||u.item||u.sub?o(e,u):(b(),d(n,a)),e.preventDefault()}function f(t,n){var a="number"==typeof t,u="number"==typeof n,i=p(),r=e.innerHeight;i+n>r&&(n-=i),a&&(v.style.left=t+"px"),u&&(v.style.top=n-14+"px")}function d(e,t){var a=M.beforeShow,u=M.name,i={x:e,y:t,name:u},r=n(a,i);r||(v.classList.remove("menu-hidden"),f(i.x,i.y))}function b(){var e=n(M.beforeClose);e||v.classList.add("menu-hidden")}function h(e){var t,n;return e=j.getName(e),e&&(t=e.getAttribute("data-menu-path")),n=x[t]}function p(){var e,t;return g||(e=getComputedStyle(v),t=e.height,g=parseInt(t,10)),g}if(!(this instanceof MenuIO))return new MenuIO(u,i,r);var v,y,g,I,M={},j=new t,x={},N={MAIN:'<ul data-name="js-menu" class="menu menu-hidden">{{ items }}</ul>',ITEM:'<li data-name="js-menu-item" class="menu-item{{ className }}"{{ attribute }}><label data-menu-path="{{ path }}">{{ name }}</label>{{ subitems }}</li>'};r?(y=I=u,M=i):i?(y=I=u,r=i):(y=document.body,I=e,r=u),this.show=d,this.hide=b,s()}}(window);
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "menu",
|
||||
"private": true,
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
||||
"description": "Simple css-based multillevel context menu",
|
||||
"homepage": "http://coderaiser.github.io/menu",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/coderaiser/menu.git"
|
||||
"url": "git://github.com/coderaiser/menu-io.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "gulp default"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue