Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/luoluo/zhky/src/commit/01812443078d5c7fd9f904418192e37ab3380f9a/out/artifacts/zhyw_war_exploded/js/2k3MenuRoot.htc You should set ROOT_URL correctly, otherwise the web may not work correctly.
zhky/out/artifacts/zhyw_war_exploded/js/2k3MenuRoot.htc

293 lines
6.9 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<PUBLIC:COMPONENT
    lightWeight = true
>
<PUBLIC:DEFAULTS
    contentEditable = false
    tabStop = true
/>
<PUBLIC:attach event="ondocumentready" onevent="initElement()" />
<PUBLIC:attach event="onmouseover" onevent="elementOnMouseOver()" />
<PUBLIC:attach event="onmouseout" onevent="elementOnMouseOut()" />
<PUBLIC:attach event="onmousedown" onevent="elementOnMouseDown()" />
<PUBLIC:attach event="onmouseup" onevent="elementOnMouseUp()" />
<PUBLIC:attach event="onpropertychange" onevent="elementPropertyChange()" />
<PUBLIC:attach event="onselectstart" onevent="elementOnSelect()" />
<PUBLIC:attach event="oncontextmenu" onevent="elementOnContextMenu()" />
<PUBLIC:attach event="ondetach" onevent="cleanupElement()" />
<PUBLIC:property name="enabled" value=true />
<PUBLIC:property name="menu" value />
<PUBLIC:property name="menuState" value />
<PUBLIC:method name="hideMenu" />
<script language="jscript">
// ----------------------------------------------------
// 2k3Widgets: 2k3MenuRoot
//
// Copyright ©2002-2004 Stedy Software and Systems
// Please see http://www.stedy.com for terms of use.
// ----------------------------------------------------
var menuShadowArray = new Array(null, null, null, null) ;
var vbLeftButton = 1 ;
function initElement() {
for (var i = 3; i >= 0; i--) {
menuShadowArray[i] = window.document.createElement("TD") ;
menuShadowArray[i].className = "2k3ShadowElement" ;
element.parentElement.insertAdjacentElement("afterBegin", menuShadowArray[i]) ;
}
element.enabled = makeBooleanOfAttribute("enabled") ;
element.subMenuState = makeBooleanOfAttribute("subMenuState") ;
if (!element.enabled) {
showDisabled(element) ;
}
}
function cleanupElement() {
for (var i = 0; i <= 3; i++) {
if (menuShadowArray[i] != null) {
menuShadowArray[i].style.visibility = "hidden" ;
menuShadowArray[i].removeNode(true) ;
menuShadowArray[i] = null ;
}
}
}
function elementOnMouseOver() {
var el = window.event.srcElement ;
if (el.className == "2k3MenuRootCaption") {
el = el.parentElement ;
}
if (el.className == "2k3MenuRoot") {
if (isElementEnabled(el)) {
if (checkMenuStates()) {
if (element.parentElement.parentElement.parentElement.activeChild == null) {
showActive(el) ;
showMenu() ;
element.menuState = true ;
}
}
else {
if (!element.menuState) {
if (element.parentElement.parentElement.parentElement.activeChild != null) {
if (element.parentElement.parentElement.parentElement.activeChild.parentElement == element.parentElement) {
showOver(el) ;
}
}
else {
showOver(el) ;
}
}
}
}
}
}
function elementOnMouseOut() {
var el = window.event.srcElement ;
if (el.className == "2k3MenuRootCaption") {
el = el.parentElement ;
}
if (el.className == "2k3MenuRootOver") {
if (isElementEnabled(el)) {
if (!element.menuState) {
showNormal(el) ;
}
}
}
}
function elementOnMouseDown() {
var el = window.event.srcElement ;
if (el.className == "2k3MenuRootCaption") {
el = el.parentElement ;
}
if (el.className == "2k3MenuRootOver") {
if ((window.event.button == vbLeftButton) && isElementEnabled(el)) {
if (!element.menuState) {
showActive(el) ;
showMenu() ;
}
}
}
}
function elementOnMouseUp() {
var el = window.event.srcElement ;
if (el.className == "2k3MenuRootCaption") {
el = el.parentElement ;
}
if (el.className == "2k3MenuRootActive") {
if ((window.event.button == vbLeftButton) && isElementEnabled(el)) {
if (element.menuState) {
hideMenu() ;
showOver(el) ;
}
else {
element.menuState = true ;
}
}
}
}
function elementPropertyChange() {
if (window.event.propertyName == "enabled") {
if (element.enabled) {
showEnabled(element) ;
}
else {
showDisabled(element) ;
}
}
}
function elementOnSelect() {
with (window.event) {
cancelBubble = true ;
returnValue = false ;
}
return false ;
}
function elementOnContextMenu() {
with (window.event) {
cancelBubble = true ;
returnValue = false ;
}
return false ;
}
function isElementEnabled(el) {
return el.enabled ;
}
function showNormal(el) {
for (var i = 0; i <= 3; i++) {
if (menuShadowArray[i] != null) {
menuShadowArray[i].style.visibility = "hidden" ;
}
}
el.className = "2k3MenuRoot" ;
}
function showOver(el) {
el.className = "2k3MenuRootOver" ;
}
function showActive(el) {
el.className = "2k3MenuRootActive" ;
for (var i = 3; i >= 0; i--) {
with (menuShadowArray[i].style) {
left = el.offsetLeft + (4 + i) - 1 ;
top = el.offsetTop + (4 + i) ;
width = el.offsetWidth - (i * 2) ;
height = el.offsetHeight - (i * 2) ;
zIndex = el.style.zIndex - 1 ;
visibility = "visible" ;
}
}
}
function showDisabled(el) {
el.className = "2k3MenuRootDisabled" ;
}
function showEnabled(el) {
el.className = "2k3MenuRoot" ;
}
function checkMenuStates() {
for (var i = 0; i < element.parentElement.children.length; i++) {
var childElement = element.parentElement.children[i] ;
if (childElement != element) {
with (childElement) {
if (className == "2k3MenuRootActive") {
hideMenu() ;
return true ;
}
}
}
}
return false ;
}
function showMenu() {
with (element) {
var x = offsetLeft + parentElement.parentElement.parentElement.offsetLeft ;
var y = offsetTop + offsetHeight + parentElement.parentElement.parentElement.offsetTop - 3 ;
var w = offsetWidth - 2 ;
}
with (window.document) {
attachEvent("onclick", hideMenuEx) ;
getElementById(element.menu).showMenu(x, y, w) ;
}
element.parentElement.parentElement.parentElement.activeChild = element ;
}
function hideMenu() {
var el = window.event.srcElement ;
var elParent = el.parentElement ;
if (elParent != null) {
switch (elParent.className) {
case "2k3MenuImageShadow":
elParent = elParent.parentElement ;
break ;
case "2k3MenuImage":
elParent = elParent.parentElement ;
break ;
case "2k3MenuItemOver":
el = elParent.parentElement.parentElement ;
if (el.subMenuState) {
elParent = null ;
el = null ;
return ;
}
break ;
}
}
with (window.document) {
detachEvent("onclick", hideMenuEx) ;
getElementById(element.menu).hideMenu() ;
}
showNormal(element) ;
element.menuState = false ;
element.parentElement.parentElement.parentElement.activeChild = null ;
}
function hideMenuEx() {
var el = window.event.srcElement ;
if (el.className != "2k3MenuRootActive" && el.className != "2k3MenuRootCaption") {
hideMenu() ;
with (window.event) {
cancelBubble = true ;
returnValue = false ;
}
}
}
function makeBooleanOfAttribute(attName) {
a = element.getAttribute(attName) ;
if (typeof(a) == "boolean") {
return a ;
}
else if (a == null) {
a = false ;
}
else if (typeof(a) == "string") {
a = a.toLowerCase() ;
a = (a == "true" || a == "1" || a == "yes") ;
}
else {
a = new Boolean(a) ;
}
return a ;
}
</script>
</PUBLIC:COMPONENT>