亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? context-menu.js

?? ajax 拖拽樹(shù)可以拖拽節(jié)點(diǎn) 刪除節(jié)點(diǎn) 重命名節(jié)點(diǎn)
?? JS
字號(hào):
/************************************************************************************************************
Context menu
Copyright (C) 2006  DTHMLGoodies.com, Alf Magne Kalleland

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Dhtmlgoodies.com., hereby disclaims all copyright interest in this script
written by Alf Magne Kalleland.

Alf Magne Kalleland, 2006
Owner of DHTMLgoodies.com


************************************************************************************************************/	

DHTMLGoodies_menuModel = function()
{
	var menuItems;
	this.menuItems = new Array();
	
	
}

/************************************************************************************************************
*	DHTML menu model class
*
*	Created:						October, 30th, 2006
*	@class Purpose of class:		Saves menu item data
*			
*
*	Demos of this class:			demo-menu-strip.html
*
* 	Update log:
*
************************************************************************************************************/


/**
* @constructor
* @class Purpose of class:	Organize menu items for different menu widgets. demos of menus: (<a href="../../demos/demo-menu-strip.html" target="_blank">Demo</a>)
* @version 1.0
* @author	Alf Magne Kalleland(www.dhtmlgoodies.com)
*/


DHTMLGoodies_menuModel.prototype = {
	// {{{ addItem()
    /**
     *	Add separator (special type of menu item)
     *
     *  @param int id of menu item
     *  @param string itemText = text of menu item
     *  @param string itemIcon = file name of menu icon(in front of menu text. Path will be imagePath for the DHTMLSuite + file name)
     *  @param string url = Url of menu item
     *  @param int parent id of menu item     
     *  @param String jsFunction Name of javascript function to execute. It will replace the url param. The function with this name will be called and the element triggering the action will be 
     *					sent as argument. Name of the element which triggered the menu action may also be sent as a second argument. That depends on the widget. The context menu is an example where
     *					the element triggering the context menu is sent as second argument to this function.    
     *
     * @public	
     */			
	addItem : function(id,itemText,itemIcon,url,parentId,jsFunction)
	{
		this.menuItems[id] = new Array();
		this.menuItems[id]['id'] = id;
		this.menuItems[id]['itemText'] = itemText;
		this.menuItems[id]['itemIcon'] = itemIcon;
		this.menuItems[id]['url'] = url;
		this.menuItems[id]['parentId'] = parentId;
		this.menuItems[id]['separator'] = false;
		this.menuItems[id]['jsFunction'] = jsFunction;
		
	}	
	,
	// {{{ addSeparator()
    /**
     *	Add separator (special type of menu item)
     *
     *  @param int id of menu item
     *  @param int parent id of menu item
     * @public	
     */		
	addSeparator : function(id,parentId)
	{
		this.menuItems[id] = new Array();
		this.menuItems[id]['parentId'] = parentId;		
		this.menuItems[id]['separator'] = true;
	}	
	,
	// {{{ init()
    /**
     *	Initilizes the menu model. This method should be called when all items has been added to the model.
     *
     *
     * @public	
     */		
	init : function()
	{
		this.__getDepths();	
		
	}
	// }}}		
	,
	// {{{ __getDepths()
    /**
     *	Create variable for the depth of each menu item.
     * 	
     *
     * @private	
     */		
	getItems : function()
	{
		return this.menuItems;
	}
		
	,
	// {{{ __getDepths()
    /**
     *	Create variable for the depth of each menu item.
     * 	
     *
     * @private	
     */	
    __getDepths : function()
    {    	
    	for(var no in this.menuItems){
    		this.menuItems[no]['depth'] = 1;
    		if(this.menuItems[no]['parentId']){
    			this.menuItems[no]['depth'] = this.menuItems[this.menuItems[no]['parentId']]['depth']+1;
    		}    		
    	}    	
    }	
    ,
	// {{{ __hasSubs()
    /**
     *	Does a menu item have sub elements ?
     * 	
     *
     * @private	
     */	
	// }}}	
	__hasSubs : function(id)
	{
		for(var no in this.menuItems){	// Looping through menu items
			if(this.menuItems[no]['parentId']==id)return true;		
		}
		return false;	
	}
 

}



var referenceToDHTMLSuiteContextMenu;


DHTMLGoodies_contextMenu = function()
{
	var menuModels;
	var menuItems;	
	var menuObject;			// Reference to context menu div
	var layoutCSS;
	var menuUls;			// Array of <ul> elements
	var width;				// Width of context menu
	var srcElement;			// Reference to the element which triggered the context menu, i.e. the element which caused the context menu to be displayed.
	var indexCurrentlyDisplayedMenuModel;	// Index of currently displayed menu model.
	var imagePath;

	this.menuModels = new Array();
	this.menuObject = false;
	this.menuUls = new Array();
	this.width = 100;
	this.srcElement = false;
	this.indexCurrentlyDisplayedMenuModel = false;
	this.imagePath = 'images/';
	
	
}

