admin/js/context_menu.js

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * 
 * @version        $Id: context_menu.js 1 22:28 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */

var MenuWidth = 120;
var ItemHeight = 16;
var ItemNumber = 0;

function curNav(){
    if(window.navigator.userAgent.indexOf("MSIE")>=1) return 'IE';
    else if(window.navigator.userAgent.indexOf("Firefox")>=1) return 'FF';
    else return 'OT';
}

function insertHtm(op,code,isStart){ 
    if(curNav()=='IE') {
        op.insertAdjacentHTML(isStart ? "beforeEnd" : "afterEnd",code); 
    } else { 
    var range=op.ownerDocument.createRange(); 
    range.setStartBefore(op); 
    var fragment = range.createContextualFragment(code); 
    if(isStart) op.insertBefore(fragment,op.firstChild); 
    else op.appendChild(fragment);
  } 
}

    ContextMenu.WebFX_PopUp = null;
    ContextMenu.WbFX_PopUpcss = null;

    ContextMenu.intializeContextMenu=function(){
	insertHtm(document.body,'<iframe src="#" scrolling="no" class="WebFX-ContextMenu" marginwidth="0" marginheight="0" frameborder="0" style="position:absolute;display:none;z-index:50000000;" id="WebFX_PopUp"></iframe>',true);
	
	if(curNav()=='IE') WebFX_PopUp = document.frames['WebFX_PopUp'];
	else WebFX_PopUp = document.getElementById('WebFX_PopUp');
		
	WebFX_PopUpcss = document.getElementById('WebFX_PopUp');	
	
	WebFX_PopUpcss.onfocus  = function(){WebFX_PopUpcss.style.display="inline"};
	WebFX_PopUpcss.onblur  = function(){WebFX_PopUpcss.style.display="none"};
	
	if(curNav()=='IE') document.body.attachEvent("onmousedown",function(){WebFX_PopUpcss.style.display="none"});
	else  document.addEventListener("onblur",function(){WebFX_PopUpcss.style.display="none"},false);
		
	if(curNav()=='IE') document.attachEvent("onblur",function(){WebFX_PopUpcss.style.display="none"});
	else document.addEventListener("onblur",function(){WebFX_PopUpcss.style.display="none"},false);
		
}


function ContextSeperator(){}

function ContextMenu(){}

ContextMenu.showPopup=function(x,y){
    WebFX_PopUpcss.style.display = "block"
后面还有 110 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。