BVB Source Codes

Cloud on the CMS (SyCms) v1.95 Show Menu.js Source code

Return Download Cloud on the CMS (SyCms) v1.95: download Menu.js Source code - Download Cloud on the CMS (SyCms) v1.95 Source code - Type:.js
  1. var Menu_cleartime=null;var menuAdmin={list:Array(),add:function(a,g,f,d){a=typeof a=="string"?document.getElementById(a):a;if(this.obj){var b=this;var c=document.getElementById(b.obj);f=f||0;d=d||0;a.onmouseover=function(h){if(Menu_cleartime){clearTimeout(Menu_cleartime)}for(var k=0,l=window.event||h,m=l.srcElement||l.target;k<b.list.length;k++){var j=b.list[k];j.menu.hide();if(m==j.owner){objwz=getElCoordinate(this);j.menu.popUp(objwz.left-d,objwz.bottom-f);break}}stopBubble(h)};c.onmouseover=function(h){if(Menu_cleartime){clearTimeout(Menu_cleartime)}};c.onmouseout=a.onmouseout=function(h){if(Menu_cleartime){clearTimeout(Menu_cleartime)}e=window.event|h|getEvent();Menu_cleartime=setTimeout(function(){for(var k=0,l=e.srcElement||e.target;k<b.list.length;k++){var j=b.list[k];j.menu.hide()}},700)}}return this.list.push({owner:a,menu:g}),this},init:function(b){var a=this,c=document;a.obj=b;if(window.ActiveXObject){c.execCommand("BackgroundImageCache",false,true)}if(!b){c.oncontextmenu=function(d){for(var g=0,h=window.event||d,j=h.srcElement||h.target;g<a.list.length;g++){var f=a.list[g];f.menu.hide();if(j==f.owner){f.menu.popUp(h.clientX,h.clientY)}}return false}}c.onclick=function(){for(var d=0;d<a.list.length;d++){a.list[d].menu.hide()}};return a},del:function(b){var a=document.getElementById(b);if(a){a.parentNode.removeChild(a)}}};var popUpMenu=function(d,j,h,a){if(!h){h=this}var g=this.MUI("UL",null,"popUpMenu",null,null,a),c=this,b=function(){};c.UI=g;for(var f=0;f<d.length;f++){var l=d[f],k=this.MUI("LI",g,l.disabled?"disabled":false);k.onmouseover=function(){var n=this.parentNode.getElementsByTagName("LI");for(var o=0;o<n.length;o++){var m=n[o];if(m!=this){m.className=="open"&&(m.className="");m.subMenu&&(m.subMenu.hide())}}};if(l.radio!=undefined){k.setAttribute("radio",l.radio);if(l.selected==true&&!this.hasOnlyRadio){l.ico=this.radioIco;this.hasOnlyRadio=true}}if(l.selected!=undefined&&l.radio==undefined){k.setAttribute("selected",l.selected);if(l.selected){l.ico=c.selectIco}}if(l.line){k.className="splitLine"}else{if(l.disabled){this.MUI("SPAN",k,(l.sub?"toSub":false),l.text,l.ico)}else{this.MUI("SPAN",this.MUI("A",k,(l.sub?"toSub":false)),false,l.text,l.ico)}}if(!l.sub){if(typeof l.cmd!="function"){l.cmd=this.cmd}if(!l.disabled){if(l.radio){k.onclick=(function(i){return function(){h.hide();var o=this.parentNode.getElementsByTagName("LI"),p=this.getAttribute("radio");for(var n=0;n<o.length;n++){var m=o[n];if(p!=m.getAttribute("radio")){continue}var q=m.getElementsByTagName("SPAN");if(q!=null){q[0].style.backgroundImage=(m==this)?"url("+c.radioIco+")":""}}i.cmd(p,this,c.owner);return false}})(l)}else{k.onclick=(function(i){return function(){h.hide();var m=null;if(this.getAttribute("selected")!=undefined){m=(String(this.getAttribute("selected"))=="true");this.setAttribute("selected",!m);this.getElementsByTagName("SPAN")[0].style.backgroundImage=!m?"url("+c.selectIco+")":""}i.cmd(m,this,c.owner);return false}})(l)}}}else{k.onclick=function(i){stopBubble(i)};new popUpMenu(l.sub,k,h)}}if(j){if(typeof j.onmouseover=="function"){b=j.onmouseover}j.onmouseover=function(m){b.call(this);this.className="open";var o=c.absPos(this),i=(o.x+this.offsetWidth-2),n=o.y+5;c.show(i,n,this)};j.onmouseout=function(){this.hideTimer=setTimeout(function(){c.hide()},20)};j.getElementsByTagName("SPAN")[0].onmouseover=this.UI.onmouseover=function(){clearTimeout(j.hideTimer)};j.subMenu=this}};popUpMenu.prototype={absPos:function(b){var a=y=0;do{a+=b.offsetLeft;y+=b.offsetTop}while(b=b.offsetParent);return{x:a,y:y}},popUp:function(a,b){this.show(a,b)},MUI:function(c,b,a,i,g,j){var h=document,f=(b||h.body).appendChild(h.createElement(c));if(a){f.className=a}if(j){f.id=j}if(i){f.innerHTML=i}if(c.toUpperCase()=="A"){f.setAttribute("href","javascript:void(0)");f.onclick=function(){return false}}if(g){f.style.backgroundImage="url("+g+")"}return f},show:function(k,i,l){var b=$(this.UI);if(this.UI.id){b.show()}this.hide();var m=this.UI.offsetWidth,f=this.UI.offsetHeight,o=document.body,a=o.clientWidth,g=o.clientHeight;if(f==0){var n=b.find(">li");var d=n.length;var c=n.filter(".splitLine").length;f=(d-c)*26+c*5}if(f+i>g){if(l){i+=l.offsetHeight}i-=(f+i-g)}else{if(l){i-=10;k-=10}}if(m+k>a){k-=m;if(l){k-=l.offsetWidth-10}}else{if(l){k+=5}}var j=this.UI.style;j.display=="none"&&(j.display="block");j.top=i+"px";j.left=k+"px"},hide:function(){var b=this.UI.style,a=this.UI.getElementsByTagName("LI");b.display!="none"&&(b.display="none");for(var c=0;c<a.length;c++){var b=a[c];b.className=="open"&&(b.className="");b.subMenu&&b.subMenu.hide()}},cmd:function(){},radioIco:"images/icon/yes.png",selectIco:"images/icon/true.png"};
  2.  
