Update dhtmlxTree & dhtmlMenu to latest version

This commit is contained in:
Nathan Gray 2014-06-02 23:32:15 +00:00
parent 4b1fc627c4
commit 3b8bee4d18
882 changed files with 34468 additions and 39 deletions

View File

@ -11,12 +11,12 @@
* @version $Id$
*/
egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/css/dhtmlXTree.css');
egw_framework::includeCSS('/phpgwapi/js/dhtmlxtree/codebase/dhtmlXTree.css');
/**
* eTemplate tree widget
*
* @see /phpgwapi/js/dhtmlxtree/docsExplorer/dhtmlxtree/dhtmlxtree___syntax_templates.html Tree syntax
* @see http://docs.dhtmlx.com/doku.php?id=dhtmlxtree:syntax_templates Tree syntax
*
* Example initialisation of tree via $sel_options array:
*

View File

@ -15,7 +15,7 @@
/*egw:uses
jsapi.jsapi;
jquery.jquery;
/phpgwapi/js/dhtmlxtree/js/dhtmlXCommon.js; // otherwise gantt breaks
/phpgwapi/js/dhtmlxtree/codebase/dhtmlxcommon.js; // otherwise gantt breaks
/phpgwapi/js/dhtmlxGantt/codebase/dhtmlxgantt.js;
et2_core_inputWidget;
*/
@ -194,7 +194,10 @@ var et2_gantt = et2_valueWidget.extend([et2_IResizeable,et2_IInput],
if(this.dynheight)
{
this.dynheight.update(function(w,h) {
this.gantt.setSizes();
if(this.gantt)
{
this.gantt.setSizes();
}
}, this);
}
else

View File

@ -17,11 +17,11 @@
/*egw:uses
et2_core_inputWidget;
/phpgwapi/js/egw_action/egw_dragdrop_dhtmlx_tree.js;
/phpgwapi/js/dhtmlxtree/js/dhtmlXCommon.js;
/phpgwapi/js/dhtmlxtree/codebase/dhtmlxcommon.js;
// using debugable and fixed source of dhtmltree instead: /phpgwapi/js/dhtmlxtree/js/dhtmlXTree.js;
/phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/dhtmlxtree.js;
/phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/ext/dhtmlxtree_json.js;
// /phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/ext/dhtmlxtree_start.js;
/phpgwapi/js/dhtmlxtree/sources/dhtmlxtree.js;
/phpgwapi/js/dhtmlxtree/sources/ext/dhtmlxtree_json.js;
// /phpgwapi/js/dhtmlxtree/sources/ext/dhtmlxtree_start.js;
*/
/**

View File

@ -0,0 +1,54 @@
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/
dhtmlx=function(a){for(var b in a)dhtmlx[b]=a[b];return dhtmlx};dhtmlx.extend_api=function(a,b,c){var d=window[a];if(d)window[a]=function(a){if(a&&typeof a=="object"&&!a.tagName){var c=d.apply(this,b._init?b._init(a):arguments),f;for(f in dhtmlx)if(b[f])this[b[f]](dhtmlx[f]);for(f in a)if(b[f])this[b[f]](a[f]);else f.indexOf("on")==0&&this.attachEvent(f,a[f])}else c=d.apply(this,arguments);b._patch&&b._patch(this);return c||this},window[a].prototype=d.prototype,c&&dhtmlXHeir(window[a].prototype,c)};
dhtmlxAjax={get:function(a,b){var c=new dtmlXMLLoaderObject(!0);c.async=arguments.length<3;c.waitCall=b;c.loadXML(a);return c},post:function(a,b,c){var d=new dtmlXMLLoaderObject(!0);d.async=arguments.length<4;d.waitCall=c;d.loadXML(a,!0,b);return d},getSync:function(a){return this.get(a,null,!0)},postSync:function(a,b){return this.post(a,b,null,!0)}};
function dtmlXMLLoaderObject(a,b,c,d){this.xmlDoc="";this.async=typeof c!="undefined"?c:!0;this.onloadAction=a||null;this.mainObject=b||null;this.waitCall=null;this.rSeed=d||!1;return this}dtmlXMLLoaderObject.count=0;
dtmlXMLLoaderObject.prototype.waitLoadFunction=function(a){var b=!0;return this.check=function(){if(a&&a.onloadAction!=null&&(!a.xmlDoc.readyState||a.xmlDoc.readyState==4)&&b){b=!1;dtmlXMLLoaderObject.count++;if(typeof a.onloadAction=="function")a.onloadAction(a.mainObject,null,null,null,a);if(a.waitCall)a.waitCall.call(this,a),a.waitCall=null}}};
dtmlXMLLoaderObject.prototype.getXMLTopNode=function(a,b){if(this.xmlDoc.responseXML){var c=this.xmlDoc.responseXML.getElementsByTagName(a);c.length==0&&a.indexOf(":")!=-1&&(c=this.xmlDoc.responseXML.getElementsByTagName(a.split(":")[1]));var d=c[0]}else d=this.xmlDoc.documentElement;if(d)return this._retry=!1,d;if(!this._retry&&_isIE)return this._retry=!0,b=this.xmlDoc,this.loadXMLString(this.xmlDoc.responseText.replace(/^[\s]+/,""),!0),this.getXMLTopNode(a,b);dhtmlxError.throwError("LoadXML","Incorrect XML",
[b||this.xmlDoc,this.mainObject]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(a,b){if(_isIE)this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM"),this.xmlDoc.async=this.async,this.xmlDoc.onreadystatechange=function(){},this.xmlDoc.loadXML(a);else{var c=new DOMParser;this.xmlDoc=c.parseFromString(a,"text/xml")}if(!b){if(this.onloadAction)this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall)this.waitCall(),this.waitCall=null}};
dtmlXMLLoaderObject.prototype.loadXML=function(a,b,c,d){this.rSeed&&(a+=(a.indexOf("?")!=-1?"&":"?")+"a_dhx_rSeed="+(new Date).valueOf());this.filePath=a;this.xmlDoc=!_isIE&&window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if(this.async)this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.open(b?"POST":"GET",a,this.async);d?(this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")"),this.xmlDoc.setRequestHeader("Content-type",
"text/xml")):b&&this.xmlDoc.setRequestHeader("Content-type",this.contenttype||"application/x-www-form-urlencoded");this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(c);this.async||(new this.waitLoadFunction(this))()};
dtmlXMLLoaderObject.prototype.destructor=function(){return this.setXSLParamValue=this.getXMLTopNode=this.xmlNodeToJSON=this.doSerialization=this.loadXMLString=this.loadXML=this.doXSLTransToString=this.doXSLTransToObject=this.doXPathOpera=this.doXPath=this.xmlDoc=this.mainObject=this.onloadAction=this.filePath=this.rSeed=this.async=this._retry=this._getAllNamedChilds=this._filterXPath=null};
dtmlXMLLoaderObject.prototype.xmlNodeToJSON=function(a){for(var b={},c=0;c<a.attributes.length;c++)b[a.attributes[c].name]=a.attributes[c].value;b._tagvalue=a.firstChild?a.firstChild.nodeValue:"";for(c=0;c<a.childNodes.length;c++){var d=a.childNodes[c].tagName;d&&(b[d]||(b[d]=[]),b[d].push(this.xmlNodeToJSON(a.childNodes[c])))}return b};function callerFunction(a,b){return this.handler=function(c){if(!c)c=window.event;a(c,b);return!0}}function getAbsoluteLeft(a){return getOffset(a).left}
function getAbsoluteTop(a){return getOffset(a).top}function getOffsetSum(a){for(var b=0,c=0;a;)b+=parseInt(a.offsetTop),c+=parseInt(a.offsetLeft),a=a.offsetParent;return{top:b,left:c}}
function getOffsetRect(a){var b=a.getBoundingClientRect(),c=document.body,d=document.documentElement,e=window.pageYOffset||d.scrollTop||c.scrollTop,g=window.pageXOffset||d.scrollLeft||c.scrollLeft,f=d.clientTop||c.clientTop||0,h=d.clientLeft||c.clientLeft||0,i=b.top+e-f,k=b.left+g-h;return{top:Math.round(i),left:Math.round(k)}}function getOffset(a){return a.getBoundingClientRect?getOffsetRect(a):getOffsetSum(a)}
function convertStringToBoolean(a){typeof a=="string"&&(a=a.toLowerCase());switch(a){case "1":case "true":case "yes":case "y":case 1:case !0:return!0;default:return!1}}function getUrlSymbol(a){return a.indexOf("?")!=-1?"&":"?"}function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;this.dragStartObject=this.dragStartNode=this.dragNode=this.lastLanding=0;this.tempDOMM=this.tempDOMU=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this}
dhtmlDragAndDropObject.prototype.removeDraggableItem=function(a){a.onmousedown=null;a.dragStarter=null;a.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(a,b){a.onmousedown=this.preCreateDragCopy;a.dragStarter=b;this.addDragLanding(a,b)};dhtmlDragAndDropObject.prototype.addDragLanding=function(a,b){a.dragLanding=b};
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(a){if(!((a||window.event)&&(a||event).button==2)){if(window.dhtmlDragAndDrop.waitDrag)return window.dhtmlDragAndDrop.waitDrag=0,document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU,document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM,!1;window.dhtmlDragAndDrop.dragNode&&window.dhtmlDragAndDrop.stopDrag(a);window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=
document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;window.dhtmlDragAndDrop.downtime=(new Date).valueOf();a&&a.preventDefault&&a.preventDefault();return!1}};
dhtmlDragAndDropObject.prototype.callDrag=function(a){if(!a)a=window.event;dragger=window.dhtmlDragAndDrop;if(!((new Date).valueOf()-dragger.downtime<100)){if(!dragger.dragNode)if(dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,a);if(!dragger.dragNode)return dragger.stopDrag();dragger.dragNode.onselectstart=function(){return!1};dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=
0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()}else return dragger.stopDrag(a,!0);if(dragger.dragNode.parentNode!=window.document.body&&dragger.gldragNode){var b=dragger.gldragNode;if(dragger.gldragNode.old)b=dragger.gldragNode.old;b.parentNode.removeChild(b);var c=dragger.dragNode.pWindow;b.pWindow&&b.pWindow.dhtmlDragAndDrop.lastLanding&&b.pWindow.dhtmlDragAndDrop.lastLanding.dragLanding._dragOut(b.pWindow.dhtmlDragAndDrop.lastLanding);if(_isIE){var d=document.createElement("Div");d.innerHTML=
dragger.dragNode.outerHTML;dragger.dragNode=d.childNodes[0]}else dragger.dragNode=dragger.dragNode.cloneNode(!0);dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);c.dhtmlDragAndDrop.dragNode=dragger.dragNode}dragger.dragNode.style.left=a.clientX+15+(dragger.fx?dragger.fx*-1:0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=a.clientY+3+(dragger.fy?dragger.fy*-1:0)+(document.body.scrollTop||
document.documentElement.scrollTop)+"px";var e=a.srcElement?a.srcElement:a.target;dragger.checkLanding(e,a)}};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(a){if(window.name){for(var b=parent.frames[window.name].frameElement.offsetParent,c=0,d=0;b;)c+=b.offsetLeft,d+=b.offsetTop,b=b.offsetParent;if(parent.dhtmlDragAndDrop){var e=parent.dhtmlDragAndDrop.calculateFramePosition(1);c+=e.split("_")[0]*1;d+=e.split("_")[1]*1}if(a)return c+"_"+d;else this.fx=c;this.fy=d}return"0_0"};
dhtmlDragAndDropObject.prototype.checkLanding=function(a,b){a&&a.dragLanding?(this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding),this.lastLanding=a,this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,b.clientX,b.clientY,b),this.lastLanding_scr=_isIE?b.srcElement:b.target):a&&a.tagName!="BODY"?this.checkLanding(a.parentNode,b):(this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding,b.clientX,b.clientY,b),this.lastLanding=
0,this._onNotFound&&this._onNotFound())};
dhtmlDragAndDropObject.prototype.stopDrag=function(a,b){dragger=window.dhtmlDragAndDrop;if(!b){dragger.stopFrameRoute();var c=dragger.lastLanding;dragger.lastLanding=null;c&&c.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,c,_isIE?event.srcElement:a.target)}dragger.lastLanding=null;dragger.dragNode&&dragger.dragNode.parentNode==document.body&&dragger.dragNode.parentNode.removeChild(dragger.dragNode);dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=
0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(a){a&&window.dhtmlDragAndDrop.stopDrag(1,1);for(var b=0;b<window.frames.length;b++)try{window.frames[b]!=a&&window.frames[b].dhtmlDragAndDrop&&window.frames[b].dhtmlDragAndDrop.stopFrameRoute(window)}catch(c){}try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=a&&parent.dhtmlDragAndDrop.stopFrameRoute(window)}catch(d){}};
dhtmlDragAndDropObject.prototype.initFrameRoute=function(a,b){if(a)window.dhtmlDragAndDrop.preCreateDragCopy(),window.dhtmlDragAndDrop.dragStartNode=a.dhtmlDragAndDrop.dragStartNode,window.dhtmlDragAndDrop.dragStartObject=a.dhtmlDragAndDrop.dragStartObject,window.dhtmlDragAndDrop.dragNode=a.dhtmlDragAndDrop.dragNode,window.dhtmlDragAndDrop.gldragNode=a.dhtmlDragAndDrop.dragNode,window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag,window.waitDrag=0,!_isIE&&b&&(!_isFF||_FFrv<1.8)&&window.dhtmlDragAndDrop.calculateFramePosition();
try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=a&&parent.dhtmlDragAndDrop.initFrameRoute(window)}catch(c){}for(var d=0;d<window.frames.length;d++)try{window.frames[d]!=a&&window.frames[d].dhtmlDragAndDrop&&window.frames[d].dhtmlDragAndDrop.initFrameRoute(window,!a||b?1:0)}catch(e){}};_OperaRv=_KHTMLrv=_FFrv=_isChrome=_isMacOS=_isKHTML=_isOpera=_isIE=_isFF=!1;navigator.userAgent.indexOf("Macintosh")!=-1&&(_isMacOS=!0);navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&(_isChrome=!0);
if(navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("Konqueror")!=-1)_KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5)),_KHTMLrv>525?(_isFF=!0,_FFrv=1.9):_isKHTML=!0;else if(navigator.userAgent.indexOf("Opera")!=-1)_isOpera=!0,_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3));else if(navigator.appName.indexOf("Microsoft")!=-1){if(_isIE=!0,(navigator.appVersion.indexOf("MSIE 8.0")!=-1||navigator.appVersion.indexOf("MSIE 9.0")!=
-1||navigator.appVersion.indexOf("MSIE 10.0")!=-1||document.documentMode>7)&&document.compatMode!="BackCompat")_isIE=8}else navigator.appName=="Netscape"&&navigator.userAgent.indexOf("Trident")!=-1?_isIE=8:(_isFF=!0,_FFrv=parseFloat(navigator.userAgent.split("rv:")[1]));
dtmlXMLLoaderObject.prototype.doXPath=function(a,b,c,d){if(_isKHTML||!_isIE&&!window.XPathResult)return this.doXPathOpera(a,b);if(_isIE)return b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),b||dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]),c!=null&&b.setProperty("SelectionNamespaces","xmlns:xsl='"+c+"'"),d=="single"?b.selectSingleNode(a):b.selectNodes(a)||[];else{var e=b;b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML);b||dhtmlxError.throwError("LoadXML",
"Incorrect XML",[b||this.xmlDoc,this.mainObject]);b.nodeName.indexOf("document")!=-1?e=b:(e=b,b=b.ownerDocument);var g=XPathResult.ANY_TYPE;if(d=="single")g=XPathResult.FIRST_ORDERED_NODE_TYPE;var f=[],h=b.evaluate(a,e,function(){return c},g,null);if(g==XPathResult.FIRST_ORDERED_NODE_TYPE)return h.singleNodeValue;for(var i=h.iterateNext();i;)f[f.length]=i,i=h.iterateNext();return f}};function j(){if(!this.catches)this.catches=[];return this}j.prototype.catchError=function(a,b){this.catches[a]=b};
j.prototype.throwError=function(a,b,c){if(this.catches[a])return this.catches[a](a,b,c);if(this.catches.ALL)return this.catches.ALL(a,b,c);alert("Error type: "+a+"\nDescription: "+b);return null};window.dhtmlxError=new j;
dtmlXMLLoaderObject.prototype.doXPathOpera=function(a,b){var c=a.replace(/[\/]+/gi,"/").split("/"),d=null,e=1;if(!c.length)return[];if(c[0]==".")d=[b];else if(c[0]=="")d=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(c[e].replace(/\[[^\]]*\]/g,"")),e++;else return[];for(;e<c.length;e++)d=this._getAllNamedChilds(d,c[e]);c[e-1].indexOf("[")!=-1&&(d=this._filterXPath(d,c[e-1]));return d};
dtmlXMLLoaderObject.prototype._filterXPath=function(a,b){for(var c=[],b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,""),d=0;d<a.length;d++)a[d].getAttribute(b)&&(c[c.length]=a[d]);return c};
dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a,b){var c=[];_isKHTML&&(b=b.toUpperCase());for(var d=0;d<a.length;d++)for(var e=0;e<a[d].childNodes.length;e++)_isKHTML?a[d].childNodes[e].tagName&&a[d].childNodes[e].tagName.toUpperCase()==b&&(c[c.length]=a[d].childNodes[e]):a[d].childNodes[e].tagName==b&&(c[c.length]=a[d].childNodes[e]);return c};function dhtmlXHeir(a,b){for(var c in b)typeof b[c]=="function"&&(a[c]=b[c]);return a}
function dhtmlxEvent(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(a,b,c){if(!c)c=this.xslDoc;if(c.responseXML)c=c.responseXML;var d=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+a+"']",c,"http://www.w3.org/1999/XSL/Transform","single");if(d!=null)d.firstChild.nodeValue=b};
dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(a,b){if(!a)a=this.xslDoc;if(a.responseXML)a=a.responseXML;if(!b)b=this.xmlDoc;if(b.responseXML)b=b.responseXML;if(_isIE){d=new ActiveXObject("Msxml2.DOMDocument.3.0");try{b.transformNodeToObject(a,d)}catch(c){d=b.transformNode(a)}}else{if(!this.XSLProcessor)this.XSLProcessor=new XSLTProcessor,this.XSLProcessor.importStylesheet(a);var d=this.XSLProcessor.transformToDocument(b)}return d};
dtmlXMLLoaderObject.prototype.doXSLTransToString=function(a,b){var c=this.doXSLTransToObject(a,b);return typeof c=="string"?c:this.doSerialization(c)};dtmlXMLLoaderObject.prototype.doSerialization=function(a){if(!a)a=this.xmlDoc;if(a.responseXML)a=a.responseXML;if(_isIE)return a.xml;else{var b=new XMLSerializer;return b.serializeToString(a)}};
dhtmlxEventable=function(a){a.attachEvent=function(a,c,d){a="ev_"+a.toLowerCase();this[a]||(this[a]=new this.eventCatcher(d||this));return a+":"+this[a].addEvent(c)};a.callEvent=function(a,c){a="ev_"+a.toLowerCase();return this[a]?this[a].apply(this,c):!0};a.checkEvent=function(a){return!!this["ev_"+a.toLowerCase()]};a.eventCatcher=function(a){var c=[],d=function(){for(var d=!0,g=0;g<c.length;g++)if(c[g]!=null)var f=c[g].apply(a,arguments),d=d&&f;return d};d.addEvent=function(a){typeof a!="function"&&
(a=eval(a));return a?c.push(a)-1:!1};d.removeEvent=function(a){c[a]=null};return d};a.detachEvent=function(a){if(a!=!1){var c=a.split(":");this[c[0]].removeEvent(c[1])}};a.detachAllEvents=function(){for(var a in this)a.indexOf("ev_")==0&&(this.detachEvent(a),this[a]=null)};a=null};
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/

View File

@ -0,0 +1,121 @@
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/
function dhtmlXMenuObject(b,c){var a=this;this.addBaseIdAsContextZone=null;this.isDhtmlxMenuObject=!0;this.skin=c!=null?c:typeof dhtmlx!="undefined"&&typeof dhtmlx.skin=="string"?dhtmlx.skin:"dhx_skyblue";this.imagePath="";this._isIE6=!1;if(_isIE)this._isIE6=window.XMLHttpRequest==null?!0:!1;if(b==null)this.base=document.body;else{var d=typeof b=="string"?document.getElementById(b):b;if(d!=null){this.base=d;if(!this.base.id)this.base.id=(new Date).valueOf();for(;this.base.childNodes.length>0;)this.base.removeChild(this.base.childNodes[0]);
this.base.className+=" dhtmlxMenu_"+this.skin+"_Middle dir_left";this.base._autoSkinUpdate=!0;if(this.base.oncontextmenu)this.base._oldContextMenuHandler=this.base.oncontextmenu;this.addBaseIdAsContextZone=this.base.id;this.base.onselectstart=function(a){a=a||event;return a.returnValue=!1};this.base.oncontextmenu=function(a){a=a||event;return a.returnValue=!1}}else this.base=document.body}this.topId="dhxWebMenuTopId";if(!this.extendedModule){for(var f=function(){alert(this.i18n.dhxmenuextalert)},
e="setItemEnabled,setItemDisabled,isItemEnabled,_changeItemState,getItemText,setItemText,loadFromHTML,hideItem,showItem,isItemHidden,_changeItemVisible,setUserData,getUserData,setOpenMode,setWebModeTimeout,enableDynamicLoading,_updateLoaderIcon,getItemImage,setItemImage,clearItemImage,setAutoShowMode,setAutoHideMode,setContextMenuHideAllMode,getContextMenuHideAllMode,setVisibleArea,setTooltip,getTooltip,setHotKey,getHotKey,setItemSelected,setTopText,setRTL,setAlign,setHref,clearHref,getCircuit,_clearAllSelectedSubItemsInPolygon,_checkArrowsState,_addUpArrow,_addDownArrow,_removeUpArrow,_removeDownArrow,_isArrowExists,_doScrollUp,_doScrollDown,_countPolygonItems,setOverflowHeight,_getRadioImgObj,_setRadioState,_radioOnClickHandler,getRadioChecked,setRadioChecked,addRadioButton,_getCheckboxState,_setCheckboxState,_readLevel,_updateCheckboxImage,_checkboxOnClickHandler,setCheckboxState,getCheckboxState,addCheckbox,serialize".split(","),
g=0;g<e.length;g++)this[e[g]]||(this[e[g]]=f);e=null}this.fixedPosition=!1;this.menuLastClicked=this.menuSelected=-1;this.idPrefix="";this.itemTagName="item";this.itemTextTagName="itemtext";this.userDataTagName="userdata";this.itemTipTagName="tooltip";this.itemHotKeyTagName="hotkey";this.itemHrefTagName="href";this.dirTopLevel="bottom";this.dirSubLevel="right";this.menuY2=this.menuY1=this.menuX2=this.menuX1=null;this.menuMode="web";this.menuTimeoutMsec=400;this.menuTimeoutHandler=null;this.autoOverflow=
!1;this.idPull={};this.itemPull={};this.userData={};this.radio={};this._rtl=!1;this._align="left";this.menuTouched=!1;this.zInd=this.zIndInit=1200;this.zIndStep=50;this.menuModeTopLevelTimeout=!0;this.menuModeTopLevelTimeoutTime=200;this._topLevelBottomMargin=1;this._topLevelRightMargin=0;this._topLevelOffsetLeft=1;this._arrowFFFix=_isIE?document.compatMode=="BackCompat"?0:-4:-4;this.setSkin=function(a){var b=this.skin;this.skin=a;switch(this.skin){case "dhx_black":case "dhx_blue":case "dhx_skyblue":case "dhx_web":this._topLevelBottomMargin=
2;this._topLevelOffsetLeft=this._topLevelRightMargin=1;this._arrowFFFix=_isIE?document.compatMode=="BackCompat"?0:-4:-4;break;case "dhx_web":this._arrowFFFix=0;break;case "dhx_terrace":this._topLevelOffsetLeft=this._topLevelRightMargin=this._topLevelBottomMargin=0,this._arrowFFFix=_isIE?document.compatMode=="BackCompat"?0:-4:-4}if(this.base._autoSkinUpdate)this.base.className=this.base.className.replace("dhtmlxMenu_"+b+"_Middle","")+" dhtmlxMenu_"+this.skin+"_Middle";for(var c in this.idPull)this.idPull[c].className=
String(this.idPull[c].className).replace(b,this.skin)};this.setSkin(this.skin);this.dLoad=!1;this.dLoadUrl="";this.dLoadSign="?";this.loaderIcon=!1;this.limit=0;this._scrollUpTM=null;this._scrollUpTMTime=20;this._scrollUpTMStep=3;this._scrollDownTM=null;this._scrollDownTMTime=20;this._scrollDownTMStep=3;this.context=!1;this.contextZones={};this.contextMenuZoneId=!1;this.contextHideAllMode=this.contextAutoHide=this.contextAutoShow=!0;this._selectedSubItems=[];this._openedPolygons=[];this._addSubItemToSelected=
function(a,b){for(var c=!0,d=0;d<this._selectedSubItems.length;d++)this._selectedSubItems[d][0]==a&&this._selectedSubItems[d][1]==b&&(c=!1);c==!0&&this._selectedSubItems.push([a,b]);return c};this._removeSubItemFromSelected=function(a,b){for(var c=[],d=!1,e=0;e<this._selectedSubItems.length;e++)this._selectedSubItems[e][0]==a&&this._selectedSubItems[e][1]==b?d=!0:c[c.length]=this._selectedSubItems[e];if(d==!0)this._selectedSubItems=c;return d};this._getSubItemToDeselectByPolygon=function(a){for(var b=
[],c=0;c<this._selectedSubItems.length;c++)if(this._selectedSubItems[c][1]==a){b[b.length]=this._selectedSubItems[c][0];for(var b=b.concat(this._getSubItemToDeselectByPolygon(this._selectedSubItems[c][0])),d=!0,e=0;e<this._openedPolygons.length;e++)this._openedPolygons[e]==this._selectedSubItems[c][0]&&(d=!1);d==!0&&(this._openedPolygons[this._openedPolygons.length]=this._selectedSubItems[c][0]);this._selectedSubItems[c][0]=-1;this._selectedSubItems[c][1]=-1}return b};this._hidePolygon=function(a){if(this.idPull["polygon_"+
a]!=null){if(typeof this._menuEffect!="undefined"&&this._menuEffect!==!1)this._hidePolygonEffect("polygon_"+a);else{if(this.idPull["polygon_"+a].style.display=="none")return;this.idPull["polygon_"+a].style.display="none";if(this.idPull["arrowup_"+a]!=null)this.idPull["arrowup_"+a].style.display="none";if(this.idPull["arrowdown_"+a]!=null)this.idPull["arrowdown_"+a].style.display="none";this._updateItemComplexState(a,!0,!1);if(this._isIE6&&this.idPull["polygon_"+a+"_ie6cover"]!=null)this.idPull["polygon_"+
a+"_ie6cover"].style.display="none"}a=String(a).replace(this.idPrefix,"");a==this.topId&&(a=null);this.callEvent("onHide",[a]);a!=null&&this.skin=="dhx_terrace"&&this.itemPull[this.idPrefix+a].parent==this.idPrefix+this.topId&&this._improveTerraceButton(this.idPrefix+a,!0)}};this._showPolygon=function(a,b){var c=this._countVisiblePolygonItems(a);if(c!=0){var d="polygon_"+a;if(this.idPull[d]!=null&&this.idPull[a]!=null&&(!this.menuModeTopLevelTimeout||this.menuMode!="web"||this.context||this.idPull[a]._mouseOver||
b!=this.dirTopLevel)){this.fixedPosition||this._autoDetectVisibleArea();var e=0,f=0,g=null,i=null;this.idPull[d].style.visibility="hidden";this.idPull[d].style.left="0px";this.idPull[d].style.top="0px";this.idPull[d].style.display="";this.idPull[d].style.zIndex=this.zInd;if(this.autoOverflow)if(this.idPull[d].firstChild.offsetHeight>this.menuY1+this.menuY2){var m=Math.floor((this.menuY2-this.menuY1-35)/24);this.limit=m}else this.limit=0,this.idPull["arrowup_"+a]!=null&&this._removeUpArrow(String(a).replace(this.idPrefix,
"")),this.idPull["arrowdown_"+a]!=null&&this._removeDownArrow(String(a).replace(this.idPrefix,""));if(this.limit>0&&this.limit<c)this.idPull["arrowup_"+a]==null&&this._addUpArrow(String(a).replace(this.idPrefix,"")),this.idPull["arrowdown_"+a]==null&&this._addDownArrow(String(a).replace(this.idPrefix,"")),g=this.idPull["arrowup_"+a],g.style.visibility="hidden",g.style.display="",g.style.zIndex=this.zInd,e=g.offsetHeight,i=this.idPull["arrowdown_"+a],i.style.visibility="hidden",i.style.display="",
i.style.zIndex=this.zInd,f=i.offsetHeight;if(this.limit>0)this.limit<c?(this.idPull[d].style.height=24*this.limit+"px",this.idPull[d].scrollTop=0):this.idPull[d].style.height="";this.zInd+=this.zIndStep;if(this.itemPull[a]!=null)var C="polygon_"+this.itemPull[a].parent;else this.context&&(C=this.idPull[this.idPrefix+this.topId]);var q=this.idPull[a].tagName!=null?getAbsoluteLeft(this.idPull[a]):this.idPull[a][0],t=this.idPull[a].tagName!=null?getAbsoluteTop(this.idPull[a]):this.idPull[a][1],u=this.idPull[a].tagName!=
null?this.idPull[a].offsetWidth:0,B=this.idPull[a].tagName!=null?this.idPull[a].offsetHeight:0,l=0,n=0,s=this.idPull[d].offsetWidth,v=this.idPull[d].offsetHeight+e+f;b=="bottom"&&(l=this._rtl?q+(u!=null?u:0)-s:this._align=="right"?q+u-s:q-1+(b==this.dirTopLevel?this._topLevelRightMargin:0),n=t-1+B+this._topLevelBottomMargin);b=="right"&&(l=q+u-1,n=t+2);b=="left"&&(l=q-this.idPull[d].offsetWidth+2,n=t+2);b=="top"&&(l=q-1,n=t-v+2);if(this.fixedPosition)var w=65536,y=65536;else if(w=this.menuX2!=null?
this.menuX2:0,y=this.menuY2!=null?this.menuY2:0,w==0)window.innerWidth?(w=window.innerWidth,y=window.innerHeight):(w=document.body.offsetWidth,y=document.body.scrollHeight);l+s>w&&!this._rtl&&(l=q-s+2);l<this.menuX1&&this._rtl&&(l=q+u-2);l<0&&(l=0);n+v>y&&this.menuY2!=null&&(n=Math.max(t+B-v+2,this._isVisibleArea?this.menuY1+2:2),this.context&&this.idPrefix+this.topId==a&&i!=null&&(n-=2),this.itemPull[a]!=null&&!this.context&&this.itemPull[a].parent==this.idPrefix+this.topId&&(n-=this.base.offsetHeight));
this.idPull[d].style.left=l+"px";this.idPull[d].style.top=n+e+"px";if(typeof this._menuEffect!="undefined"&&this._menuEffect!==!1)this._showPolygonEffect(d);else{this.idPull[d].style.visibility="";if(this.limit>0&&this.limit<c)g.style.left=l+"px",g.style.top=n+"px",g.style.width=s+this._arrowFFFix+"px",g.style.visibility="",i.style.left=l+"px",i.style.top=n+v-f+"px",i.style.width=s+this._arrowFFFix+"px",i.style.visibility="",this._checkArrowsState(a);if(this._isIE6){var r=d+"_ie6cover";if(this.idPull[r]==
null){var x=document.createElement("IFRAME");x.className="dhtmlxMenu_IE6CoverFix_"+this.skin;x.frameBorder=0;x.setAttribute("src","javascript:false;");document.body.insertBefore(x,document.body.firstChild);this.idPull[r]=x}this.idPull[r].style.left=l+"px";this.idPull[r].style.top=n+"px";this.idPull[r].style.width=s+"px";this.idPull[r].style.height=v+"px";this.idPull[r].style.zIndex=this.idPull[d].style.zIndex-1;this.idPull[r].style.display=""}}a=String(a).replace(this.idPrefix,"");a==this.topId&&
(a=null);this.callEvent("onShow",[a]);a!=null&&this.skin=="dhx_terrace"&&this.itemPull[this.idPrefix+a].parent==this.idPrefix+this.topId&&this._improveTerraceButton(this.idPrefix+a,!1)}}};this._redistribSubLevelSelection=function(a,b){for(;this._openedPolygons.length>0;)this._openedPolygons.pop();var c=this._getSubItemToDeselectByPolygon(b);this._removeSubItemFromSelected(-1,-1);for(var d=0;d<c.length;d++)if(this.idPull[c[d]]!=null&&c[d]!=a&&this.itemPull[c[d]].state=="enabled")this.idPull[c[d]].className=
"sub_item";for(d=0;d<this._openedPolygons.length;d++)this._openedPolygons[d]!=b&&this._hidePolygon(this._openedPolygons[d]);if(this.itemPull[a].state=="enabled"){this.idPull[a].className="sub_item_selected";if(this.itemPull[a].complex&&this.dLoad&&this.itemPull[a].loaded=="no"){this.loaderIcon==!0&&this._updateLoaderIcon(a,!0);var e=new dtmlXMLLoaderObject(this._xmlParser,window);this.itemPull[a].loaded="get";this.callEvent("onXLS",[]);e.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&parentId="+
a.replace(this.idPrefix,"")+"&etc="+(new Date).getTime())}if((this.itemPull[a].complex||this.dLoad&&this.itemPull[a].loaded=="yes")&&this.itemPull[a].complex&&this.idPull["polygon_"+a]!=null)this._updateItemComplexState(a,!0,!0),this._showPolygon(a,this.dirSubLevel);this._addSubItemToSelected(a,b);this.menuSelected=a}};this._doOnClick=function(a,b,c){this.menuLastClicked=a;if(this.itemPull[this.idPrefix+a].href_link!=null&&this.itemPull[this.idPrefix+a].state=="enabled"){var d=document.createElement("FORM"),
e=String(this.itemPull[this.idPrefix+a].href_link).split("?");d.action=e[0];if(e[1]!=null)for(var f=String(e[1]).split("&"),g=0;g<f.length;g++){var i=String(f[g]).split("="),m=document.createElement("INPUT");m.type="hidden";m.name=i[0]||"";m.value=i[1]||"";d.appendChild(m)}if(this.itemPull[this.idPrefix+a].href_target!=null)d.target=this.itemPull[this.idPrefix+a].href_target;d.style.display="none";document.body.appendChild(d);d.submit();d!=null&&(document.body.removeChild(d),d=null)}else if(b.charAt(0)!=
"c"&&b.charAt(1)!="d"&&b.charAt(2)!="s"){if(this.checkEvent("onClick"))this.callEvent("onClick",[a,this.contextMenuZoneId,c]);else if(b.charAt(1)=="d"||this.menuMode=="win"&&b.charAt(2)=="t")return;this.context&&this._isContextMenuVisible()&&this.contextAutoHide?this._hideContextMenu():this._clearAndHide&&this._clearAndHide()}};this._doOnTouchMenu=function(a){if(this.menuTouched==!1)this.menuTouched=!0,this.checkEvent("onTouch")&&this.callEvent("onTouch",[a])};this._searchMenuNode=function(a,b){for(var c=
[],d=0;d<b.length;d++)if(typeof b[d]=="object"){b[d].length==5&&typeof b[d][0]!="object"&&b[d][0].replace(this.idPrefix,"")==a&&d==0&&(c=b);var e=this._searchMenuNode(a,b[d]);e.length>0&&(c=e)}return c};this._getMenuNodes=function(a){var b=[],c;for(c in this.itemPull)this.itemPull[c].parent==a&&(b[b.length]=c);return b};this._genStr=function(a){for(var b="",c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",d=0;d<a;d++)b+=c.charAt(Math.round(Math.random()*(c.length-1)));return b};
this.getItemType=function(a){a=this.idPrefix+a;return this.itemPull[a]==null?null:this.itemPull[a].type};this.forEachItem=function(a){for(var b in this.itemPull)a(String(b).replace(this.idPrefix,""))};this._clearAndHide=function(){a.menuSelected=-1;for(a.menuLastClicked=-1;a._openedPolygons.length>0;)a._openedPolygons.pop();for(var b=0;b<a._selectedSubItems.length;b++){var c=a._selectedSubItems[b][0];if(a.idPull[c]!=null&&a.itemPull[c].state=="enabled"){if(a.idPull[c].className=="sub_item_selected")a.idPull[c].className=
"sub_item";if(a.idPull[c].className=="dhtmlxMenu_"+a.skin+"_TopLevel_Item_Selected")a.idPull[c].className=a.itemPull[c].cssNormal!=null?a.itemPull[c].cssNormal:"dhtmlxMenu_"+a.skin+"_TopLevel_Item_Normal"}a._hidePolygon(c)}a.menuTouched=!1;if(a.context)a.contextHideAllMode?(a._hidePolygon(a.idPrefix+a.topId),a.zInd=a.zIndInit):a.zInd=a.zIndInit+a.zIndStep};this._doOnLoad=function(){};this.loadXML=function(a,b){if(b)this._doOnLoad=function(){b()};this.callEvent("onXLS",[]);this._xmlLoader.loadXML(a)};
this.loadXMLString=function(a,b){if(b)this._doOnLoad=function(){b()};this._xmlLoader.loadXMLString(a)};this._buildMenu=function(a,b){for(var c=0,d=0;d<a.childNodes.length;d++)if(a.childNodes[d].tagName==this.itemTagName){var e=a.childNodes[d],f={};f.id=this.idPrefix+(e.getAttribute("id")||this._genStr(24));f.title=e.getAttribute("text")||"";f.imgen=e.getAttribute("img")||"";f.imgdis=e.getAttribute("imgdis")||"";f.tip="";f.hotkey="";e.getAttribute("cssNormal")!=null&&(f.cssNormal=e.getAttribute("cssNormal"));
f.type=e.getAttribute("type")||"item";if(f.type=="checkbox")f.checked=e.getAttribute("checked")!=null,f.imgen="chbx_"+(f.checked?"1":"0"),f.imgdis=f.imgen;if(f.type=="radio")f.checked=e.getAttribute("checked")!=null,f.imgen="rdbt_"+(f.checked?"1":"0"),f.imgdis=f.imgen,f.group=e.getAttribute("group")||this._genStr(24),this.radio[f.group]==null&&(this.radio[f.group]=[]),this.radio[f.group][this.radio[f.group].length]=f.id;f.state=e.getAttribute("enabled")!=null||e.getAttribute("disabled")!=null?e.getAttribute("enabled")==
"false"||e.getAttribute("disabled")=="true"?"disabled":"enabled":"enabled";f.parent=b!=null?b:this.idPrefix+this.topId;f.complex=this.dLoad?e.getAttribute("complex")!=null?!0:!1:this._buildMenu(e,f.id)>0;this.dLoad&&f.complex&&(f.loaded="no");this.itemPull[f.id]=f;for(var g=0;g<e.childNodes.length;g++){var i=e.childNodes[g].tagName;i!=null&&(i=i.toLowerCase());if(i==this.userDataTagName){var m=e.childNodes[g];m.getAttribute("name")!=null&&(this.userData[f.id+"_"+m.getAttribute("name")]=m.firstChild!=
null&&m.firstChild.nodeValue!=null?m.firstChild.nodeValue:"")}if(i==this.itemTextTagName)f.title=e.childNodes[g].firstChild.nodeValue;if(i==this.itemTipTagName)f.tip=e.childNodes[g].firstChild.nodeValue;if(i==this.itemHotKeyTagName)f.hotkey=e.childNodes[g].firstChild.nodeValue;if(i==this.itemHrefTagName&&f.type=="item")f.href_link=e.childNodes[g].firstChild.nodeValue,e.childNodes[g].getAttribute("target")!=null&&(f.href_target=e.childNodes[g].getAttribute("target"))}c++}return c};this._xmlParser=
function(){if(a.dLoad){var b=this.getXMLTopNode("menu");parentId=b.getAttribute("parentId")!=null?b.getAttribute("parentId"):null;if(parentId==null)a._buildMenu(b,null),a._initTopLevelMenu();else{a._buildMenu(b,a.idPrefix+parentId);a._addSubMenuPolygon(a.idPrefix+parentId,a.idPrefix+parentId);if(a.menuSelected==a.idPrefix+parentId){var c=a.idPrefix+parentId,d=a.itemPull[a.idPrefix+parentId].parent==a.idPrefix+a.topId,e=d&&!a.context?a.dirTopLevel:a.dirSubLevel,f=!1;if(d&&a.menuModeTopLevelTimeout&&
a.menuMode=="web"&&!a.context){var g=a.idPull[a.idPrefix+parentId];if(g._mouseOver==!0){var p=a.menuModeTopLevelTimeoutTime-((new Date).getTime()-g._dynLoadTM);if(p>1)g._menuOpenTM=window.setTimeout(function(){a._showPolygon(c,e)},p),f=!0}}f||a._showPolygon(c,e)}a.itemPull[a.idPrefix+parentId].loaded="yes";a.loaderIcon==!0&&a._updateLoaderIcon(a.idPrefix+parentId,!1)}this.destructor();a.callEvent("onXLE",[])}else b=this.getXMLTopNode("menu"),a._buildMenu(b,null),a.init(),a.callEvent("onXLE",[]),a._doOnLoad()};
this._xmlLoader=new dtmlXMLLoaderObject(this._xmlParser,window);this._showSubLevelItem=function(a,b){if(document.getElementById("arrow_"+this.idPrefix+a)!=null)document.getElementById("arrow_"+this.idPrefix+a).style.display=b?"none":"";if(document.getElementById("image_"+this.idPrefix+a)!=null)document.getElementById("image_"+this.idPrefix+a).style.display=b?"none":"";if(document.getElementById(this.idPrefix+a)!=null)document.getElementById(this.idPrefix+a).style.display=b?"":"none"};this._hideSubLevelItem=
function(a){this._showSubLevelItem(a,!0)};this.idPrefix=this._genStr(12);this._bodyClick=function(b){b=b||event;b.button==2||_isOpera&&b.ctrlKey==!0||(a.context?a.contextAutoHide&&(!_isOpera||a._isContextMenuVisible()&&_isOpera)&&a._hideContextMenu():a._clearAndHide&&a._clearAndHide())};this._bodyContext=function(b){var b=b||event,c=String((b.srcElement||b.target).className);if(!(c.search("dhtmlxMenu")!=-1&&c.search("SubLevelArea")!=-1)){for(var d=!0,e=b.target||b.srcElement;e!=null;)e.id!=null&&
a.isContextZone(e.id)&&(d=!1),e==document.body&&(d=!1),e=e.parentNode;d&&a.hideContextMenu()}};typeof window.addEventListener!="undefined"?(window.addEventListener("click",this._bodyClick,!1),window.addEventListener("contextmenu",this._bodyContext,!1)):(document.body.attachEvent("onclick",this._bodyClick),document.body.attachEvent("oncontextmenu",this._bodyContext));this._UID=this._genStr(32);dhtmlxMenuObjectLiveInstances[this._UID]=this;dhtmlxEventable(this);return this}
dhtmlXMenuObject.prototype.init=function(){if(this._isInited!=!0)this.dLoad?(this.callEvent("onXLS",[]),this._xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&etc="+(new Date).getTime())):(this._initTopLevelMenu(),this._isInited=!0)};
dhtmlXMenuObject.prototype._countVisiblePolygonItems=function(b){var c=0,a;for(a in this.itemPull){var d=this.itemPull[a].parent,f=this.itemPull[a].type;this.idPull[a]!=null&&d==b&&(f=="item"||f=="radio"||f=="checkbox")&&this.idPull[a].style.display!="none"&&c++}return c};
dhtmlXMenuObject.prototype._redefineComplexState=function(b){if(this.idPrefix+this.topId!=b&&this.idPull["polygon_"+b]!=null&&this.idPull[b]!=null){var c=this._countVisiblePolygonItems(b);c>0&&!this.itemPull[b].complex&&this._updateItemComplexState(b,!0,!1);c==0&&this.itemPull[b].complex&&this._updateItemComplexState(b,!1,!1)}};
dhtmlXMenuObject.prototype._updateItemComplexState=function(b,c){if(!this.context&&this._getItemLevelType(b.replace(this.idPrefix,""))=="TopLevel")this.itemPull[b].complex=c;else if(!(this.idPull[b]==null||this.itemPull[b]==null))if(this.itemPull[b].complex=c,b!=this.idPrefix+this.topId){var a=null,d=this.idPull[b].childNodes[this._rtl?0:2];d.childNodes[0]&&String(d.childNodes[0].className).search("complex_arrow")===0&&(a=d.childNodes[0]);if(this.itemPull[b].complex){if(a==null){a=document.createElement("DIV");
a.className="complex_arrow";for(a.id="arrow_"+b;d.childNodes.length>0;)d.removeChild(d.childNodes[0]);d.appendChild(a)}if(this.dLoad&&this.itemPull[b].loaded=="get"&&this.loaderIcon){if(a.className!="complex_arrow_loading")a.className="complex_arrow_loading"}else a.className="complex_arrow"}else!this.itemPull[b].complex&&a!=null&&(d.removeChild(a),this.itemPull[b].hotkey_backup!=null&&this.setHotKey&&this.setHotKey(b.replace(this.idPrefix,""),this.itemPull[b].hotkey_backup))}};
dhtmlXMenuObject.prototype._getItemLevelType=function(b){return this.itemPull[this.idPrefix+b].parent==this.idPrefix+this.topId?"TopLevel":"SubLevelArea"};
dhtmlXMenuObject.prototype._redistribTopLevelSelection=function(b){var c=this._getSubItemToDeselectByPolygon("parent");this._removeSubItemFromSelected(-1,-1);for(var a=0;a<c.length;a++)if(c[a]!=b&&this._hidePolygon(c[a]),this.idPull[c[a]]!=null&&c[a]!=b)this.idPull[c[a]].className=this.idPull[c[a]].className.replace(/Selected/g,"Normal");if(this.itemPull[this.idPrefix+b].state=="enabled")this.idPull[this.idPrefix+b].className="dhtmlxMenu_"+this.skin+"_TopLevel_Item_Selected",this._addSubItemToSelected(this.idPrefix+
b,"parent"),this.menuSelected=this.menuMode=="win"?this.menuSelected!=-1?b:this.menuSelected:b,this.itemPull[this.idPrefix+b].complex&&this.menuSelected!=-1&&this._showPolygon(this.idPrefix+b,this.dirTopLevel)};
dhtmlXMenuObject.prototype._initTopLevelMenu=function(){this.dirTopLevel="bottom";this.dirSubLevel=this._rtl?"left":"right";if(this.context)this.idPull[this.idPrefix+this.topId]=[0,0],this._addSubMenuPolygon(this.idPrefix+this.topId,this.idPrefix+this.topId);else for(var b=this._getMenuNodes(this.idPrefix+this.topId),c=0;c<b.length;c++)this.itemPull[b[c]].type=="item"&&this._renderToplevelItem(b[c],null),this.itemPull[b[c]].type=="separator"&&this._renderSeparator(b[c],null)};
dhtmlXMenuObject.prototype._renderToplevelItem=function(b,c){var a=this,d=document.createElement("DIV");d.id=b;d.className=this.itemPull[b].state=="enabled"&&this.itemPull[b].cssNormal!=null?this.itemPull[b].cssNormal:"dhtmlxMenu_"+this.skin+"_TopLevel_Item_"+(this.itemPull[b].state=="enabled"?"Normal":"Disabled");if(this.itemPull[b].title!=""){var f=document.createElement("DIV");f.className="top_level_text";f.innerHTML=this.itemPull[b].title;d.appendChild(f)}if(this.itemPull[b].tip.length>0)d.title=
this.itemPull[b].tip;if(this.itemPull[b].imgen!=""||this.itemPull[b].imgdis!=""){var e=this.itemPull[b][this.itemPull[b].state=="enabled"?"imgen":"imgdis"];if(e){var g=document.createElement("IMG");g.border="0";g.id="image_"+b;g.src=this.imagePath+e;g.className="dhtmlxMenu_TopLevel_Item_Icon";d.childNodes.length>0&&!this._rtl?d.insertBefore(g,d.childNodes[0]):d.appendChild(g)}}d.onselectstart=function(a){a=a||event;return a.returnValue=!1};d.oncontextmenu=function(a){a=a||event;return a.returnValue=
!1};if(!this.cont)this.cont=document.createElement("DIV"),this.cont.dir="ltr",this.cont.className=this._align=="right"?"align_right":"align_left",this.base.appendChild(this.cont);c!=null&&(c++,c<0&&(c=0),c>this.cont.childNodes.length-1&&(c=null));c!=null?this.cont.insertBefore(d,this.cont.childNodes[c]):this.cont.appendChild(d);this.idPull[d.id]=d;this.itemPull[b].complex&&!this.dLoad&&this._addSubMenuPolygon(this.itemPull[b].id,this.itemPull[b].id);d.onmouseover=function(){a.menuMode=="web"&&window.clearTimeout(a.menuTimeoutHandler);
var b=a._getSubItemToDeselectByPolygon("parent");a._removeSubItemFromSelected(-1,-1);for(var c=0;c<b.length;c++)if(b[c]!=this.id&&a._hidePolygon(b[c]),a.idPull[b[c]]!=null&&b[c]!=this.id)if(a.itemPull[b[c]].cssNormal!=null)a.idPull[b[c]].className=a.itemPull[b[c]].cssNormal;else{if(a.idPull[b[c]].className=="sub_item_selected")a.idPull[b[c]].className="sub_item";a.idPull[b[c]].className=a.idPull[b[c]].className.replace(/Selected/g,"Normal")}if(a.itemPull[this.id].state=="enabled"){this.className=
"dhtmlxMenu_"+a.skin+"_TopLevel_Item_Selected";a._addSubItemToSelected(this.id,"parent");a.menuSelected=a.menuMode=="win"?a.menuSelected!=-1?this.id:a.menuSelected:this.id;if(a.dLoad&&a.itemPull[this.id].loaded=="no"){if(a.menuModeTopLevelTimeout&&a.menuMode=="web"&&!a.context)this._mouseOver=!0,this._dynLoadTM=(new Date).getTime();var d=new dtmlXMLLoaderObject(a._xmlParser,window);a.itemPull[this.id].loaded="get";a.callEvent("onXLS",[]);d.loadXML(a.dLoadUrl+a.dLoadSign+"action=loadMenu&parentId="+
this.id.replace(a.idPrefix,"")+"&etc="+(new Date).getTime())}if((!a.dLoad||a.dLoad&&(!a.itemPull[this.id].loaded||a.itemPull[this.id].loaded=="yes"))&&a.itemPull[this.id].complex&&a.menuSelected!=-1)if(a.menuModeTopLevelTimeout&&a.menuMode=="web"&&!a.context){this._mouseOver=!0;var e=this.id;this._menuOpenTM=window.setTimeout(function(){a._showPolygon(e,a.dirTopLevel)},a.menuModeTopLevelTimeoutTime)}else a._showPolygon(this.id,a.dirTopLevel)}a._doOnTouchMenu(this.id.replace(a.idPrefix,""))};d.onmouseout=
function(){if(!(a.itemPull[this.id].complex&&a.menuSelected!=-1)&&a.itemPull[this.id].state=="enabled")d.className=a.itemPull[this.id].cssNormal!=null?a.itemPull[this.id].cssNormal:"dhtmlxMenu_"+a.skin+"_TopLevel_Item_Normal";if(a.menuMode=="web")window.clearTimeout(a.menuTimeoutHandler),a.menuTimeoutHandler=window.setTimeout(function(){a._clearAndHide()},a.menuTimeoutMsec,"JavaScript");if(a.menuModeTopLevelTimeout&&a.menuMode=="web"&&!a.context)this._mouseOver=!1,window.clearTimeout(this._menuOpenTM)};
d.onclick=function(b){a.menuMode=="web"&&window.clearTimeout(a.menuTimeoutHandler);if(!(a.menuMode!="web"&&a.itemPull[this.id].state=="disabled")){b=b||event;b.cancelBubble=!0;b.returnValue=!1;if(a.menuMode=="win"&&a.itemPull[this.id].complex){if(a.menuSelected==this.id){a.menuSelected=-1;var c=!1}else a.menuSelected=this.id,c=!0;c?a._showPolygon(this.id,a.dirTopLevel):a._hidePolygon(this.id)}var d=a.itemPull[this.id].complex?"c":"-",e=a.itemPull[this.id].state!="enabled"?"d":"-",f={ctrl:b.ctrlKey,
alt:b.altKey,shift:b.shiftKey};a._doOnClick(this.id.replace(a.idPrefix,""),d+e+"t",f);return!1}};this.skin=="dhx_terrace"&&this._improveTerraceSkin()};dhtmlXMenuObject.prototype.setImagePath=function(){};dhtmlXMenuObject.prototype.setIconsPath=function(b){this.imagePath=b};dhtmlXMenuObject.prototype.setIconPath=dhtmlXMenuObject.prototype.setIconsPath;
dhtmlXMenuObject.prototype._updateItemImage=function(b){var b=this.idPrefix+b,c=this.itemPull[b].parent==this.idPrefix+this.topId&&!this.context,a=null;if(c)for(var d=0;d<this.idPull[b].childNodes.length;d++)try{this.idPull[b].childNodes[d].className=="dhtmlxMenu_TopLevel_Item_Icon"&&(a=this.idPull[b].childNodes[d])}catch(f){}else try{a=this.idPull[b].childNodes[this._rtl?2:0].childNodes[0]}catch(e){}var g=this.itemPull[b].type=="radio"?this.itemPull[b][this.itemPull[b].state=="enabled"?"imgen":"imgdis"]:
this.itemPull[b][this.itemPull[b].state=="enabled"?"imgen":"imgdis"];if(g.length>0)if(a!=null)a.src=this.imagePath+g;else if(c)a=document.createElement("IMG"),a.className="dhtmlxMenu_TopLevel_Item_Icon",a.src=this.imagePath+g,a.border="0",a.id="image_"+b,!this._rtl&&this.idPull[b].childNodes.length>0?this.idPull[b].insertBefore(a,this.idPull[b].childNodes[0]):this.idPull[b].appendChild(a);else{a=document.createElement("IMG");a.className="sub_icon";a.src=this.imagePath+g;a.border="0";a.id="image_"+
b;for(var h=this.idPull[b].childNodes[this._rtl?2:0];h.childNodes.length>0;)h.removeChild(h.childNodes[0]);h.appendChild(a)}else a!=null&&a.parentNode.removeChild(a)};
dhtmlXMenuObject.prototype.removeItem=function(b,c,a){c||(b=this.idPrefix+b);var d=null;if(b!=this.idPrefix+this.topId){if(this.itemPull[b]==null)return;this.idPull["polygon_"+b]&&this.idPull["polygon_"+b]._tmShow&&window.clearTimeout(this.idPull["polygon_"+b]._tmShow);var f=this.itemPull[b].type;if(f=="separator"){var e=this.idPull["separator_"+b];this.itemPull[b].parent==this.idPrefix+this.topId?(e.onclick=null,e.onselectstart=null,e.id=null):(e.childNodes[0].childNodes[0].onclick=null,e.childNodes[0].childNodes[0].onselectstart=
null,e.childNodes[0].childNodes[0].id=null,e.childNodes[0].removeChild(e.childNodes[0].childNodes[0]),e.removeChild(e.childNodes[0]));e.parentNode.removeChild(e);this.idPull["separator_"+b]=null;this.itemPull[b]=null;delete this.idPull["separator_"+b]}else{d=this.itemPull[b].parent;e=this.idPull[b];e.onclick=null;e.oncontextmenu=null;e.onmouseover=null;e.onmouseout=null;e.onselectstart=null;for(e.id=null;e.childNodes.length>0;)e.removeChild(e.childNodes[0]);e.parentNode.removeChild(e);this.idPull[b]=
null;this.itemPull[b]=null;delete this.idPull[b]}delete this.itemPull[b];f=e=null}for(var g in this.itemPull)this.itemPull[g].parent==b&&this.removeItem(g,!0,!0);var h=Array(b);d!=null&&!a&&this.idPull["polygon_"+d]!=null&&this.idPull["polygon_"+d].tbd.childNodes.length==0&&(h.push(d),this._updateItemComplexState(d,!1,!1));for(var j=0;j<h.length;j++)if(this.idPull["polygon_"+h[j]]){var k=this.idPull["polygon_"+h[j]];k.onclick=null;k.oncontextmenu=null;k.tbl.removeChild(k.tbd);k.tbd=null;k.removeChild(k.tbl);
k.tbl=null;k.id=null;k.parentNode.removeChild(k);k=null;if(this._isIE6){var o="polygon_"+h[j]+"_ie6cover";this.idPull[o]!=null&&(document.body.removeChild(this.idPull[o]),delete this.idPull[o])}this.idPull["arrowup_"+b]!=null&&this._removeArrow&&this._removeArrow("arrowup_"+b);this.idPull["arrowdown_"+b]!=null&&this._removeArrow&&this._removeArrow("arrowdown_"+b);this.idPull["polygon_"+h[j]]=null;delete this.idPull["polygon_"+h[j]]}h=null;this.skin=="dhx_terrace"&&arguments.length==1&&this._improveTerraceSkin()};
dhtmlXMenuObject.prototype._getAllParents=function(b){var c=[],a;for(a in this.itemPull)if(this.itemPull[a].parent==b&&(c[c.length]=this.itemPull[a].id,this.itemPull[a].complex))for(var d=this._getAllParents(this.itemPull[a].id),f=0;f<d.length;f++)c[c.length]=d[f];return c};
dhtmlXMenuObject.prototype.renderAsContextMenu=function(){this.context=!0;if(this.base._autoSkinUpdate==!0)this.base.className=this.base.className.replace("dhtmlxMenu_"+this.skin+"_Middle",""),this.base._autoSkinUpdate=!1;this.addBaseIdAsContextZone!=null&&this.addContextZone(this.addBaseIdAsContextZone)};
dhtmlXMenuObject.prototype.addContextZone=function(b){if(b==document.body)var b="document.body."+this.idPrefix,c=document.body;else c=document.getElementById(b);var a=!1,d;for(d in this.contextZones)a=a||d==b||this.contextZones[d]==c;if(a==!0)return!1;this.contextZones[b]=c;var f=this;if(_isOpera)this.operaContext=function(a){f._doOnContextMenuOpera(a,f)},c.addEventListener("mouseup",this.operaContext,!1);else{if(c.oncontextmenu!=null&&!c._oldContextMenuHandler)c._oldContextMenuHandler=c.oncontextmenu;
c.oncontextmenu=function(a){for(var b in dhtmlxMenuObjectLiveInstances)b!=f._UID&&dhtmlxMenuObjectLiveInstances[b].context&&dhtmlxMenuObjectLiveInstances[b]._hideContextMenu();a=a||event;a.cancelBubble=!0;a.returnValue=!1;f._doOnContextBeforeCall(a,this);return!1}}};
dhtmlXMenuObject.prototype._doOnContextMenuOpera=function(b,c){for(var a in dhtmlxMenuObjectLiveInstances)a!=c._UID&&dhtmlxMenuObjectLiveInstances[a].context&&dhtmlxMenuObjectLiveInstances[a]._hideContextMenu();b.cancelBubble=!0;b.returnValue=!1;b.button==0&&b.ctrlKey==!0&&c._doOnContextBeforeCall(b,this);return!1};
dhtmlXMenuObject.prototype.removeContextZone=function(b){if(!this.isContextZone(b))return!1;b==document.body&&(b="document.body."+this.idPrefix);var c=this.contextZones[b];_isOpera?c.removeEventListener("mouseup",this.operaContext,!1):(c.oncontextmenu=c._oldContextMenuHandler!=null?c._oldContextMenuHandler:null,c._oldContextMenuHandler=null);try{this.contextZones[b]=null,delete this.contextZones[b]}catch(a){}return!0};
dhtmlXMenuObject.prototype.isContextZone=function(b){if(b==document.body&&this.contextZones["document.body."+this.idPrefix]!=null)return!0;var c=!1;this.contextZones[b]!=null&&this.contextZones[b]==document.getElementById(b)&&(c=!0);return c};dhtmlXMenuObject.prototype._isContextMenuVisible=function(){return this.idPull["polygon_"+this.idPrefix+this.topId]==null?!1:this.idPull["polygon_"+this.idPrefix+this.topId].style.display==""};
dhtmlXMenuObject.prototype._showContextMenu=function(b,c,a){this._clearAndHide();if(this.idPull["polygon_"+this.idPrefix+this.topId]==null)return!1;window.clearTimeout(this.menuTimeoutHandler);this.idPull[this.idPrefix+this.topId]=[b,c];this._showPolygon(this.idPrefix+this.topId,"bottom");this.callEvent("onContextMenu",[a])};
dhtmlXMenuObject.prototype._hideContextMenu=function(){if(this.idPull["polygon_"+this.idPrefix+this.topId]==null)return!1;this._clearAndHide();this._hidePolygon(this.idPrefix+this.topId);this.zInd=this.zIndInit};
dhtmlXMenuObject.prototype._doOnContextBeforeCall=function(b,c){this.contextMenuZoneId=c.id;this._clearAndHide();this._hideContextMenu();var a=b.srcElement||b.target,d=_isIE||_isOpera||_KHTMLrv?b.offsetX:b.layerX,f=_isIE||_isOpera||_KHTMLrv?b.offsetY:b.layerY,e=getAbsoluteLeft(a)+d,g=getAbsoluteTop(a)+f;this.checkEvent("onBeforeContextMenu")?this.callEvent("onBeforeContextMenu",[c.id,b])&&this.contextAutoShow&&(this._showContextMenu(e,g,c.id),this.callEvent("onAfterContextMenu",[c.id,b])):this.contextAutoShow&&
(this._showContextMenu(e,g,c.id),this.callEvent("onAfterContextMenu",[c.id]))};dhtmlXMenuObject.prototype.showContextMenu=function(b,c){this._showContextMenu(b,c,!1)};dhtmlXMenuObject.prototype.hideContextMenu=function(){this._hideContextMenu()};
dhtmlXMenuObject.prototype._autoDetectVisibleArea=function(){if(!this._isVisibleArea)this.menuX1=document.body.scrollLeft,this.menuX2=this.menuX1+(window.innerWidth||document.body.clientWidth),this.menuY1=Math.max((_isIE?document.documentElement:document.getElementsByTagName("html")[0]).scrollTop,document.body.scrollTop),this.menuY2=this.menuY1+(_isIE?Math.max(document.documentElement.clientHeight||0,document.documentElement.offsetHeight||0,document.body.clientHeight||0):window.innerHeight)};
dhtmlXMenuObject.prototype.getItemPosition=function(b){var b=this.idPrefix+b,c=-1;if(this.itemPull[b]==null)return c;for(var a=this.itemPull[b].parent,d=this.idPull["polygon_"+a]!=null?this.idPull["polygon_"+a].tbd:this.cont,f=0;f<d.childNodes.length;f++)if(d.childNodes[f]==this.idPull["separator_"+b]||d.childNodes[f]==this.idPull[b])c=f;return c};
dhtmlXMenuObject.prototype.setItemPosition=function(b,c){b=this.idPrefix+b;if(this.idPull[b]!=null){var a=this.itemPull[b].parent==this.idPrefix+this.topId,d=this.idPull[b],f=this.getItemPosition(b.replace(this.idPrefix,"")),e=this.itemPull[b].parent,g=this.idPull["polygon_"+e]!=null?this.idPull["polygon_"+e].tbd:this.cont;g.removeChild(g.childNodes[f]);c<0&&(c=0);a&&c<1&&(c=1);c<g.childNodes.length?g.insertBefore(d,g.childNodes[c]):g.appendChild(d)}};
dhtmlXMenuObject.prototype.getParentId=function(b){b=this.idPrefix+b;return this.itemPull[b]==null?null:(this.itemPull[b].parent!=null?this.itemPull[b].parent:this.topId).replace(this.idPrefix,"")};
dhtmlXMenuObject.prototype.addNewSibling=function(b,c,a,d,f,e){var g=this.idPrefix+(c!=null?c:this._genStr(24)),h=this.idPrefix+(b!=null?this.getParentId(b):this.topId);this._addItemIntoGlobalStrorage(g,h,a,"item",d,f,e);h==this.idPrefix+this.topId&&!this.context?this._renderToplevelItem(g,this.getItemPosition(b)):this._renderSublevelItem(g,this.getItemPosition(b))};
dhtmlXMenuObject.prototype.addNewChild=function(b,c,a,d,f,e,g){if(b==null)if(this.context)b=this.topId;else{this.addNewSibling(b,a,d,f,e,g);c!=null&&this.setItemPosition(a,c);return}a=this.idPrefix+(a!=null?a:this._genStr(24));this.setHotKey&&this.setHotKey(b,"");b=this.idPrefix+b;this._addItemIntoGlobalStrorage(a,b,d,"item",f,e,g);this.idPull["polygon_"+b]==null&&this._renderSublevelPolygon(b,b);this._renderSublevelItem(a,c-1);this._redefineComplexState(b)};
dhtmlXMenuObject.prototype._addItemIntoGlobalStrorage=function(b,c,a,d,f,e,g){var h={id:b,title:a,imgen:e!=null?e:"",imgdis:g!=null?g:"",type:d,state:f==!0?"disabled":"enabled",parent:c,complex:!1,hotkey:"",tip:""};this.itemPull[h.id]=h};
dhtmlXMenuObject.prototype._addSubMenuPolygon=function(b,c){for(var a=this._renderSublevelPolygon(b,c),d=this._getMenuNodes(c),f=0;f<d.length;f++)this.itemPull[d[f]].type=="separator"?this._renderSeparator(d[f],null):this._renderSublevelItem(d[f],null);for(var e=b==c?"topLevel":"subLevel",f=0;f<d.length;f++)this.itemPull[d[f]].complex&&this._addSubMenuPolygon(b,this.itemPull[d[f]].id)};
dhtmlXMenuObject.prototype._renderSublevelPolygon=function(b,c){var a=document.createElement("DIV");a.className="dhtmlxMenu_"+this.skin+"_SubLevelArea_Polygon "+(this._rtl?"dir_right":"");a.dir="ltr";a.oncontextmenu=function(a){a=a||event;a.returnValue=!1;a.cancelBubble=!0;return!1};a.id="polygon_"+c;a.onclick=function(a){a=a||event;a.cancelBubble=!0};a.style.display="none";document.body.insertBefore(a,document.body.firstChild);var d=document.createElement("TABLE");d.className="dhtmlxMebu_SubLevelArea_Tbl";
d.cellSpacing=0;d.cellPadding=0;d.border=0;var f=document.createElement("TBODY");d.appendChild(f);a.appendChild(d);a.tbl=d;a.tbd=f;this.idPull[a.id]=a;this.sxDacProc!=null&&(this.idPull["sxDac_"+c]=new this.sxDacProc(a,a.className),_isIE?(this.idPull["sxDac_"+c]._setSpeed(this.dacSpeedIE),this.idPull["sxDac_"+c]._setCustomCycle(this.dacCyclesIE)):(this.idPull["sxDac_"+c]._setSpeed(this.dacSpeed),this.idPull["sxDac_"+c]._setCustomCycle(this.dacCycles)));return a};
dhtmlXMenuObject.prototype._renderSublevelItem=function(b,c){var a=this,d=document.createElement("TR");d.className=this.itemPull[b].state=="enabled"?"sub_item":"sub_item_dis";var f=document.createElement("TD");f.className="sub_item_icon";var e=this.itemPull[b][this.itemPull[b].state=="enabled"?"imgen":"imgdis"];if(e!=""){var g=this.itemPull[b].type;if(g=="checkbox"||g=="radio"){var h=document.createElement("DIV");h.id="image_"+this.itemPull[b].id;h.className="sub_icon "+e;f.appendChild(h)}if(!(g==
"checkbox"||g=="radio"))h=document.createElement("IMG"),h.id="image_"+this.itemPull[b].id,h.className="sub_icon",h.src=this.imagePath+e,f.appendChild(h)}var j=document.createElement("TD");j.className="sub_item_text";if(this.itemPull[b].title!=""){var k=document.createElement("DIV");k.className="sub_item_text";k.innerHTML=this.itemPull[b].title;j.appendChild(k)}else j.innerHTML="&nbsp;";var o=document.createElement("TD");o.className="sub_item_hk";if(this.itemPull[b].complex){var z=document.createElement("DIV");
z.className="complex_arrow";z.id="arrow_"+this.itemPull[b].id;o.appendChild(z)}else if(this.itemPull[b].hotkey.length>0&&!this.itemPull[b].complex){var A=document.createElement("DIV");A.className="sub_item_hk";A.innerHTML=this.itemPull[b].hotkey;o.appendChild(A)}else o.innerHTML="&nbsp;";d.appendChild(this._rtl?o:f);d.appendChild(j);d.appendChild(this._rtl?f:o);d.id=this.itemPull[b].id;d.parent=this.itemPull[b].parent;if(this.itemPull[b].tip.length>0)d.title=this.itemPull[b].tip;if(!this._hideTMData)this._hideTMData=
{};d.onselectstart=function(a){a=a||event;return a.returnValue=!1};d.onmouseover=function(){a._hideTMData[this.id]&&window.clearTimeout(a._hideTMData[this.id]);a.menuMode=="web"&&window.clearTimeout(a.menuTimeoutHandler);this._visible||a._redistribSubLevelSelection(this.id,this.parent);this._visible=!0};d.onmouseout=function(){if(a.menuMode=="web")a.menuTimeoutHandler&&window.clearTimeout(a.menuTimeoutHandler),a.menuTimeoutHandler=window.setTimeout(function(){a&&a._clearAndHide&&a._clearAndHide()},
a.menuTimeoutMsec,"JavaScript");var b=this;a._hideTMData[this.id]&&window.clearTimeout(a._hideTMData[this.id]);a._hideTMData[this.id]=window.setTimeout(function(){b._visible=!1},50)};d.onclick=function(b){if(a.checkEvent("onClick")||!a.itemPull[this.id].complex){b=b||event;b.cancelBubble=!0;b.returnValue=!1;tc=a.itemPull[this.id].complex?"c":"-";td=a.itemPull[this.id].state=="enabled"?"-":"d";var c={ctrl:b.ctrlKey,alt:b.altKey,shift:b.shiftKey};switch(a.itemPull[this.id].type){case "checkbox":a._checkboxOnClickHandler(this.id.replace(a.idPrefix,
""),tc+td+"n",c);break;case "radio":a._radioOnClickHandler(this.id.replace(a.idPrefix,""),tc+td+"n",c);break;case "item":a._doOnClick(this.id.replace(a.idPrefix,""),tc+td+"n",c)}return!1}};var p=this.idPull["polygon_"+this.itemPull[b].parent];c!=null&&(c++,c<0&&(c=0),c>p.tbd.childNodes.length-1&&(c=null));c!=null&&p.tbd.childNodes[c]!=null?p.tbd.insertBefore(d,p.tbd.childNodes[c]):p.tbd.appendChild(d);this.idPull[d.id]=d};
dhtmlXMenuObject.prototype._renderSeparator=function(b,c){var a=this.context?"SubLevelArea":this.itemPull[b].parent==this.idPrefix+this.topId?"TopLevel":"SubLevelArea";if(!(a=="TopLevel"&&this.context)){var d=this;if(a!="TopLevel"){var f=document.createElement("TR");f.className="sub_sep";var e=document.createElement("TD");e.colSpan="3";f.appendChild(e)}var g=document.createElement("DIV");g.id="separator_"+b;g.className=a=="TopLevel"?"top_sep":"sub_sep";g.onselectstart=function(a){a=a||event;a.returnValue=
!1};g.onclick=function(a){a=a||event;a.cancelBubble=!0;var b={ctrl:a.ctrlKey,alt:a.altKey,shift:a.shiftKey};d._doOnClick(this.id.replace("separator_"+d.idPrefix,""),"--s",b)};if(a=="TopLevel"){if(c!=null)c++,c<0&&(c=0),this.cont.childNodes[c]!=null?this.cont.insertBefore(g,this.cont.childNodes[c]):this.cont.appendChild(g);else{var h=this.cont.childNodes[this.cont.childNodes.length-1];String(h).search("TopLevel_Text")==-1?this.cont.appendChild(g):this.cont.insertBefore(g,h)}this.idPull[g.id]=g}else{var j=
this.idPull["polygon_"+this.itemPull[b].parent];c!=null&&(c++,c<0&&(c=0),c>j.tbd.childNodes.length-1&&(c=null));c!=null&&j.tbd.childNodes[c]!=null?j.tbd.insertBefore(f,j.tbd.childNodes[c]):j.tbd.appendChild(f);e.appendChild(g);this.idPull[g.id]=f}}};dhtmlXMenuObject.prototype.addNewSeparator=function(b,c){var c=this.idPrefix+(c!=null?c:this._genStr(24)),a=this.idPrefix+this.getParentId(b);this._addItemIntoGlobalStrorage(c,a,"","separator",!1,"","");this._renderSeparator(c,this.getItemPosition(b))};
dhtmlXMenuObject.prototype.hide=function(){this._clearAndHide()};dhtmlXMenuObject.prototype.clearAll=function(){this.removeItem(this.idPrefix+this.topId,!0);this._isInited=!1;this.idPrefix=this._genStr(12);this.itemPull={}};
dhtmlXMenuObject.prototype.unload=function(){typeof window.addEventListener=="function"?(window.removeEventListener("click",this._bodyClick,!1),window.removeEventListener("contextmenu",this._bodyContext,!1)):(document.body.detachEvent("onclick",this._bodyClick),document.body.detachEvent("oncontextmenu",this._bodyContext));this._bodyContext=this._bodyClick=null;this.removeItem(this.idPrefix+this.topId,!0);this.idPull=this.itemPull=null;if(this.context)for(var b in this.contextZones)this.removeContextZone(b);
if(this.cont!=null)this.cont.className="",this.cont.parentNode.removeChild(this.cont),this.cont=null;if(this.base!=null){this.base.className="";if(!this.context)this.base.oncontextmenu=this.base._oldContextMenuHandler||null;this.base=this.base.onselectstart=null}this.setSkin=null;this.detachAllEvents();if(this._xmlLoader)this._xmlLoader.destructor(),this._xmlLoader=null;this.extendedModule=this.serialize=this.addCheckbox=this.getCheckboxState=this.setCheckboxState=this.addRadioButton=this.setRadioChecked=
this.getRadioChecked=this.userData=this.setOverflowHeight=this.contextZones=this.getCircuit=this.clearHref=this.setHref=this.setAlign=this.setRTL=this.setTopText=this.setItemSelected=this.getHotKey=this.setHotKey=this.getTooltip=this.setTooltip=this.setVisibleArea=this.getContextMenuHideAllMode=this.setContextMenuHideAllMode=this.setAutoHideMode=this.setAutoShowMode=this.clearItemImage=this.setItemImage=this.getItemImage=this.enableDynamicLoading=this.setWebModeTimeout=this.setOpenMode=this.getUserData=
this.setUserData=this.isItemHidden=this.showItem=this.hideItem=this.loadFromHTML=this.setItemText=this.getItemText=this.isItemEnabled=this.setItemDisabled=this.setItemEnabled=this._removeArrow=this._checkboxOnClickHandler=this._updateCheckboxImage=this._readLevel=this._setCheckboxState=this._getCheckboxState=this._radioOnClickHandler=this._setRadioState=this._getRadioImgObj=this._countPolygonItems=this._doScrollDown=this._doScrollUp=this._isArrowExists=this._removeDownArrow=this._removeUpArrow=this._addDownArrow=
this._addUpArrow=this._checkArrowsState=this._clearAllSelectedSubItemsInPolygon=this._updateLoaderIcon=this._changeItemVisible=this._changeItemState=this.hideContextMenu=this.showContextMenu=this.hide=this.detachAllEvents=this.radio=this.items=this.unload=this.dhx_Event=this.detachEvent=this.eventCatcher=this.checkEvent=this.callEvent=this.attachEvent=this.addNewSeparator=this.addNewChild=this.addNewSibling=this.getParentId=this.setItemPosition=this.getItemPosition=this.clearAll=this._hideContextMenu=
this._renderSeparator=this._renderSublevelItem=this._renderSublevelPolygon=this._addSubMenuPolygon=this._addItemIntoGlobalStrorage=this._autoDetectVisibleArea=this._doOnContextBeforeCall=this._showContextMenu=this._isContextMenuVisible=this.isContextZone=this.removeContextZone=this.addContextZone=this.renderAsContextMenu=this._getAllParents=this.removeItem=this._updateItemImage=this.setIconPath=this.setIconsPath=this.setImagePath=this._renderToplevelItem=this._initTopLevelMenu=this._redistribTopLevelSelection=
this._getItemLevelType=this._updateItemComplexState=this._redefineComplexState=this._countVisiblePolygonItems=this._hideSubLevelItem=this._showSubLevelItem=this._xmlParser=this._buildMenu=this.loadXMLString=this.loadXML=this.init=this.forEachItem=this.getItemType=this._doOnLoad=this._clearAndHide=this._genStr=this._getMenuNodes=this._searchMenuNode=this._doOnTouchMenu=this._doOnClick=this._redistribSubLevelSelection=this._showPolygon=this._hidePolygon=this._getSubItemToDeselectByPolygon=this._removeSubItemFromSelected=
this._addSubItemToSelected=this._openedPolygons=this._selectedSubItems=this._enableDacSupport=this.zIndStep=this.zIndInit=this.zInd=this.dacSpeedIE=this.dacSpeed=this.dacCyclesIE=this.dacCycles=this.topId=this.skin=this.userDataTagName=this.itemTipTagName=this.itemTextTagName=this.itemTagName=this.itemHrefTagName=this.itemHotKeyTagName=this.isDhtmlxMenuObject=this.menuTouched=this.menuTimeoutMsec=this.menuTimeoutHandler=this.menuModeTopLevelTimeoutTime=this.menuModeTopLevelTimeout=this.menuMode=this.imagePath=
this.idPrefix=this.menuLastClicked=this.menuSelected=this.limit=this.dirTopLevel=this.dirSubLevel=this.fixedPosition=this.loaderIcon=this.dLoadUrl=this.dLoadSign=this.dLoad=this.contextMenuZoneId=this.contextHideAllMode=this.contextAutoShow=this.contextAutoHide=this.context=this.addBaseIdAsContextZone=this._topLevelRightMargin=this._topLevelBottomMargin=this._topLevelOffsetLeft=this._topLevelBottomMargin=this._scrollUpTMTime=this._scrollUpTMStep=this._scrollDownTMTime=this._scrollDownTMStep=this._rtl=
this._isInited=this._isIE6=this._arrowFFFix=this._align=null;dhtmlxMenuObjectLiveInstances[this._UID]=null;try{delete dhtmlxMenuObjectLiveInstances[this._UID]}catch(c){}this._UID=null};var dhtmlxMenuObjectLiveInstances={};dhtmlXMenuObject.prototype.i18n={dhxmenuextalert:"dhtmlxmenu_ext.js required"};
(function(){dhtmlx.extend_api("dhtmlXMenuObject",{_init:function(b){return[b.parent,b.skin]},align:"setAlign",top_text:"setTopText",context:"renderAsContextMenu",icon_path:"setIconsPath",open_mode:"setOpenMode",rtl:"setRTL",skin:"setSkin",dynamic:"enableDynamicLoading",xml:"loadXML",items:"items",overflow:"setOverflowHeight"},{items:function(b,c){for(var a=1E5,d=null,f=0;f<b.length;f++){var e=b[f];e.type=="separator"?(this.addNewSeparator(d,a,e.id),d=e.id):(this.addNewChild(c,a,e.id,e.text,e.disabled,
e.img,e.img_disabled),d=e.id,e.items&&this.items(e.items,e.id))}}})})();
dhtmlXMenuObject.prototype._improveTerraceSkin=function(){for(var b in this.itemPull)if(this.itemPull[b].parent==this.idPrefix+this.topId&&this.idPull[b]!=null){var c=!1,a=!1;this.idPull[b].parentNode.firstChild==this.idPull[b]&&(c=!0);this.idPull[b].parentNode.lastChild==this.idPull[b]&&(a=!0);for(var d in this.itemPull)this.itemPull[d].type=="separator"&&this.itemPull[d].parent==this.idPrefix+this.topId&&(this.idPull[b].nextSibling==this.idPull["separator_"+d]&&(a=!0),this.idPull[b].previousSibling==
this.idPull["separator_"+d]&&(c=!0));this.idPull[b].style.borderLeft=c?"1px solid #cecece":"0px solid white";this.idPull[b].style.borderTopLeftRadius=this.idPull[b].style.borderBottomLeftRadius=c?"5px":"0px";this.idPull[b].style.borderTopRightRadius=this.idPull[b].style.borderBottomRightRadius=a?"5px":"0px";this.idPull[b]._bl=c;this.idPull[b]._br=a}};
dhtmlXMenuObject.prototype._improveTerraceButton=function(b,c){c?(this.idPull[b].style.borderBottomLeftRadius=this.idPull[b]._bl?"5px":"0px",this.idPull[b].style.borderBottomRightRadius=this.idPull[b]._br?"5px":"0px"):(this.idPull[b].style.borderBottomLeftRadius="0px",this.idPull[b].style.borderBottomRightRadius="0px")};
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/

View File

@ -0,0 +1,23 @@
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/
dhtmlXMenuObject.prototype.enableEffect=function(a,b,c){this._menuEffect=a=="opacity"||a=="slide"||a=="slide+"?a:!1;for(var d in this.idPull)if(d.search(/polygon/)===0)this._pOpacityApply(d,_isIE?100:1),this.idPull[d].style.height="";this._pOpMax=(typeof b=="undefined"?100:b)/(_isIE?1:100);this._pOpStyleName=_isIE?"filter":"opacity";this._pOpStyleValue=_isIE?"progid:DXImageTransform.Microsoft.Alpha(Opacity=#)":"#";this._pSlSteps=_isIE?10:20;this._pSlTMTimeMax=c||50};
dhtmlXMenuObject.prototype._showPolygonEffect=function(a){this._pShowHide(a,!0)};dhtmlXMenuObject.prototype._hidePolygonEffect=function(a){this._pShowHide(a,!1)};dhtmlXMenuObject.prototype._pOpacityApply=function(a,b){this.idPull[a].style[this._pOpStyleName]=String(this._pOpStyleValue).replace("#",b||this.idPull[a]._op)};
dhtmlXMenuObject.prototype._pShowHide=function(a,b){if(this.idPull){if(this.idPull[a]._tmShow!=null){if(this.idPull[a]._step_h>0&&b==!0||this.idPull[a]._step_h<0&&b==!1)return;window.clearTimeout(this.idPull[a]._tmShow);this.idPull[a]._tmShow=null;this.idPull[a]._max_h=null}if(!(b==!1&&(this.idPull[a].style.visibility=="hidden"||this.idPull[a].style.display=="none"))){if(b==!0&&this.idPull[a].style.display=="none")this.idPull[a].style.visibility="hidden",this.idPull[a].style.display="";if(this.idPull[a]._max_h==
null){this.idPull[a]._max_h=parseInt(this.idPull[a].offsetHeight);this.idPull[a]._h=b==!0?0:this.idPull[a]._max_h;this.idPull[a]._step_h=Math.round(this.idPull[a]._max_h/this._pSlSteps)*(b==!0?1:-1);if(this.idPull[a]._step_h==0)return;this.idPull[a]._step_tm=Math.round(this._pSlTMTimeMax/this._pSlSteps);if(this._menuEffect=="slide+"||this._menuEffect=="opacity"){this.idPull[a].op_tm=this.idPull[a]._step_tm;this.idPull[a].op_step=this._pOpMax/this._pSlSteps*(b==!0?1:-1);if(_isIE)this.idPull[a].op_step=
Math.round(this.idPull[a].op_step);this.idPull[a]._op=b==!0?0:this._pOpMax}else this.idPull[a]._op=_isIE?100:1;this._pOpacityApply(a);if(this._menuEffect.search(/slide/)===0)this.idPull[a].style.height="0px";this.idPull[a].style.visibility="visible"}this._pEffectSet(a,this.idPull[a]._h+this.idPull[a]._step_h)}}};
dhtmlXMenuObject.prototype._pEffectSet=function(a,b){if(this.idPull){this.idPull[a]._tmShow&&window.clearTimeout(this.idPull[a]._tmShow);this.idPull[a]._h=Math.max(0,Math.min(b,this.idPull[a]._max_h));if(this._menuEffect.search(/slide/)===0)this.idPull[a].style.height=this.idPull[a]._h+"px";b+=this.idPull[a]._step_h;if(this._menuEffect=="slide+"||this._menuEffect=="opacity")this.idPull[a]._op=Math.max(0,Math.min(this._pOpMax,this.idPull[a]._op+this.idPull[a].op_step)),this._pOpacityApply(a);if(this.idPull[a]._step_h>
0&&b<=this.idPull[a]._max_h||this.idPull[a]._step_h<0&&b>=0){var c=this;this.idPull[a]._tmShow=window.setTimeout(function(){c._pEffectSet(a,b)},this.idPull[a]._step_tm)}else{if(this._menuEffect.search(/slide/)===0)this.idPull[a].style.height="";if(this.idPull[a]._step_h<0)this.idPull[a].style.visibility="hidden";if(this._menuEffect=="slide+"||this._menuEffect=="opacity")this.idPull[a]._op=this.idPull[a]._step_h<0?_isIE?100:1:this._pOpMax,this._pOpacityApply(a);this.idPull[a]._tmShow=null;this.idPull[a]._h=
null;this.idPull[a]._max_h=null;this.idPull[a]._step_tm=null}}};
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/

View File

@ -0,0 +1,61 @@
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/
dhtmlXMenuObject.prototype.extendedModule="DHXMENUEXT";dhtmlXMenuObject.prototype.setItemEnabled=function(a){this._changeItemState(a,"enabled",this._getItemLevelType(a))};dhtmlXMenuObject.prototype.setItemDisabled=function(a){this._changeItemState(a,"disabled",this._getItemLevelType(a))};dhtmlXMenuObject.prototype.isItemEnabled=function(a){return this.itemPull[this.idPrefix+a]!=null?this.itemPull[this.idPrefix+a].state=="enabled":!1};
dhtmlXMenuObject.prototype._changeItemState=function(a,c,b){var d=!1,e=this.idPrefix+a;if(this.itemPull[e]!=null&&this.idPull[e]!=null&&this.itemPull[e].state!=c)this.itemPull[e].state=c,this.idPull[e].className=this.itemPull[e].parent==this.idPrefix+this.topId&&!this.context?"dhtmlxMenu_"+this.skin+"_TopLevel_Item_"+(this.itemPull[e].state=="enabled"?"Normal":"Disabled"):"sub_item"+(this.itemPull[e].state=="enabled"?"":"_dis"),this._updateItemComplexState(this.idPrefix+a,this.itemPull[this.idPrefix+
a].complex,!1),this._updateItemImage(a,b),this.idPrefix+this.menuLastClicked==e&&b!="TopLevel"&&this._redistribSubLevelSelection(e,this.itemPull[e].parent);return d};dhtmlXMenuObject.prototype.getItemText=function(a){return this.itemPull[this.idPrefix+a]!=null?this.itemPull[this.idPrefix+a].title:""};
dhtmlXMenuObject.prototype.setItemText=function(a,c){a=this.idPrefix+a;if(this.itemPull[a]!=null&&this.idPull[a]!=null)if(this._clearAndHide(),this.itemPull[a].title=c,this.itemPull[a].parent==this.idPrefix+this.topId&&!this.context){for(var b=null,d=0;d<this.idPull[a].childNodes.length;d++)try{this.idPull[a].childNodes[d].className=="top_level_text"&&(b=this.idPull[a].childNodes[d])}catch(e){}if(String(this.itemPull[a].title).length==""||this.itemPull[a].title==null)b!=null&&b.parentNode.removeChild(b);
else{if(!b)b=document.createElement("DIV"),b.className="top_level_text",this._rtl&&this.idPull[a].childNodes.length>0?this.idPull[a].insertBefore(b,this.idPull[a].childNodes[0]):this.idPull[a].appendChild(b);b.innerHTML=this.itemPull[a].title}}else{b=null;for(d=0;d<this.idPull[a].childNodes[1].childNodes.length;d++)if(String(this.idPull[a].childNodes[1].childNodes[d].className||"")=="sub_item_text")b=this.idPull[a].childNodes[1].childNodes[d];if(String(this.itemPull[a].title).length==""||this.itemPull[a].title==
null){if(b)b.parentNode.removeChild(b),b=null,this.idPull[a].childNodes[1].innerHTML="&nbsp;"}else{if(!b)b=document.createElement("DIV"),b.className="sub_item_text",this.idPull[a].childNodes[1].innerHTML="",this.idPull[a].childNodes[1].appendChild(b);b.innerHTML=this.itemPull[a].title}}};dhtmlXMenuObject.prototype.loadFromHTML=function(a,c,b){this.itemTagName="DIV";typeof a=="string"&&(a=document.getElementById(a));this._buildMenu(a,null);this.init();c&&a.parentNode.removeChild(a);b!=null&&b()};
dhtmlXMenuObject.prototype.hideItem=function(a){this._changeItemVisible(a,!1)};dhtmlXMenuObject.prototype.showItem=function(a){this._changeItemVisible(a,!0)};dhtmlXMenuObject.prototype.isItemHidden=function(a){var c=null;this.idPull[this.idPrefix+a]!=null&&(c=this.idPull[this.idPrefix+a].style.display=="none");return c};
dhtmlXMenuObject.prototype._changeItemVisible=function(a,c){var b=this.idPrefix+a;if(this.itemPull[b]!=null&&(this.itemPull[b].type=="separator"&&(b="separator_"+b),this.idPull[b]!=null))this.idPull[b].style.display=c?"":"none",this._redefineComplexState(this.itemPull[this.idPrefix+a].parent)};dhtmlXMenuObject.prototype.setUserData=function(a,c,b){this.userData[this.idPrefix+a+"_"+c]=b};
dhtmlXMenuObject.prototype.getUserData=function(a,c){return this.userData[this.idPrefix+a+"_"+c]!=null?this.userData[this.idPrefix+a+"_"+c]:null};dhtmlXMenuObject.prototype.setOpenMode=function(a){if(a=="win"||a=="web")this.menuMode=a};dhtmlXMenuObject.prototype.setWebModeTimeout=function(a){this.menuTimeoutMsec=!isNaN(a)?a:400};
dhtmlXMenuObject.prototype.enableDynamicLoading=function(a,c){this.dLoad=!0;this.dLoadUrl=a;this.dLoadSign=String(this.dLoadUrl).search(/\?/)==-1?"?":"&";this.loaderIcon=c;this.init()};
dhtmlXMenuObject.prototype._updateLoaderIcon=function(a,c){if(this.idPull[a]!=null&&!(String(this.idPull[a].className).search("TopLevel_Item")>=0)){var b=this._rtl?0:2;if(this.idPull[a].childNodes[b]&&this.idPull[a].childNodes[b].childNodes[0]){var d=this.idPull[a].childNodes[b].childNodes[0];if(String(d.className).search("complex_arrow")===0)d.className="complex_arrow"+(c?"_loading":"")}}};
dhtmlXMenuObject.prototype.getItemImage=function(a){var c=[null,null],a=this.idPrefix+a;if(this.itemPull[a].type=="item")c[0]=this.itemPull[a].imgen,c[1]=this.itemPull[a].imgdis;return c};dhtmlXMenuObject.prototype.setItemImage=function(a,c,b){if(this.itemPull[this.idPrefix+a].type=="item")this.itemPull[this.idPrefix+a].imgen=c,this.itemPull[this.idPrefix+a].imgdis=b,this._updateItemImage(a,this._getItemLevelType(a))};dhtmlXMenuObject.prototype.clearItemImage=function(a){this.setItemImage(a,"","")};
dhtmlXMenuObject.prototype.setAutoShowMode=function(a){this.contextAutoShow=a==!0?!0:!1};dhtmlXMenuObject.prototype.setAutoHideMode=function(a){this.contextAutoHide=a==!0?!0:!1};dhtmlXMenuObject.prototype.setContextMenuHideAllMode=function(a){this.contextHideAllMode=a==!0?!0:!1};dhtmlXMenuObject.prototype.getContextMenuHideAllMode=function(){return this.contextHideAllMode};
dhtmlXMenuObject.prototype.setVisibleArea=function(a,c,b,d){this._isVisibleArea=!0;this.menuX1=a;this.menuX2=c;this.menuY1=b;this.menuY2=d};dhtmlXMenuObject.prototype.setTooltip=function(a,c){a=this.idPrefix+a;if(this.itemPull[a]!=null&&this.idPull[a]!=null)this.idPull[a].title=c.length>0?c:null,this.itemPull[a].tip=c};dhtmlXMenuObject.prototype.getTooltip=function(a){return this.itemPull[this.idPrefix+a]==null?null:this.itemPull[this.idPrefix+a].tip};
dhtmlXMenuObject.prototype.setHotKey=function(a,c){a=this.idPrefix+a;if(this.itemPull[a]!=null&&this.idPull[a]!=null&&(this.itemPull[a].parent!=this.idPrefix+this.topId||this.context)&&!this.itemPull[a].complex){var b=this.itemPull[a].type;if(b=="item"||b=="checkbox"||b=="radio"){var d=null;try{if(this.idPull[a].childNodes[this._rtl?0:2].childNodes[0].className=="sub_item_hk")d=this.idPull[a].childNodes[this._rtl?0:2].childNodes[0]}catch(e){}if(c.length==0)this.itemPull[a].hotkey_backup=this.itemPull[a].hotkey,
this.itemPull[a].hotkey="",d!=null&&d.parentNode.removeChild(d);else{this.itemPull[a].hotkey=c;this.itemPull[a].hotkey_backup=null;if(d==null){d=document.createElement("DIV");d.className="sub_item_hk";for(var f=this.idPull[a].childNodes[this._rtl?0:2];f.childNodes.length>0;)f.removeChild(f.childNodes[0]);f.appendChild(d)}d.innerHTML=c}}}};dhtmlXMenuObject.prototype.getHotKey=function(a){return this.itemPull[this.idPrefix+a]==null?null:this.itemPull[this.idPrefix+a].hotkey};
dhtmlXMenuObject.prototype.setItemSelected=function(a){if(this.itemPull[this.idPrefix+a]==null)return null};dhtmlXMenuObject.prototype.setTopText=function(a){if(!this.context){if(this._topText==null)this._topText=document.createElement("DIV"),this._topText.className="dhtmlxMenu_TopLevel_Text_"+(this._rtl?"left":this._align=="left"?"right":"left"),this.base.appendChild(this._topText);this._topText.innerHTML=a}};
dhtmlXMenuObject.prototype.setAlign=function(a){if(this._align!=a&&(a=="left"||a=="right")){this._align=a;if(this.cont)this.cont.className=this._align=="right"?"align_right":"align_left";if(this._topText!=null)this._topText.className="dhtmlxMenu_TopLevel_Text_"+(this._align=="left"?"right":"left")}};dhtmlXMenuObject.prototype.setHref=function(a,c,b){if(this.itemPull[this.idPrefix+a]!=null)this.itemPull[this.idPrefix+a].href_link=c,b!=null&&(this.itemPull[this.idPrefix+a].href_target=b)};
dhtmlXMenuObject.prototype.clearHref=function(a){this.itemPull[this.idPrefix+a]!=null&&(delete this.itemPull[this.idPrefix+a].href_link,delete this.itemPull[this.idPrefix+a].href_target)};dhtmlXMenuObject.prototype.getCircuit=function(a){for(var c=Array(a);this.getParentId(a)!=this.topId;)a=this.getParentId(a),c[c.length]=a;return c.reverse()};
dhtmlXMenuObject.prototype._clearAllSelectedSubItemsInPolygon=function(a){for(var c=this._getSubItemToDeselectByPolygon(a),b=0;b<this._openedPolygons.length;b++)this._openedPolygons[b]!=a&&this._hidePolygon(this._openedPolygons[b]);for(b=0;b<c.length;b++)if(this.idPull[c[b]]!=null&&this.itemPull[c[b]].state=="enabled")this.idPull[c[b]].className="dhtmlxMenu_"+this.skin+"_SubLevelArea_Item_Normal"};
dhtmlXMenuObject.prototype._checkArrowsState=function(a){var c=this.idPull["polygon_"+a],b=this.idPull["arrowup_"+a],d=this.idPull["arrowdown_"+a];b.className=c.scrollTop==0?"dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowUp_Disabled":"dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowUp"+(b.over?"_Over":"");d.className=c.scrollTop+c.offsetHeight<c.scrollHeight?"dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown"+(d.over?"_Over":""):"dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown_Disabled"};
dhtmlXMenuObject.prototype._addUpArrow=function(a){var c=this,b=document.createElement("DIV");b.pId=this.idPrefix+a;b.id="arrowup_"+this.idPrefix+a;b.className="dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowUp";b.innerHTML="<div class='dhtmlxMenu_"+this.skin+"_SubLevelArea_Arrow'><div class='dhtmlxMenu_SubLevelArea_Arrow_Icon'></div></div>";b.style.display="none";b.over=!1;b.onselectstart=function(a){a=a||event;return a.returnValue=!1};b.oncontextmenu=function(a){a=a||event;return a.returnValue=!1};
b.onmouseover=function(){c.menuMode=="web"&&window.clearTimeout(c.menuTimeoutHandler);c._clearAllSelectedSubItemsInPolygon(this.pId);if(this.className!="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowUp_Disabled")this.className="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowUp_Over",this.over=!0,c._canScrollUp=!0,c._doScrollUp(this.pId,!0)};b.onmouseout=function(){if(c.menuMode=="web")window.clearTimeout(c.menuTimeoutHandler),c.menuTimeoutHandler=window.setTimeout(function(){c._clearAndHide()},c.menuTimeoutMsec,
"JavaScript");this.over=!1;c._canScrollUp=!1;if(this.className!="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowUp_Disabled")this.className="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowUp",window.clearTimeout(c._scrollUpTM)};b.onclick=function(a){a=a||event;a.returnValue=!1;a.cancelBubble=!0;return!1};document.body.insertBefore(b,document.body.firstChild);this.idPull[b.id]=b};
dhtmlXMenuObject.prototype._addDownArrow=function(a){var c=this,b=document.createElement("DIV");b.pId=this.idPrefix+a;b.id="arrowdown_"+this.idPrefix+a;b.className="dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown";b.innerHTML="<div class='dhtmlxMenu_"+this.skin+"_SubLevelArea_Arrow'><div class='dhtmlxMenu_SubLevelArea_Arrow_Icon'></div></div>";b.style.display="none";b.over=!1;b.onselectstart=function(a){a=a||event;return a.returnValue=!1};b.oncontextmenu=function(a){a=a||event;return a.returnValue=
!1};b.onmouseover=function(){c.menuMode=="web"&&window.clearTimeout(c.menuTimeoutHandler);c._clearAllSelectedSubItemsInPolygon(this.pId);if(this.className!="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowDown_Disabled")this.className="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowDown_Over",this.over=!0,c._canScrollDown=!0,c._doScrollDown(this.pId,!0)};b.onmouseout=function(){if(c.menuMode=="web")window.clearTimeout(c.menuTimeoutHandler),c.menuTimeoutHandler=window.setTimeout(function(){c._clearAndHide()},c.menuTimeoutMsec,
"JavaScript");this.over=!1;c._canScrollDown=!1;if(this.className!="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowDown_Disabled")this.className="dhtmlxMenu_"+c.skin+"_SubLevelArea_ArrowDown",window.clearTimeout(c._scrollDownTM)};b.onclick=function(a){a=a||event;a.returnValue=!1;a.cancelBubble=!0;return!1};document.body.insertBefore(b,document.body.firstChild);this.idPull[b.id]=b};dhtmlXMenuObject.prototype._removeUpArrow=function(a){var c="arrowup_"+this.idPrefix+a;this._removeArrow(c)};
dhtmlXMenuObject.prototype._removeDownArrow=function(a){var c="arrowdown_"+this.idPrefix+a;this._removeArrow(c)};dhtmlXMenuObject.prototype._removeArrow=function(a){var c=this.idPull[a];c.onselectstart=null;c.oncontextmenu=null;c.onmouseover=null;c.onmouseout=null;c.onclick=null;c.parentNode&&c.parentNode.removeChild(c);c=null;this.idPull[a]=null;try{delete this.idPull[a]}catch(b){}};
dhtmlXMenuObject.prototype._isArrowExists=function(a){return this.idPull["arrowup_"+a]!=null&&this.idPull["arrowdown_"+a]!=null?!0:!1};dhtmlXMenuObject.prototype._doScrollUp=function(a,c){var b=this.idPull["polygon_"+a];if(this._canScrollUp&&b.scrollTop>0){var d=!1,e=b.scrollTop-this._scrollUpTMStep;e<0&&(d=!0,e=0);b.scrollTop=e;if(!d){var f=this;this._scrollUpTM=window.setTimeout(function(){f._doScrollUp(a,!1)},this._scrollUpTMTime)}}else this._canScrollUp=!1,this._checkArrowsState(a);c&&this._checkArrowsState(a)};
dhtmlXMenuObject.prototype._doScrollDown=function(a,c){var b=this.idPull["polygon_"+a];if(this._canScrollDown&&b.scrollTop+b.offsetHeight<=b.scrollHeight){var d=!1,e=b.scrollTop+this._scrollDownTMStep;e+b.offsetHeight>b.scollHeight&&(d=!0,e=b.scollHeight-b.offsetHeight);b.scrollTop=e;if(!d){var f=this;this._scrollDownTM=window.setTimeout(function(){f._doScrollDown(a,!1)},this._scrollDownTMTime)}}else this._checkArrowsState(a);c&&this._checkArrowsState(a)};
dhtmlXMenuObject.prototype._countPolygonItems=function(a){var c=0,b;for(b in this.itemPull){var d=this.itemPull[b].parent,e=this.itemPull[b].type;d==this.idPrefix+a&&(e=="item"||e=="radio"||e=="checkbox")&&c++}return c};
dhtmlXMenuObject.prototype.setOverflowHeight=function(a){if(a==="auto")this.limit=0,this.autoOverflow=!0;else if(!(this.limit==0&&a<=0))if(this._clearAndHide(),this.limit>=0&&a>0)this.limit=a;else if(this.limit>0&&a<=0){for(var c in this.itemPull)if(this._isArrowExists(c)){var b=String(c).replace(this.idPrefix,"");this._removeUpArrow(b);this._removeDownArrow(b);this.idPull["polygon_"+c].style.height=""}this.limit=0}};
dhtmlXMenuObject.prototype._getRadioImgObj=function(a){try{var c=this.idPull[this.idPrefix+a].childNodes[this._rtl?2:0].childNodes[0]}catch(b){c=null}return c};dhtmlXMenuObject.prototype._setRadioState=function(a,c){var b=this._getRadioImgObj(a);if(b!=null){var d=this.itemPull[this.idPrefix+a];d.checked=c;d.imgen="rdbt_"+(d.checked?"1":"0");d.imgdis=d.imgen;b.className="sub_icon "+d.imgen}};
dhtmlXMenuObject.prototype._radioOnClickHandler=function(a,c,b){if(!(c.charAt(1)=="d"||this.itemPull[this.idPrefix+a].group==null)){var d=this.itemPull[this.idPrefix+a].group;this.checkEvent("onRadioClick")?this.callEvent("onRadioClick",[d,this.getRadioChecked(d),a,this.contextMenuZoneId,b])&&this.setRadioChecked(d,a):this.setRadioChecked(d,a);this.checkEvent("onClick")&&this.callEvent("onClick",[a])}};
dhtmlXMenuObject.prototype.getRadioChecked=function(a){for(var c=null,b=0;b<this.radio[a].length;b++){var d=this.radio[a][b].replace(this.idPrefix,""),e=this._getRadioImgObj(d);if(e!=null){var f=e.className.match(/rdbt_1$/gi);f!=null&&(c=d)}}return c};dhtmlXMenuObject.prototype.setRadioChecked=function(a,c){if(this.radio[a]!=null)for(var b=0;b<this.radio[a].length;b++){var d=this.radio[a][b].replace(this.idPrefix,"");this._setRadioState(d,d==c)}};
dhtmlXMenuObject.prototype.addRadioButton=function(a,c,b,d,e,f,k,i){if(!(this.context&&c==this.topId)){if(this.itemPull[this.idPrefix+c]==null)return;if(a=="child"&&this.itemPull[this.idPrefix+c].type!="item")return}var h=this.idPrefix+(d!=null?d:this._genStr(24)),g="rdbt_"+(k?"1":"0"),j=g;if(a=="sibling"){var l=this.idPrefix+this.getParentId(c);this._addItemIntoGlobalStrorage(h,l,e,"radio",i,g,j);this._renderSublevelItem(h,this.getItemPosition(c))}else l=this.idPrefix+c,this._addItemIntoGlobalStrorage(h,
l,e,"radio",i,g,j),this.idPull["polygon_"+l]==null&&this._renderSublevelPolygon(l,l),this._renderSublevelItem(h,b-1),this._redefineComplexState(l);var m=f!=null?f:this._genStr(24);this.itemPull[h].group=m;this.radio[m]==null&&(this.radio[m]=[]);this.radio[m][this.radio[m].length]=h;k==!0&&this.setRadioChecked(m,String(h).replace(this.idPrefix,""))};dhtmlXMenuObject.prototype._getCheckboxState=function(a){return this.itemPull[this.idPrefix+a]==null?null:this.itemPull[this.idPrefix+a].checked};
dhtmlXMenuObject.prototype._setCheckboxState=function(a,c){this.itemPull[this.idPrefix+a]!=null&&(this.itemPull[this.idPrefix+a].checked=c)};
dhtmlXMenuObject.prototype._updateCheckboxImage=function(a){if(this.idPull[this.idPrefix+a]!=null){this.itemPull[this.idPrefix+a].imgen="chbx_"+(this._getCheckboxState(a)?"1":"0");this.itemPull[this.idPrefix+a].imgdis=this.itemPull[this.idPrefix+a].imgen;try{this.idPull[this.idPrefix+a].childNodes[this._rtl?2:0].childNodes[0].className="sub_icon "+this.itemPull[this.idPrefix+a].imgen}catch(c){}}};
dhtmlXMenuObject.prototype._checkboxOnClickHandler=function(a,c,b){if(c.charAt(1)!="d"&&this.itemPull[this.idPrefix+a]!=null){var d=this._getCheckboxState(a);this.checkEvent("onCheckboxClick")?this.callEvent("onCheckboxClick",[a,d,this.contextMenuZoneId,b])&&this.setCheckboxState(a,!d):this.setCheckboxState(a,!d);this.checkEvent("onClick")&&this.callEvent("onClick",[a])}};dhtmlXMenuObject.prototype.setCheckboxState=function(a,c){this._setCheckboxState(a,c);this._updateCheckboxImage(a)};
dhtmlXMenuObject.prototype.getCheckboxState=function(a){return this._getCheckboxState(a)};
dhtmlXMenuObject.prototype.addCheckbox=function(a,c,b,d,e,f,k){if(!(this.context&&c==this.topId)){if(this.itemPull[this.idPrefix+c]==null)return;if(a=="child"&&this.itemPull[this.idPrefix+c].type!="item")return}var i="chbx_"+(f?"1":"0"),h=i;if(a=="sibling"){var g=this.idPrefix+(d!=null?d:this._genStr(24)),j=this.idPrefix+this.getParentId(c);this._addItemIntoGlobalStrorage(g,j,e,"checkbox",k,i,h);this.itemPull[g].checked=f;this._renderSublevelItem(g,this.getItemPosition(c))}else g=this.idPrefix+(d!=
null?d:this._genStr(24)),j=this.idPrefix+c,this._addItemIntoGlobalStrorage(g,j,e,"checkbox",k,i,h),this.itemPull[g].checked=f,this.idPull["polygon_"+j]==null&&this._renderSublevelPolygon(j,j),this._renderSublevelItem(g,b-1),this._redefineComplexState(j)};
dhtmlXMenuObject.prototype._readLevel=function(a){var c="",b;for(b in this.itemPull)if(this.itemPull[b].parent==a){var d="",e="",f="",k=String(this.itemPull[b].id).replace(this.idPrefix,""),i="",h=this.itemPull[b].title!=""?' text="'+this.itemPull[b].title+'"':"",g="";this.itemPull[b].type=="item"&&(this.itemPull[b].imgen!=""&&(d=' img="'+this.itemPull[b].imgen+'"'),this.itemPull[b].imgdis!=""&&(e=' imgdis="'+this.itemPull[b].imgdis+'"'),this.itemPull[b].hotkey!=""&&(f="<hotkey>"+this.itemPull[b].hotkey+
"</hotkey>"));this.itemPull[b].type=="separator"?i=' type="separator"':this.itemPull[b].state=="disabled"&&(g=' enabled="false"');this.itemPull[b].type=="checkbox"&&(i=' type="checkbox"'+(this.itemPull[b].checked?' checked="true"':""));this.itemPull[b].type=="radio"&&(i=' type="radio" group="'+this.itemPull[b].group+'" '+(this.itemPull[b].checked?' checked="true"':""));c+="<item id='"+k+"'"+h+i+d+e+g+">";c+=f;this.itemPull[b].complex&&(c+=this._readLevel(b));c+="</item>"}return c};
dhtmlXMenuObject.prototype.serialize=function(){var a="<menu>"+this._readLevel(this.idPrefix+this.topId)+"</menu>";return a};
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You allowed to use this component or parts of it under GPL terms
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,342 @@
/*
"DHX SKYBLUE" DHTMLXMENU SKIN 2009
*/
/****************************************************************************************************************************************************/
/* TOPLEVEL */
.dhtmlxMenu_dhx_black_Middle {
position: relative;
height: 24px;
border: none;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_bg.gif");
background-position: top;
background-repeat: repeat-x;
-moz-user-select: none;
}
.dhtmlxMenu_dhx_black_Middle.dir_left div.align_left {
float: left;
}
.dhtmlxMenu_dhx_black_Middle.dir_left div.align_right {
float: right;
}
/****************************************************************************************************************************************************/
/* TOPLEVEL ITEMS */
/* toplevel item normal */
div.dhtmlxMenu_dhx_black_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_black_TopLevel_Item_Disabled,
div.dhtmlxMenu_dhx_black_TopLevel_Item_Selected {
position: relative;
float: left;
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
cursor: default;
white-space: nowrap;
-moz-user-select: none;
height: 20px;
line-height: 20px;
vertical-align: middle;
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
border: transparent 1px solid;
padding-left: 4px;
padding-right: 4px;
background: none;
color: #ffffff;
}
div.dhtmlxMenu_dhx_black_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_black_TopLevel_Item_Disabled {
#border-color: #000000;
#filter:progid:DXImageTransform.Microsoft.Chroma(color='#000000');
}
/* toplevel item disabled */
div.dhtmlxMenu_dhx_black_TopLevel_Item_Disabled {
color: #999999 !important;
}
/* toplevel item selected (over) */
div.dhtmlxMenu_dhx_black_TopLevel_Item_Selected {
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_bg.gif");
background-repeat: repeat-x;
background-position: top;
border-top: #000000 1px solid;
border-left: #000000 1px solid;
border-right: #909090 1px solid;
border-bottom: #909090 1px solid;
}
/* toplevel separator */
.dhtmlxMenu_dhx_black_Middle div.top_sep {
font-size: 1px;
cursor: default;
-moz-user-select: none;
background-color: #959595;
height: 22px;
position: relative;
float: left;
width: 1px;
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
}
/* top level image */
.dhtmlxMenu_dhx_black_Middle img.dhtmlxMenu_TopLevel_Item_Icon {
float: left;
margin: 2px 2px 0px 2px;
width: 18px;
height: 18px;
}
/* top level text*/
div.dhtmlxMenu_dhx_black_TopLevel_Item_Normal div.top_level_text,
div.dhtmlxMenu_dhx_black_TopLevel_Item_Disabled div.top_level_text,
div.dhtmlxMenu_dhx_black_TopLevel_Item_Selected div.top_level_text {
float: left;
margin-left: 2px;
margin-right: 2px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL POLYGON */
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon {
position: absolute;
background-color: #585757;
border: #8C8B8B 1px solid;
overflow: hidden;
}
/* IE6 sublevel undercover fix */
iframe.dhtmlxMenu_IE6CoverFix_dhx_black {
position: absolute;
border: none;
background: #000000;
filter: alpha(opacity=100);
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ITEMS */
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl {
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected {
height: 24px;
cursor: default;
background-color: #3d3d3d;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon {
width: 24px;
text-align: left;
-moz-user-select: none;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon img.sub_icon {
width: 18px;
height: 18px;
margin-top: 2px;
margin-right: 0px;
margin-left: 6px;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_text {
vertical-align: middle;
padding-left: 4px;
padding-right: 4px;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_item_text {
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
color: #ffffff;
white-space: nowrap;
text-align: left;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_item_text {
color: #888787 !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk {
padding-left: 8px;
padding-right: 8px;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk div.sub_item_hk {
font-family: Tahoma;
font-size: 11px;
color: #cecece;
text-align: right;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis td.sub_item_hk div.sub_item_hk {
color: #888787 !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon tr.sub_sep {
height: 3px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon div.sub_sep {
font-size: 1px;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_subsepbg.gif");
background-repeat: repeat-x;
background-position: center center;
cursor: default;
height: 3px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ARROWS */
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.complex_arrow {
width: 4px;
height: 24px;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_subar.gif");
background-repeat: no-repeat;
background-position: 0px 0px;
float: right;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected div.complex_arrow {
background-position: -4px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.complex_arrow {
background-position: -8px 0px !important;
}
/****************************************************************************************************************************************************/
/* LOADING ICON */
div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
position: absolute;
width: 11px;
height: 11px;
background-position: center top;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_loader.gif");
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon_left div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
top: 6px;
left: none;
right: 6px;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon_right div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
top: 6px;
right: none;
left: 6px;
_right: -38px;
}
/****************************************************************************************************************************************************/
/* UP/DOWN OVERFLOW ARROWS */
div.dhtmlxMenu_dhx_black_SubLevelArea_Arrow {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
background-color: #eaf2fb;
text-align: center;
overflow: hidden;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Arrow div.dhtmlxMenu_SubLevelArea_Arrow_Icon {
position: relative;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
width: 9px;
height: 5px;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_upar.gif");
}
/* up arrows */
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowUp,
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowUp_Over,
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowUp_Disabled {
position: absolute;
height: 16px;
height= 18px;
padding: 1px 1px 0px 1px;
font-size: 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-bottom: none;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowUp div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -27px 0px; }
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowUp_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -36px 0px; }
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowUp_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -45px 0px; }
/* down arrows */
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowDown,
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowDown_Over,
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowDown_Disabled {
position: absolute;
height: 16px;
height= 18px;
font-size: 1px;
padding: 1px 1px 0px 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-top: none;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowDown div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: 0px 0px; }
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowDown_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -9px 0px; }
div.dhtmlxMenu_dhx_black_SubLevelArea_ArrowDown_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -18px 0px; }
/****************************************************************************************************************************************************/
/* TOPLEVEL TEXT */
.dhtmlxMenu_dhx_black_Middle div.dhtmlxMenu_TopLevel_Text_right {
position: absolute;
top: 5px;
left: none;
right: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
.dhtmlxMenu_dhx_black_Middle div.dhtmlxMenu_TopLevel_Text_left {
position: absolute;
top: 5px;
right: none;
left: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
/****************************************************************************************************************************************************/
/* ITEM'S CHECKS, RADIOS */
/* sublevel */
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon {
float: left;
margin: 0px 2px 0px 2px;
width: 18px;
height: 18px;
background-position: top right;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_black/dhtmlxmenu_chrd.gif");
}
/* checkboxes */
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_0 {
background-position: 0px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_1 {
background-position: -18px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_0 {
background-position: -36px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_1 {
background-position: -54px 0px !important;
}
/* radios */
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_0 {
background-position: -72px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_1 {
background-position: -90px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_0 {
background-position: -108px 0px !important;
}
div.dhtmlxMenu_dhx_black_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_1 {
background-position: -126px 0px !important;
}

View File

@ -0,0 +1,342 @@
/*
"DHX SKYBLUE" DHTMLXMENU SKIN 2009
*/
/****************************************************************************************************************************************************/
/* TOPLEVEL */
.dhtmlxMenu_dhx_blue_Middle {
position: relative;
height: 24px;
border: none;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_bg.gif");
background-position: top;
background-repeat: repeat-x;
-moz-user-select: none;
}
.dhtmlxMenu_dhx_blue_Middle.dir_left div.align_left {
float: left;
}
.dhtmlxMenu_dhx_blue_Middle.dir_left div.align_right {
float: right;
}
/****************************************************************************************************************************************************/
/* TOPLEVEL ITEMS */
/* toplevel item normal */
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Disabled,
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Selected {
position: relative;
float: left;
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
cursor: default;
white-space: nowrap;
-moz-user-select: none;
height: 20px;
line-height: 20px;
vertical-align: middle;
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
padding-left: 4px;
padding-right: 4px;
border: transparent 1px solid;
aborder-top: #e8f0f4 1px solid;
aborder-bottom: #d2e3ea 1px solid;
background: none;
color: #000000;
}
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Disabled {
#border-color: #FFFFFF;
#filter:progid:DXImageTransform.Microsoft.Chroma(color='#FFFFFF');
}
/* toplevel item disabled */
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Disabled {
color: #999999 !important;
}
/* toplevel item selected (over) */
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Selected {
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_bg.gif");
background-repeat: repeat-x;
background-position: top;
border-top: #C2D5DC 1px solid;
border-left: #C2D5DC 1px solid;
border-right: #FFFFFF 1px solid;
border-bottom: #FFFFFF 1px solid;
}
/* toplevel separator */
.dhtmlxMenu_dhx_blue_Middle div.top_sep {
font-size: 1px;
cursor: default;
-moz-user-select: none;
background-color: #c2d5dc;
height: 22px;
position: relative;
float: left;
width: 1px;
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
}
/* top level image */
.dhtmlxMenu_dhx_blue_Middle img.dhtmlxMenu_TopLevel_Item_Icon {
float: left;
margin: 2px 2px 0px 2px;
width: 18px;
height: 18px;
}
/* top level text*/
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Normal div.top_level_text,
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Disabled div.top_level_text,
div.dhtmlxMenu_dhx_blue_TopLevel_Item_Selected div.top_level_text {
float: left;
margin-left: 2px;
margin-right: 2px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL POLYGON */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon {
position: absolute;
background-color: #E8F0F4;
border: #C2D5DC 1px solid;
overflow: hidden;
}
/* IE6 sublevel undercover fix */
iframe.dhtmlxMenu_IE6CoverFix_dhx_blue {
position: absolute;
border: none;
background: #000000;
filter: alpha(opacity=100);
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ITEMS */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl {
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected {
height: 24px;
cursor: default;
background-color: #d3e2e5;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon {
width: 24px;
text-align: left;
-moz-user-select: none;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon img.sub_icon {
width: 18px;
height: 18px;
margin-top: 2px;
margin-right: 0px;
margin-left: 6px;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_text {
vertical-align: middle;
padding-left: 4px;
padding-right: 4px;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_item_text {
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
color: #000000;
white-space: nowrap;
text-align: left;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_item_text {
color: #999999 !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk {
padding-left: 8px;
padding-right: 8px;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk div.sub_item_hk {
font-family: Tahoma;
font-size: 11px;
color: #333333;
text-align: right;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis td.sub_item_hk div.sub_item_hk {
color: #cecece !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon tr.sub_sep {
height: 3px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon div.sub_sep {
font-size: 1px;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_subsepbg.gif");
background-repeat: repeat-x;
background-position: center center;
cursor: default;
height: 3px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ARROWS */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.complex_arrow {
width: 4px;
height: 24px;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_subar.gif");
background-repeat: no-repeat;
background-position: 0px 0px;
float: right;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected div.complex_arrow {
background-position: -4px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.complex_arrow {
background-position: -8px 0px !important;
}
/****************************************************************************************************************************************************/
/* LOADING ICON */
div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
position: absolute;
width: 11px;
height: 11px;
background-position: center top;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_loader.gif");
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon_left div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
top: 6px;
left: none;
right: 6px;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon_right div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
top: 6px;
right: none;
left: 6px;
_right: -38px;
}
/****************************************************************************************************************************************************/
/* UP/DOWN OVERFLOW ARROWS */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Arrow {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
background-color: #eaf2fb;
text-align: center;
overflow: hidden;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Arrow div.dhtmlxMenu_SubLevelArea_Arrow_Icon {
position: relative;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
width: 9px;
height: 5px;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_upar.gif");
}
/* up arrows */
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowUp,
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowUp_Over,
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowUp_Disabled {
position: absolute;
height: 16px;
height= 18px;
padding: 1px 1px 0px 1px;
font-size: 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-bottom: none;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowUp div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -27px 0px; }
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowUp_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -36px 0px; }
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowUp_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -45px 0px; }
/* down arrows */
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowDown,
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowDown_Over,
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowDown_Disabled {
position: absolute;
height: 16px;
height= 18px;
font-size: 1px;
padding: 1px 1px 0px 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-top: none;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowDown div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: 0px 0px; }
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowDown_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -9px 0px; }
div.dhtmlxMenu_dhx_blue_SubLevelArea_ArrowDown_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -18px 0px; }
/****************************************************************************************************************************************************/
/* TOPLEVEL TEXT */
.dhtmlxMenu_dhx_blue_Middle div.dhtmlxMenu_TopLevel_Text_right {
position: absolute;
top: 5px;
left: none;
right: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
.dhtmlxMenu_dhx_blue_Middle div.dhtmlxMenu_TopLevel_Text_left {
position: absolute;
top: 5px;
right: none;
left: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
/****************************************************************************************************************************************************/
/* ITEM'S CHECKS, RADIOS */
/* sublevel */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon {
float: left;
margin: 0px 2px 0px 2px;
width: 18px;
height: 18px;
background-position: top right;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_blue/dhtmlxmenu_chrd.gif");
}
/* checkboxes */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_0 {
background-position: 0px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_1 {
background-position: -18px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_0 {
background-position: -36px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_1 {
background-position: -54px 0px !important;
}
/* radios */
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_0 {
background-position: -72px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_1 {
background-position: -90px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_0 {
background-position: -108px 0px !important;
}
div.dhtmlxMenu_dhx_blue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_1 {
background-position: -126px 0px !important;
}

View File

@ -0,0 +1,347 @@
/*
"DHX SKYBLUE" DHTMLXMENU SKIN 2009
*/
/****************************************************************************************************************************************************/
/* TOPLEVEL */
.dhtmlxMenu_dhx_skyblue_Middle {
position: relative;
height: 24px;
border: none;
background-color: #ebebeb;
-moz-user-select: none;
}
.dhtmlxMenu_dhx_skyblue_Layout, .dhtmlxMenu_dhx_skyblue_Accordion {
border-bottom: #cedce8 1px solid;
}
.dhtmlxMenu_dhx_skyblue_Middle.in_acccell, .dhtmlxMenu_dhx_skyblue_Middle.in_layoutcell {
height: 25px;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhxmenu_bg_acccell.gif");
background-position: top;
background-repeat: repeat-x;
}
.dhtmlxMenu_dhx_skyblue_Middle.dir_left div.align_left {
float: left;
}
.dhtmlxMenu_dhx_skyblue_Middle.dir_left div.align_right {
float: right;
}
/****************************************************************************************************************************************************/
/* TOPLEVEL ITEMS */
/* toplevel item normal */
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Disabled,
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Selected {
position: relative;
float: left;
font-family: Tahoma;
font-size: 11px;
font-weight: normal;
cursor: default;
white-space: nowrap;
-moz-user-select: none;
height: 22px;
line-height: 22px;
vertical-align: middle;
margin-top: 1px;
margin-left: 0px;
margin-right: 2px;
padding-left: 4px;
padding-right: 4px;
border-left: #ebebeb 1px solid;
border-right: #ebebeb 1px solid;
background: none;
color: #000000;
}
/* toplevel item disabled */
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Disabled {
color: #999999 !important;
}
/* toplevel item selected (over) */
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Selected {
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhxmenu_topselbg.gif") !important;
background-repeat: repeat-x !important;
background-position: top !important;
border-left: #ffb951 1px solid !important;
border-right: #ffb951 1px solid !important;
}
/* toplevel separator */
.dhtmlxMenu_dhx_skyblue_Middle div.top_sep {
font-size: 1px;
cursor: default;
-moz-user-select: none;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhxmenu_topsepbg.gif");
background-repeat: no-repeat;
background-position: top center;
height: 24px;
position: relative;
float: left;
width: 3px;
margin-left: 0px;
margin-right: 2px;
}
/* top level image */
.dhtmlxMenu_dhx_skyblue_Middle img.dhtmlxMenu_TopLevel_Item_Icon {
float: left;
margin: 2px 2px 0px 2px;
width: 18px;
height: 18px;
}
/* top level text*/
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Normal div.top_level_text,
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Disabled div.top_level_text,
div.dhtmlxMenu_dhx_skyblue_TopLevel_Item_Selected div.top_level_text {
float: left;
margin-left: 2px;
margin-right: 2px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL POLYGON */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon {
position: absolute;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
overflow: hidden;
padding-top: 1px;
padding-bottom: 1px;
}
/* IE6 sublevel undercover fix */
iframe.dhtmlxMenu_IE6CoverFix_dhx_skyblue {
position: absolute;
border: none;
background: #000000;
filter: alpha(opacity=100);
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ITEMS */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl {
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected {
height: 24px;
cursor: default;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected td {
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhxmenu_subselbg.gif") !important;
background-repeat: repeat-x;
background-position: top;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon {
width: 24px;
text-align: left;
-moz-user-select: none;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon img.sub_icon {
width: 18px;
height: 18px;
margin-top: 2px;
margin-right: 0px;
margin-left: 6px;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_text {
vertical-align: middle;
padding-left: 4px;
padding-right: 4px;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_item_text {
font-family: Tahoma;
font-size: 11px;
font-weight: normal;
color: #000000;
white-space: nowrap;
text-align: left;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_item_text {
color: #999999 !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk {
padding-left: 8px;
padding-right: 8px;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk div.sub_item_hk {
font-family: Tahoma;
font-size: 10px;
color: #4985b7;
text-align: right;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis td.sub_item_hk div.sub_item_hk {
color: #cecece !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon tr.sub_sep {
height: 3px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon div.sub_sep {
font-size: 1px;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhxmenu_subsepbg.gif");
background-repeat: repeat-x;
background-position: top;
cursor: default;
height: 3px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ARROWS */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.complex_arrow {
width: 4px;
height: 24px;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhtmlxmenu_subar.gif");
background-repeat: no-repeat;
background-position: 0px 0px;
float: right;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected div.complex_arrow {
background-position: -4px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.complex_arrow {
background-position: -8px 0px !important;
}
/****************************************************************************************************************************************************/
/* LOADING ICON */
div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
position: absolute;
width: 11px;
height: 11px;
background-position: center top;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhtmlxmenu_loader.gif");
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon_left div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
top: 6px;
left: none;
right: 6px;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon_right div.dhtmlxMenu_SubLevelArea_Item_Arrow_Loading {
top: 6px;
right: none;
left: 6px;
_right: -38px;
}
/****************************************************************************************************************************************************/
/* UP/DOWN OVERFLOW ARROWS */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Arrow {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
background-color: #eaf2fb;
text-align: center;
overflow: hidden;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Arrow div.dhtmlxMenu_SubLevelArea_Arrow_Icon {
position: relative;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
width: 9px;
height: 5px;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhtmlxmenu_upar.gif");
}
/* up arrows */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowUp,
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowUp_Over,
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowUp_Disabled {
position: absolute;
height: 16px;
height= 18px;
padding: 1px 1px 0px 1px;
font-size: 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-bottom: none;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowUp div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -27px 0px; }
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowUp_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -36px 0px; }
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowUp_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -45px 0px; }
/* down arrows */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowDown,
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowDown_Over,
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowDown_Disabled {
position: absolute;
height: 16px;
height= 18px;
font-size: 1px;
padding: 1px 1px 0px 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-top: none;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowDown div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: 0px 0px; }
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowDown_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -9px 0px; }
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_ArrowDown_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -18px 0px; }
/****************************************************************************************************************************************************/
/* TOPLEVEL TEXT */
.dhtmlxMenu_dhx_skyblue_Middle div.dhtmlxMenu_TopLevel_Text_right {
position: absolute;
top: 5px;
left: none;
right: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
.dhtmlxMenu_dhx_skyblue_Middle div.dhtmlxMenu_TopLevel_Text_left {
position: absolute;
top: 5px;
right: none;
left: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
/****************************************************************************************************************************************************/
/* ITEM'S CHECKS, RADIOS */
/* sublevel */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon {
float: left;
margin: 0px 2px 0px 2px;
width: 18px;
height: 18px;
background-position: top right;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_skyblue/dhtmlxmenu_chrd.gif");
}
/* checkboxes */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_0 {
background-position: 0px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_1 {
background-position: -18px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_0 {
background-position: -36px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_1 {
background-position: -54px 0px !important;
}
/* radios */
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_0 {
background-position: -72px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_1 {
background-position: -90px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_0 {
background-position: -108px 0px !important;
}
div.dhtmlxMenu_dhx_skyblue_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_1 {
background-position: -126px 0px !important;
}

View File

@ -0,0 +1,356 @@
/*
"dhx_terrace" DHTMLXMENU SKIN 20012/05
*/
/****************************************************************************************************************************************************/
/* TOPLEVEL */
.dhtmlxMenu_dhx_terrace_Middle {
position: relative;
height: 32px;
border: none;
/*border-left: #cecece 1px solid;*/
-moz-user-select: none;
/*
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
*/
}
/*
.dhtmlxMenu_dhx_terrace_Layout, .dhtmlxMenu_dhx_terrace_Accordion {
border-bottom: #cedce8 1px solid;
}
.dhtmlxMenu_dhx_terrace_Middle.in_acccell, .dhtmlxMenu_dhx_terrace_Middle.in_layoutcell {
height: 25px;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhxmenu_bg_acccell.gif");
background-position: top;
background-repeat: repeat-x;
}
*/
.dhtmlxMenu_dhx_terrace_Middle.dir_left div.align_left {
float: left;
}
.dhtmlxMenu_dhx_terrace_Middle.dir_left div.align_right {
float: right;
}
/****************************************************************************************************************************************************/
/* TOPLEVEL ITEMS */
/* toplevel item normal */
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Disabled,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Selected {
position: relative;
float: left;
font-family: Arial;
font-size: 12px;
font-weight: normal;
cursor: default;
white-space: nowrap;
-moz-user-select: none;
height: 32px;
line-height: 32px;
vertical-align: middle;
margin: 0px;
padding-left: 12px;
padding-right: 12px;
aborder-left: #cecece 1px solid;
border-right: #cecece 1px solid;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhxmenu_bg_item.gif");
background-repeat: repeat-x;
color: #2f2f2f;
}
/*
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Normal:last-child,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Disabled:last-child,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Selected:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Normal:first-child,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Disabled:first-child,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Selected:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
*/
/* toplevel item disabled */
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Disabled {
color: #999999 !important;
}
/* toplevel item selected (over) */
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Selected {
background-image: url("../imgs/dhxmenu_dhx_terrace/dhxmenu_bg_item_sel.gif");
}
/* toplevel separator */
.dhtmlxMenu_dhx_terrace_Middle div.top_sep {
font-size: 1px;
cursor: default;
-moz-user-select: none;
height: 32px;
position: relative;
float: left;
width: 14px;
/*border-right: #cecece 1px solid;*/
}
/* top level image */
.dhtmlxMenu_dhx_terrace_Middle img.dhtmlxMenu_TopLevel_Item_Icon {
float: left;
margin: 7px 6px 0px 0px;
width: 18px;
height: 18px;
}
/* top level text*/
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Normal div.top_level_text,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Disabled div.top_level_text,
div.dhtmlxMenu_dhx_terrace_TopLevel_Item_Selected div.top_level_text {
float: left;
margin-left: 2px;
margin-right: 2px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL POLYGON */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon {
position: absolute;
background-color: #ffffff;
border: #c0c0c0 1px solid;
overflow: hidden;
padding-top: 7px;
padding-bottom: 5px;
box-shadow: 1px 1px 6px #909090;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top-right-radius: 5px;
filter:progid:DXImageTransform.Microsoft.Shadow(color=#a0a0a0,direction=135,strength=3);
}
/* IE6 sublevel undercover fix */
iframe.dhtmlxMenu_IE6CoverFix_dhx_terrace {
position: absolute;
border: none;
background: #000000;
filter: alpha(opacity=100);
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ITEMS */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl {
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item {
height: 26px;
cursor: default;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis {
height: 26px;
cursor: default;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected {
height: 26px;
cursor: default;
background-color: #f0ede7;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon {
width: 35px;
text-align: left;
-moz-user-select: none;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon img.sub_icon {
width: 18px;
height: 18px;
margin-top: 2px;
margin-right: 0px;
margin-left: 12px;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_text {
vertical-align: middle;
padding-left: 4px;
padding-right: 4px;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_item_text {
font-family: Arial;
font-size: 13px;
font-weight: normal;
color: #2f2f2f;
white-space: nowrap;
text-align: left;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_item_text {
color: #999999 !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk {
padding-left: 12px;
padding-right: 16px;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk div.sub_item_hk {
padding-top: 1px;
font-family: Arial;
font-size: 11px;
color: #747473;
text-align: right;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis td.sub_item_hk div.sub_item_hk {
color: #cecece !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon tr.sub_sep {
height: 5px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon div.sub_sep {
font-size: 1px;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhxmenu_bg_subsep.gif");
background-repeat: repeat-x;
background-position: top;
cursor: default;
height: 5px;
overflow: hidden;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ARROWS */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.complex_arrow {
width: 5px;
height: 26px;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhtmlxmenu_subar.gif");
background-repeat: no-repeat;
background-position: 0px 0px;
float: right;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected div.complex_arrow {
background-position: -5px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.complex_arrow {
background-position: -10px 0px !important;
}
/****************************************************************************************************************************************************/
/* LOADING ICON */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected div.complex_arrow_loading {
aposition: absolute;
width: 16px;
height: 16px;
background-position: center top;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhtmlxmenu_loader.gif");
top: 0px;
left: none;
right: 0px;
}
/****************************************************************************************************************************************************/
/* UP/DOWN OVERFLOW ARROWS */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Arrow {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
background-color: #eaf2fb;
text-align: center;
overflow: hidden;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Arrow div.dhtmlxMenu_SubLevelArea_Arrow_Icon {
position: relative;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
width: 9px;
height: 5px;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhtmlxmenu_upar.gif");
}
/* up arrows */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowUp,
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowUp_Over,
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowUp_Disabled {
position: absolute;
height: 16px;
height= 18px;
padding: 1px 1px 0px 1px;
font-size: 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-bottom: none;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowUp div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -27px 0px; }
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowUp_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -36px 0px; }
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowUp_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -45px 0px; }
/* down arrows */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowDown,
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowDown_Over,
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowDown_Disabled {
position: absolute;
height: 16px;
height= 18px;
font-size: 1px;
padding: 1px 1px 0px 1px;
background-color: #eaf2fb;
border: #a4bed4 1px solid;
border-top: none;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowDown div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: 0px 0px; }
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowDown_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -9px 0px; }
div.dhtmlxMenu_dhx_terrace_SubLevelArea_ArrowDown_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -18px 0px; }
/****************************************************************************************************************************************************/
/* TOPLEVEL TEXT */
.dhtmlxMenu_dhx_terrace_Middle div.dhtmlxMenu_TopLevel_Text_right {
position: absolute;
top: 5px;
left: none;
right: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
.dhtmlxMenu_dhx_terrace_Middle div.dhtmlxMenu_TopLevel_Text_left {
position: absolute;
top: 5px;
right: none;
left: 8px;
font-family: Tahoma;
font-size: 11px;
color: #000000;
cursor: default;
}
/****************************************************************************************************************************************************/
/* ITEM'S CHECKS, RADIOS */
/* sublevel */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon {
float: left;
margin-left: 12px;
width: 18px;
height: 18px;
background-position: top right;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_terrace/dhtmlxmenu_chrd.gif");
}
/* checkboxes */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_0 {
background-position: 0px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_1 {
background-position: -18px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_0 {
background-position: -36px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_1 {
background-position: -54px 0px !important;
}
/* radios */
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_0 {
background-position: -72px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_1 {
background-position: -90px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_0 {
background-position: -108px 0px !important;
}
div.dhtmlxMenu_dhx_terrace_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_1 {
background-position: -126px 0px !important;
}

View File

@ -0,0 +1,364 @@
/*
"DHX SKYBLUE" DHTMLXMENU SKIN 2009
*/
/****************************************************************************************************************************************************/
/* TOPLEVEL */
.dhtmlxMenu_dhx_web_Middle {
position: relative;
height: 20px;
border: none;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_topbg.gif");
background-position: top;
background-repeat: repeat-x;
-moz-user-select: none;
padding: 0px 7px;
}
.dhtmlx_winviewport.dhtmlx_skin_dhx_web div.dhtmlxMenu_dhx_web_Middle,
.dhxlayout_fullscreened div.dhtmlxMenu_dhx_web_Middle,
.dhx_tabbar_zone.dhx_tabbar_zone_dhx_web div.dhtmlxMenu_dhx_web_Middle,
.dhx_acc_base_dhx_web div.dhtmlxMenu_dhx_web_Middle,
.dhtmlx_skin_dhx_web div.dhtmlx_window_active div.dhtmlxMenu_dhx_web_Middle,
.dhtmlx_skin_dhx_web div.dhtmlx_window_inactive div.dhtmlxMenu_dhx_web_Middle,
table.dhtmlxLayoutPolyContainer_dhx_web td.dhtmlxLayoutSinglePoly div.dhtmlxMenu_dhx_web_Middle {
height: 29px !important;
}
.dhtmlxMenu_dhx_web_Middle.dir_left div.align_left {
float: left;
}
.dhtmlxMenu_dhx_web_Middle.dir_left div.align_right {
float: right;
}
/* menu in window, layout, accordion have bottom margin 9px */
/*
.dhtmlx_skin_dhx_web div.dhtmlx_wins_body_inner div.dhtmlxMenu_dhx_web_Middle,
table.dhtmlxLayoutPolyContainer_dhx_web td.dhtmlxLayoutSinglePoly div.dhtmlxMenu_dhx_web_Middle {
height: 27px !important;
}
.dhtmlxMenu_dhx_web_Layout, .dhtmlxMenu_dhx_web_Accordion {
border-bottom: #cedce8 1px solid;
}
.dhtmlxMenu_dhx_web_Middle.in_acccell, .dhtmlxMenu_dhx_web_Middle.in_layoutcell {
height: 27px;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_bg_acccell.gif");
background-position: top;
background-repeat: repeat-x;
}
*/
/****************************************************************************************************************************************************/
/* TOPLEVEL ITEMS */
/* toplevel item normal */
div.dhtmlxMenu_dhx_web_TopLevel_Item_Normal,
div.dhtmlxMenu_dhx_web_TopLevel_Item_Disabled,
div.dhtmlxMenu_dhx_web_TopLevel_Item_Selected {
position: relative;
float: left;
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
cursor: default;
white-space: nowrap;
-moz-user-select: none;
height: 20px;
line-height: 20px;
vertical-align: middle;
margin: 0px 2px 100px 0px;
padding: 0px 5px;
color: #000000;
}
div.dhtmlxMenu_dhx_web_TopLevel_Item_Normal {
border-left: #ececec 1px solid !important;
border-right: #ececec 1px solid !important;
/*
background-image:url("../imgs/dhxmenu_dhx_web/dhxmenu_topsepbg.gif");
background-position:right center;
background-repeat:no-repeat;
*/
}
/* toplevel item disabled */
div.dhtmlxMenu_dhx_web_TopLevel_Item_Disabled {
color: #999999 !important;
}
/* toplevel item selected (over) */
div.dhtmlxMenu_dhx_web_TopLevel_Item_Selected {
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_topselbg.gif");
background-repeat: repeat-x;
border-left: #ffffff 1px solid !important;
border-right: #ffffff 1px solid !important;
}
/* toplevel separator */
.dhtmlxMenu_dhx_web_Middle div.top_sep {
font-size: 1px;
cursor: default;
-moz-user-select: none;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_topsepbg.gif");
background-repeat: no-repeat;
background-position: top center;
height: 20px;
position: relative;
float: left;
width: 3px;
margin-left: 0px;
margin-right: 2px;
}
/* top level image */
.dhtmlxMenu_dhx_web_Middle img.dhtmlxMenu_TopLevel_Item_Icon {
float: left;
margin: 2px 2px 0px 2px;
width: 16px;
height: 16px;
}
/* top level text*/
div.dhtmlxMenu_dhx_web_TopLevel_Item_Normal div.top_level_text,
div.dhtmlxMenu_dhx_web_TopLevel_Item_Disabled div.top_level_text,
div.dhtmlxMenu_dhx_web_TopLevel_Item_Selected div.top_level_text {
float: left;
margin-left: 2px;
margin-right: 2px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL POLYGON */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon {
position: absolute;
background-color: #ececec;
border: #ffffff 1px solid;
overflow: hidden;
padding-top: 1px;
padding-bottom: 1px;
box-shadow: 2px 3px 13px #666666;
-moz-box-shadow: 2px 3px 13px #666666;
-webkit-box-shadow: 2px 3px 13px #666666;
-khtml-box-shadow: 2px 3px 13px #666666;
filter:progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3);
-moz-user-select: none;
}
/* IE6 sublevel undercover fix */
iframe.dhtmlxMenu_IE6CoverFix_dhx_web {
position: absolute;
border: none;
background: #000000;
filter: alpha(opacity=100);
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ITEMS */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl {
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item {
height: 28px;
cursor: default;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis {
height: 28px;
cursor: default;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected {
height: 28px;
cursor: default;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_subselbg.gif");
background-repeat: repeat-x;
background-position: top;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon {
width: 24px;
text-align: left;
-moz-user-select: none;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_icon img.sub_icon {
width: 18px;
height: 18px;
margin-top: 4px;
margin-right: 0px;
margin-left: 6px;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_text {
vertical-align: middle;
padding-left: 4px;
padding-right: 4px;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_item_text {
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
color: #000000;
white-space: nowrap;
text-align: left;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_item_text {
color: #999999 !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk {
padding-left: 8px;
padding-right: 8px;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl td.sub_item_hk div.sub_item_hk {
font-family: Tahoma;
font-size: 10px;
color: #a4bed4;
text-align: right;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected td.sub_item_hk div.sub_item_hk {
color: #999999;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis td.sub_item_hk div.sub_item_hk {
color: #cecece !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon tr.sub_sep {
height: 3px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon div.sub_sep {
font-size: 1px;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_subsepbg.gif");
background-repeat: repeat-x;
background-position: top;
cursor: default;
height: 3px;
}
/****************************************************************************************************************************************************/
/* SUBLEVEL ARROWS */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.complex_arrow {
width: 7px;
height: 24px;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_subar.gif");
background-repeat: no-repeat;
background-position: 0px 0px;
float: right;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_selected div.complex_arrow {
background-position: -7px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.complex_arrow {
background-position: -14px 0px !important;
}
/****************************************************************************************************************************************************/
/* LOADING ICON */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.complex_arrow_loading {
width: 7px;
height: 24px;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_loader.gif");
background-repeat: no-repeat;
background-position: center center;
float: right;
}
/****************************************************************************************************************************************************/
/* UP/DOWN OVERFLOW ARROWS */
div.dhtmlxMenu_dhx_web_SubLevelArea_Arrow {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
text-align: center;
overflow: hidden;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Arrow div.dhtmlxMenu_SubLevelArea_Arrow_Icon {
position: relative;
margin-top: 6px;
margin-left: auto;
margin-right: auto;
width: 29px;
height: 8px;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_upar.gif");
}
/* up arrows */
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowUp,
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowUp_Over,
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowUp_Disabled {
position: absolute;
height: 20px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowUp div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -87px 0px; }
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowUp_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -116px 0px; }
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowUp_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -145px 0px; }
/* down arrows */
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowDown,
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowDown_Over,
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowDown_Disabled {
position: absolute;
height: 20px;
font-size: 1px;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowDown div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: 0px 0px; }
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowDown_Over div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -29px 0px; }
div.dhtmlxMenu_dhx_web_SubLevelArea_ArrowDown_Disabled div.dhtmlxMenu_SubLevelArea_Arrow_Icon { background-position: -58px 0px; }
/****************************************************************************************************************************************************/
/* TOPLEVEL TEXT */
.dhtmlxMenu_dhx_web_Middle div.dhtmlxMenu_TopLevel_Text_right {
position: absolute;
top: 0px;
height: 20px;
line-height: 20px;
vertical-align: middle;
left: none;
right: 8px;
font-family: Tahoma;
font-size: 12px;
color: #000000;
cursor: default;
}
.dhtmlxMenu_dhx_web_Middle div.dhtmlxMenu_TopLevel_Text_left {
position: absolute;
top: 0px;
height: 20px;
line-height: 20px;
vertical-align: middle;
right: none;
left: 8px;
font-family: Tahoma;
font-size: 12px;
color: #000000;
cursor: default;
}
/****************************************************************************************************************************************************/
/* ITEM'S CHECKS, RADIOS */
/* sublevel */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon {
float: left;
margin: 0px 2px 0px 6px;
width: 18px;
height: 18px;
background-position: top right;
background-repeat: no-repeat;
background-image: url("../imgs/dhxmenu_dhx_web/dhxmenu_chrd.gif");
}
/* checkboxes */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_0 {
background-position: 0px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.chbx_1 {
background-position: -18px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_0 {
background-position: -36px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.chbx_1 {
background-position: -54px 0px !important;
}
/* radios */
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_0 {
background-position: -72px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl div.sub_icon.rdbt_1 {
background-position: -90px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_0 {
background-position: -108px 0px !important;
}
div.dhtmlxMenu_dhx_web_SubLevelArea_Polygon table.dhtmlxMebu_SubLevelArea_Tbl tr.sub_item_dis div.sub_icon.rdbt_1 {
background-position: -126px 0px !important;
}

View File

@ -0,0 +1,3 @@
dhtmlxMenu v.3.6 Standard edition build 131108
(c) DHTMLX Ltd.

View File

@ -0,0 +1,88 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Initialization from XML</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Initialization from XML</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime(),function(){
// menu.addNewSeparator("file");
});
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-comment">//</span><span class="hl-comment"> menu.addNewSeparator(&quot;file&quot;);</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,124 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Initiazation using Script</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Initiazation using Script</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js" type="text/javascript"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<script>
var menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
// initing
menu.addNewSibling(null, "file", "File", false);
menu.addNewChild("file", 0, "new", "New", false, "new.gif");
menu.addNewSeparator("new");
menu.addNewChild("file", 2, "open", "Open", false, "open.gif");
menu.addNewChild("file", 3, "save", "Save", false, "save.gif");
menu.addNewChild("file", 4, "saveAs", "Save As...", true, null, "save_as_dis.gif");
menu.addNewSeparator("saveAs");
menu.addNewChild("file", 6, "print", "Print", false, "print.gif");
menu.addNewChild("file", 7, "pageSetup", "Page Setup", true, null, "page_setup_dis.gif");
menu.addNewSeparator("pageSetup");
menu.addNewChild("file", 12, "close", "Close", false, "close.gif");
menu.addNewSibling("file", "edit", "Edit", false);
menu.addNewChild("edit", 0, "edit_undo", "Undo", false, "undo.gif");
menu.addNewSibling("edit_undo", "edit_redo", "Redo", false, "redo.gif");
menu.addNewSeparator("edit_redo", "sep_1");
menu.addNewSibling("sep_1", "edit_select_all", "Select All", false, "select_all.gif");
menu.addNewSeparator("edit_select_all", "sep_2");
menu.addNewSibling("sep_2", "edit_cut", "Cut", false, "cut.gif");
menu.addNewSibling("edit_cut", "edit_copy", "Copy", false, "copy.gif");
menu.addNewSibling("edit_copy", "edit_paste", "Paste", false, "paste.gif");
menu.addNewSibling("edit", "help", "Help", false);
menu.addNewChild("help", 0, "about", "About...", false, "about.gif");
menu.addNewChild("help", 1, "help2", "Help", false, "help.gif");
menu.addNewChild("help", 2, "bugrep", "Bug Reporting", false, "bug_reporting.gif");
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/javascript</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> initing;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">File</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">new</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">New</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">new.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSeparator</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">new</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">open</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Open</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">open.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">save</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Save</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">save.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">4</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">saveAs</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Save As...</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">save_as_dis.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSeparator</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">saveAs</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">print</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Print</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">print.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">pageSetup</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Page Setup</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">page_setup_dis.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSeparator</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">pageSetup</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">close</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Close</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">close.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Edit</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_undo</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Undo</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">undo.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_undo</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_redo</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Redo</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">redo.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSeparator</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_redo</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep_1</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">sep_1</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_select_all</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Select All</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">select_all.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSeparator</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_select_all</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep_2</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">sep_2</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_cut</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Cut</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">cut.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_cut</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_copy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Copy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">copy.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_copy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_paste</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Paste</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">paste.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">edit</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">about</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">About...</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">about.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">help2</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">help.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">bugrep</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Bug Reporting</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">bug_reporting.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,153 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Adding First Item</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="doOnLoad();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Adding First Item</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<table>
<tr>
<td width="300"><div style="height: 250px;"><div id="menuObj"></div></div></td>
<td width="300"><div style="height: 250px;"><div id="menuObj2"></div></div></td>
</tr>
</table>
<br>
<script>
var menu;
function doOnLoad() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.addNewSibling(null, "opts", "Options");
menu.addNewSibling("opts", "color", "Color");
menu.addNewSibling("color", "help", "Help", false);
menu.addCheckbox("child", "opts", 0, "ignore_case", "Ignore Case", true);
menu.addCheckbox("child", "opts", 1, "search_everywhere", "Search Everywhere");
menu.addRadioButton("child", "color", 0, "red", "Red", "color", true);
menu.addRadioButton("child", "color", 1, "green", "Green", "color");
menu.addRadioButton("child", "color", 2, "blue", "Blue", "color");
menu.addNewChild("help", 0, "about", "About...", false, "about.gif");
menu.addNewChild("help", 1, "help2", "Help", false, "help.gif");
menu.addNewChild("help", 2, "bugrep", "Bug Reporting", false, "bug_reporting.gif");
menu2 = new dhtmlXMenuObject("menuObj2");
menu2.setIconsPath("../common/imgs2/");
menu2.addNewChild(null, 0, "buddy", "Buddy List");
menu2.addNewChild(null, 1, "status", "Status");
menu2.addNewChild(null, 2, "tools", "Tools");
menu2.addCheckbox("child", "buddy", 0, "show_off_line", "Show Off-Line Buddies", true);
menu2.addCheckbox("child", "buddy", 1, "buddy_groups", "Buddy Groups", true);
menu2.addCheckbox("child", "buddy", 2, "protocol_icon", "Show Protocol Icons");
menu2.addRadioButton("child", "status", 0, "offline", "Off-Line", "status");
menu2.addNewSeparator("offline");
menu2.addRadioButton("child", "status", 2, "online", "On-Line", "status", true);
menu2.addRadioButton("child", "status", 3, "away", "Away", "status");
menu2.addRadioButton("child", "status", 4, "notavailable", "Not Available", "status");
menu2.addRadioButton("child", "status", 5, "invisible", "Invisible", "status");
menu2.addNewChild("tools", 0, "manage_accounts", "Manage Accounts", false, "private_data.gif");
menu2.addNewChild("tools", 1, "modules", "Modules", false, "addons.gif");
menu2.addNewChild("tools", 2, "files_transfer", "Files Transfer", false, "../imgs/cut.gif");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">300</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">300</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj2</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">doOnLoad</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">opts</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Options</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">opts</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Color</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">opts</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">ignore_case</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Ignore Case</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">opts</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">search_everywhere</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Search Everywhere</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">red</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Red</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">green</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Green</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">blue</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Blue</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">about</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">About...</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">about.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">help2</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">help.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">bugrep</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Bug Reporting</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">bug_reporting.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj2</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs2/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">buddy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Buddy List</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Status</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">tools</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Tools</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">buddy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">show_off_line</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Show Off-Line Buddies</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">buddy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">buddy_groups</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Buddy Groups</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">buddy</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">protocol_icon</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Show Protocol Icons</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">offline</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Off-Line</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewSeparator</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">offline</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">online</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">On-Line</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">away</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Away</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">4</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">notavailable</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Not Available</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">invisible</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Invisible</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">status</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">tools</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">manage_accounts</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Manage Accounts</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">private_data.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">tools</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">modules</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Modules</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">addons.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">tools</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">files_transfer</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Files Transfer</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">../imgs/cut.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,84 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Dynamic Loading</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Dynamic Loading</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.enableDynamicLoading("../common/dhtmlxmenu_dl.php");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">enableDynamicLoading</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhtmlxmenu_dl.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,84 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Object API Init</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Object API Init</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<script>
var menu;
function initMenu() {
var menuData = {
parent: "menuObj",
icon_path: "../common/imgs/",
xml: "../common/dhxmenu.xml"
};
menu = new dhtmlXMenuObject(menuData);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menuData</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">parent</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">icon_path</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">xml</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-identifier">menuData</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,206 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Object API Extended Init</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Object API Extended Init</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js" type="text/javascript"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<script>
var menu;
function initMenu() {
var menuData = {
parent: "menuObj",
icon_path: "../common/imgs/",
items: [{id: "file", text: "File", items:[
{id: "new", text: "New", img: "new.gif"},
{id: "sep0", type: "separator"},
{id: "open", text: "Open", img: "open.gif"},
{id: "save", text: "Save", img: "save.gif"},
{id: "saveAs", text: "Save As...", disabled: true, img_disabled: "save_as_dis.gif"},
{id: "sep1", type: "separator"},
{id: "print", text: "Print", img: "print.gif"},
{id: "pageSetup", text: "Page Setup", disabled: true, img_disabled: "page_setup_dis.gif"},
{id: "sep2", type: "separator"},
{id: "close", text: "Close", img: "close.gif"}
]},
{id: "edit", text: "Edit", items:[
{id: "edit_undo", text: "Undo", img: "undo.gif"},
{id: "edit_redo", text: "Redo", img: "redo.gif"},
{id: "sep3", type: "separator"},
{id: "edit_select_all", text: "Select All", img: "select_all.gif"},
{id: "sep4", type: "separator"},
{id: "edit_cut", text: "Cut", img: "cut.gif"},
{id: "edit_copy", text: "Copy",img: "copy.gif"},
{id: "edit_paste", text: "Paste", img: "paste.gif"}
]},
{id: "help", text: "Help", items:[
{id: "about", text: "About...", img: "about.gif"},
{id: "help2", text: "Help", img: "help.gif"},
{id: "bugrep", text: "Bug Reporting", img: "bug_reporting.gif"}
]}
]
};
menu = new dhtmlXMenuObject(menuData);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/javascript</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menuData</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">parent</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">icon_path</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">items</span><span class="hl-code">: </span><span class="hl-brackets">[</span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">file</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">File</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">items</span><span class="hl-code">: </span><span class="hl-brackets">[</span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">new</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">New</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">new.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep0</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">type</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">open</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Open</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">open.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">save</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Save</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">save.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">saveAs</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Save As...</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">disabled</span><span class="hl-code">: </span><span class="hl-reserved">true</span><span class="hl-code">,
</span><span class="hl-identifier">img_disabled</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">save_as_dis.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep1</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">type</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">print</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Print</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">print.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">pageSetup</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Page Setup</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">disabled</span><span class="hl-code">: </span><span class="hl-reserved">true</span><span class="hl-code">,
</span><span class="hl-identifier">img_disabled</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">page_setup_dis.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep2</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">type</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">close</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Close</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">close.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">]</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Edit</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">items</span><span class="hl-code">: </span><span class="hl-brackets">[</span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_undo</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Undo</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">undo.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_redo</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Redo</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">redo.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep3</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">type</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_select_all</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Select All</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">select_all.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">sep4</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">type</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_cut</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Cut</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">cut.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_copy</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Copy</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">copy.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">edit_paste</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Paste</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">paste.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">]</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">help</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Help</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">items</span><span class="hl-code">: </span><span class="hl-brackets">[</span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">about</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">About...</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">about.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">help2</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Help</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">help.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">, </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">id</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">bugrep</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">text</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">Bug Reporting</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">img</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">bug_reporting.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">]</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">]</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-identifier">menuData</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,166 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Skinning</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="doOnLoad();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Skinning</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_blue.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_black.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_web.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_terrace.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script>
var menu, menu2, menu3, menu4, menu5;
function doOnLoad() {
// dhx_skyblue
menu = new dhtmlXMenuObject("menuObj", "dhx_skyblue");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
// dhx_blue
menu2 = new dhtmlXMenuObject("menuObj2", "dhx_blue");
menu2.setIconsPath("../common/imgs/");
menu2.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
// dhx_black
menu3 = new dhtmlXMenuObject("menuObj3", "dhx_black");
menu3.setIconsPath("../common/imgs3/");
menu3.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
// dhx_web
menu4 = new dhtmlXMenuObject("menuObj4", "dhx_web");
menu4.setIconsPath("../common/imgs/");
menu4.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
// dhx_terrace
menu5 = new dhtmlXMenuObject("menuObj5", "dhx_terrace");
menu5.setIconsPath("../common/imgs_terrace/");
menu5.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
}
</script>
<table>
<th>dhx_skyblue</th>
<th> </th>
<th>dhx_blue</th>
<th> </th>
<th>dhx_black</th>
<th> </th>
<th><b>dhx_web</b></th>
<th> </th>
<th><b>dhx_terrace</b></th>
<tr>
<td width="270"> <div style="height: 250px;"><div id="menuObj"></div></div> </td>
<td width="20"> </td>
<td width="270"> <div style="height: 250px;"><div id="menuObj2"></div></div> </td>
<td width="20"> </td>
<td width="270"> <div style="height: 250px;"><div id="menuObj3"></div></div> </td>
<td width="20"> </td>
<td width="270"> <div style="height: 250px;"><div id="menuObj4"></div></div> </td>
<td width="20"> </td>
<td width="270"> <div style="height: 250px;"><div id="menuObj5"></div></div> </td>
</tr>
</table>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_blue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_black.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_web.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_terrace.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">,
</span><span class="hl-identifier">menu2</span><span class="hl-code">,
</span><span class="hl-identifier">menu3</span><span class="hl-code">,
</span><span class="hl-identifier">menu4</span><span class="hl-code">,
</span><span class="hl-identifier">menu5</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">doOnLoad</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-comment">//</span><span class="hl-comment"> dhx_skyblue;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">dhx_skyblue</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> dhx_blue;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj2</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">dhx_blue</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> dhx_black;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu3</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj3</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">dhx_black</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs3/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> dhx_web;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj4</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">dhx_web</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu4</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu4</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> dhx_terrace;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj5</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">dhx_terrace</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu5</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs_terrace/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu5</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">dhx_skyblue</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">dhx_blue</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">dhx_black</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">b</span><span class="hl-brackets">&gt;</span><span class="hl-code">dhx_web</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">b</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">b</span><span class="hl-brackets">&gt;</span><span class="hl-code">dhx_terrace</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">b</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">270</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">20</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">270</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj2</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">20</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">270</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj3</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">20</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">270</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj4</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">20</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">270</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj5</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Clear All</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Clear All</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<input type="button" value="Load XML 1" onclick="loadXML('');">
<input type="button" value="Load XML 2" onclick="loadXML('2');">
<br>
<script>
var menu;
var menuBusy = true;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onXLE", function(){menuBusy=false;});
menu.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime());
}
function loadXML(v) {
if (menuBusy) return;
menuBusy = true;
menu.clearAll();
menu.setIconsPath("../common/imgs"+v+"/");
menu.loadXML("../common/dhxmenu"+v+".xml?etc="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Load XML 1</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">loadXML('');</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Load XML 2</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">loadXML('2');</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menuBusy</span><span class="hl-code"> = </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onXLE</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menuBusy</span><span class="hl-code"> = </span><span class="hl-reserved">false</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-identifier">v</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menuBusy</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-identifier">menuBusy</span><span class="hl-code"> = </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">clearAll</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">v</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">v</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,142 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Unload</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body aonload="load2();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Init</a>
</div>
<div style="display:block;">
<h3>Unload</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 400px; position: relative;">
<div id="menuObj"></div>
<div id="contextArea" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF; visibility: hidden;"></div>
</div>
<input type="button" value="Load Menu" onclick="load();">
<input type="button" value="Unload Menu" onclick="unload();">
<input type="button" value="Load Context Menu" onclick="load2();">
<input type="button" value="Unload Context Menu" onclick="unload2();">
<br>
<script>
var menu, menu2;
function load() {
if (menu) return;
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime());
}
function unload() {
if (!menu) return;
menu.unload();
menu = null;
}
function load2() {
if (menu2) return;
document.getElementById("contextArea").style.visibility = "visible";
menu2 = new dhtmlXMenuObject("contextArea");
menu2.setIconsPath("../common/imgs/");
menu2.renderAsContextMenu();
menu2.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime());
}
function unload2() {
if (!menu2) return;
menu2.unload();
menu2 = null;
document.getElementById("contextArea").style.visibility = "hidden";
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF; visibility: hidden;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Load Menu</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">load();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Unload Menu</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">unload();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Load Context Menu</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">load2();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Unload Context Menu</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">unload2();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">,
</span><span class="hl-identifier">menu2</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">load</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">unload</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-code">!</span><span class="hl-identifier">menu</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">unload</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">null</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">load2</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menu2</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">style</span><span class="hl-code">.</span><span class="hl-identifier">visibility</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">visible</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">unload2</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-code">!</span><span class="hl-identifier">menu2</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">unload</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code"> = </span><span class="hl-reserved">null</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">style</span><span class="hl-code">.</span><span class="hl-identifier">visibility</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">hidden</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Init</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img src="../common/icons/menu.gif" alt="" border=0 >dhtmlxMenu</a>
</div>
<div style="display:block;">
<h3>Init</h3>
</div>
<ul class="topics samples">
<li><a href='./01_init_from_xml.html'>Initialization from XML</a></li><li><a href='./03_init_from_script.html'>Initiazation using Script</a></li><li><a href='./04_first_item_usual.html'>Adding First Item</a></li><li><a href='./05_dynamic_loading.html'>Dynamic Loading</a></li><li><a href='./06_api_simple.html'>Object API Init</a></li><li><a href='./07_api_ext.html'>Object API Extended Init</a></li><li><a href='./08_skinning.html'>Skinning</a></li><li><a href='./09_clearall.html'>Clear All</a></li><li><a href='./10_unload.html'>Unload</a></li>
<!--<li><a href="#">Calendar eXcell</a></li>-->
</ul>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Initialization of Context Menu</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Initialization of Context Menu</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<div style="height: 400px; position: relative;">
<div id="contextArea" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
</div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("contextArea");
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu();
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Context Menu Object API Init</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Context Menu Object API Init</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<div style="height: 400px; position: relative;">
<div id="contextArea" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
</div>
<script>
var menu;
function initMenu() {
var menuData = {
parent: "contextArea",
context: true,
icon_path: "../common/imgs/",
xml: "../common/dhxmenu.xml"
};
menu = new dhtmlXMenuObject(menuData);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menuData</span><span class="hl-code"> = </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">parent</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">context</span><span class="hl-code">: </span><span class="hl-reserved">true</span><span class="hl-code">,
</span><span class="hl-identifier">icon_path</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-code">,
</span><span class="hl-identifier">xml</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-identifier">menuData</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,140 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Context Menu Zones</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();" id="docbody">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Context Menu Zones</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<div style="height: 400px; position: relative;">
<div id="contextZone_A" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">zone A</div>
<div id="contextZone_B" style="position: absolute; left: 220px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">zone B</div>
<div id="contextZone_C" style="position: absolute; left: 340px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">zone C</div>
</div>
<div>
<select id="sel">
<option value="contextZone_A">zone A</option>
<option value="contextZone_B">zone B</option>
<option value="contextZone_C">zone C</option>
</select>
<input type="button" value="Add Context Zone" onclick="add();">
<input type="button" value="Remove Context Zone" onclick="remove();">
<input type="button" value="Is Context Zone?" onclick="check();">
</div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject();
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu();
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
}
var sel = document.getElementById("sel");
function getId() {
return sel.options[sel.selectedIndex].value;
}
function add() {
menu.addContextZone(getId());
}
function remove() {
menu.removeContextZone(getId());
}
function check() {
alert(menu.isContextZone(getId()));
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_A</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zone A</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_B</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 220px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zone B</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_C</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 340px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zone C</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">select</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">option</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_A</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zone A</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">option</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_B</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zone B</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">option</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_C</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zone C</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">select</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Add Context Zone</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">add();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Remove Context Zone</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">remove();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Is Context Zone?</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">check();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">sel</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">options</span><span class="hl-brackets">[</span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">selectedIndex</span><span class="hl-brackets">]</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">add</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">remove</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">removeContextZone</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">check</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">isContextZone</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Context Menu With Dynamical Loading</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Context Menu With Dynamical Loading</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 400px; position: relative;">
<div id="contextArea" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
</div>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("contextArea");
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu();
menu.enableDynamicLoading("../common/dhtmlxmenu_dl.php");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">enableDynamicLoading</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhtmlxmenu_dl.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Context Menu Hide All Mode</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Context Menu Hide All Mode</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<style>
span.mode_en {
color: #009000;
margin-left: 7px;
font-weight: bold;
}
span.mode_dis {
color: #EE0000;
margin-left: 7px;
font-weight: bold;
}
</style>
<div style="height: 400px; position: relative;">
<div id="contextArea" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
</div>
<div>Hide All contextual menu mode - hide all opened context menu polygons on mouseout (true by the default)</div>
<br>
<div><input type="button" value="On/Off" onclick="onOff();"><span style="margin-left: 7px;"><b>Hide All</b> mode</span><span id="spmod" class="mode_en">enabled</span></div>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("contextArea");
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu();
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
}
function onOff() {
menu.setContextMenuHideAllMode(!menu.getContextMenuHideAllMode());
document.getElementById("spmod").className = (menu.getContextMenuHideAllMode()?"mode_en":"mode_dis");
document.getElementById("spmod").innerHTML = (menu.getContextMenuHideAllMode()?"enabled":"disabled");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">style</span><span class="hl-brackets">&gt;</span><span class="hl-code">
span.mode_en {
color: #009000;
margin-left: 7px;
font-weight: bold;
}
span.mode_dis {
color: #EE0000;
margin-left: 7px;
font-weight: bold;
}
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">style</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">Hide All contextual menu mode - hide all opened context menu polygons on mouseout (true by the default)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">On/Off</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">onOff();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">margin-left: 7px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">b</span><span class="hl-brackets">&gt;</span><span class="hl-code">Hide All</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">b</span><span class="hl-brackets">&gt;</span><span class="hl-code"> mode</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">spmod</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">class</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">mode_en</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">enabled</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">onOff</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setContextMenuHideAllMode</span><span class="hl-brackets">(</span><span class="hl-code">!</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getContextMenuHideAllMode</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">spmod</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">className</span><span class="hl-code"> = </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getContextMenuHideAllMode</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">mode_en</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">mode_dis</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">spmod</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getContextMenuHideAllMode</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">enabled</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">disabled</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,133 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Adding First Item</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="doOnLoad();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Adding First Item</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 400px; position: relative;">
<div id="contextZone_A" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">Items</div>
<div id="contextZone_B" style="position: absolute; left: 220px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">Checkboxes</div>
<div id="contextZone_C" style="position: absolute; left: 340px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">Radios</div>
</div>
<br>
<script>
var menu1, menu2, menu3;
function doOnLoad() {
// items
menu1 = new dhtmlXMenuObject();
menu1.renderAsContextMenu();
menu1.addContextZone("contextZone_A");
menu1.setIconsPath("../common/imgs/");
menu1.addNewChild(menu1.topId, 0, "open", "Open", false, "open.gif");
menu1.addNewChild(menu1.topId, 1, "save", "Save", false, "save.gif");
menu1.addNewChild(menu1.topId, 3, "close", "Close", false, "close.gif");
// checkboxes
menu2 = new dhtmlXMenuObject();
menu2.renderAsContextMenu();
menu2.addContextZone("contextZone_B");
menu2.addCheckbox("child", menu2.topId, 0, "ignore_case", "Ignore Case", true);
menu2.addCheckbox("child", menu2.topId, 1, "search_everywhere", "Search Everywhere");
// radios
menu3 = new dhtmlXMenuObject();
menu3.renderAsContextMenu();
menu3.addContextZone("contextZone_C");
menu3.addRadioButton("child", menu3.topId, 0, "red", "Red", "color", true);
menu3.addRadioButton("child", menu3.topId, 1, "green", "Green", "color");
menu3.addRadioButton("child", menu3.topId, 2, "blue", "Blue", "color");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 400px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_A</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Items</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_B</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 220px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Checkboxes</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_C</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 340px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Radios</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu1</span><span class="hl-code">,
</span><span class="hl-identifier">menu2</span><span class="hl-code">,
</span><span class="hl-identifier">menu3</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">doOnLoad</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-comment">//</span><span class="hl-comment"> items;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_A</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">open</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Open</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">open.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">save</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Save</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">save.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">close</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Close</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">close.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> checkboxes;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_B</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">ignore_case</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Ignore Case</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">addCheckbox</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">search_everywhere</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Search Everywhere</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> radios;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu3</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextZone_C</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">red</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Red</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">green</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Green</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">addRadioButton</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">child</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menu3</span><span class="hl-code">.</span><span class="hl-identifier">topId</span><span class="hl-code">, </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">blue</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">Blue</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">color</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Context Menu on Body</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Contextual Menu</a>
</div>
<div style="display:block;">
<h3>Context Menu on Body</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<input type="button" value="Open Demo" onclick="window.open('inc/context_body.html');">
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-code">&lt;</span><span class="hl-identifier">input</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Open Demo</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-identifier">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">window.open('inc/context_body.html');</span><span class="hl-quotes">&quot;</span><span class="hl-code">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Context Menu on Body</title>
<link rel="stylesheet" type="text/css" href="../../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../../codebase/dhtmlxcommon.js"></script>
<script src="../../../codebase/dhtmlxmenu.js"></script>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0px;
overflow: hidden;
}
</style>
</head>
<body onload="initMenu();">
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject();
menu.setIconsPath("../../common/imgs/");
menu.renderAsContextMenu();
menu.addContextZone(document.body);
menu.loadXML("../../common/dhxmenu.xml?e="+new Date().getTime());
}
</script>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Contextual Menu</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img src="../common/icons/menu.gif" alt="" border=0 >dhtmlxMenu</a>
</div>
<div style="display:block;">
<h3>Contextual Menu</h3>
</div>
<ul class="topics samples">
<li><a href='./01_context.html'>Initialization of Context Menu</a></li><li><a href='./02_context_api.html'>Context Menu Object API Init</a></li><li><a href='./03_context_zones.html'>Context Menu Zones</a></li><li><a href='./04_context_dynamic.html'>Context Menu With Dynamical Loading</a></li><li><a href='./05_context_hide_all.html'>Context Menu Hide All Mode</a></li><li><a href='./06_context_first_item.html'>Adding First Item</a></li><li><a href='./07_context_on_body.html'>Context Menu on Body</a></li>
<!--<li><a href="#">Calendar eXcell</a></li>-->
</ul>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,119 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Open Mode</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Open Mode</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<table border="0" cellspacing="0" cellpadding="0">
<th>Web Mode</th>
<th>&nbsp;</th>
<th>Win Mode</th>
<tr>
<td width="300"><div style="height: 250px;"><div id="menuWeb"></div></div></td>
<td width="20">&nbsp;</td>
<td width="300"><div style="height: 250px;"><div id="menuWin"></div></div></td>
</tr>
</table>
<br>
<script>
var menu1, menu2;
function initMenu() {
// web mode
menu1 = new dhtmlXMenuObject("menuWeb");
menu1.setIconsPath("../common/imgs/");
menu1.setOpenMode("web");
menu1.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
// win mode
menu2 = new dhtmlXMenuObject("menuWin");
menu2.setIconsPath("../common/imgs/");
menu2.setOpenMode("win");
menu2.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">Web Mode</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">Win Mode</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">300</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuWeb</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">20</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">300</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuWin</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu1</span><span class="hl-code">,
</span><span class="hl-identifier">menu2</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-comment">//</span><span class="hl-comment"> web mode;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuWeb</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">setOpenMode</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">web</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu1</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> win mode;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuWin</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">setOpenMode</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">win</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu2</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,96 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Overflow Control</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Overflow Control</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<input type="text" value="4" id="overflowValue" size="2">
<input type="button" value="set overflow" onclick="setOverflow(document.getElementById('overflowValue').value);">
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?etc=" + new Date().getTime());
}
function setOverflow(h) {
if (isNaN(h)) return;
menu.setOverflowHeight(h);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">4</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">overflowValue</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">size</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">2</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">set overflow</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">setOverflow(document.getElementById('overflowValue').value);</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">setOverflow</span><span class="hl-brackets">(</span><span class="hl-identifier">h</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">isNaN</span><span class="hl-brackets">(</span><span class="hl-identifier">h</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setOverflowHeight</span><span class="hl-brackets">(</span><span class="hl-identifier">h</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,102 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Setting Visible Area</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Setting Visible Area</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div id="contextArea" style="position: relative; left: 20px; top: 20px; width: 600px; height: 400px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
<br>
<script>
var menu;
function initMenu() {
var pObj = document.getElementById("contextArea");
var x1 = getAbsoluteLeft(pObj);
var x2 = x1+pObj.offsetWidth;
var y1 = getAbsoluteTop(pObj);
var y2 = y1+pObj.offsetHeight;
//
menu = new dhtmlXMenuObject("contextArea");
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu(true);
menu.setVisibleArea(x1, x2, y1, y2);
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: relative; left: 20px; top: 20px; width: 600px; height: 400px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">pObj</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">x1</span><span class="hl-code"> = </span><span class="hl-identifier">getAbsoluteLeft</span><span class="hl-brackets">(</span><span class="hl-identifier">pObj</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">x2</span><span class="hl-code"> = </span><span class="hl-identifier">x1</span><span class="hl-code"> + </span><span class="hl-identifier">pObj</span><span class="hl-code">.</span><span class="hl-identifier">offsetWidth</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">y1</span><span class="hl-code"> = </span><span class="hl-identifier">getAbsoluteTop</span><span class="hl-brackets">(</span><span class="hl-identifier">pObj</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">y2</span><span class="hl-code"> = </span><span class="hl-identifier">y1</span><span class="hl-code"> + </span><span class="hl-identifier">pObj</span><span class="hl-code">.</span><span class="hl-identifier">offsetHeight</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment">;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setVisibleArea</span><span class="hl-brackets">(</span><span class="hl-identifier">x1</span><span class="hl-code">, </span><span class="hl-identifier">x2</span><span class="hl-code">, </span><span class="hl-identifier">y1</span><span class="hl-code">, </span><span class="hl-identifier">y2</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,93 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Align</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Align</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<input type="button" value="Left Align" onclick="menu.setAlign('left');">
<input type="button" value="Right Align" onclick="menu.setAlign('right');">
</div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Left Align</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menu.setAlign('left');</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Right Align</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menu.setAlign('right');</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Top Text</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Top Text</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.setTopText("dhtmlxMenu");
menu.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setTopText</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">dhtmlxMenu</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,78 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Hrefs</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Hrefs</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("");
menu.loadXML("../common/dhxmenu_links.xml?etc="+new Date().getTime());
}
</script>
<div style="height: 250px;"><div id="menuObj"></div></div>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu_links.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Setting Auto Overflow Mode</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Features</a>
</div>
<div style="display:block;">
<h3>Setting Auto Overflow Mode</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div id="contextArea" style="position: relative; left: 20px; top: 20px; width: 600px; height: 400px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
<br>
<script>
var menu;
function initMenu() {
var pObj = document.getElementById("contextArea");
var x1 = getAbsoluteLeft(pObj);
var x2 = x1+pObj.offsetWidth;
var y1 = getAbsoluteTop(pObj);
var y2 = y1+pObj.offsetHeight;
//
menu = new dhtmlXMenuObject("contextArea");
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu(true);
menu.setVisibleArea(x1, x2, y1, y2);
menu.setOverflowHeight("auto");
menu.loadXML("../common/dhxmenu3.xml?e="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: relative; left: 20px; top: 20px; width: 600px; height: 400px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">pObj</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">x1</span><span class="hl-code"> = </span><span class="hl-identifier">getAbsoluteLeft</span><span class="hl-brackets">(</span><span class="hl-identifier">pObj</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">x2</span><span class="hl-code"> = </span><span class="hl-identifier">x1</span><span class="hl-code"> + </span><span class="hl-identifier">pObj</span><span class="hl-code">.</span><span class="hl-identifier">offsetWidth</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">y1</span><span class="hl-code"> = </span><span class="hl-identifier">getAbsoluteTop</span><span class="hl-brackets">(</span><span class="hl-identifier">pObj</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">y2</span><span class="hl-code"> = </span><span class="hl-identifier">y1</span><span class="hl-code"> + </span><span class="hl-identifier">pObj</span><span class="hl-code">.</span><span class="hl-identifier">offsetHeight</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment">;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">contextArea</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setVisibleArea</span><span class="hl-brackets">(</span><span class="hl-identifier">x1</span><span class="hl-code">, </span><span class="hl-identifier">x2</span><span class="hl-code">, </span><span class="hl-identifier">y1</span><span class="hl-code">, </span><span class="hl-identifier">y2</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setOverflowHeight</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">auto</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu3.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Features</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img src="../common/icons/menu.gif" alt="" border=0 >dhtmlxMenu</a>
</div>
<div style="display:block;">
<h3>Features</h3>
</div>
<ul class="topics samples">
<li><a href='./01_open_mode.html'>Open Mode</a></li><li><a href='./02_overflow.html'>Overflow Control</a></li><li><a href='./03_visible_area.html'>Setting Visible Area</a></li><li><a href='./04_align.html'>Align</a></li><li><a href='./05_toptext.html'>Top Text</a></li><li><a href='./06_hrefs.html'>Hrefs</a></li><li><a href='./07_auto_overflow.html'>Setting Auto Overflow Mode</a></li>
<!--<li><a href="#">Calendar eXcell</a></li>-->
</ul>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,112 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Iterator</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Iterator</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<input type="button" value="Disable All Nested" onclick="disable();">
<input type="button" value="Enable All Nested" onclick="enable();">
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?etc="+new Date().getTime());
}
function disable() {
menu.forEachItem(function(id){
if (menu.getItemType(id) != "separator" && menu._getItemLevelType(id) != "TopLevel") menu.setItemDisabled(id);
});
}
function enable() {
menu.forEachItem(function(id){
if (menu.getItemType(id) != "separator" && menu._getItemLevelType(id) != "TopLevel") menu.setItemEnabled(id);
});
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Disable All Nested</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">disable();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Enable All Nested</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">enable();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?etc=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">disable</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">forEachItem</span><span class="hl-brackets">(</span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemType</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">_getItemLevelType</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-string">TopLevel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemDisabled</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">enable</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">forEachItem</span><span class="hl-brackets">(</span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemType</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">_getItemLevelType</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-string">TopLevel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemEnabled</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,314 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Menu Items Manipulations</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Menu Items Manipulations</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<th colspan="3" style="padding-bottom: 10px;">Add New Item</th>
<tr>
<td>Item Type</td>
<td width="10">&nbsp;</td>
<td><select id="add_type"><option value="0">Child</option><option value="1">Sibling</option></select></td>
</tr>
<tr>
<td>Parent</td>
<td>&nbsp;</td>
<td><div id="item_parent" style="font-weight: bold;">(Click menu to select)</div></td>
</tr>
<tr>
<td>Item Text</td>
<td>&nbsp;</td>
<td><input id="item_text" type="text" value=""></td>
</tr>
<tr>
<td>Item Has Icon</td>
<td>&nbsp;</td>
<td>
<span><input id="icon_exists" type="checkbox" checked></span>
<span><img id="icon_src" width="18" height="18" border="0" src="../common/imgs/copy.gif"></span>
</td>
</tr>
<tr>
<td>Icon Source</td>
<td>&nbsp;</td>
<td>
<span><img onclick="changeIcon(this, 'copy');" width="18" height="18" border="0" src="../common/imgs/copy.gif"></span>
<span><img onclick="changeIcon(this, 'cut');" width="18" height="18" border="0" src="../common/imgs/cut.gif"></span>
<span><img onclick="changeIcon(this, 'new');" width="18" height="18" border="0" src="../common/imgs/new.gif"></span>
<span><img onclick="changeIcon(this, 'paste');" width="18" height="18" border="0" src="../common/imgs/paste.gif"></span>
<span><img onclick="changeIcon(this, 'print');" width="18" height="18" border="0" src="../common/imgs/print.gif"></span>
<span><img onclick="changeIcon(this, 'redo');" width="18" height="18" border="0" src="../common/imgs/redo.gif"></span>
<span><img onclick="changeIcon(this, 'undo');" width="18" height="18" border="0" src="../common/imgs/undo.gif"></span>
<span><img onclick="changeIcon(this, 'save');" width="18" height="18" border="0" src="../common/imgs/save.gif"></span>
<span><img onclick="changeIcon(this, 'select_all');" width="18" height="18" border="0" src="../common/imgs/select_all.gif"></span>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="button" value="Add Item" style="margin-top: 10px;" onclick="addItem();"></td>
</tr>
</table>
</td>
<td width="30">&nbsp;</td>
<td valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<th colspan="3" style="padding-bottom: 10px;">Remove Item</th>
<tr>
<td>Item</td>
<td>&nbsp;</td>
<td><div id="item_id" style="font-weight: bold;">(Click menu to select)</div></td>
</tr>
<tr>
<td colspan="3" align="center"><input type="button" value="Remove Item" style="margin-top: 10px;" onclick="removeItem();"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onClick", changeParent);
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime());
}
var itemImg = "copy";
function changeIcon(obj, icon) {
document.getElementById("icon_src").src = obj.src;
itemImg = icon;
}
var parentId = null;
function changeParent(id) {
parentId = id;
var text = menu.getItemText(id);
document.getElementById("item_parent").innerHTML = id + " ("+text+")";
document.getElementById("item_id").innerHTML = id + " ("+text+")";
}
var itemId = 0;
function addItem() {
if (parentId == null) { alert("Please select parentId"); return; }
var itemText = document.getElementById("item_text").value;
if (itemText.length == 0) { itemText = "New Item"; }
var img = "";
var imgDis = "";
if (document.getElementById("icon_exists").checked) {
img = itemImg+".gif";
imgDis = itemImg+"_dis.gif";
}
var opts = document.getElementById("add_type");
if (opts.options[opts.selectedIndex].value == "0") {
menu.addNewChild(parentId, 0, "item_"+itemId, itemText, false, img, imgDis);
} else {
menu.addNewSibling(parentId, "item_"+itemId, itemText, false, img, imgDis);
}
itemId++;
parentId = null;
document.getElementById("item_parent").innerHTML = "(Click menu to select)";
document.getElementById("item_id").innerHTML = "(Click menu to select)";
}
function removeItem() {
if (parentId == null) { alert("Please select itemId"); return; }
menu.removeItem(parentId);
parentId = null;
document.getElementById("item_parent").innerHTML = "(Click menu to select)";
document.getElementById("item_id").innerHTML = "(Click menu to select)";
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">valign</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">top</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-code"> </span><span class="hl-var">colspan</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">3</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">padding-bottom: 10px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Add New Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Item Type</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">select</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">add_type</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">option</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Child</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">option</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">1</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Sibling</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">select</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Parent</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_parent</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">font-weight: bold;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">(Click menu to select)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Item Text</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Item Has Icon</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">icon_exists</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">checkbox</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">checked</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">icon_src</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/copy.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Icon Source</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'copy');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/copy.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'cut');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/cut.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'new');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/new.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'paste');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/paste.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'print');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/print.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'redo');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/redo.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'undo');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/undo.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'save');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/save.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">changeIcon(this, 'select_all');</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/select_all.gif</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">span</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Add Item</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">margin-top: 10px;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">addItem();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">30</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">valign</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">top</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">th</span><span class="hl-code"> </span><span class="hl-var">colspan</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">3</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">padding-bottom: 10px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">Remove Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">th</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_id</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">font-weight: bold;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">(Click menu to select)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">colspan</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">3</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">align</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">center</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Remove Item</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">margin-top: 10px;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">removeItem();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">changeParent</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">itemImg</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">copy</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">changeIcon</span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">, </span><span class="hl-identifier">icon</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">icon_src</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">src</span><span class="hl-code"> = </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">src</span><span class="hl-code">;
</span><span class="hl-identifier">itemImg</span><span class="hl-code"> = </span><span class="hl-identifier">icon</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentId</span><span class="hl-code"> = </span><span class="hl-reserved">null</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">changeParent</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">parentId</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">text</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_parent</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">text</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_id</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">text</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">itemId</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">addItem</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-code"> == </span><span class="hl-reserved">null</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Please select parentId</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">itemText</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_text</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">itemText</span><span class="hl-code">.</span><span class="hl-identifier">length</span><span class="hl-code"> == </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">itemText</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">New Item</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">img</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">imgDis</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">icon_exists</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">checked</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">img</span><span class="hl-code"> = </span><span class="hl-identifier">itemImg</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-identifier">imgDis</span><span class="hl-code"> = </span><span class="hl-identifier">itemImg</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">_dis.gif</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">opts</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">add_type</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">opts</span><span class="hl-code">.</span><span class="hl-identifier">options</span><span class="hl-brackets">[</span><span class="hl-identifier">opts</span><span class="hl-code">.</span><span class="hl-identifier">selectedIndex</span><span class="hl-brackets">]</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code"> == </span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewChild</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">item_</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">itemId</span><span class="hl-code">, </span><span class="hl-identifier">itemText</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-identifier">img</span><span class="hl-code">, </span><span class="hl-identifier">imgDis</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addNewSibling</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">item_</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">itemId</span><span class="hl-code">, </span><span class="hl-identifier">itemText</span><span class="hl-code">, </span><span class="hl-reserved">false</span><span class="hl-code">, </span><span class="hl-identifier">img</span><span class="hl-code">, </span><span class="hl-identifier">imgDis</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-identifier">itemId</span><span class="hl-code">++;
</span><span class="hl-identifier">parentId</span><span class="hl-code"> = </span><span class="hl-reserved">null</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_parent</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">(Click menu to select)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_id</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">(Click menu to select)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">removeItem</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-code"> == </span><span class="hl-reserved">null</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Please select itemId</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">removeItem</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">parentId</span><span class="hl-code"> = </span><span class="hl-reserved">null</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_parent</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">(Click menu to select)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_id</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">(Click menu to select)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,143 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Menu Items Visibility Control</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Menu Items Visibility Control</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Select Item</td>
<td width="10">&nbsp;</td>
<td><select id="sel"></select></td>
<td width="10">&nbsp;</td>
<td><input type="button" value="Show" onclick="show();"> <input type="button" value="Hide" onclick="hide();"> <input type="button" value="Is Hidden?" onclick="isHidden();"></td>
</tr>
</table>
</div>
<br>
<script>
var menu;
var sel = document.getElementById("sel");
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime(), function(){
menu.forEachItem(function(itemId){
if (menu.getItemType(itemId) != "separator") sel.options.add(new Option(menu.getItemText(itemId), itemId));
});
});
}
function getId() {
return sel.options[sel.selectedIndex].value;
}
function show() {
menu.showItem(getId());
}
function hide() {
menu.hideItem(getId());
}
function isHidden() {
alert(menu.isItemHidden(getId()));
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">select</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">select</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Show</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">show();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Hide</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">hide();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Is Hidden?</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">isHidden();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">sel</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">forEachItem</span><span class="hl-brackets">(</span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">itemId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemType</span><span class="hl-brackets">(</span><span class="hl-identifier">itemId</span><span class="hl-brackets">)</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">options</span><span class="hl-code">.</span><span class="hl-identifier">add</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Option</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">itemId</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">itemId</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">options</span><span class="hl-brackets">[</span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">selectedIndex</span><span class="hl-brackets">]</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">show</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">showItem</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">hide</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">hideItem</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">isHidden</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">isItemHidden</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Menu Items State Manipulation</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Menu Items State Manipulation</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Select Item</td>
<td width="10">&nbsp;</td>
<td><select id="sel"></select></td>
<td width="10">&nbsp;</td>
<td><input type="button" value="Enable" onclick="enable();"> <input type="button" value="Disable" onclick="disable();"> <input type="button" value="Is Enabled?" onclick="isEnabled();"></td>
</tr>
</table>
</div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime(), function(){
var sel = document.getElementById("sel");
menu.forEachItem(function(id){if(menu.getItemType(id)!="separator"){sel.options.add(new Option(menu.getItemText(id),id));}});
});
}
function getId() {
var sel = document.getElementById("sel");
var id = sel.options[sel.selectedIndex].value;
return id;
}
function enable() {
menu.setItemEnabled(getId());
}
function disable() {
menu.setItemDisabled(getId());
}
function isEnabled() {
alert(menu.isItemEnabled(getId()));
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">select</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">select</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Enable</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">enable();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Disable</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">disable();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Is Enabled?</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">isEnabled();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">sel</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">forEachItem</span><span class="hl-brackets">(</span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemType</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-string">separator</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">options</span><span class="hl-code">.</span><span class="hl-identifier">add</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Option</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">sel</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">sel</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code"> = </span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">options</span><span class="hl-brackets">[</span><span class="hl-identifier">sel</span><span class="hl-code">.</span><span class="hl-identifier">selectedIndex</span><span class="hl-brackets">]</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">enable</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemEnabled</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">disable</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemDisabled</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">isEnabled</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">isItemEnabled</span><span class="hl-brackets">(</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,145 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Menu Items Text Manipulation</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Menu Items Text Manipulation</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Select Item</td>
<td width="10">&nbsp;</td>
<td><div id="item">(Click menu item to select)</div></td>
</tr>
<tr>
<td>Current Item Text</td>
<td>&nbsp;</td>
<td><div id="item_text">&nbsp;</div></td>
</tr>
<tr>
<td>New Item Text</td>
<td>&nbsp;</td>
<td><input id="item_new_text" type="text" value="New Item Text"> <input type="button" value="Update" onclick="update();"></td>
</tr>
</table>
</div>
<br>
<script>
var menu, mid;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onClick", menuClick);
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime());
}
function menuClick(id) {
document.getElementById("item").innerHTML = id;
document.getElementById("item_text").innerHTML = menu.getItemText(id);
mid = id;
}
function update() {
var text = document.getElementById("item_new_text").value;
menu.setItemText(mid, text);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">(Click menu item to select)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Current Item Text</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_text</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">New Item Text</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_new_text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">New Item Text</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Update</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">update();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">,
</span><span class="hl-identifier">mid</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_text</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">mid</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">update</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">text</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_new_text</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">mid</span><span class="hl-code">, </span><span class="hl-identifier">text</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,149 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Menu Items Position Control</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Menu Items Position Control</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Select Item</td>
<td width="10">&nbsp;</td>
<td><div id="item">(Click menu item to select)</div></td>
</tr>
<tr>
<td>Current Item Position</td>
<td>&nbsp;</td>
<td><div id="item_pos">&nbsp;</div></td>
</tr>
<tr>
<td>New Item Position</td>
<td>&nbsp;</td>
<td><input id="item_new_pos" type="text" value="1" style="width: 30px;"> <input type="button" value="Update" onclick="update();"></td>
</tr>
</table>
</div>
<br>
<script>
var menu, mid;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onClick", menuClick);
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime());
}
function menuClick(id) {
document.getElementById("item").innerHTML = id + " ("+menu.getItemText(id)+")";
document.getElementById("item_pos").innerHTML = menu.getItemPosition(id);
mid = id;
}
function update() {
var pos = Number(document.getElementById("item_new_pos").value);
if (isNaN(pos)) { return; }
menu.setItemPosition(mid, pos);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">(Click menu item to select)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Current Item Position</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_pos</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">New Item Position</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_new_pos</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">1</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 30px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Update</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">update();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">,
</span><span class="hl-identifier">mid</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_pos</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemPosition</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">mid</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">update</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">pos</span><span class="hl-code"> = </span><span class="hl-builtin">Number</span><span class="hl-brackets">(</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_new_pos</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">isNaN</span><span class="hl-brackets">(</span><span class="hl-identifier">pos</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemPosition</span><span class="hl-brackets">(</span><span class="hl-identifier">mid</span><span class="hl-code">, </span><span class="hl-identifier">pos</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,157 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Using UserData In Menu Items</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Using UserData In Menu Items</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td>Select Item</td>
<td width="10">&nbsp;</td>
<td><div id="item">(Click menu item to select)</div></td>
</tr>
<tr>
<td>Current UserData ("data")</td>
<td>&nbsp;</td>
<td><input id="item_ud" type="text" value="" disabled="true"></td>
</tr>
<tr>
<td>UserData Name</td>
<td>&nbsp;</td>
<td><select disabled><option>data</option></select></td>
</tr>
<tr>
<td>UserData Value</td>
<td>&nbsp;</td>
<td><input id="item_new_ud" type="text" value=""> <input type="button" value="Update" onclick="update();"></td>
</tr>
</table>
</div>
<br>
<script>
var menu, mid;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onClick", menuClick);
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime());
}
function menuClick(id) {
document.getElementById("item").innerHTML = id + " ("+menu.getItemText(id)+")";
var ud = menu.getUserData(id, "data");
document.getElementById("item_ud").value = (ud!=null?ud:"");
mid = id;
}
function update() {
var data = document.getElementById("item_new_ud").value;
menu.setUserData(mid, "data", data);
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">2</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">2</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">(Click menu item to select)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Current UserData (&quot;data&quot;)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_ud</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">disabled</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">true</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">UserData Name</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">select</span><span class="hl-code"> </span><span class="hl-var">disabled</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-code">data</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">option</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">select</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">UserData Value</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_new_ud</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code"> </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Update</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">update();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">,
</span><span class="hl-identifier">mid</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ud</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getUserData</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">data</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_ud</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code"> = </span><span class="hl-brackets">(</span><span class="hl-identifier">ud</span><span class="hl-code"> != </span><span class="hl-reserved">null</span><span class="hl-code"> ? </span><span class="hl-identifier">ud</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">mid</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">update</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">data</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item_new_ud</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setUserData</span><span class="hl-brackets">(</span><span class="hl-identifier">mid</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">data</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">data</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,186 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Menu Items Images Manipulation</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Items</a>
</div>
<div style="display:block;">
<h3>Menu Items Images Manipulation</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Select Item</td>
<td width="10">&nbsp;</td>
<td><div id="item">(Click menu item to select)</div></td>
</tr>
<tr>
<td>Current Image</td>
<td>&nbsp;</td>
<td><img id="imgcur" src="" width="18" height="18" style="border: #909090 1px solid;"></td>
</tr>
<tr>
<td>Select New Image</td>
<td>&nbsp;</td>
<td id="imgList"></td>
</tr>
<tr>
<td>Remove Item Image</td>
<td>&nbsp;</td>
<td><input type="button" value="Remove Image" onclick="update();"></td>
</tr>
</table>
</div>
<br>
<script>
var menu, mid;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onClick", menuClick);
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime(), function(){
menu.forEachItem(function(id){
var imgs = menu.getItemImage(id);
if (imgs[0] != null && imgs[0] != "") {
var text = '<span><img onclick="changeIcon(this, \''+imgs[0]+'\');" width="18" height="18" border="0" src="../common/imgs/'+imgs[0]+'"></span> ';
document.getElementById("imgList").innerHTML += text;
}
});
});
}
function menuClick(id) {
var img = menu.getItemImage(id);
document.getElementById("item").innerHTML = id+" ("+menu.getItemText(id)+")";
document.getElementById("imgcur").src = "../common/imgs/"+img[0];//.replace(/^\.\.\//,"");
mid = id;
}
function changeIcon(obj, icon) {
if (mid == null) { return; }
document.getElementById("imgcur").src = obj.src;
menu.setItemImage(mid, icon);
}
function update() {
menu.clearItemImage(mid);
document.getElementById("imgcur").src = "../common/imgs/";
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">table</span><span class="hl-code"> </span><span class="hl-var">border</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellspacing</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">cellpadding</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">0</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select Item</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">10</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">(Click menu item to select)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Current Image</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">img</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">imgcur</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">18</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">border: #909090 1px solid;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Select New Image</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">imgList</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">Remove Item Image</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-special">&amp;nbsp;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">input</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">button</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">value</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">Remove Image</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">onclick</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">update();</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">td</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">tr</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">table</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">,
</span><span class="hl-identifier">mid</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">forEachItem</span><span class="hl-brackets">(</span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">imgs</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemImage</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">imgs</span><span class="hl-brackets">[</span><span class="hl-number">0</span><span class="hl-brackets">]</span><span class="hl-code"> != </span><span class="hl-reserved">null</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">imgs</span><span class="hl-brackets">[</span><span class="hl-number">0</span><span class="hl-brackets">]</span><span class="hl-code"> != </span><span class="hl-quotes">&quot;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">text</span><span class="hl-code"> = </span><span class="hl-quotes">'</span><span class="hl-string">&lt;span&gt;&lt;img onclick=&quot;changeIcon(this, </span><span class="hl-special">\'</span><span class="hl-quotes">'</span><span class="hl-code"> + </span><span class="hl-identifier">imgs</span><span class="hl-brackets">[</span><span class="hl-number">0</span><span class="hl-brackets">]</span><span class="hl-code"> + </span><span class="hl-quotes">'</span><span class="hl-special">\'</span><span class="hl-string">);&quot; width=&quot;18&quot; height=&quot;18&quot; border=&quot;0&quot; src=&quot;../common/imgs/</span><span class="hl-quotes">'</span><span class="hl-code"> + </span><span class="hl-identifier">imgs</span><span class="hl-brackets">[</span><span class="hl-number">0</span><span class="hl-brackets">]</span><span class="hl-code"> + </span><span class="hl-quotes">'</span><span class="hl-string">&quot;&gt;&lt;/span&gt; </span><span class="hl-quotes">'</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">imgList</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-identifier">text</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">img</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemImage</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">item</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">imgcur</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">src</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">img</span><span class="hl-brackets">[</span><span class="hl-number">0</span><span class="hl-brackets">]</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment">.replace(/^\.\.\//,&quot;&quot;);</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">mid</span><span class="hl-code"> = </span><span class="hl-identifier">id</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">changeIcon</span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">, </span><span class="hl-identifier">icon</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">mid</span><span class="hl-code"> == </span><span class="hl-reserved">null</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">return</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">imgcur</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">src</span><span class="hl-code"> = </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">src</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemImage</span><span class="hl-brackets">(</span><span class="hl-identifier">mid</span><span class="hl-code">, </span><span class="hl-identifier">icon</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">update</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">clearItemImage</span><span class="hl-brackets">(</span><span class="hl-identifier">mid</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">imgcur</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">src</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Items</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img src="../common/icons/menu.gif" alt="" border=0 >dhtmlxMenu</a>
</div>
<div style="display:block;">
<h3>Items</h3>
</div>
<ul class="topics samples">
<li><a href='./01_iterator.html'>Iterator</a></li><li><a href='./02_manipulations.html'>Menu Items Manipulations</a></li><li><a href='./03_visibility.html'>Menu Items Visibility Control</a></li><li><a href='./04_state.html'>Menu Items State Manipulation</a></li><li><a href='./05_text.html'>Menu Items Text Manipulation</a></li><li><a href='./06_position.html'>Menu Items Position Control</a></li><li><a href='./07_userdata.html'>Using UserData In Menu Items</a></li><li><a href='./08_images.html'>Menu Items Images Manipulation</a></li>
<!--<li><a href="#">Calendar eXcell</a></li>-->
</ul>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,150 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Event Handling In Case Of Single Loading</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Events</a>
</div>
<div style="display:block;">
<h3>Event Handling In Case Of Single Loading</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div id="ta" style="width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;"></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onXLS", menuXLS);
menu.attachEvent("onXLE", menuXLE);
menu.attachEvent("onClick", menuClick);
menu.attachEvent("onTouch", menuTouch);
menu.attachEvent("onShow", menuShow);
menu.attachEvent("onHide", menuHide);
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime(), function(){
document.getElementById("ta").innerHTML += "<b>doOnLoad</b> onLoadFunction was called<br>";
});
}
function printLog(text) {
document.getElementById("ta").innerHTML = text+document.getElementById("ta").innerHTML;
document.getElementById("ta").scrollTop = 0;
}
function menuClick(id) {
printLog("<b>onClick</b> Item "+menu.getItemText(id)+" (id:"+id+") was clicked<br>");
return true;
}
function menuTouch(id) {
printLog("<b>onTouch</b> Menu was touched at item "+menu.getItemText(id)+" (id:"+id+")<br>");
}
function menuXLS() {
printLog("<b>onXLS</b> XML loading has started<br>");
}
function menuXLE() {
printLog("<b>onXLE</b> XML was loaded into menu<br>");
}
function menuShow(parentId) {
printLog("<b>onShow</b> Menu was shown, parentId <b>"+parentId+"</b><br>");
}
function menuHide(parentId) {
printLog("<b>onHide</b> Menu was hidden, parentId <b>"+parentId+"</b><br>");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onXLS</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuXLS</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onXLE</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuXLE</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onTouch</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuTouch</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onShow</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuShow</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onHide</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuHide</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;doOnLoad&lt;/b&gt; onLoadFunction was called&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-identifier">text</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">text</span><span class="hl-code"> + </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">scrollTop</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onClick&lt;/b&gt; Item </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (id:</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">) was clicked&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuTouch</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onTouch&lt;/b&gt; Menu was touched at item </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (id:</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuXLS</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onXLS&lt;/b&gt; XML loading has started&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuXLE</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onXLE&lt;/b&gt; XML was loaded into menu&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuShow</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onShow&lt;/b&gt; Menu was shown, parentId &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">parentId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuHide</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onHide&lt;/b&gt; Menu was hidden, parentId &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">parentId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,133 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Event Handling In Case Of Dynamical Loading</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Events</a>
</div>
<div style="display:block;">
<h3>Event Handling In Case Of Dynamical Loading</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
* This sample requires PHP to work.
<div id="ta" style="width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;"></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.attachEvent("onXLS", menuXLS);
menu.attachEvent("onXLE", menuXLE);
menu.attachEvent("onClick", menuClick);
menu.attachEvent("onTouch", menuTouch);
menu.enableDynamicLoading("../common/dhtmlxmenu_dl.php");
}
function printLog(text) {
document.getElementById("ta").innerHTML = text+document.getElementById("ta").innerHTML;
document.getElementById("ta").scrollTop = 0;
}
function menuClick(id) {
printLog("<b>onClick</b> Item "+menu.getItemText(id)+" (id:"+id+") was clicked<br>");
}
function menuTouch(id) {
printLog("<b>onTouch</b> Menu was touched at item "+menu.getItemText(id)+" (id:"+id+")<br>");
}
function menuXLS() {
printLog("<b>onXLS</b> XML loading has started<br>");
}
function menuXLE() {
printLog("<b>onXLE</b> XML was loaded into menu<br>");
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
* This sample requires PHP to work.
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onXLS</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuXLS</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onXLE</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuXLE</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onTouch</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuTouch</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">enableDynamicLoading</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhtmlxmenu_dl.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-identifier">text</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">text</span><span class="hl-code"> + </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">scrollTop</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onClick&lt;/b&gt; Item </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (id:</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">) was clicked&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuTouch</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onTouch&lt;/b&gt; Menu was touched at item </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> (id:</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">)&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuXLS</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onXLS&lt;/b&gt; XML loading has started&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuXLE</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onXLE&lt;/b&gt; XML was loaded into menu&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,172 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Event Handling In Case Of Contextual Menu</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Events</a>
</div>
<div style="display:block;">
<h3>Event Handling In Case Of Contextual Menu</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 380px; position: relative;">
<div id="zoneA" style="position: absolute; left: 50px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">zoneA</div>
<div id="zoneB" style="position: absolute; left: 170px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">zoneB</div>
<div id="zoneC" style="position: absolute; left: 290px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">zoneC</div>
</div>
<div id="ta" style="width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;"></div>
<br>
<script>
var menu = new dhtmlXMenuObject();
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu();
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
menu.addContextZone("zoneA");
menu.addContextZone("zoneB");
menu.addContextZone("zoneC");
//
menu.attachEvent("onBeforeContextMenu", function(zoneId){
if (zoneId == "zoneA") {
printLog("<b>onBeforeContextMenu</b>: context menu will shown at <b>"+zoneId+"</b>; deny (return false)<br>");
return false;
}
printLog("<b>onBeforeContextMenu</b>: context menu will shown at <b>"+zoneId+"</b>; allow (return true)<br>");
return true;
});
menu.attachEvent("onAfterContextMenu", function(zoneId){
printLog("<b>onAfterContextMenu</b>: context menu was shown at <b>"+zoneId+"</b><br>");
});
menu.attachEvent("onClick", function(id, zoneId){
printLog("<b>onClick</b>: "+id+" was clicked, context menu at zone <b>"+zoneId+"</b><br>");
});
menu.attachEvent("onRadioClick", function(gruop, checked, clicked, zoneId){
printLog("<b>onRadioClick</b>: "+clicked+" was clicked, context menu at zone <b>"+zoneId+"</b><br>");
return true;
});
menu.attachEvent("onCheckboxClick", function(id, state, zoneId) {
printLog("<b>onCheckboxClick</b>: "+id+" was clicked, context menu at zone <b>"+zoneId+"</b><br>");
return true;
});
menu.attachEvent("onShow", function(parentId){
if (parentId == null) parentId = "null";
printLog("<b>onShow</b>: menu was shown, parentId <b>"+parentId+"</b><br>");
});
// adding onHide event handler
menu.attachEvent("onHide", function(parentId){
if (parentId == null) parentId = "null";
printLog("<b>onHide</b>: menu was hidden, parentId <b>"+parentId+"</b><br>");
});
function printLog(text) {
document.getElementById("ta").innerHTML = text+document.getElementById("ta").innerHTML;
document.getElementById("ta").scrollTop = 0;
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 380px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneA</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 50px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zoneA</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneB</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 170px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zoneB</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneC</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 290px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">zoneC</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneA</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneB</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneC</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment">;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onBeforeContextMenu</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">zoneId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">zoneId</span><span class="hl-code"> == </span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneA</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onBeforeContextMenu&lt;/b&gt;: context menu will shown at &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">zoneId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;; deny (return false)&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">false</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onBeforeContextMenu&lt;/b&gt;: context menu will shown at &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">zoneId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;; allow (return true)&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onAfterContextMenu</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">zoneId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onAfterContextMenu&lt;/b&gt;: context menu was shown at &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">zoneId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onClick&lt;/b&gt;: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> was clicked, context menu at zone &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">zoneId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onRadioClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">gruop</span><span class="hl-code">, </span><span class="hl-identifier">checked</span><span class="hl-code">, </span><span class="hl-identifier">clicked</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onRadioClick&lt;/b&gt;: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">clicked</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> was clicked, context menu at zone &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">zoneId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onCheckboxClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">state</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onCheckboxClick&lt;/b&gt;: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string"> was clicked, context menu at zone &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">zoneId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onShow</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-code"> == </span><span class="hl-reserved">null</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-identifier">parentId</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">null</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onShow&lt;/b&gt;: menu was shown, parentId &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">parentId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment"> adding onHide event handler;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onHide</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">parentId</span><span class="hl-code"> == </span><span class="hl-reserved">null</span><span class="hl-brackets">)</span><span class="hl-code">
</span><span class="hl-identifier">parentId</span><span class="hl-code"> = </span><span class="hl-quotes">&quot;</span><span class="hl-string">null</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onHide&lt;/b&gt;: menu was hidden, parentId &lt;b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">parentId</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;/b&gt;&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">printLog</span><span class="hl-brackets">(</span><span class="hl-identifier">text</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> = </span><span class="hl-identifier">text</span><span class="hl-code"> + </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code">;
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">scrollTop</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,106 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Event Handling: CAS State (Single Loading)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Events</a>
</div>
<div style="display:block;">
<h3>Event Handling: CAS State (Single Loading)</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div id="ta" style="width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;"></div>
<br>
<script>
var menu = new dhtmlXMenuObject("menuObj");
menu.setIconsPath("../common/imgs/");
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
//
menu.attachEvent("onClick", function(id, zoneId, casState){
document.getElementById("ta").innerHTML += "<b>onClick</b> '"+menu.getItemText(id)+"' was clicked, ctrl: "+(casState["ctrl"]?"<b>true</b>":"false")+", alt: "+(casState["alt"]?"<b>true</b>":"false")+", shift: "+(casState["shift"]?"<b>true</b>":"false")+"<br>";
});
menu.attachEvent("onRadioClick", function(gruop, checked, clicked, zoneId, casState) {
document.getElementById("ta").innerHTML += "<b>onRadioClick</b> '"+menu.getItemText(clicked)+"' was clicked, ctrl: "+(casState["ctrl"]?"<b>true</b>":"false")+", alt: "+(casState["alt"]?"<b>true</b>":"false")+", shift: "+(casState["shift"]?"<b>true</b>":"false")+"<br>";
return true;
});
menu.attachEvent("onCheckboxClick", function(id, state, zoneId, casState) {
document.getElementById("ta").innerHTML += "<b>onCheckboxClick</b> '"+menu.getItemText(id)+"' was clicked, ctrl: "+(casState["ctrl"]?"<b>true</b>":"false")+", alt: "+(casState["alt"]?"<b>true</b>":"false")+", shift: "+(casState["shift"]?"<b>true</b>":"false")+"<br>";
return true;
});
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment">;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-code">, </span><span class="hl-identifier">casState</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onClick&lt;/b&gt; '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' was clicked, ctrl: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">ctrl</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, alt: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">alt</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, shift: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">shift</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onRadioClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">gruop</span><span class="hl-code">, </span><span class="hl-identifier">checked</span><span class="hl-code">, </span><span class="hl-identifier">clicked</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-code">, </span><span class="hl-identifier">casState</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onRadioClick&lt;/b&gt; '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">clicked</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' was clicked, ctrl: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">ctrl</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, alt: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">alt</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, shift: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">shift</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onCheckboxClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">state</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-code">, </span><span class="hl-identifier">casState</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onCheckboxClick&lt;/b&gt; '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' was clicked, ctrl: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">ctrl</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, alt: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">alt</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, shift: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">shift</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,114 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Event Handling: CAS State (Contextual Menu)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Events</a>
</div>
<div style="display:block;">
<h3>Event Handling: CAS State (Contextual Menu)</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 380px; position: relative;">
<div id="zoneA" style="position: absolute; left: 50px; top: 100px; width: 200px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
</div>
<div id="ta" style="width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;"></div>
<br>
<script>
var menu = new dhtmlXMenuObject();
menu.setIconsPath("../common/imgs/");
menu.renderAsContextMenu();
menu.loadXML("../common/dhxmenu.xml?e="+new Date().getTime());
menu.addContextZone("zoneA");
//
menu.attachEvent("onClick", function(id, zoneId, casState){
document.getElementById("ta").innerHTML += "<b>onClick</b> '"+menu.getItemText(id)+"' was clicked, ctrl: "+(casState["ctrl"]?"<b>true</b>":"false")+", alt: "+(casState["alt"]?"<b>true</b>":"false")+", shift: "+(casState["shift"]?"<b>true</b>":"false")+"<br>";
});
menu.attachEvent("onRadioClick", function(gruop, checked, clicked, zoneId, casState) {
document.getElementById("ta").innerHTML += "<b>onRadioClick</b> '"+menu.getItemText(clicked)+"' was clicked, ctrl: "+(casState["ctrl"]?"<b>true</b>":"false")+", alt: "+(casState["alt"]?"<b>true</b>":"false")+", shift: "+(casState["shift"]?"<b>true</b>":"false")+"<br>";
return true;
});
menu.attachEvent("onCheckboxClick", function(id, state, zoneId, casState) {
document.getElementById("ta").innerHTML += "<b>onCheckboxClick</b> '"+menu.getItemText(id)+"' was clicked, ctrl: "+(casState["ctrl"]?"<b>true</b>":"false")+", alt: "+(casState["alt"]?"<b>true</b>":"false")+", shift: "+(casState["shift"]?"<b>true</b>":"false")+"<br>";
return true;
});
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 380px; position: relative;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneA</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">position: absolute; left: 50px; top: 100px; width: 200px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 500px; height: 160px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/imgs/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">addContextZone</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">zoneA</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-comment">//</span><span class="hl-comment">;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-code">, </span><span class="hl-identifier">casState</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onClick&lt;/b&gt; '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' was clicked, ctrl: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">ctrl</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, alt: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">alt</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, shift: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">shift</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onRadioClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">gruop</span><span class="hl-code">, </span><span class="hl-identifier">checked</span><span class="hl-code">, </span><span class="hl-identifier">clicked</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-code">, </span><span class="hl-identifier">casState</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onRadioClick&lt;/b&gt; '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">clicked</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' was clicked, ctrl: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">ctrl</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, alt: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">alt</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, shift: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">shift</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onCheckboxClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">state</span><span class="hl-code">, </span><span class="hl-identifier">zoneId</span><span class="hl-code">, </span><span class="hl-identifier">casState</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;onCheckboxClick&lt;/b&gt; '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' was clicked, ctrl: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">ctrl</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, alt: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">alt</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">, shift: </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">casState</span><span class="hl-brackets">[</span><span class="hl-quotes">&quot;</span><span class="hl-string">shift</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">]</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;b&gt;true&lt;/b&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">false</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Events</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img src="../common/icons/menu.gif" alt="" border=0 >dhtmlxMenu</a>
</div>
<div style="display:block;">
<h3>Events</h3>
</div>
<ul class="topics samples">
<li><a href='./01_events_single.html'>Event Handling In Case Of Single Loading</a></li><li><a href='./02_events_dynamic.html'>Event Handling In Case Of Dynamical Loading</a></li><li><a href='./03_events_context.html'>Event Handling In Case Of Contextual Menu</a></li><li><a href='./04_events_single_cas.html'>Event Handling: CAS State (Single Loading)</a></li><li><a href='./05_events_context_cas.html'>Event Handling: CAS State (Contextual Menu)</a></li>
<!--<li><a href="#">Calendar eXcell</a></li>-->
</ul>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,84 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Radio Buttons And Checkboxes Used As Menu Items</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="featured" content="yes"><meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Radios And Checkboxes</a>
</div>
<div style="display:block;">
<h3>Radio Buttons And Checkboxes Used As Menu Items</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<div style="height: 250px;"><div id="menuObj"></div></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.loadXML("../common/dhxmenu_radios.xml?e="+new Date().getTime());
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu_radios.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,107 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Radio Buttons And Checkboxes Event Handling</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body onload="initMenu();">
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/menu.gif" alt="" >dhtmlxMenu</a>
<div class="arrow"></div>
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Radios And Checkboxes</a>
</div>
<div style="display:block;">
<h3>Radio Buttons And Checkboxes Event Handling</h3>
</div>
<div class="navigation-div">
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
</div>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxmenu.js"></script>
<script src="../../codebase/ext/dhtmlxmenu_ext.js"></script>
<p>Menu contains sub items with checkboxes and radio buttons. Try to change their states.</p>
<div style="height: 250px;"><div id="menuObj"></div></div>
<div id="ta" style="width: 500px; height: 100px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;"></div>
<br>
<script>
var menu;
function initMenu() {
menu = new dhtmlXMenuObject("menuObj");
menu.attachEvent("onCheckboxClick", menuCheckboxClick);
menu.attachEvent("onRadioClick", menuRadioClick);
menu.loadXML("../common/dhxmenu_radios.xml?e=" + new Date().getTime());
}
function menuCheckboxClick(id, state) {
document.getElementById("ta").innerHTML += "Checkbox '"+menu.getItemText(id)+"' (id:"+id+") was "+(state?"unchecked":"checked")+"<br>";
return true;
}
function menuRadioClick(group, idChecked, idClicked) {
document.getElementById("ta").innerHTML += "Radiobutton '"+menu.getItemText(idClicked)+"' (id:"+idClicked+") was checked<br>";
return true;
}
</script>
</div>
<div style="clear:both;"></div>
<div class="source">
<div class="teg">Source</div>
<div class="code" id="code">
<div class="hl-main"><pre><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">stylesheet</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxmenu.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code"> </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">height: 250px;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width: 500px; height: 100px; border: #909090 1px solid; overflow: auto; font-size: 10px; font-family: Tahoma;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code">;
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">initMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">menuObj</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onCheckboxClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuCheckboxClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">onRadioClick</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-identifier">menuRadioClick</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../common/dhxmenu_radios.xml?e=</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">getTime</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuCheckboxClick</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">, </span><span class="hl-identifier">state</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">Checkbox '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' (id:</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">id</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">) was </span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-brackets">(</span><span class="hl-identifier">state</span><span class="hl-code"> ? </span><span class="hl-quotes">&quot;</span><span class="hl-string">unchecked</span><span class="hl-quotes">&quot;</span><span class="hl-code">: </span><span class="hl-quotes">&quot;</span><span class="hl-string">checked</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span><span class="hl-code">
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">menuRadioClick</span><span class="hl-brackets">(</span><span class="hl-identifier">group</span><span class="hl-code">, </span><span class="hl-identifier">idChecked</span><span class="hl-code">, </span><span class="hl-identifier">idClicked</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
</span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">ta</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">innerHTML</span><span class="hl-code"> += </span><span class="hl-quotes">&quot;</span><span class="hl-string">Radiobutton '</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getItemText</span><span class="hl-brackets">(</span><span class="hl-identifier">idClicked</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">' (id:</span><span class="hl-quotes">&quot;</span><span class="hl-code"> + </span><span class="hl-identifier">idClicked</span><span class="hl-code"> + </span><span class="hl-quotes">&quot;</span><span class="hl-string">) was checked&lt;br&gt;</span><span class="hl-quotes">&quot;</span><span class="hl-code">;
</span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">;
</span><span class="hl-brackets">}</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Radios And Checkboxes</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Samples" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
<div class="search-field">
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><input class="button" type="submit" value=""><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
</div>
<div class="buttons">
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
<a class="sample"></a>
</div>
</div>
<div class="content">
<div class="navigation-div">
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
<div class="arrow"></div>
<a href="../index.html" class="navigation"><img src="../common/icons/menu.gif" alt="" border=0 >dhtmlxMenu</a>
</div>
<div style="display:block;">
<h3>Radios And Checkboxes</h3>
</div>
<ul class="topics samples">
<li><a href='./01_radios_checks.html'>Radio Buttons And Checkboxes Used As Menu Items</a></li><li><a href='./02_events.html'>Radio Buttons And Checkboxes Event Handling</a></li>
<!--<li><a href="#">Calendar eXcell</a></li>-->
</ul>
</div>
<div class="footer">
<div class="footer-logo"></div>
<div class="copyright">Copyright &copy; 1998-2012 DHTMLX LTD.<br />All rights reserved.</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

View File

@ -0,0 +1,18 @@
<?php
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
This version of Software is free for using in non-commercial applications.
For commercial use please contact sales@dhtmlx.com to obtain license
*/
$mysql_host = "192.168.1.251";
$mysql_user = "sampleDB";
$mysql_pasw = "sampleDB";
$mysql_db = "sampleDB";
/*
$mysql_host = "localhost";
$mysql_user = "root";
$mysql_pasw = "1";
$mysql_db = "dhtmlx";
*/
?>

View File

@ -0,0 +1,485 @@
/* MAIN STYLES */
html {
overflow-x:hidden;
border: none;
}
body {
margin:1px;
color:#666;
font-family: Tahoma, Arial, Helvetica, Tahoma, serif;
font-size:12px;
overflow-x:hidden;
}
h5 {
margin:0;
padding:0;
}
a {
font-family: Tahoma, Arial, Helvetica, serif;
font-size:12px;
color: #058cb6;
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
a.navigation img {
margin-bottom:-5px;
padding-right:5px;
border:none;
}
p {
margin: 20px 0;
}
ul {
padding-bottom:30px;
}
h3 {
color:#000;
font-family: Tahoma, Arial, Helvetica, serif;
font-size:21px;
font-weight:normal;
padding-bottom:37px;
margin-top:35px;
}
h4 {
display:inline-block;
width:100%;
color:#B5B5B5;
font-family: Arial, Helvetica, Tahoma, serif;
font-size:20px;
font-weight:normal;
padding-bottom:20px;
}
h5 {
color:#666;
font-family: Tahoma, Arial, Helvetica, Tahoma, serif;
font-size:13px;
padding:4px 0 10px 0;
font-weight:bold;
}
.column {
float:left;
width:24%;
}
/* HEADER */
.header {
width:100%;
height: 100px;
background:url("../img/head_bg.png");
}
a.logo {
display:block;
margin-left:48px;
height:100px;
width:100px;
background-image:url("../img/logo.png");
float:left;
outline:none;
}
.tittle-dhtmlx {
padding: 29px 0 0 121px;
font-family:arial, serif;
font-size:16px;
color:white;
float:left;
cursor:default;
}
/* Search */
.search-field {
position:absolute;
float:right;
right:67px;
top:30px;
min-width: 430px;
}
.search-field input {
float:left;
width:351px;
height:18px;
background: white url("../img/search-field.png");
border: none;
}
.search-field input:hover {
background-position:0 -20px;
}
input.button {
cursor:pointer;
margin-left:7px;
float:left;
width:70px;
height:20px;
background: white url("../img/search-button.png");
border: 0;
}
input.button:hover {
background-position:0 -20px;
}
/* BUTTONS */
.buttons {
position:absolute;
width: 154px;
height: 24px;
left: 55px;
top:80px;
}
.buttons a.doc {
display:block;
height:24px;
width:93px;
background-image:url("../img/doc-button.png");
float:left;
outline:none;
}
.buttons a.doc_inact {
display:block;
height:24px;
width:92px;
background-image:url("../img/doc-button_inact.png");
float:left;
outline:none;
}
.buttons a.doc_inact:hover {
background-position:0 -24px;
}
.buttons a.sample {
display:block;
height:24px;
width:62px;
background-image:url("../img/samples-but.png");
float:left;
outline:none;
}
.buttons a.sample_inact {
display:block;
height:24px;
width:55px;
background-image:url("../img/samples-but_inact.png");
float:left;
outline:none;
}
.buttons a.sample_inact:hover {
background-position:0 -24px;
}
/* CONTENT */
.content {
margin: 30px 63px 0 63px;
}
.content li {
list-style:none;
height:22px;
}
li img {
margin-bottom:-5px;
padding-right: 7px;
}
.line {
margin: 0;
padding: 1px;
background: url("../img/border-dotted.gif") repeat-x top;
}
/* NAVIGATION */
.navigation-div {
display:block;
height:35px;
width:100%;
margin-bottom:20px;
}
a.navigation {
outline:none;
float:left;
display:block;
height:25px;
padding: 2px 10px 0 5px;
border: solid 1px #cccccc;
}
a.navigation:hover {
background-color: #eaeff4;
border-color: #6699CC;
text-decoration:none;
outline:none;
}
a.navigation img {
margin-bottom:-5px;
padding-right:5px;
border:none;
}
.arrow {
float:left;
height:23px;
background:url("../img/arrow.gif");
margin: 3px 3px;
width:8px;
}
a.view-source {
border: dashed 1px #cccccc;
}
/* LOGOS */
.big_logo {
display:block;
width:200px;
height:54px;
overflow:hidden;
line-height:1000px;
margin: 40px 0 20px 0;
}
.logo_grid{
background:transparent url("../img/logo_grid.gif") no-repeat;
}
.logo_treegrid{
background:transparent url("../img/logo_treegrid.gif") no-repeat;
}
.logo_tree{
background:transparent url("../img/logo_tree.gif") no-repeat;
}
.logo_layout{
background:transparent url("../img/logo_layout.gif") no-repeat;
}
.logo_menu{
background:transparent url("../img/logo_menu.gif") no-repeat;
}
.logo_toolbar{
background:transparent url("../img/logo_toolbar.gif") no-repeat;
}
.logo_windows{
background:transparent url("../img/logo_windows.gif") no-repeat;
}
.logo_calendar{
background:transparent url("../img/logo_calendar.gif") no-repeat;
}
.logo_slider{
background:transparent url("../img/logo_slider.gif") no-repeat;
}
.logo_scheduler{
background:transparent url("../img/logo_scheduler.gif") no-repeat;
}
.logo_colorpicker{
background:transparent url("../img/logo_colorpicker.gif") no-repeat;
}
.logo_combo{
background:transparent url("../img/logo_combo.gif") no-repeat;
}
.logo_tabbar{
background:transparent url("../img/logo_tabbar.gif") no-repeat;
}
.logo_accordion{
background:transparent url("../img/logo_accordion.gif") no-repeat;
}
.logo_folders{
background:transparent url("../img/logo_folders.gif") no-repeat;
}
.logo_editor{
background:transparent url("../img/logo_editor.gif") no-repeat;
}
.logo_ajax{
background:transparent url("../img/logo_ajax.gif") no-repeat;
}
.logo_gantt{
background:transparent url("../img/logo_gantt.gif") no-repeat;
}
.logo_chart{
background:transparent url("../img/logo_chart.gif") no-repeat;
}
.logo_dataview{
background:transparent url("../img/logo_dataview.gif") no-repeat;
}
.logo_form{
background:transparent url("../img/logo_form.gif") no-repeat;
}
/* Topics */
.topics li {
background:url("../icons/old.gif") no-repeat;
padding-left: 25px;
line-height:22px;
}
.samples li {
background:url("../icons/file.gif") no-repeat;
}
ul.list {
margin-left:40px;
}
.list li {
list-style-image:url("../icons/bullet.gif");
}
.component-demo-placeholder {
width:602px;
height:252px;
background:url("../img/grid-placeholder.gif");
}
/* FOOTER */
.footer {
display:block;
float:left;
width:100%;
height:64px;
background: white url("../img/border-dotted-ccc.gif") repeat-x;
}
.footer-logo {
float:left;
width:55px;
height:24px;
background:url("../img/footer-logo.gif");
margin: 20px 20px 20px 63px;
}
.copyright {
float:left;
margin-top:18px;
font-size:11px;
}
/* CODE */
.source {
width:100%;
background:url("../img/source-bg.gif");
border-top: dashed 3px #ccc;
border-bottom: dotted 1px #ccc;
margin-top:20px;
clear:both;
}
.code {
margin:20px 63px;
}
.teg {
height:40px;
color:#ccc;
font-size:30px;
font-family: Tahoma, Arial, Helvetica, Tahoma, serif;
background:url("../img/source.gif") no-repeat 0 22px;
padding: 10px 0 0 63px;
}
/*colorizer*/
.hl-default {
color: Black;
}
.hl-code {
color: Gray;
}
.hl-brackets {
color: Olive;
}
.hl-comment {
color: Orange;
}
.hl-quotes {
color: Darkred;
}
.hl-string {
color: Red;
}
.hl-identifier {
color: Blue;
}
.hl-identifier a{
font-family: "Courier New";
font-size: 11px;
color: Blue;
text-decoration: underline;
}
.hl-builtin {
color: Teal;
}
.hl-reserved {
color: Green;
}
.hl-inlinedoc {
color: Blue;
}
.hl-var {
color: Darkblue;
}
.hl-url {
color: Blue;
}
.hl-special {
color: Navy;
}
.hl-number {
color: Maroon;
}
.hl-inlinetags {
color: Blue;
}
.hl-main {
background: transparent;
}
.hl-gutter {
background-color: #999999;
color: White
}
.hl-table {
font-family: "Courier New";
font-size: 12px;
border: solid 1px lightgray;
}

View File

@ -0,0 +1,45 @@
<?php
header("Content-Type: text/xml");
//include db connection settings
require_once("./config.php");
$link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw);
$db = mysql_select_db ($mysql_db);
function get_menu_xml($parent_id, $top_id) {
if (!isset($parent_id)) {
// top level
$xml = '<?xml version="1.0"?><menu>';
$parent_id = "topId";
} else {
// sublevel
$xml = '<?xml version="1.0"?><menu parentId="'.$parent_id.'">';
}
$res = mysql_query("SELECT `a`.`itemId`, `a`.`itemText`, `a`.`itemType`, `a`.`itemEnabled`, `a`.`itemChecked`, `a`.`itemGroup`, `a`.`itemImage`, `a`.`itemImageDis`, COUNT(`b`.`itemId`) AS `itemComplex` FROM `dhtmlxmenu` AS `a` LEFT JOIN (`dhtmlxmenu` AS `b`) ON (`b`.`itemParentId`=`a`.`itemId`) WHERE `a`.`itemParentId`='".mysql_real_escape_string($parent_id)."' GROUP BY `a`.`itemId` ORDER BY `a`.`itemOrder`");// or die(mysql_error());
while ($out = mysql_fetch_object($res)) {
$xml = $xml.'<item id="'.$out->itemId.'" text="'.$out->itemText.'"'.
(strlen($out->itemType)>0?' type="'.$out->itemType.'"':'').
($out->itemEnabled=="0"?' enabled="false"':'').
($out->itemChecked=="1"?' checked="true"':'').
(strlen($out->itemGroup)>0?' group="'.$out->itemGroup.'"':'').
(strlen($out->itemImage)>0?' img="'.$out->itemImage.'"':'').
(strlen($out->itemImageDis)>0?' imgdis="'.$out->itemImageDis.'"':'').
($out->itemComplex>0?' complex="true"':'').
'/>';
}
mysql_free_result($res);
//
$xml = $xml.'</menu>';
return $xml;
}
switch(@$_GET["action"]) {
case "loadMenu":
echo get_menu_xml(@$_GET["parentId"], @$_GET["topId"]);
break;
}
mysql_close($link);
?>

View File

@ -0,0 +1,31 @@
<?xml version="1.0"?>
<menu>
<item id="file" text="File">
<item id="new" text="New" img="new.gif" imgdis="new_dis.gif"/>
<item id="file_sep_1" type="separator"/>
<item id="open" text="Open" img="open.gif" imgdis="open_dis.gif"/>
<item id="save" text="Save" img="save.gif" imgdis="save_dis.gif"/>
<item id="saveAs" text="Save As..." img="save_as.gif" imgdis="save_as_dis.gif" enabled="false"/>
<item id="file_sep_2" type="separator"/>
<item id="print" text="Print" img="print.gif" imgdis="print_dis.gif"/>
<item id="pageSetup" text="Page Setup" img="page_setup.gif" imgdis="page_setup_dis.gif" enabled="false"/>
<item id="file_sep_3" type="separator"/>
<item id="close" text="Close" img="close.gif" imgdis="close_dis.gif"/>
</item>
<item id="sep_top_1" type="separator"/>
<item id="edit" text="Edit">
<item id="undo" text="Undo" img="undo.gif" imgdis="undo_dis.gif"/>
<item id="redo" text="Redo" img="redo.gif" imgdis="redo_dis.gif"/>
<item id="edit_sep_1" type="separator"/>
<item id="selectAll" text="Select All" img="select_all.gif" imgdis="select_all_dis.gif"/>
<item id="edit_sep_2" type="separator"/>
<item id="cut" text="Cut" img="cut.gif" imgdis="cut_dis.gif"/>
<item id="copy" text="Copy" img="copy.gif" imgdis="copy_dis.gif"/>
<item id="paste" text="Paste" img="paste.gif" imgdis="paste_dis.gif"/>
</item>
<item id="help" text="Help">
<item id="about" text="About..." img="about.gif" imgdis="about_dis.gif"/>
<item id="needhelp" text="Help" img="help.gif" imgdis="help_dis.gif"/>
<item id="bugReporting" text="Bug Reporting" img="bug_reporting.gif" imgdis="bug_reporting_dis.gif"/>
</item>
</menu>

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<menu>
<item id="view" text="View">
<item id="zoomIn" text="Zoom In" img="zoom_in.gif"/>
<item id="zoomOut" text="Zoom Out" img="zoom_out.gif"/>
<item id="zoom100" text="Zoom 100%" img="zoom_100.gif"/>
<item id="view_sep_1" type="separator"/>
<item id="reload" text="Reload" img="reload.gif"/>
<item id="view_sep_2" type="separator"/>
<item id="sourceCode" text="Source Code" img="source_code.gif"/>
<item id="fullscreenMode" text="Fullscreen Mode" img="fullscreen_mode.gif"/>
</item>
<item id="tools" text="Tools">
<item id="search" text="Search" img="search.gif"/>
<item id="tools_sep_1" type="separator"/>
<item id="downloads" text="Downloads" img="downloads.gif"/>
<item id="addons" text="Addons" img="addons.gif"/>
<item id="tools_sep_2" type="separator"/>
<item id="console" text="Console" img="console.gif"/>
<item id="pageInfo" text="Page Info" img="page_info.gif"/>
<item id="tools_sep_3" type="separator"/>
<item id="privateData" text="Private Data" img="private_data.gif"/>
</item>
</menu>

Some files were not shown because too many files have changed in this diff Show More