DHTMLGoodies_contextMenu.prototype = 
{
	
	setWidth : function(newWidth)
	{
		this.width = newWidth;
	}
	// }}}
	,	
	// {{{ setLayoutCss()
    /**
     *	Add menu items
     *
     *  @param String cssFileName Name of css file 	
     *
     * @public	
     */		
	setLayoutCss : function(cssFileName)
	{
		this.layoutCSS = cssFileName;	
	}	
	// }}}	
	,	
	// {{{ attachToElement()
    /**
     *	Add menu items
     *
     *  @param Object HTML Element = Reference to html element
     *  @param String elementId = String id of element(optional). An alternative to HTML Element	
     *
     * @public	
     */		
	attachToElement : function(element,elementId,menuModel)
	{
		window.refToThisContextMenu = this;
		if(!element && elementId)element = document.getElementById(elementId);
		if(!element.id){
			element.id = 'context_menu' + Math.random();
			element.id = element.id.replace('.','');
		}
		this.menuModels[element.id] = menuModel;
		element.oncontextmenu = this.__displayContextMenu;
		//element.onmousedown = function() { window.refToThisContextMenu.__setReference(window.refToThisContextMenu); };
		document.documentElement.onclick = this.__hideContextMenu;
		
	}	
	// }}}
	,
	// {{{ __setReference()
    /**
     *	Creates a reference to current context menu object. (Note: This method should be deprecated as only one context menu object is needed)
     *
     *  @param Object context menu object = Reference to context menu object
     *
     * @private	
     */		
	__setReference : function(obj)
	{	
		referenceToDHTMLSuiteContextMenu = obj;	
	}
	,
	// {{{ __displayContextMenu()
    /**
     *	Displays the context menu
     *
     *  @param Event e
     *
     * @private	
     */		
	__displayContextMenu : function(e)
	{
		if(document.all)e = event;		
		var ref = referenceToDHTMLSuiteContextMenu;
		ref.srcElement = ref.getSrcElement(e);
		
		if(!ref.indexCurrentlyDisplayedMenuModel || ref.indexCurrentlyDisplayedMenuModel!=this.id){		
				
			if(ref.indexCurrentlyDisplayedMenuModel){
				ref.menuObject.innerHTML = '';				
			}else{
				ref.__createDivs();
			}
			ref.menuItems = ref.menuModels[this.id].getItems();			
			ref.__createMenuItems();	
		}
		ref.indexCurrentlyDisplayedMenuModel=this.id;
		
		ref.menuObject.style.left = (e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft)) + 'px';
		ref.menuObject.style.top = (e.clientY + Math.max(document.body.scrollTop,document.documentElement.scrollTop)) + 'px';
		ref.menuObject.style.display='block';
		return false;
			
	}
	// }}}
	,
	// {{{ __displayContextMenu()
    /**
     *	Add menu items
     *
     *  @param Event e
     *
     * @private	
     */		
	__hideContextMenu : function()
	{
		var ref = referenceToDHTMLSuiteContextMenu;
		if(ref.menuObject)ref.menuObject.style.display = 'none';
		
		
	}
	// }}}
	,
	// {{{ __createDivs()
    /**
     *	Creates general divs for the menu
     *
     *
     * @private	
     */		
	__createDivs : function()
	{
		this.menuObject = document.createElement('DIV');
		this.menuObject.className = 'DHTMLSuite_contextMenu';
		this.menuObject.style.backgroundImage = 'url(\'' + this.imagePath + 'context-menu-gradient.gif' + '\')';
		this.menuObject.style.backgroundRepeat = 'repeat-y';
		if(this.width)this.menuObject.style.width = this.width + 'px';
		document.body.appendChild(this.menuObject);
	}
	// }}}
	,
	
	// {{{ __mouseOver()
    /**
     *	Display mouse over effect when moving the mouse over a menu item
     *
     *
     * @private	
     */		
	__mouseOver : function()
	{
		this.className = 'DHTMLSuite_item_mouseover';	
		if(!document.all){
			this.style.backgroundPosition = 'left center';
		}
									
	}
	// }}}
	,
	// {{{ __mouseOut()
    /**
     *	Remove mouse over effect when moving the mouse away from a menu item
     *
     *
     * @private	
     */		
	__mouseOut : function()
	{
		this.className = '';
		if(!document.all){
			this.style.backgroundPosition = '1px center';
		}		
	}
	// }}}
	,
	// {{{ __createMenuItems()
    /**
     *	Create menu items
     *
     *
     * @private	
     */		
	__evalUrl : function()
	{
		var js = this.getAttribute('jsFunction');
		if(!js)js = this.jsFunction;
		if(js)eval(js);
		
	}
	// }}}
	,
	// {{{ __createMenuItems()
    /**
     *	Create menu items
     *
     *
     * @private	
     */		
	__createMenuItems : function()
	{
		window.refToContextMenu = this;	// Reference to menu strip object
		this.menuUls = new Array();
		for(var no in this.menuItems){	// Looping through menu items		
			if(!this.menuUls[0]){	// Create main ul element
				this.menuUls[0] = document.createElement('UL');
				this.menuObject.appendChild(this.menuUls[0]);
			}
			
			if(this.menuItems[no]['depth']==1){

				if(this.menuItems[no]['separator']){
					var li = document.createElement('DIV');
					li.className = 'DHTMLSuite_contextMenu_separator';
				}else{				
					var li = document.createElement('LI');
					if(this.menuItems[no]['jsFunction']){
						this.menuItems[no]['url'] = this.menuItems[no]['jsFunction'] + '(this,referenceToDHTMLSuiteContextMenu.srcElement)';
					}
					if(this.menuItems[no]['itemIcon']){
						li.style.backgroundImage = 'url(\'' + this.menuItems[no]['itemIcon'] + '\')';
						if(!document.all)li.style.backgroundPosition = '1px center';

					}
					
					if(this.menuItems[no]['url']){
						var url = this.menuItems[no]['url'] + '';
						var tmpUrl = url + '';
						li.setAttribute('jsFunction',url);
						li.jsFunction = url;
						li.onclick = this.__evalUrl;

					}
					
					li.innerHTML = '<a href="#" onclick="return false">' + this.menuItems[no]['itemText'] + '</a>';
					li.onmouseover = this.__mouseOver;
					li.onmouseout = this.__mouseOut;
				}				
				this.menuUls[0].appendChild(li);			
			}		
		}		
	}

	,
	
	// {{{ getSrcElement()
    /**
     *
     *  Returns a reference to the element which triggered an event.
     *	@param Event e = Event object
     *
     * 
     * @private
     */	       
    getSrcElement : function(e)
    {
    	var el;
		// Dropped on which element
		if (e.target) el = e.target;
			else if (e.srcElement) el = e.srcElement;
			if (el.nodeType == 3) // defeat Safari bug
				el = el.parentNode;
		return el;	
    }
    	
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色琪琪一区二区三区亚洲区| 六月丁香婷婷色狠狠久久| 美女在线观看视频一区二区| 色偷偷88欧美精品久久久 | 欧美丰满美乳xxx高潮www| 国产精品入口麻豆九色| 香蕉加勒比综合久久| 欧美中文字幕不卡| 成人免费视频在线观看| 国产精品一区二区在线播放| 91麻豆精品国产自产在线观看一区| 亚洲精品亚洲人成人网在线播放| 国产成人超碰人人澡人人澡| 精品久久久久一区| 久久99久久精品| 日韩免费一区二区三区在线播放| 日韩专区一卡二卡| 欧美一级高清大全免费观看| 视频一区二区三区中文字幕| 欧美日韩国产美| 首页综合国产亚洲丝袜| 欧美日韩在线一区二区| 一区二区三区成人| 欧美久久久久久久久| 日韩av在线播放中文字幕| 日韩欧美一区二区视频| 美女视频一区在线观看| 久久久久久久久久久久久久久99| 国产真实乱对白精彩久久| 久久久高清一区二区三区| 成人av电影在线观看| 亚洲欧美在线视频观看| 欧美日韩视频专区在线播放| 天天色 色综合| 精品少妇一区二区三区在线视频| 青草av.久久免费一区| 亚洲国产精品二十页| 97se亚洲国产综合自在线 | 日韩一区二区免费在线观看| 国产一区二区三区四区五区入口 | 欧美一区二区三区人| 高清视频一区二区| 亚洲高清在线视频| 久久国产麻豆精品| 婷婷开心激情综合| 欧美色老头old∨ideo| 亚洲欧美欧美一区二区三区| 成人中文字幕在线| 粉嫩绯色av一区二区在线观看| 韩国一区二区视频| 香蕉乱码成人久久天堂爱免费| 日韩欧美亚洲一区二区| 99久久国产综合精品色伊| 美女脱光内衣内裤视频久久网站| 国产精品久久久爽爽爽麻豆色哟哟| 91精品黄色片免费大全| 国产成人99久久亚洲综合精品| |精品福利一区二区三区| 欧美日韩不卡在线| 91香蕉视频污在线| 国产一区二区三区免费在线观看| 亚洲国产视频直播| 综合激情网...| 中文字幕一区二区三区精华液| 欧美va亚洲va| 欧美精品自拍偷拍| 欧美性大战久久久久久久蜜臀| 91网上在线视频| 99国产麻豆精品| 国产成人午夜精品5599| 伊人性伊人情综合网| 亚洲品质自拍视频| 综合久久久久久| 国产精品久久久久影院色老大| 久久精品网站免费观看| 精品嫩草影院久久| 欧美日韩国产乱码电影| 欧美日韩视频在线一区二区| 欧美在线看片a免费观看| 色综合天天性综合| 91亚洲永久精品| 7777精品伊人久久久大香线蕉经典版下载 | 欧美一级二级三级蜜桃| 久久综合九色欧美综合狠狠| 国产精品热久久久久夜色精品三区| 1024亚洲合集| 五月天激情小说综合| 国产在线麻豆精品观看| va亚洲va日韩不卡在线观看| 欧美日韩国产在线观看| 国产农村妇女毛片精品久久麻豆| 一区二区在线观看视频在线观看| 久久爱另类一区二区小说| 91免费小视频| 国产婷婷色一区二区三区在线| 亚洲国产精品久久不卡毛片| 成人精品一区二区三区四区| 欧美成人艳星乳罩| 日韩专区一卡二卡| 欧美写真视频网站| 欧美大片在线观看| 亚洲在线免费播放| 国产成人一区在线| 日韩女优毛片在线| 亚洲国产精品影院| 99久久综合国产精品| 久久免费的精品国产v∧| 亚洲国产va精品久久久不卡综合| 成人性生交大合| 久久久久久久久久久黄色 | 99国产精品久| 中文字幕电影一区| 国产成人免费9x9x人网站视频| 91精品国产一区二区三区香蕉 | 91性感美女视频| 欧美激情综合在线| 国产成人免费视频网站高清观看视频| 日韩午夜三级在线| 天天色天天操综合| 56国语精品自产拍在线观看| 一区二区三区免费看视频| 色天使久久综合网天天| 亚洲欧美日韩中文字幕一区二区三区 | 在线一区二区三区四区五区| 欧美国产成人精品| 国产超碰在线一区| 国产精品不卡在线观看| 99精品在线观看视频| 亚洲欧洲三级电影| 欧洲一区二区三区在线| 亚洲一区二区成人在线观看| 欧美精品在线一区二区三区| 丝袜亚洲另类欧美综合| 日韩三级.com| 国产另类ts人妖一区二区| 中文字幕一区二区视频| 色婷婷亚洲婷婷| 午夜精品福利在线| 精品欧美一区二区久久| 高清不卡在线观看av| 一区二区三区久久| 日韩一区二区三| 粉嫩av一区二区三区| 亚洲综合色自拍一区| 日韩一区二区在线播放| 国产成人av资源| 一区二区三区在线视频观看| 91精品国产综合久久蜜臀| 欧美三区在线观看| 免费观看在线综合色| 国产精品视频第一区| 欧美卡1卡2卡| 成年人网站91| 久久精品国产久精国产| 一区二区三区在线播放| 久久久精品中文字幕麻豆发布| 日本伦理一区二区| 国产成人精品网址| 日韩一区欧美二区| 一区二区三区在线观看网站| 欧美成人在线直播| 欧美午夜片在线观看| 99久久国产综合精品色伊| 精品一区二区三区在线播放| 亚洲狠狠爱一区二区三区| 国产精品国产自产拍高清av| 精品国产免费人成在线观看| 精品视频一区三区九区| 色哟哟国产精品| 国产成人在线观看免费网站| 美女网站视频久久| 日本美女一区二区| 亚洲成人一二三| 亚洲宅男天堂在线观看无病毒| ●精品国产综合乱码久久久久 | 一区二区三区在线视频播放| 久久精品夜夜夜夜久久| 欧美精品一区男女天堂| 欧美日韩一区 二区 三区 久久精品 | 国产一区二区影院| 日一区二区三区| 亚洲成人免费看| 亚洲另类春色国产| 一区二区三区在线观看国产| 1024亚洲合集| 亚洲专区一二三| 亚洲无人区一区| www.99精品| 91网站视频在线观看| 99精品欧美一区| 欧美中文字幕一区| 精品视频在线免费| 日韩欧美一区在线| 2020国产精品| 中文字幕av不卡| 亚洲精品成人少妇| 婷婷夜色潮精品综合在线| 麻豆国产一区二区| 粉嫩一区二区三区性色av| 91麻豆产精品久久久久久|