diff --git a/bower.json b/bower.json index 853b0ac2..23cad42d 100644 --- a/bower.json +++ b/bower.json @@ -22,6 +22,6 @@ "dependencies": { "fancybox": "~2.1.5", "jquery": "~2.1.3", - "menu": "~0.7.6" + "menu": "~0.7.7" } } diff --git a/modules/menu/.bower.json b/modules/menu/.bower.json index 5fad81dd..9207199b 100644 --- a/modules/menu/.bower.json +++ b/modules/menu/.bower.json @@ -1,6 +1,6 @@ { "name": "menu", - "version": "0.7.6", + "version": "0.7.7", "homepage": "https://github.com/coderaiser/menu-io", "authors": [ "coderaiser " @@ -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 } \ No newline at end of file diff --git a/modules/menu/ChangeLog b/modules/menu/ChangeLog index 143982ee..e32dcdfc 100644 --- a/modules/menu/ChangeLog +++ b/modules/menu/ChangeLog @@ -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 diff --git a/modules/menu/bower.json b/modules/menu/bower.json index 80b67f08..92c999e6 100644 --- a/modules/menu/bower.json +++ b/modules/menu/bower.json @@ -1,6 +1,6 @@ { "name": "menu", - "version": "0.7.6", + "version": "0.7.7", "homepage": "https://github.com/coderaiser/menu-io", "authors": [ "coderaiser " @@ -8,7 +8,8 @@ "description": "Simple css-based multillevel context menu", "main": "menu-io.min.js", "moduleType": [ - "globals" + "globals", + "node" ], "keywords": [ "menu" diff --git a/modules/menu/menu-io.min.js b/modules/menu/menu-io.min.js index 8f9fdb8b..fe29bbdb 100755 --- a/modules/menu/menu-io.min.js +++ b/modules/menu/menu-io.min.js @@ -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:'',ITEM:''};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); \ No newline at end of file +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:'',ITEM:''};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); \ No newline at end of file diff --git a/modules/menu/package.json b/modules/menu/package.json index 6e68d7e2..ef2f157b 100644 --- a/modules/menu/package.json +++ b/modules/menu/package.json @@ -1,13 +1,13 @@ { "name": "menu", "private": true, - "version": "0.7.6", + "version": "0.7.7", "author": "coderaiser (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"