downloadMenu.js Source code - Download Cloud on the CMS (SyCms) v1.95 Source code
Related Source Codes/Software:
SuperSocket v1.6.6 - SuperSocket the Socket is a lightweight and extens... 2016-08-19
Students' basic information input program v2.0 - 1, the program is based on. net4.0 framework and d... 2016-08-19
Student information input system v2.0 - 1, the program is based on. net4.0 framework and d... 2016-08-19
Baidu handwriting input source v1.0 - Baidu handwriting input method source code, no nee... 2016-08-19
Rui bao tong v1.0 JAVA version of B2B e-commerce system - Rainbow B2B system developed using the popular JAV... 2016-08-19
1.0 housing, rental housing sale platform - Rent housing rent out platform is a very typical r... 2016-08-19
Deng Xi v2.4 website help system - Deng Xi website help system is a very useful help ... 2016-08-19
Address book v1.0 FaLiang three layer - This Demo is a three layer address book source cod... 2016-08-19
Ray speed v7.0 wage query system - To modify the software to conduct a comprehensive ... 2016-08-19
Easy to point the content management system DianCMS v6.0.0 SQL version - Easy content management system (DianCMS) is based ... 2016-08-19
www.html5rocks.com - ....a top-notch resource for web developer 2017-05-12
MTStatusBarOverlay - A custom iOS status bar overlay seen in Apps like ... 2017-05-12
blueprint - Reverse engineer server configuration ... 2017-05-12
PullToRefresh - A simple iPhone TableViewController for adding the... 2017-05-12
mrjob - Run MapReduce jobs on Hadoop or Amazon Web Service... 2017-05-11
wax - Wax is now being maintained by alibaba ... 2017-05-11
ledisdb - a high performance NoSQL powered by Go ... 2017-05-11
d3-cloud - Create word clouds in JavaScript. ... 2017-05-11
react-makes-you-sad - Here's a flowchart to make you happy again! 2017-05-11
flat-surface-shader - Flat Surface Shader for rendering lit triangles to... 2017-05-11

 Back to top