code
stringlengths 1
2.01M
| repo_name
stringlengths 3
62
| path
stringlengths 1
267
| language
stringclasses 231
values | license
stringclasses 13
values | size
int64 1
2.01M
|
|---|---|---|---|---|---|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="../include/css/default.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../include/js/tabUtil.js"></script>
<script type="text/javascript" src="../include/js/components/comm_js/dhtmlxcommon.js"></script>
<link href="../include/js/components/xTree/xTree_css/dhtmlxtree.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../include/js/components/xTree/xTree_js/dhtmlxtree.js"></script>
<script type="text/javascript" src="../include/js/jquery-1.6.1.js"></script>
<script src="../include/js/newAjax.js"></script>
<script type="text/javascript" src="./left_menu.js"></script>
</head>
<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' class='color1' onload="getMenu();">
<nobr>
<div id="treeBox"></div>
</nobr>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/main/left_menu.html
|
HTML
|
asf20
| 966
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../include/jsp/taglib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript" >var contextPath="<%=request.getContextPath()%>";</script>
<script type="text/javascript" src="<c:url value="/include/js/commons.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/jquery-1.6.1.js" />"></script>
<script type="text/javascript" src="<c:url value="/include/js/newAjax.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/validator3/validator.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/validator3/exvalidator.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/My97DatePicker/WdatePicker.js"/>"></script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(images/login/bg.gif);
background-repeat: repeat-x;
}
.tiperror {
background: #FDF7D2 url(../include/js/validator3/invalid_line.gif) repeat-x bottom;
border: 1px solid #dd7870;
}
.requideerror {
background: #FDF7D2;
border: 1px solid #999999;
}
.pt {
color:#FF3300;
font-size:12px;
margin-right:5px
}
-->
</style>
<script type="text/javascript" src="./login.js"></script>
</head>
<body onload="initPage()">
<form method="post" action="" name="loginForm" id="loginForm">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="561" style="background:url(images/login/lbg.gif)"><table width="940" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="238" style="background:url(images/login/login01.jpg)"> </td>
</tr>
<tr>
<td height="190"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="208" height="190" style="background:url(images/login/login02.jpg)"> </td>
<td width="518" style="background:url(images/login/login03.jpg)"><table width="320" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40" height="50"><img src="images/login/user.gif" width="30" height="30"></td>
<td width="38" height="50">用户</td>
<td width="242" height="50">
<input type="text" name="ACCOUNT" id="ACCOUNT" style="width:164px; height:32px; line-height:34px; font-size:9pt; font-family:Verdana, Geneva, sans-serif;"
onkeydown="if(event.keyCode==13){event.keyCode=9;}" validatorRules="Require" msg0="请输入登录账号">
</td>
</tr>
<tr>
<td height="50"><img src="images/login/password.gif" width="28" height="32"></td>
<td height="50">密码</td>
<td height="50">
<input type="password" name="USER_PWD" id="USER_PWD" style="width:164px; height:32px; line-height:34px; font-size:9pt; "
onkeydown="if(event.keyCode==13){checkLogin();}" validatorRules="Require" msg0="请输入登录密码" >
</td>
</tr>
<tr>
<td height="40"> </td>
<td height="40"> </td>
<td height="60"><img src="images/login/login.gif" width="95" height="34" onclick="checkLogin();"></td>
</tr>
</table></td>
<td width="214" style="background:url(images/login/login04.jpg)" > </td>
</tr>
</table></td>
</tr>
<tr>
<td height="133" style="background:url(images/login/login05.jpg)"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/main/login.jsp
|
Java Server Pages
|
asf20
| 5,246
|
var userModuleTree = null;
/**
*取左侧菜单
*/
function getMenu() {
var json = {
url:parent.parent.contextPath + "/server/sys/getModuleTreeByUserDM.do",
msg:"数据加载中.....",
params:{
"MODULE_DM_SJ":"1"
},
callback:[getMenuCallBack]
};
AjaxTools.ajax(json);
}
function getMenuCallBack(data) {
userModuleTree = new dhtmlXTreeObject(document.getElementById('treeBox'), "100%", "100%", 0);
userModuleTree.setImagePath("../include/js/components/xTree/xTree_imgs/csh_bluebooks/");
userModuleTree.enableCheckBoxes(false);
userModuleTree.loadXMLString(data.data);
}
|
zzfls-pj
|
trunk/WebRoot/main/left_menu.js
|
JavaScript
|
asf20
| 691
|
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
body{
margin: 0px;
overflow: hidden;
background:#fff;
background-repeat: repeat-x;
}
.out{
width:100%;
height:60px;
margin:0px;
padding:0px;
background:#fff url(images/skin/1/top_bg.jpg);
}
</style>
<script type="text/javascript" src="../include/js/tabUtil.js"></script>
<script type="text/javascript" src="../include/js/jquery-1.6.1.js"></script>
<script src="../include/js/newAjax.js"></script>
<script type="text/javascript">
function changePWD(){
openTabInRightFrame("../admin/user/changePWD.jsp","修改密码","-99");
}
function loginOut(){
var json = {
url:parent.parent.contextPath + "/server/sys/loginOut.do",
msg:"处理中.....",
callback:[loginOutCallBack]
};
AjaxTools.ajax(json);
}
function loginOutCallBack(json){
var sTarget = "login.jsp";
var win = window.open(sTarget, "_blank");
if (win != null)
{
// window.opener = null;
// window.close();
//ie7有时提示是否关闭 此代码屏蔽了提示 ie678通用
window.opener = null;
window.open("", "_self");
parent.window.close();
}
else
{
msg.style.display = "block";
}
}
</script>
</HEAD>
<body scroll="no" >
<div class="out">
<!--<IMG SRC="images/skin/1/top.jpg" WIDTH="1004" HEIGHT="60" BORDER="0" ALT="">-->
<br /><br />
<div style="text-align:right;margin-top:-5px;">
<input type="button" style="border: 0px;width:82;height:25;background:url(images/xgmm.gif);" onclick="changePWD();"/>
<input type="button" style="border: 0px;width:82;height:25;background:url(images/aqtc.gif);" onclick="loginOut();"/>
</div>
</div>
</BODY>
</HTML>
|
zzfls-pj
|
trunk/WebRoot/main/top.html
|
HTML
|
asf20
| 2,094
|
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../include/css/default.css" rel="stylesheet" type="text/css"/>
<link href="../include/js/components/Tabbar/Tabbar_css/dhtmlxtabbar.css" rel="stylesheet" type="text/css"/>
<script src="../include/js/components/comm_js/dhtmlxcommon.js"></script>
<script src="../include/js/components/Tabbar/Tabbar_js/dhtmlxtabbar.js"></script>
<script type="text/javascript" src="../include/js/jquery-1.6.1.js"></script>
</head>
<body style="margin: 0px;overflow: hidden;background:#fff url(images/skin/1/tab_bg.jpg);background-repeat: repeat-x;" scroll="no" >
<div id="tabbarDiv" style="width:100%; height:100%;margin-top:3px;"></div>
<script>
<!--
var tabbar = new dhtmlXTabBar("tabbarDiv","top");
//tabbar.setSkinColors("#FFFF00","#FFFACD");
tabbar.setOnFullscreen(fullscreen);
//tabbar.setOnSelectHandler(set_tabbarID);
tabbar.setMargin("0");
tabbar.setOffset("10");
tabbar.enableAutoReSize(true);
tabbar.preventIECashing(true);
tabbar.setImagePath("../include/js/components/Tabbar/Tabbar_imgs/");
tabbar.loadXMLString("<?xml version=\"1.0\" encoding=\"GBK\"?><tabbar hrefmode=\"iframes\"><row><tab id=\"mydesktop\" width=\"100px\" selected=\"1\" href=\"desk.html\">我的桌面</tab></row></tabbar>");
tabbar.enableTabCloseButton("true");
tabbar.setOnTabClose(close_tab);
function close_tab(id){
top.frames[5].Array_RemoveItem(id);
return true;
}
function fullscreen(){
if (top.dhxLayout.cells("b").isCollapsed()){
top.dhxLayout.cells("a").expand();
top.dhxLayout.cells("b").expand();
}else{
top.dhxLayout.cells("a").collapse();
top.dhxLayout.cells("b").collapse();
}
}
//-->
</script>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/main/main.html
|
HTML
|
asf20
| 1,889
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<script for="window" event="onload">
var sTarget = "main/login.jsp";
//window.location.href = sTarget;
var sw = screen.width+9;
var sh = screen.height+9;
var w = 650;
var h = 350;
var l = -10;
var t = -10;
//var win = window.open(sTarget, "_blank", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=" + screen.width + ",height=" + screen.height + ",left=" + l + ",top=" + t);
// var win = window.open(sTarget, "_blank", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + w + ",height=" + h + ",left=" + l + ",top=" + t);
var win = window.open(sTarget,"_blank");
if (win != null)
{
// window.opener = null;
// window.close();
//ie7有时提示是否关闭 此代码屏蔽了提示 ie678通用
window.opener = null
window.open("", "_self")
window.close();
}
else
{
msg.style.display = "block";
}
</script>
</head>
<body>
<h4>
在进入系统登录界面,请稍候...
</h4>
<h4 id="msg" style="color: red; display: none">
系统的登录界面为自动弹出界面,但是您的浏览器阻止了这个弹出窗口,导致无法进行登录!
<br>
请检查:
<br>
在浏览器中是否使用了Google、上网助手或Windows XP SP2的自动禁用弹出窗口的功能。
</h4>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/login.html
|
HTML
|
asf20
| 1,728
|
/*--------------------------------------------------|
| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
|---------------------------------------------------|
| Copyright (c) 2002-2003 Geir Landr? |
| |
| This script can be used freely as long as all |
| copyright messages are intact. |
| |
| Updated: 17.04.2003 |
|--------------------------------------------------*/
// Node object
function Node(id, pid, name, url, title, target, icon, iconOpen, open) {
this.id = id;
this.pid = pid;
this.name = name;
this.url = url;
this.title = title;
this.target = target;
this.icon = icon;
this.iconOpen = iconOpen;
this._io = open || false;
this._is = false;
this._ls = false;
this._hc = false;
this._ai = 0;
this._p;
};
// Tree object
function dTree(objName) {
this.config = {
target : false,
folderLinks : true,
useSelection : true,
useCookies : true,
useLines : true,
useIcons : true,
useStatusText : false,
closeSameLevel : false,
inOrder : false
}
this.icon = {
root : '../include/images/img/base.gif',
folder : '../include/images/img/folder.gif',
folderOpen : '../include/images/img/folderopen.gif',
node : '../include/images/img/page.gif',
empty : '../include/images/img/empty.gif',
line : '../include/images/img/line.gif',
join : '../include/images/img/join.gif',
joinBottom : '../include/images/img/joinbottom.gif',
plus : '../include/images/img/plus.gif',
plusBottom : '../include/images/img/plusbottom.gif',
minus : '../include/images/img/minus.gif',
minusBottom : '../include/images/img/minusbottom.gif',
nlPlus : '../include/images/img/nolines_plus.gif',
nlMinus : '../include/images/img/nolines_minus.gif'
};
this.obj = objName;
this.aNodes = [];
this.aIndent = [];
this.root = new Node(-1);
this.selectedNode = null;
this.selectedFound = false;
this.completed = false;
};
// Adds a new node to the node array
dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {
this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
};
// Open/close all nodes
dTree.prototype.openAll = function() {
this.oAll(true);
};
dTree.prototype.closeAll = function() {
this.oAll(false);
};
// Outputs the tree to the page
dTree.prototype.toString = function() {
var str = '<div class="dtree">\n';
if (document.getElementById) {
if (this.config.useCookies) this.selectedNode = this.getSelected();
str += this.addNode(this.root);
} else str += 'Browser not supported.';
str += '</div>';
if (!this.selectedFound) this.selectedNode = null;
this.completed = true;
return str;
};
// Creates the tree structure
dTree.prototype.addNode = function(pNode) {
var str = '';
var n=0;
if (this.config.inOrder) n = pNode._ai;
for (n; n<this.aNodes.length; n++) {
if (this.aNodes[n].pid == pNode.id) {
var cn = this.aNodes[n];
cn._p = pNode;
cn._ai = n;
this.setCS(cn);
if (!cn.target && this.config.target) cn.target = this.config.target;
if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
if (!this.config.folderLinks && cn._hc) cn.url = null;
if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
cn._is = true;
this.selectedNode = n;
this.selectedFound = true;
}
str += this.node(cn, n);
if (cn._ls) break;
}
}
return str;
};
// Creates the node icon, url and text
dTree.prototype.node = function(node, nodeId) {
var str = '<div class="dTreeNode">' + this.indent(node, nodeId);
if (this.config.useIcons) {
if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
if (this.root.id == node.pid) {
node.icon = this.icon.root;
node.iconOpen = this.icon.root;
}
str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
}
if (node.url) {
str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="#"';
//str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
if (node.title) str += ' title="' + node.title + '"';
if (node.target) str += ' target="' + node.target + '"';
if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
//str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
str += ' onclick="javascript:openTabInRightFrame(\''+ node.url+'\',\''+node.name+'\',\'w_'+nodeId+'\');' + this.obj + '.s(' + nodeId + ');"';
//str += '>';
str += ' node_name_='+node.name+'>';
}
else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
str += node.name;
if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
str += '</div>';
if (node._hc) {
str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
str += this.addNode(node);
str += '</div>';
}
this.aIndent.pop();
return str;
};
// Adds the empty and line icons
dTree.prototype.indent = function(node, nodeId) {
var str = '';
if (this.root.id != node.pid) {
for (var n=0; n<this.aIndent.length; n++)
str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
(node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
if (node._hc) {
str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';
if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
str += '" alt="" /></a>';
} else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';
}
return str;
};
// Checks if a node has any children and if it is the last sibling
dTree.prototype.setCS = function(node) {
var lastId;
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n].pid == node.id) node._hc = true;
if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
}
if (lastId==node.id) node._ls = true;
};
// Returns the selected node
dTree.prototype.getSelected = function() {
var sn = this.getCookie('cs' + this.obj);
return (sn) ? sn : null;
};
// Highlights the selected node
dTree.prototype.s = function(id) {
if (!this.config.useSelection) return;
var cn = this.aNodes[id];
if (cn._hc && !this.config.folderLinks) return;
var eOld;
if (this.selectedNode != id) {
if (this.selectedNode || this.selectedNode==0) {
eOld = document.getElementById("s" + this.obj + this.selectedNode);
if(eOld) eOld.className = "node";
}
eNew = document.getElementById("s" + this.obj + id);
eNew.className = "nodeSel";
this.selectedNode = id;
if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
}
};
// Toggle Open or close
dTree.prototype.o = function(id) {
var cn = this.aNodes[id];
this.nodeStatus(!cn._io, id, cn._ls);
cn._io = !cn._io;
if (this.config.closeSameLevel) this.closeLevel(cn);
if (this.config.useCookies) this.updateCookie();
};
// Open or close all nodes
dTree.prototype.oAll = function(status) {
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
this.nodeStatus(status, n, this.aNodes[n]._ls)
this.aNodes[n]._io = status;
}
}
if (this.config.useCookies) this.updateCookie();
};
// Opens the tree to a specific node
dTree.prototype.openTo = function(nId, bSelect, bFirst) {
if (!bFirst) {
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n].id == nId) {
nId=n;
break;
}
}
}
var cn=this.aNodes[nId];
if (cn.pid==this.root.id || !cn._p) return;
cn._io = true;
cn._is = bSelect;
if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
if (this.completed && bSelect) this.s(cn._ai);
else if (bSelect) this._sn=cn._ai;
this.openTo(cn._p._ai, false, true);
};
// Closes all nodes on the same level as certain node
dTree.prototype.closeLevel = function(node) {
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
this.nodeStatus(false, n, this.aNodes[n]._ls);
this.aNodes[n]._io = false;
this.closeAllChildren(this.aNodes[n]);
}
}
}
// Closes all children of a node
dTree.prototype.closeAllChildren = function(node) {
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
this.aNodes[n]._io = false;
this.closeAllChildren(this.aNodes[n]);
}
}
}
// Change the status of a node(open or closed)
dTree.prototype.nodeStatus = function(status, id, bottom) {
eDiv = document.getElementById('d' + this.obj + id);
eJoin = document.getElementById('j' + this.obj + id);
if (this.config.useIcons) {
eIcon = document.getElementById('i' + this.obj + id);
eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
}
eJoin.src = (this.config.useLines)?
((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
((status)?this.icon.nlMinus:this.icon.nlPlus);
eDiv.style.display = (status) ? 'block': 'none';
};
// [Cookie] Clears a cookie
dTree.prototype.clearCookie = function() {
var now = new Date();
var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
this.setCookie('co'+this.obj, 'cookieValue', yesterday);
this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
};
// [Cookie] Sets value in a cookie
dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
document.cookie =
escape(cookieName) + '=' + escape(cookieValue)
+ (expires ? '; expires=' + expires.toGMTString() : '')
+ (path ? '; path=' + path : '')
+ (domain ? '; domain=' + domain : '')
+ (secure ? '; secure' : '');
};
// [Cookie] Gets a value from a cookie
dTree.prototype.getCookie = function(cookieName) {
var cookieValue = '';
var posName = document.cookie.indexOf(escape(cookieName) + '=');
if (posName != -1) {
var posValue = posName + (escape(cookieName) + '=').length;
var endPos = document.cookie.indexOf(';', posValue);
if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
else cookieValue = unescape(document.cookie.substring(posValue));
}
return (cookieValue);
};
// [Cookie] Returns ids of open nodes as a string
dTree.prototype.updateCookie = function() {
var str = '';
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
if (str) str += '.';
str += this.aNodes[n].id;
}
}
this.setCookie('co' + this.obj, str);
};
// [Cookie] Checks if a node id is in a cookie
dTree.prototype.isOpen = function(id) {
var aOpen = this.getCookie('co' + this.obj).split('.');
for (var n=0; n<aOpen.length; n++)
if (aOpen[n] == id) return true;
return false;
};
// If Push and pop is not implemented by the browser
if (!Array.prototype.push) {
Array.prototype.push = function array_push() {
for(var i=0;i<arguments.length;i++)
this[this.length]=arguments[i];
return this.length;
}
};
if (!Array.prototype.pop) {
Array.prototype.pop = function array_pop() {
lastElement = this[this.length-1];
this.length = Math.max(this.length-1,0);
return lastElement;
}
};
|
zzfls-pj
|
trunk/WebRoot/include/js/dtree.js
|
JavaScript
|
asf20
| 12,712
|
/* MAIN OBJ */
div.dhx_acc_base_standard {
overflow: hidden;
background-color: #F3F3F3;
/*
border-top: #609BCA 1px solid;
border-left: #609BCA 1px solid;
border-right: #C2D9EB 1px solid;
border-bottom: none;
*/
}
/* SINGLE ITEM */
div.dhx_acc_item_standard {
position: relative;
overflow: hidden;
width: 100%;
padding-bottom: 1px;
abackground-color: #FFFFFF;
}
div.dhx_acc_item_hidden_standard {
display: none;
}
/* label */
div.dhx_acc_item_standard div.dhx_acc_item_label_standard {
position: relative;
color: #000000;
font-family: Tahoma;
font-size: 11px;
font-weight: normal;
height: 24px;
line-height: 24px;
border-top: #B4B4B4 1px solid;
border-left: #B4B4B4 1px solid;
border-right: #969596 1px solid;
border-bottom: #969596 1px solid;
vertical-align: middle;
overflow: hidden;
background-image: url("../imgs/dhxaccord_standard/dhxaccord_bg.gif");
background-position: top;
background-repeat: repeat-x;
-moz-user-select: none;
cursor: default;
padding-left: 4px;
padding-right: 4px;
}
/* icon */
div.dhx_acc_item_standard div.dhx_acc_item_label_standard img.dhx_acc_item_icon_standard {
position: absolute;
width: 16px;
height: 16px;
right: 4px;
top: 3px;
}
/* content */
div.dhx_acc_item_standard div.dhx_acc_item_content_opened_standard {
awidth: 100%;
overflow: hidden;
position: relative;
aborder-bottom: #C2D9EB 1px solid;
amargin-top: 1px;
margin-top: 1px;
}
div.dhx_acc_item_standard div.dhx_acc_item_content_opened_standard div.dhtmlx_wins_body_content {
position: relative;
}
div.dhx_acc_item_standard div.dhx_acc_item_content_closed_standard {
display: none;
}
/* accordion attached to window */
.dhtmlxAccordionAttached {
border: none !important;
}
div.dhx_acc_item_standard div.dhtmlxWindowMainContent {
amargin-top: 1px;
amargin-bottom: 1px;
}
/* inner window */
div.dhx_acc_item_standard div.dhx_acc_item_content_opened_standard div.dhtmlxWindowMainContent {
background-color: #FFFFFF;
aborder: 1px solid #C2D5DC;
border-top: #B4B4B4 1px solid;
border-left: #B4B4B4 1px solid;
border-right: #969596 1px solid;
border-bottom: #969596 1px solid;
}
.dhxAccordLabelIEFix_standard {
height: 26px !important;
line-height: 22px !important;
}
.dhxAccordPolyIEFix_standard {
padding-bottom: 2px;
padding-right: 2px;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xAccordion/xAccordion_css/dhtmlxaccordion_standard.css
|
CSS
|
asf20
| 2,383
|
/* MAIN OBJ */
div.dhx_acc_base_dhx_blue {
overflow: hidden;
background-color: #D3E2E5;
/*
border-top: #609BCA 1px solid;
border-left: #609BCA 1px solid;
border-right: #C2D9EB 1px solid;
border-bottom: none;
*/
}
/* SINGLE ITEM */
div.dhx_acc_item_dhx_blue {
position: relative;
overflow: hidden;
width: 100%;
padding-bottom: 1px;
}
div.dhx_acc_item_hidden_dhx_blue {
display: none;
}
/* label */
div.dhx_acc_item_dhx_blue div.dhx_acc_item_label_dhx_blue {
position: relative;
color: #055A78;
text-align:left;
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
height: 22px;
line-height: 20px;
border: #C2D5DC 0px solid;
vertical-align: middle;
overflow: hidden;
background-image: url("../xAccordion_imgs/dhxaccord_dhx_blue/dhtmlxaccordion_bg.png");
background-position: top;
background-repeat: repeat-x;
-moz-user-select: none;
cursor: default;
padding-left: 10px;
padding-right: 4px;
}
/* icon */
div.dhx_acc_item_dhx_blue div.dhx_acc_item_label_dhx_blue img.dhx_acc_item_icon_dhx_blue {
position: absolute;
width: 16px;
height: 16px;
right: 4px;
top: 3px;
}
/* content */
div.dhx_acc_item_dhx_blue div.dhx_acc_item_content_opened_dhx_blue {
awidth: 100%;
overflow: hidden;
position: relative;
aborder-bottom: #C2D9EB 1px solid;
amargin-top: 1px;
margin-top: 1px;
}
div.dhx_acc_item_dhx_blue div.dhx_acc_item_content_opened_dhx_blue div.dhtmlx_wins_body_content {
position: relative;
}
div.dhx_acc_item_dhx_blue div.dhx_acc_item_content_closed_dhx_blue {
display: none;
}
/* accordion attached to window */
.dhtmlxAccordionAttached {
border: none !important;
}
div.dhx_acc_item_dhx_blue div.dhtmlxWindowMainContent {
amargin-top: 1px;
amargin-bottom: 1px;
}
/* inner window */
div.dhx_acc_item_dhx_blue div.dhx_acc_item_content_opened_dhx_blue div.dhtmlxWindowMainContent {
background-color: #FFFFFF;
border: 1px solid #C2D5DC;
}
.dhxAccordLabelIEFix_dhx_blue {
height: 24px;
line-height: 18px;
}
.dhxAccordPolyIEFix_dhx_blue {
padding-bottom: 2px;
padding-right: 2px;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xAccordion/xAccordion_css/dhtmlxaccordion_dhx_blue.css
|
CSS
|
asf20
| 2,120
|
/* MAIN OBJ */
div.dhx_acc_base_dhx_black {
overflow: hidden;
background-color: #000000;
/*
border-top: #609BCA 1px solid;
border-left: #609BCA 1px solid;
border-right: #C2D9EB 1px solid;
border-bottom: none;
*/
}
/* SINGLE ITEM */
div.dhx_acc_item_dhx_black {
position: relative;
overflow: hidden;
width: 100%;
padding-bottom: 1px;
}
div.dhx_acc_item_hidden_dhx_black {
display: none;
}
/* label */
div.dhx_acc_item_dhx_black div.dhx_acc_item_label_dhx_black {
position: relative;
color: #FFFFFF;
font-family: Tahoma;
font-size: 12px;
font-weight: normal;
height: 22px;
line-height: 20px;
border: #333333 1px solid;
vertical-align: middle;
overflow: hidden;
background-image: url("../imgs/dhxaccord_dhx_black/dhtmlxaccordion_bg.png");
background-position: top;
background-repeat: repeat-x;
-moz-user-select: none;
cursor: default;
padding-left: 4px;
padding-right: 4px;
}
/* icon */
div.dhx_acc_item_dhx_black div.dhx_acc_item_label_dhx_black img.dhx_acc_item_icon_dhx_black {
position: absolute;
width: 16px;
height: 16px;
right: 4px;
top: 3px;
}
/* content */
div.dhx_acc_item_dhx_black div.dhx_acc_item_content_opened_dhx_black {
awidth: 100%;
overflow: hidden;
position: relative;
aborder-bottom: #C2D9EB 1px solid;
amargin-top: 1px;
margin-top: 1px;
}
div.dhx_acc_item_dhx_black div.dhx_acc_item_content_opened_dhx_black div.dhtmlx_wins_body_content {
position: relative;
}
div.dhx_acc_item_dhx_black div.dhx_acc_item_content_closed_dhx_black {
display: none;
}
/* accordion attached to window */
.dhtmlxAccordionAttached {
border: none !important;
}
div.dhx_acc_item_dhx_black div.dhtmlxWindowMainContent {
amargin-top: 1px;
amargin-bottom: 1px;
}
/* inner window */
div.dhx_acc_item_dhx_black div.dhx_acc_item_content_opened_dhx_black div.dhtmlxWindowMainContent {
background-color: #FFFFFF;
border: 1px solid #333333;
}
.dhxAccordLabelIEFix_dhx_black {
height: 24px;
line-height: 18px;
}
.dhxAccordPolyIEFix_dhx_black {
padding-bottom: 2px;
padding-right: 2px;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xAccordion/xAccordion_css/dhtmlxaccordion_dhx_black.css
|
CSS
|
asf20
| 2,109
|
//v.2.0 build 81107
/*
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
*/
/**
* @desc: constructor, creates an accordion item under dhtmlxaccordion
* @pseudonym: item
* @type: public
*/
function dhtmlXAccordionItem(){
}
/**
* @desc: constructor, creates a dhtmlXAccordion object
* @param: baseId - object/objectId
* @param: skin - used skin
* @type: public
*/
function dhtmlXAccordion(baseId, skin) {
var that = this;
this.skin = (skin!=null?skin:"dhx_blue");
this.base = document.getElementById(baseId);
this.base.className = "dhx_acc_base_"+this.skin;
this.w = this.base.offsetWidth;
this.h = this.base.offsetHeight;
//alert(this.h+" "+this.base.parentNode.offsetHeight)
this.idPull = {};
this.opened = null;
this.items = {};
/**
* @desc: returns the handler to an item by id
* @param: itemId - id
* @type: public
*/
this.cells = function(itemId) {
if (this.idPull[itemId] == null) { return null; }
return this.idPull[itemId];//._win;
}
this._borderFix = (this.base.offsetWidth!=this.base.clientWidth?(_isIE?1:2):0);
// ie fix for inlayout mode
if (_isIE && this._borderFix == 0) { this._borderFix = -1; }
if (_isIE && (this.skin == "dhx_blue" || this.skin == "dhx_black" || this.skin == "standard")) {
this._borderFix = (document.compatMode!="BackCompat"?2:0);
}
// alert(document.compatMode!="BackCompat")
// alert(this._borderFix)
// probably not needed
this.imagePath = "codebase/imgs/";
/**
* @desc: set path to icons
* @param: path - path on the hard disk
* @type: public
*/
this.setIconsPath = function(path) {
this.imagePath = path;
}
this._initWindows = function() {
this.dhxWins = new dhtmlXWindows();
this.dhxWins.setSkin(this.skin);
this.dhxWins.setImagePath("../../../dhtmlxWindows/codebase/imgs/");
this.dhxWins.attachEvent("onTextChange", that.setText);
}
this._count = function(obj) {
var cnt = 0;
for (var q in obj) { cnt++; }
return cnt;
}
/**
* @desc: adds a new item
* @param: itemId - item's id
* @param: itemText - item's text
* @type: public
*/
this.addItem = function(itemId, itemText) {
// adding new item
var item = document.createElement("DIV");
item.className = "dhx_acc_item_"+this.skin;
this.base.appendChild(item);
// adding label
var label = document.createElement("DIV");
label._idd = itemId;
label.className = "dhx_acc_item_label_"+this.skin+(_isIE&&document.compatMode=="BackCompat"?" dhxAccordLabelIEFix_"+this.skin:"");
label.innerHTML = "<span></span>";
label.onselectstart = function(e) { e = e||event; e.returnValue = false; }
label.onclick = function() {
if (that.checkEvent("onBeforeActive")) {
if (that.callEvent("onBeforeActive", [this._idd])) {
that.openItem(this._idd, "dhx_accord_outer_event");
}
} else {
that.openItem(this._idd, "dhx_accord_outer_event");
}
}
item.appendChild(label);
// adding content
var content = document.createElement("DIV");
content.innerHTML = " ";
content.className = "dhx_acc_item_content_closed_"+this.skin;
content.style.height = "0px";
item.appendChild(content);
//
item._id = itemId;
item._label = label;
item._content = content;
this.idPull[itemId] = item;
//
var wId = itemId;
var win = this.dhxWins.createWindow(wId, 10, 10, 200, 200);
win._dockCell = itemId;
win.setText(itemText);
win.button("close").hide();
win.addUserButton("dock", 99, "Dock", "dock");
win.button("dock").attachEvent("onClick", function(win) {
that.dockWindow(win.getId());
});
this.dockWindow(wId);
//
item.win = win;
this.items[itemId] = item;
// this.items[this.items.length] = item;
//
/**
* @desc: returns item's id
* @type: public
*/
item.getId = function() {
return this._id;
}
/**
* @desc: sets item's text
* @param: text - new text
* @type: public
*/
item.setText = function(text) {
that.setText(this._id, text);
}
/**
* @desc: returns item's text
* @type: public
*/
item.getText = function() {
return that.getText(this._id);
}
/**
* @desc: opens an item
* @type: public
*/
item.open = function() {
that.openItem(this._id);
}
/**
* @desc: closes an item
* @type: public
*/
item.close = function() {
that.closeItem(this._id);
}
/**
* @desc: sets item's icon (header icon)
* @param: icon - filepath
* @type: public
*/
item.setIcon = function(icon) {
that.setIcon(this._id, icon);
}
/**
* @desc: clears item's icon
* @type: public
*/
item.clearIcon = function() {
that.clearIcon(this._id);
}
/**
* @desc: docks an item from a window
* @type: public
*/
item.dock = function() {
that.dockItem(this._id);
}
/**
* @desc: undocks an item to a window
* @type: public
*/
item.undock = function() {
that.undockItem(this._id);
}
/**
* @desc: shows an item
* @type: public
*/
item.show = function() {
that.showItem(this._id);
}
/**
* @desc: hides an item
* @type: public
*/
item.hide = function() {
that.hideItem(this._id);
}
// attach
/**
* @desc: attaches an object into an item
* @param: obj - object/object id
* @type: public
*/
item.attachObject = function(obj) {
this.win.attachObject(obj);
}
/**
* @desc: attaches an url into an item
* @param: url
* @type: public
*/
item.attachURL = function(url) {
this.win.attachURL(url);
this._frame = this.win._frame;
}
// components
/**
* @desc: attaches a dhtmlxGrid into an item
* @type: public
*/
item.attachGrid = function() {
this.grid = this.win.attachGrid();
return this.grid;
}
/**
* @desc: attaches a dhtmlxTree into an item
* @param: id - not mandatory, super root's id (see dhtmlxTree documentation)
* @type: public
*/
item.attachTree = function(id) {
this.tree = this.win.attachTree(id);
this.tree.allTree.style.overflow = "auto";
return this.tree;
}
/**
* @desc: attaches a dhtmlxFolders into an item
* @type: public
*/
item.attachFolders = function() {
this.folders = this.win.attachFolders();
return this.folders;
}
/**
* @desc: attaches a dhtmlxLayout into an item
* @type: public
*/
item.attachLayout = function(view) {
this.layout = this.win.attachLayout(view);
return this.layout;
}
/**
* @desc: attaches a dhtmlxTabbar into an item
* @type: public
*/
item.attachTabbar = function() {
this.tabbar = this.win.attachTabbar();
return this.tabbar;
}
/**
* @desc: attaches a dhtmlxEditor into an item
* @type: public
*/
item.attachEditor = function() {
this.editor = this.win.attachEditor();
return this.editor;
}
/**
* @desc: attaches a dhtmlxMenu into an item
* @type: public
*/
item.attachMenu = function() {
this.menu = this.win.attachMenu();
return this.menu;
}
/**
* @desc: attaches a dhtmlxToolbar into an item
* @type: public
*/
item.attachToolbar = function() {
this.toolbar = this.win.attachToolbar();
return this.toolbar;
}
/**
* @desc: attaches a status bar into an item
* @type: public
*/
item.attachStatusBar = function() {
this.status = this.win.attachStatusBar();
return this.status;
}
//
this.openItem(itemId);
//
return item;
}
this.openItem = function(itemId, callEvent) {
if (this._openBuzy == true && this._enableOpenEffect == true) { return; }
if (this.idPull[itemId] == null) { return; }
var item = this.idPull[itemId];
if ((item._content.className).search("dhx_acc_item_content_opened_"+this.skin) != -1) { return; }
if (this._enableOpenEffect == true) {
var itemToHide = null;
}
// 1. close any opened items & calculate available space
var h = 0;
for (var a in this.idPull) {
if (this._enableOpenEffect == true) {
if ((this.idPull[a]._content.className).search("dhx_acc_item_content_opened_"+this.skin) != -1) {
itemToHide = this.idPull[a];
// fix bottom border
if (!_isIE) { itemToHide._content.style.height = parseInt(itemToHide._content.style.height)-1+"px"; }
}
h += this.idPull[a].offsetHeight - this.idPull[a]._content.offsetHeight;
} else {
if ((this.idPull[a]._content.className).search("dhx_acc_item_content_opened_"+this.skin) != -1) { this.closeItem(a); }
h += this.idPull[a].offsetHeight;
}
}
// 2. open needed item
item._content.className = "dhx_acc_item_content_opened_"+this.skin+(_isIE&&document.compatMode!="BackCompat"?" dhxAccordPolyIEFix_"+this.skin:"");
if (this._enableOpenEffect == true) {
var maxHeight = this.h - h - this._borderFix+1;
this._openBuzy = true;
this._openEffect(item, itemToHide, this._openStep, maxHeight);
} else {
item._content.style.height = this.h - h - this._borderFix + "px";
this._fixInnerObjsOnOpen(itemId);
// event
if (callEvent == "dhx_accord_outer_event") {
this.callEvent("onActive", [itemId]);
}
}
// IE fix some skins
if (_isIE && this.skin == "nb_black") {
}
}
this._fixInnerObjsOnOpen = function(itemId) {
var win = this.dhxWins.window(itemId);
if (win.grid) { win.grid.setSizes(); win.grid.setSizes(); }
if (win.tabbar) { win.tabbar.adjustOuterSize(); }
if (win.menu) { win.menu._redistribTopLevelPositions(); }
if (win.accordion) { win.accordion.setSizes(); }
if (win.layout) { win.layout.setSizes(win); }
if (win.folders != null) { win.folders.setSizes(); }
if (win.editor) { if (_isOpera) { window.setTimeout(function(){win.editor.adjustSize();},10); } else { win.editor.adjustSize(); } }
}
this._enableOpenEffect = false;
this._openStep = 15;
this._openStepIncrement = 10;
this._openStepTimeout = 10;
this._openBuzy = false;
this._opera950FixData = "";
this._openEffect = function(item, itemToHide, step, maxHeight) {
var goOn = false;
var h = parseInt(item._content.style.height);
var newH = 0;
if (h + step < maxHeight) {
newH = h + step;
goOn = true;
} else {
newH = maxHeight;
}
item._content.style.height = newH+"px";
if (itemToHide != null) {
var hh = parseInt(itemToHide._content.style.height);
hh = hh - (newH - h);
if (hh < 0) { hh = 0; }
itemToHide._content.style.height = hh+"px";
}
if (goOn == true) {
// opera 9.50 fix #1 start
/*
if (_isOpera) {
if (this._opera950FixData == "") { this._opera950FixData = item._content.childNodes[0].childNodes[2].className; }
item._content.childNodes[0].childNodes[2].className = "";
window.setTimeout(function(){
item._content.childNodes[0].childNodes[2].className = that._opera950FixData;
that._openEffect(item, itemToHide, (step+that._openStepIncrement), maxHeight);
}, this._openStepTimeout);
} else {
*/
window.setTimeout(function(){ that._openEffect(item, itemToHide, (step+that._openStepIncrement), maxHeight); }, this._openStepTimeout);
/*
}
*/
// opera 9.50 fix #1 end
} else {
if (itemToHide != null) {
itemToHide._content.className = "dhx_acc_item_content_closed_"+this.skin;
itemToHide._content.style.height = "0px";
}
this._fixInnerObjsOnOpen(item._id);
//
this._openBuzy = false;
// opera 9.50 fix #2 start
if (_isOpera) {
var p = item._content.childNodes[0].childNodes[2].className;
item._content.childNodes[0].childNodes[2].className = "";
window.setTimeout(function(){item._content.childNodes[0].childNodes[2].className = p;},1);
}
// opera 9.50 fix #2 end
// event
this.callEvent("onActive", [item._id]);
}
}
this.closeItem = function(itemId) {
if (this.idPull[itemId] == null) { return; }
var item = this.idPull[itemId];
item._content.className = "dhx_acc_item_content_closed_"+this.skin;
item._content.style.height = "0px";
}
this.setText = function(itemId, itemText) {
if (that.idPull[itemId] == null) { return; }
that.idPull[itemId]._label.childNodes[0].innerHTML = itemText;
if (that.idPull[itemId].win != null) { that.idPull[itemId].win.childNodes[2].innerHTML = itemText; }
}
this.getText = function(itemId) {
if (that.idPull[itemId] == null) { return; }
return that.idPull[itemId]._label.childNodes[0].innerHTML;
}
this.dockWindow = function(wId) {
if (this.idPull[wId] == null) { return; }
if (this.dhxWins.window(wId) == null) { return; }
//
this.showItem(wId);
// 1. getting window
var win = this.dhxWins.window(wId);
// editor fix
if (win.editor != null) { var winEditorStoredData = win.editor.getContent(); }
//
win._isDocked = true;
var data = win._content;
data.parentNode.removeChild(data);
win.hide();
// 2. prepare accordion's polygon
while (this.idPull[wId]._content.childNodes.length > 0) { this.idPull[wId]._content.removeChild(this.idPull[wId]._content.childNodes[0]); }
data.style.width = "100%";
data.style.height = "100%";
this.idPull[wId]._content.appendChild(data);
// editor fix
if (win.editor != null && winEditorStoredData != null) {
var iconsPath = win.editor.iconsPath;
win.editor = win.attachEditor();
win.editor.setIconsPath(iconsPath);
win.editor.init();
win.editor.setContent(winEditorStoredData);
}
// fix grid sizes
if (win.grid != null) { win.grid.setSizes(); }
// fix tabbar sizes
if (win.tabbar) { win.tabbar.adjustOuterSize(); }
// fix menu toplevel visibility
if (this.idPull[wId]._content.className != "dhx_acc_item_content_closed_"+this.skin) {
if (win.menu != null) { win.menu._redistribTopLevelPositions(); }
}
}
this.undockWindow = function(wId) {
if (this.idPull[wId] == null) { return; }
if (this.dhxWins.window(wId) == null) { return; }
// 1. gettinw window
var win = this.dhxWins.window(wId);
// editor fix
if (win.editor != null) { var winEditorStoredData = win.editor.getContent(); }
//
win._isDocked = false;
var winCell = win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1];
// prepare accordion's polygon
var data = this.idPull[wId]._content.childNodes[0];
data.parentNode.removeChild(data);
this.idPull[wId]._content.innerHTML = " ";
//
winCell.appendChild(data);
//
if (win._isParked) {
data.style.height = "0px";
} else {
win.setDimension(400, 300);
}
//
win.show();
win.bringToTop();
win.center();
// editor fix
if (win.editor != null && winEditorStoredData != null) {
var iconsPath = win.editor.iconsPath;
win.editor = win.attachEditor();
win.editor.setIconsPath(iconsPath);
win.editor.init();
win.editor.setContent(winEditorStoredData);
}
// fix grid sizes
if (win.grid != null) { win.grid.setSizes(); }
if (!win._isParked) {
// fix menu toplevel visibility
if (win.menu != null) { win.menu._redistribTopLevelPositions(); }
}
// fix tabbar sizes
if (win.tabbar) { win.tabbar.adjustOuterSize(); }
// hide item
this.hideItem(wId);
}
/**
* @desc: changes object instance's size according to the outer container
* @type: public
*/
this.setSizes = function() {
this.h = this.base.offsetHeight;
var itemOpened = null;
var h = 0;
for (var a in this.idPull) {
if ((this.idPull[a]._content.className).search("dhx_acc_item_content_opened_"+this.skin) != -1) {
itemOpened = this.idPull[a];
h += this.idPull[a].offsetHeight - this.idPull[a]._content.offsetHeight;
} else {
h += this.idPull[a].offsetHeight;
}
}
if (itemOpened != null) {
itemOpened._content.style.height = this.h - h - (_isIE?-1:-1) + "px";
// fix nodes in wins
var win = this.dhxWins.window(itemOpened._id);
if (win.grid != null) { win.grid.setSizes(); }
if (win.tabbar != null) { win.tabbar.adjustOuterSize(); }
}
}
this.showItem = function(itemId) {
if (this.idPull[itemId] == null) { return; }
var item = this.idPull[itemId];
if (item.className == "dhx_acc_item_"+this.skin) { return; }
item.className = "dhx_acc_item_"+this.skin;
this.setSizes();
}
this.hideItem = function(itemId) {
if (this.idPull[itemId] == null) { return; }
var item = this.idPull[itemId];
if (item.className == "dhx_acc_item_hidden_"+this.skin) { return; }
item.className = "dhx_acc_item_hidden_"+this.skin;
this.setSizes();
}
/**
* @desc: iterator, calls a user-defined function n-times
* @param: handler - user defined-function, item's object is passed as an incoming argument
* @type: public
*/
this.forEachItem = function(handler) {
for (var a in this.idPull) {
handler(this.idPull[a]);
}
}
/**
* @desc: sets open effect
* @param: state - true/false to enable/disable, disabled by default
* @type: public
*/
this.setEffect = function(state) {
this._enableOpenEffect = state;
}
this.setActive = function(itemId) {
this.openItem(itemId);
}
this.dockItem = function(itemId) {
this.dockWindow(itemId);
}
this.undockItem = function(itemId) {
this.undockWindow(itemId);
}
this.setIcon = function(itemId, icon) {
if (this.idPull[itemId] == null) { return; }
var item = this.idPull[itemId];
if (item._label.childNodes.length < 2) {
var img = document.createElement("IMG");
img.className = "dhx_acc_item_icon_"+this.skin;
item._label.appendChild(img);
}
item._label.childNodes[1].src = this.imagePath+icon;
}
this.clearIcon = function(itemId) {
if (this.idPull[itemId] == null) { return; }
var item = this.idPull[itemId];
while (item._label.childNodes.length > 1) { item._label.removeChild(item._label.childNodes[1]); }
}
// events
this.dhx_Event = function() {
this.dhx_SeverCatcherPath="";
/**
* @desc: attaches an event handler to the accordion
* @param: original - event's original name
* @param: catcher - event handler
* @param: CallObj - object that will call the event
* @type: public
*/
this.attachEvent = function(original, catcher, CallObj) {
original = original.toLowerCase();
CallObj = CallObj||this;
original = 'ev_'+original;
if ((!this[original]) || (!this[original].addEvent)) {
var z = new this.eventCatcher(CallObj);
z.addEvent(this[original]);
this[original] = z;
}
return (original + ':' + this[original].addEvent(catcher)); //return ID (event name & event ID)
}
this.callEvent = function(name,arg0) {
name = name.toLowerCase();
if (this["ev_"+name]) { return this["ev_"+name].apply(this,arg0); }
return true;
}
/**
* @desc: returns true if the event exists
* @param: name - event's name
* @type: public
*/
this.checkEvent = function(name) {
name = name.toLowerCase();
if (this["ev_"+name]) { return true; }
return false;
}
this.eventCatcher = function(obj) {
var dhx_catch = new Array();
var m_obj = obj;
var z = function() {
if (dhx_catch) var res = true;
for (var i=0; i<dhx_catch.length; i++) { if (dhx_catch[i] != null) { var zr = dhx_catch[i].apply(m_obj, arguments); res = res && zr; } }
return res;
}
z.addEvent = function(ev) {
if (typeof(ev) != "function") ev = eval(ev);
if (ev) return dhx_catch.push( ev ) - 1;
return false;
}
z.removeEvent = function(id) { dhx_catch[id] = null; }
return z;
}
/**
* @desc: removes an event handler
* @param: id - event's id
* @type: public
*/
this.detachEvent = function(id) {
if (id != false) {
var list = id.split(':'); //get EventName and ID
this[list[0]].removeEvent(list[1]); //remove event
}
}
}
this._initWindows();
this.dhx_Event();
return this;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xAccordion/xAccordion_js/dhtmlxaccordion.js
|
JavaScript
|
asf20
| 20,346
|
.contextMenu{
font-family:arial; font-size:8pt;
padding:0 0 0 2;
margin: 0 1 0 1;
text-align:left;
cursor:default;
}
.contextMenuover, .contextMenudown{
font-family:arial; font-size:8pt;
padding:0 0 0 2;
margin: 0 1 0 1;
text-align:left;
background-color:#6495ed;
color:white;
cursor:default;
}
.contextMenuover td{
color:white;
}
.menuTable{
border:1px solid;
margin : 0px;
padding : 3 1 4 1;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_css/context.css
|
CSS
|
asf20
| 443
|
/*button text - all levels*/
.menuButtonSecond td, .menuButton td, .menuButtondown td, .menuButtonover td {
cursor:default;
}
/*menu text - all levels*/
.defaultMenuText{
font:12px Arial,sans-serif;
padding-left:10px;
padding-right:5px;
text-align:left;
}
/*disabled menu text - all levels*/
.buttonTextDisabled{
font: 11px "Microsoft Sans Serif",Arial;
padding-left:10px;
padding-right:5px;
color:gray;
}
/*menu caption if any*/
.menuName{
color : gray;
letter-spacing : 7px;
font : 11px Arial,sans-serif;
padding-left : 10px;
padding-right : 10px;
}
/*========= BUTTONS ======================*/
/*plain button state - top level*/
.menuButton {
border : solid 1px #D4D0C8;
}
/*down button state - top level*/
.menuButtondown {
background-color : #DBD8D1;
border-bottom : solid 1px #FFFFFF;
border-left : solid 1px #808080;
border-right : solid 1px #FFFFFF;
border-top : solid 1px #808080;
cursor : default;
}
/*mouse over button state - top level*/
.menuButtonover {
background-color : #DBD8D1;
border-bottom : solid 1px #808080;
border-left : solid 1px #FFFFFF;
border-right : solid 1px #808080;
border-top : solid 1px #FFFFFF;
cursor : default;
}
/*plain button state - other levels*/
.menuButtonSecond {
background-color:#D4D0C8;
border:1px solid #D4D0C8;
font:12px Arial,sans-serif;
}
/*mouse over button and down button states - other levels*/
.menuButtonSecondover, .menuButtonSeconddown {
background-color : #6495ed;
color:navy;
cursor : default;
border:1px solid navy;
font:12px Arial,sans-serif;
/*
background-color : navy;
color:white;
cursor : default;
border:1px solid navy;
font:12px Arial,sans-serif; */
}
/*icon place style on button over/down - other levels
.menuButtonSeconddownimg {
background-color : #C9D9F5;
}*/
/*text of mouse over button - other levels*/
.menuButtonSeconddown td {
color:navy;
cursor:default;
border:0px solid;
/*
color:white;
cursor:default;
border:0px solid; */
}
/*============ PANELS and DEVIDERS ===========================================*/
/*manu panel - top level*/
.menuTable{
background-color : #D4D0C8;
border-bottom : solid #808080 1px;
border-left : solid #FFFFFF 1px;
border-right : solid #808080 1px;
border-top : solid #d4d0c8 1px;
margin : 0px;
-moz-user-select : none;
padding : 0px;
}
/*menu panel - other levels*/
.secondMenuTable{
background-color : #D4D0C8;
border: 2px outset #ffffff;
margin : 0px;
-moz-user-select : none;
padding : 0px 1px 0px 2px;
}
/*devider - horizontal*/
.menuDivider {
background-color : #D4D0C8;
border-left : solid #808080 1px;
border-right : solid #FFFFFF 1px;
height : 100%;
margin-bottom : 2px;
margin-top : 1px;
overflow : hidden;
vertical-align : middle;
width : 2px;
}
/*devider - vertical*/
.menuDividerY {
background-color : #D4D0C8;
border-bottom : solid #FFFFFF 1px;
border-top : solid #808080 1px;
height : 2px;
overflow : hidden;
width : 100%;
}
/*================== DRAG HANDLERS ==================*/
/*drag handler for menu - horizontal*/
.menuHandle {
background-color : #D4D0C8;
border-bottom : solid #808080 1px;
border-left : solid #FFFFFF 1px;
border-right : solid #808080 1px;
border-top : solid #FFFFFF 1px;
cursor : move;
height : 100%;
overflow : hidden;
width : 3px;
}
/*drag handler for menu - vertical*/
.vmenuHandle {
background-color : #D4D0C8;
border-bottom : solid #808080 1px;
border-left : solid #FFFFFF 1px;
border-right : solid #808080 1px;
border-top : solid #FFFFFF 1px;
cursor : move;
height : 3px;
}
/*============ ICONS and SCROLLERS ====================*/
/*disabled icon - all levels*/
.iconGray {
filter : BlendTrans(Percent=50) gray();
cursor: default;
border:solid 1px #D4D0C8;
}
/*enabled scroller*/
.menuScrollerEnabled{
background-color:#CAC8D4;
cursor: pointer;
text-align:center;
}
/*disabled scroller*/
.menuScrollerDisabled{
background-color: #CAC8D4;
cursor: default;
visibility:hidden;
text-align:center;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_css/dhtmlxmenu.css
|
CSS
|
asf20
| 4,170
|
/*button text - all levels*/
#menu_modernstyle .menuButtonSecond td, #menu_modernstyle .menuButton td, #menu_modernstyle .menuButtondown td,#menu_modernstyle .menuButtonover td {
cursor:default;
}
/*menu text - all levels*/
#menu_modernstyle .defaultMenuText{
font: 11px Tahoma,Arial;
padding-left:10px;
padding-right:5px;
}
/*menu caption if any*/
#menu_modernstyle .menuName{
color : gray;
letter-spacing : 7px;
font : 11px Arial,sans-serif;
padding-left : 10px;
padding-right : 10px;
}
/*========= BUTTONS ======================*/
/*plain button state - top level*/
#menu_modernstyle .menuButton {
xborder : solid 1px #ece9d8;
}
/*down button state - top level*/
#menu_modernstyle .menuButtondown {
background-color : #868686;
xborder: solid 1px #316ac5;
cursor : default;
}
/*mouse over button state - top level*/
#menu_modernstyle .menuButtonover {
background-color : #868686;
xcolor:white;
xborder: solid 1px #316ac5;
cursor : default;
}
/*text color for pressed and over items - top level*/
#menu_modernstyle .menuButtondown .defaultMenuText,#menu_modernstyle .menuButtonover .defaultMenuText{
color:white;
}
/*plain button state - other levels*/
#menu_modernstyle .menuButtonSecond {
background-color:#F0F0F0;/*#xD4D0C8*/
border:2px solid #F0F0F0;
font:12px Arial,sans-serif;
xline-height:26px;
height:18px;
}
/*mouse over button and down button states - other levels*/
#menu_modernstyle .menuButtonSecondover,#menu_modernstyle .menuButtonSeconddown {
background-color : #CBCBCB;
color:black;
cursor : default;
border:2px solid #CBCBCB;
font:12px Arial,sans-serif;
}
/*icon place style on button over/down - other levels
.menuButtonSeconddownimg {
background-color : #C9D9F5;
}*/
/*text of mouse over button - other levels*/
#menu_modernstyle .menuButtonSeconddown td {
color:black;
cursor:default;
border:0px solid;
}
/*============ PANELS and DEVIDERS ===========================================*/
/*manu panel - top level*/
#menu_modernstyle .menuTable{
background-color : #ece9d8;
border: 0px solid #808080 ;
background-image: url(imgs/bg_menu.gif);
-moz-user-select : none;
padding : 0px;
height:20px;
}
/*menu panel - other levels*/
#menu_modernstyle .secondMenuTable{
background-color : #F0F0F0;
border: 1px solid #808080;
margin : 0px;
-moz-user-select : none;
padding : 0 1 0 2;
margin-top:-1px;
}
/*devider - horizontal*/
#menu_modernstyle .menuDivider {
background-color : #ece9d8;
border-left : solid #808080 1px;
border-right : solid #FFFFFF 1px;
height : 100%;
margin-bottom : 2px;
margin-top : 1px;
overflow : hidden;
vertical-align : middle;
width : 2px;
}
/*devider - vertical*/
#menu_modernstyle .menuDividerY {
background-color : #ece9d8;
border-bottom : solid #808080 1px;
xborder-top : solid #808080 1px;
height : 2px;
overflow : hidden;
width : 100%;
}
/*================== DRAG HANDLERS ==================*/
/*drag handler for menu - horizontal*/
#menu_modernstyle .menuhandle {
background-color : #ece9d8;
border-bottom : solid #808080 1px;
border-left : solid #FFFFFF 1px;
border-right : solid #808080 1px;
border-top : solid #FFFFFF 1px;
cursor : move;
height : 100%;
overflow : hidden;
width : 3px;
}
/*drag handler for menu - vertical*/
#menu_modernstyle .vmenuhandle {
background-color : #ece9d8;
border-bottom : solid #808080 1px;
border-left : solid #FFFFFF 1px;
border-right : solid #808080 1px;
border-top : solid #FFFFFF 1px;
cursor : move;
height : 3px;
}
/*============ ICONS and SCROLLERS ====================*/
/*disabled icon - all levels*/
#menu_modernstyle .iconGray {
filter : BlendTrans(Percent=50) gray();
cursor: default;
border:solid 1px #ece9d8;
}
/*enabled scroller*/
#menu_modernstyle .menuscrollerenabled{
background-color:#CAC8D4;
cursor: pointer;
text-align:center;
}
/*disabled scroller*/
#menu_modernstyle .menuscrollerdisabled{
background-color: #CAC8D4;
cursor: default;
visibility:hidden;
text-align:center;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_css/dhtmlxmenu_modern.css
|
CSS
|
asf20
| 4,143
|
function dhtmlXContextMenuObject(width,height,gfxPath,httpsdummy)
{
this.menu=new dhtmlXMenuBarObject(document.body,width,height,"",1,gfxPath,httpsdummy);
this.menu.setMenuMode("popup");
this.menu.hideBar();
this.menu.contextMenu=this;
this.menu.enableWindowOpenMode(false);
this.menu.setOnClickHandler(this._innerOnClick);
this.aframes=new Array();
this.registerFrame(window);
return this
};
dhtmlXContextMenuObject.prototype.registerFrame=function(awin)
{
this.aframes[this.aframes.length]=awin
};
dhtmlXContextMenuObject.prototype.setContextMenuHandler=function(func)
{
if (typeof(func)=="function") this.onClickHandler=func;
else this.onClickHandler=eval(func)
};
dhtmlXContextMenuObject.prototype.openAt=function(x,y,id,smartPosition)
{
this.espc=convertStringToBoolean(smartPosition);
var f=new Object;
f.button=2;
f.clientX=x;
f.clientY=y;
var start=new Object;
start.contextMenuId=id;
start.contextMenu=this;
start.a=this._contextStart;
start.a(document.body,f);
this.espc=null
};
dhtmlXContextMenuObject.prototype.disableMenu=function(mode)
{
this._dsbd=convertStringToBoolean(mode)
};
dhtmlXContextMenuObject.prototype.setOnShowMenuHandler=function(func)
{
if (typeof(func)=="function") this.onShowHandler=func;
else this.onShowHandler=eval(func)
};
dhtmlXContextMenuObject.prototype.setContextMenuPosition=function(left,top)
{
this._msTop=parseInt(top);
this._msLeft=parseInt(left)
};
dhtmlXContextMenuObject.prototype._innerOnClick=function(id)
{
var that=document.body.contextMenu;
if (that.contextZone.ownerDocument)
{
if (that.contextZone.ownerDocument.body.onclick)that.contextZone.ownerDocument.body.onclick()
}
else if (document.body.onclick)document.body.onclick();
if (that.onClickHandler)return that.onClickHandler(id,that.zoneId,that.contextZone);
return true
};
dhtmlXContextMenuObject.prototype.setContextZone=function(htmlObject,zoneId)
{
if (typeof(htmlObject)!="object")
htmlObject=document.getElementById(htmlObject);
if (!htmlObject.contextMenu)htmlObject.contextOnclick=htmlObject.onmouseup;
htmlObject.selfobj = this;
htmlObject[_isMacOS?"oncontextmenu":"onmouseup"]= function(e)
{
this.selfobj._contextStart(this,e)
};
htmlObject.contextMenu=this;
htmlObject.contextMenuId=zoneId
};
dhtmlXContextMenuObject.prototype._contextStart=function(obj,e)
{
if ((_isIE)&&(window.event))
event.srcElement.oncontextmenu = function()
{
event.cancelBubble=true;
return false
};
if (e && e.preventDefault)e.preventDefault();
if(!this.contextMenu)this.contextMenu = this;
var win = obj.ownerDocument?obj.ownerDocument.parentWindow:window;
if(!win)
{
win = obj.ownerDocument.defaultView
};
var a=this.contextMenu.menu.topNod;
a.style.position="absolute";
if (!e)
{
e=win.event
};
if (document.body.onclick)document.body.onclick();
if ((!_isMacOS)&&((!e)||(e.button!=2)))
{
if (obj.contextOnclick)obj.contextOnclick();
return true
}
else
{
if (this.contextMenu._dsbd)return true;
if (this.contextMenu.onShowHandler)
{
var z=this.contextMenu.onShowHandler(obj.contextMenuId);
if ((typeof(z)=="boolean")&&(!z)) return
};
this.contextMenu.menu.showBar()
};
var winScreenTop = window.screenTop;
if ((!winScreenTop)&&(winScreenTop!=0))
{
winScreenTop = window.screenY+window.outerHeight-window.innerHeight
};
var winScreenLeft = window.screenLeft;
if((!winScreenLeft)&&(winScreenLeft!=0))
{
winScreenLeft = window.screenX+window.outerWidth-window.innerWidth-4
};
var dEl0=window.document.documentElement;
var dEl1=window.document.body;
if(e.screenY-winScreenTop+a.offsetHeight-(dEl0.scrollTop||dEl1.scrollTop)> (dEl0.clientHeight||dEl1.clientHeight))
{
var verCor = a.offsetHeight
}
else
var verCor = ((this.contextMenu._msTop*(-1))||0);
var corrector = new Array((dEl0.scrollLeft||dEl1.scrollLeft)+(this.contextMenu._msLeft||0),verCor-(dEl0.scrollTop||dEl1.scrollTop));
if ((!e.screenY)&&(e.clientX))
{
a.style.top = e.clientY+"px";
a.style.left = e.clientX+"px"
}
else
{
a.style.top = e.screenY-winScreenTop-corrector[1]+"px";
a.style.left = e.screenX-winScreenLeft+corrector[0]+"px"
};
if(!_isIE)
{
a.style.top = e.clientY-corrector[1]+"px";
a.style.left = e.clientX+corrector[0]+"px"
};
this.contextMenu.correctMenuPosition(a);
if (a.ieFix)
{
a.ieFix.style.top=a.style.top;
a.ieFix.style.left=a.style.left
};
win.document.body.oncontextmenu=new Function("document.body.oncontextmenu=new Function('if (document.body.onclick)document.body.onclick();return false;');return false;");
for (var i=0;i<this.contextMenu.aframes.length;i++)
{
if (this.contextMenu.aframes[i].document)this.contextMenu.aframes[i].document.body.selfobj = this;
this.contextMenu.aframes[i].document.body.onclick=function(e)
{
this.selfobj.contextMenu._contextEnd(e)
}
};
document.body.contextMenu=this.contextMenu;
this.contextMenu.contextZone=obj;
this.contextMenu.zoneId=obj.contextMenuId;
return false
};
dhtmlXContextMenuObject.prototype.correctMenuPosition=function(panel,mode)
{
var xs=document.body.offsetWidth+document.body.scrollLeft;
var ys=document.body.offsetHeight-15+document.body.scrollTop;
if ((panel.offsetWidth+parseInt(panel.style.left))>xs)
{
var z=parseInt(panel.style.left)-panel.offsetWidth;
if ((z<0)||(this.espc))
z=xs-panel.offsetWidth;
if (z<0)z=0;
panel.style.left=z+"px";
if (panel.ieFix)panel.ieFix.style.left=z+"px"
};
if ((panel.offsetHeight+parseInt(panel.style.top))>ys)
{
var z=parseInt(panel.style.top) - panel.offsetHeight;
if ((z<0)||(this.espc))
z=ys-panel.offsetHeight;
if (z<0)z=0;
panel.style.top=z+"px";
if (panel.ieFix)panel.ieFix.style.top=z+"px"
};
if (!mode)this.correctMenuPosition(panel,1)
};
dhtmlXMenuBarObject.prototype.correctMenuPosition=dhtmlXContextMenuObject.prototype.correctMenuPosition;
dhtmlXContextMenuObject.prototype._contextEnd=function(e)
{
var menu=this.menu;
menu._closePanel(menu);
menu.lastOpenedPanel="";
menu.lastSelectedItem=0;
menu.hideBar();
for (var i=0;i<this.aframes.length;i++)if (this.aframes[i].document)
{
this.aframes[i].document.body.onclick=null;
this.aframes[i].document.body.oncontextmenu=null
};
return false
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_js/dhtmlxmenubar_cp.js
|
JavaScript
|
asf20
| 6,550
|
function dhtmlXProtobarObject()
{
return this
};
dhtmlXProtobarObject.prototype.setOnShowHandler=function(func)
{
if (typeof(func)=="function") this.onShow=func;
else this.onShow=eval(func)
};
dhtmlXProtobarObject.prototype._getItemIndex=function(id)
{
for (var i=0;i<this.itemsCount;i++)
{
if (this.items[i].id==id)return i
};
return -1
};
dhtmlXProtobarObject.prototype.setGfxPath=function(path)
{
this.sysGfxPath=path;
if (this._adjustGFXPath)this._adjustGFXPath(path)
};
dhtmlXProtobarObject.prototype.setOnHideHandler=function(func)
{
if (typeof(func)=="function") this.onHide=func;
else this.onHide=eval(func)
};
dhtmlXProtobarObject.prototype.setItemAction=function(id,action)
{
var z=this._getItemIndex(id);
if (z>=0)
{
this.items[z].setSecondAction(action)
}
};
dhtmlXProtobarObject.prototype.getItem=function(itemId)
{
var z=this._getItemIndex(itemId);
if (z>=0)return this.items[z]
};
dhtmlXProtobarObject.prototype.hideButtons=function(idList)
{
if (!idList)
{
for (var i=0;i<this.itemsCount;i++)
{
var z=this.items[i].getTopNode();
z.style.display="none";
if (this.extraMode)z.parentNode.style.display="none";
this.items[i].hide=1
};
return 0
};
var temp=idList.split(",");
for (var i=0;i<temp.length;i++)
{
this.hideItem(temp[i])
}
};
dhtmlXProtobarObject.prototype.showButtons=function(idList)
{
if (!idList)
{
for (var i=0;i<this.itemsCount;i++)
{
var w=this.items[i].getTopNode();
w.style.display="";
if (this.extraMode)w.parentNode.style.display="";
this.items[i].hide=0
};
return 0
};
var temp=idList.split(",");
for (var i=0;i<temp.length;i++)
{
this.showItem(temp[i])
}
};
dhtmlXProtobarObject.prototype.disableItem=function(itemId)
{
var z=this.getItem(itemId);
if (z)
{
if (z.disable)z.disable()
}
};
dhtmlXProtobarObject.prototype.enableItem=function(itemId)
{
var z=this.getItem(itemId);
if (z)
{
if (z.enable)z.enable()
}
};
dhtmlXProtobarObject.prototype.hideItem=function(itemId)
{
var z=this.getItem(itemId);
if (z)
{
var w=z.getTopNode();
w.style.display="none";
if (this.extraMode)w.parentNode.style.display="none";
z.hide=1;
if (z.parentPanel)
{
this._scrollClear(z.parentPanel);
this._scrollCheck(z.parentPanel)
}
}
};
dhtmlXProtobarObject.prototype.showItem=function(id)
{
var z=this.getItem(id);
if (z)
{
var w=z.getTopNode();
w.style.display="";
if (this.extraMode)w.parentNode.style.display="";
z.hide=0;
if (z.parentPanel)
{
this._scrollClear(z.parentPanel);
this._scrollCheck(z.parentPanel)
}
}
};
dhtmlXProtobarObject.prototype.setOnClickHandler=function(func)
{
if (typeof(func)=="function") this.defaultAction=func;
else this.defaultAction=eval(func)
};
dhtmlXProtobarObject.prototype.setTitleText=function(newText)
{
this.tname=newText;
this.nameCell.innerHTML=newText;
this.preNameCell.innerHTML=newText
};
dhtmlXProtobarObject.prototype.setBarSize=function(width,height)
{
if(width)this.topNod.width=width;
if(height)this.topNod.height=height
};
dhtmlXProtobarObject.prototype.resetBar=function(idList)
{
for (var i=0;i<this.itemsCount;i++)this.hideItem(this.items[i].id);
var temp=idList.split(",");
for (var i=0;i<temp.length;i++)
{
this.showItem(temp[i])
}
};
dhtmlXProtobarObject.prototype.loadXMLFor=function(file,itemId,afterCall)
{
var z=this._getItemIndex(itemId);
if (z>=0)this._awaitXML=this.gitems[z];
this.xmlLoader.waitCall=afterCall||0;
this.xmlLoader.loadXML(file)
};
dhtmlXProtobarObject.prototype.loadXML=function(file,afterCall)
{
this.xmlLoader.waitCall=afterCall||0;
this.xmlLoader.loadXML(file)
};
dhtmlXProtobarObject.prototype.loadXMLString=function(xmlString,afterCall)
{
this.waitCall=afterCall||0;
this.xmlLoader.loadXMLString(xmlString)
};
dhtmlXProtobarObject.prototype.showBar=function()
{
this.topNod.style.display="";
if ((this.topNod.ieFix)&&(this.topNod.style.position=="absolute"))
{
this.topNod.ieFix.style.display="";
this.topNod.ieFix.style.position="absolute";
this.topNod.ieFix.style.top=this.topNod.style.top;
this.topNod.ieFix.style.left=this.topNod.style.left;
this.topNod.ieFix.style.width=this.topNod.offsetWidth+"px";
this.topNod.ieFix.style.height=this.topNod.offsetHeight+"px"
};
if(this.onShow)this.onShow()
};
dhtmlXProtobarObject.prototype.hideBar=function()
{
this.topNod.style.display="none";
if (this.topNod.ieFix)this.topNod.ieFix.style.display="none";
if(this.onHide)this.onHide()
};
dhtmlXProtobarObject.prototype.setBarAlign=function(align)
{
if ((align=="left")||(align=="top"))
{
this.preNameCell.innerHTML="";
this.preNameCell.style.display="none";
this.nameCell.style.display="";
this.nameCell.width="100%";
this.nameCell.innerHTML=this.tname
};
if ((align=="center")||(align=="middle"))
{
this.preNameCell.style.display="";
this.preNameCell.width="50%";
this.nameCell.style.display="";
this.nameCell.width="50%";
this.nameCell.innerHTML=this.tname;
this.preNameCell.innerHTML=this.tname
};
if ((align=="right")||(align=="bottom"))
{
this.nameCell.innerHTML="";
this.nameCell.style.display="none";
this.preNameCell.style.display="";
this.preNameCell.width="100%";
this.preNameCell.innerHTML=this.tname
}
};
dhtmlXProtobarObject.prototype.dummyFunc=function()
{
return true
};
dhtmlXProtobarObject.prototype.badDummy=function()
{
return false
};
function dhtmlXButtonPrototypeObject()
{
return this
};
dhtmlXButtonPrototypeObject.prototype.setAction=function(func)
{
if (typeof(func)=="function") this.action=func;
else this.action=eval(func)
};
dhtmlXButtonPrototypeObject.prototype.setSecondAction=function(func)
{
if (typeof(func)=="function") this.persAction=func;
else this.persAction=eval(func)
};
dhtmlXButtonPrototypeObject.prototype.enable=function()
{
if (this.disableImage)this.imageTag.src=this.src;
else
if (!this.className)this.topNod.className=this.objectNode.className;
else
this.topNod.className=this.className;
if (this.textTag)this.textTag.className=this.textClassName;
this.topNod.onclick=this._onclickX;
this.topNod.onmouseover=this._onmouseoverX;
this.topNod.onmouseout=this._onmouseoutX;
this.topNod.onmousedown=this._onmousedownX;
this.topNod.onmouseup=this._onmouseupX
};
dhtmlXButtonPrototypeObject.prototype.disable=function()
{
if (this.disableImage)
{
this.imageTag.src=this.disableImage
}
else this.topNod.className="iconGray";
if (this.textTag)this.textTag.className="buttonTextDisabled";
this.topNod.onclick=this.dummy;
this.topNod.onmouseover=this.dummy;
this.topNod.onmouseout=this.dummy;
this.topNod.onmousedown=this.dummy;
this.topNod.onmouseup=this.dummy
};
dhtmlXButtonPrototypeObject.prototype._onclickX=function(e,that)
{
if (!that)that=this.objectNode;
if (that.topNod.dstatus)return;
if ((!that.persAction)||(that.persAction()))
if (that.action)
{
that.action(that.id)
}
};
dhtmlXButtonPrototypeObject.prototype.setHTML=function(htmlText)
{
this.topNod.innerHTML=htmlText
};
dhtmlXButtonPrototypeObject.prototype.setAltText=function(imageText)
{
this.imageTag.alt=imageText
};
dhtmlXButtonPrototypeObject.prototype.setImage=function(imageSrc,disabledImageSrc)
{
this.src=imageSrc;
if (disabledImageSrc)this.disableImage=disabledImageSrc;
if (this.topNod.onclick==this.dummy)
{
if (disabledImageSrc)this.imageTag.src=disabledImageSrc
}
else
this.imageTag.src=imageSrc
};
dhtmlXButtonPrototypeObject.prototype.dummy=function()
{
};
dhtmlXButtonPrototypeObject.prototype.getTopNode=function()
{
return this.topNod
};
dhtmlXButtonPrototypeObject.prototype._onmouseoverY=function()
{
if (this._mvImage)this.imageTag.src=this._mvImage;
else
this.topNod.className=this.className+'Over'
};
dhtmlXButtonPrototypeObject.prototype._onmouseoutY=function()
{
if (this._mnImage)this.imageTag.src=this._mnImage;
else
this.topNod.className=this.className
};
dhtmlXButtonPrototypeObject.prototype._onmousedownX=function()
{
this.className=this.objectNode.className+'Down';
return true
};
dhtmlXButtonPrototypeObject.prototype._onmouseupX=function()
{
this.className=this.objectNode.className;
return true
};
dhtmlXButtonPrototypeObject.prototype._onmouseoutX=function(e)
{
if (!e)e=event;
if (this.timeoutop)clearTimeout(this.timeoutop);
this.timeoutop=setTimeout( this.objectNode._delayedTimerCall(this.objectNode,"_onmouseoutY"),100)
};
dhtmlXButtonPrototypeObject.prototype._onmouseoverX=function(e)
{
if (!e)e=event;
if (this.timeoutop)clearTimeout(this.timeoutop);
this.timeoutop=setTimeout( this.objectNode._delayedTimerCall(this.objectNode,"_onmouseoverY"),50)
};
dhtmlXButtonPrototypeObject.prototype._delayedTimerCall=function(object,functionName,time)
{
this.callFunc=function()
{
eval("object."+functionName+"();")
};
return this.callFunc
};
dhtmlXButtonPrototypeObject.prototype._arg2obj=function(n,list)
{
var nAtr=new Object();
for (var i=0;i<n.length;i++)nAtr[list[i]]=n[i];
return nAtr
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_js/dhtmlxprotobar.js
|
JavaScript
|
asf20
| 10,175
|
function dhtmlXMenuBarObject(htmlObject,width,height,name,vMode,gfxPath,httpsdummy)
{
if (typeof(htmlObject)!="object")
this.parentObject=document.getElementById(htmlObject);
else
this.parentObject=htmlObject;
if (!this.parentObject)this.parentObject=document.body;
this.setGfxPathA=this.setGfxPath;
this.setGfxPath=function()
{
this.setGfxPathA.apply(this,arguments);
var self=this;
dhtmlXMenuItemObject.prototype.dummyImg=function()
{
return self.sysGfxPath+"blank.gif"
}
};
if ((_isIE)&&(this.parentObject==document.body))
{
var zdiv=document.createElement("DIV");
zdiv.style.position="absolute";
zdiv.style.zIndex=30;
zdiv.style.top=0;
zdiv.style.left=0;
document.body.insertBefore(zdiv,document.body.firstChild);
this.parentObject=zdiv
};
if (!vMode)this.flsmd=true;
this.tname=name;
this.topMenu=this;
this.width=width;
this.height=height;
this.topNod=0;
this._httpsdummy=httpsdummy;
this.ieFix=(document.all?true:false);
var detect = navigator.userAgent.toLowerCase();
place = detect.indexOf('opera') + 1;
if (place)this.ieFix=false;
this.ieWinMode=true;
this.ieWinModeState=0;
this.zIndex=30;
this.maxItems=99;
this.echsw=true;
this.sysGfxPath=gfxPath;
this.dividerCell=0;
this.firstCell=0;
this.nameCell=0;
this.crossCell=0;
this.echsw2=true;
this.tableCSS="menuTable";
this.titleCSS="menuName";
this.secTableCSS="secondMenuTable";
this.extraMode=convertStringToBoolean(vMode);
this.defaultAction=0;
this.onShow=0;
this.onHide=0;
var lastOpenedPanel=0;
var lastSelectedItem=0;
this.items=new Array();
this.itemsCount=0;
this.gitems=new Array();
this.gitemsCount=0;
this.subMenus=new Array();
this.subMenusCount=0;
if (!this.extraMode)this._createPanel();
else
this._createVPanel();
this.hiddenForm=document.createElement("FORM");
this.hiddenForm.style.display="none";
this.parentObject.appendChild(this.hiddenForm);
if (this._extendedInit)this._extendedInit();
this.xmlLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this);
this.setMenuMode("classic");
this.setBarSize(this.width,this.height);
this.showBar();
return this
};
dhtmlXMenuBarObject.prototype = new dhtmlXProtobarObject;
dhtmlXMenuBarObject.prototype.setZIndex=function(zIndex)
{
this.zIndex=zIndex;
this.topNod.style.zIndex=this.zIndex;
if (this.topNod.ieFix)this.topNod.ieFix.style.zIndex=this.zIndex-1;
if ((_isIE)&&(this.parentObject)&&(this.parentObject.style.position=="absolute")) this.parentObject.style.zIndex=zIndex
};
dhtmlXMenuBarObject.prototype.setIconSize=function(size)
{
this._aimsize=size
};
function dhtmlXMenuBarPanelObject(parentPanel,parentItem,mode,minWidth,withoutImages)
{
this.extraMode=!convertStringToBoolean(mode);
this.parentPanel=parentPanel;
this.parentItem=parentItem;
this.parentObject=parentPanel.parentObject;
this.topMenu=parentPanel.topMenu;
this.topNod=0;
this.dividerCell=0;
this.firstCell=0;
this.nameCell=0;
this.crossCell=0;
this.maxItems=99;
this.items=new Array();
this.itemsCount=0;
this.withoutImages=(withoutImages==1);
this.mixedImages=(withoutImages==2);
if (minWidth)this.width=minWidth;
if ((!this.topMenu.flsmd)||(this.topMenu!=this.parentPanel))
this.parentItem.setHasChild(true);
if (mode)this._createVPanel=this.topMenu._createPanel;
else
this._createVPanel=this.topMenu._createVPanel;
this._createVPanel();
this.topNod.panel=this;
this.topNod.onmouseover=this.topMenu._onmouseoverZ;
this.topNod.onmouseout=this.topMenu._onmouseoutZ;
parentItem.subMenu=this;
this.topNod.style.position="absolute";
this.topMenu.subMenus[this.topMenu.subMenusCount]=this;
this.topMenu.subMenusCount++;
return this
};
dhtmlXMenuBarObject.prototype.enableIESelectBoxFix=function(mode)
{
this.ieFix=convertStringToBoolean(mode)
};
dhtmlXMenuBarObject.prototype.enableTooltip=function(mode)
{
this._endtt=(!convertStringToBoolean(mode))
};
dhtmlXMenuBarObject.prototype.disableSmartPositioning=function(mode)
{
this._skipAPP=convertStringToBoolean(mode)
};
dhtmlXMenuBarObject.prototype.enableMenuHandle=function(mode)
{
if(convertStringToBoolean(mode)) this.dividerCell.style.display="";
else this.dividerCell.style.display="none"
};
dhtmlXMenuBarObject.prototype.enableChildIcon=function(mode)
{
this.echsw=convertStringToBoolean(mode)
};
dhtmlXMenuBarObject.prototype.setHrefMode=function(mode)
{
this._hmode=mode
};
dhtmlXMenuBarObject.prototype.enableDirectOnClick=function(mode)
{
this._dirClick=convertStringToBoolean(mode)
};
dhtmlXMenuBarObject.prototype.enableChildIconSwitching=function(mode)
{
this.echsw2=convertStringToBoolean(mode)
};
dhtmlXMenuBarObject.prototype.enableWindowOpenMode=function(mode)
{
this.ieWinMode=convertStringToBoolean(mode)
};
dhtmlXMenuBarObject.prototype._getItemIndex=function(id)
{
for (var i=0;i<this.gitemsCount;i++)
{
if (this.gitems[i].id==id)return i
};
return -1
};
dhtmlXMenuBarObject.prototype.getItem=function(itemId)
{
var z=this._getItemIndex(itemId);
if (z>=0)return this.gitems[z]
};
dhtmlXMenuBarObject.prototype._showScroll=function(node,order,rest,mode)
{
if (!node.items[order])return;
if (mode=="")if (rest==1)node.cAr[2]++;
else node.cAr[0]--;
else
if (rest==1)node.cAr[0]++;
else node.cAr[2]--;
if ((!node.items[order].CSSTag)||(node.items[order].hide))
{
node.items[order].topNod.parentNode.style.display=mode;
this._showScroll(node,order*1+rest*1,rest,mode)
}
else
{
node.items[order].topNod.parentNode.style.display=mode
}
};
dhtmlXMenuBarObject.prototype._fixScrollState=function(node,rest)
{
if (parseInt(node.topNod.offsetWidth)>parseInt(node.topNod.width))
node.topNod.width=node.topNod.offsetWidth;
var flag=0;
if (rest>0)
{
this._showScroll(node,node.cAr[0],1,"none");
this._showScroll(node,node.cAr[2],1,"")
}
else
{
this._showScroll(node,node.cAr[0]-1,-1,"");
this._showScroll(node,node.cAr[2]-1,-1,"none")
};
z.scrollState+=rest*1;
if ((node.scrollState*1+node.maxItems*1)==(node.realItemsCount))
node.scrollDown.className="menuScrollerDisabled";
else
{
node.scrollDown.className="menuScrollerEnabled";
flag++
};
if (node.scrollState==0)node.scrollUp.className="menuScrollerDisabled";
else
{
node.scrollUp.className="menuScrollerEnabled";
flag++
};
return flag
};
dhtmlXMenuBarObject.prototype._scrollstart=function()
{
if (this.timeoutops)clearTimeout(this.timeoutops);
z=this.parentNode.parentNode.parentNode.menu;
if (z.scrollDown==this)var rest=1;
else
var rest=-1;
if (z.topMenu._fixScrollState(z,rest)==2)
this.timeoutops=setTimeout(new z.topMenu._delayedTimerCall(this,"onmouseover",0,0),333)
};
dhtmlXMenuBarObject.prototype._scrollend=function(node)
{
if (this.timeoutops)window.clearTimeout(this.timeoutops)
};
dhtmlXMenuBarObject.prototype._scrollCheck=function(node)
{
var z_count=0;
for (var i=0;i<node.itemsCount;i++)if ((node.items[i].CSSTag)&&(!node.items[i].hide)) z_count++;
node.realItemsCount=z_count;
node.cAr=new Array(0,0,0);
if ((node.realItemsCount>node.maxItems)&&(node.scrollDown))
{
node.scrollDown.style.display="";
node.scrollUp.style.display="";
node.scrollDown.className='menuScrollerEnabled';
node.scrollState=0;
node.scrollUp.onmouseover=this._scrollstart;
node.scrollUp.onmouseout=this._scrollend;
node.scrollDown.onmouseover=this._scrollstart;
node.scrollDown.onmouseout=this._scrollend;
node.cAr[2]=0;
var z_count=0;
var b_flag=true;
for (var i=0;i<node.itemsCount;i++)
{
if ((node.items[i].CSSTag)&&(!node.items[i].hide)) z_count++;
if (z_count>node.maxItems)
{
node.items[i].topNod.parentNode.style.display="none";
if (node.cAr[2]==0)node.cAr[2]=i
}
else
{
node.items[i].topNod.parentNode.style.display=""
}
}
}
};
dhtmlXMenuBarObject.prototype._scrollClear=function(node)
{
for (var i=0;i<node.itemsCount;i++)
{
if ((node.items[i].CSSTag)&&(!node.items[i].hide))
node.items[i].topNod.parentNode.style.display="";
if (node.scrollDown)node.scrollDown.style.display="none";
if (node.scrollUp)node.scrollUp.style.display="none"
}
};
dhtmlXMenuBarObject.prototype.getPanel=function(panelId)
{
var z=this._getGItemIndex(panelId);
if (z<0)return this;
else return this.gitems[z].subMenu
};
dhtmlXMenuBarObject.prototype.addItem=function(panel,item)
{
if (this==panel)this.addFirstLevel(panel,item);
else this.addSecondLevel(panel,item)
};
dhtmlXMenuBarObject.prototype._addItem=function(panel,item)
{
panel.items[panel.itemsCount]=item;
panel.firstCell.parentNode.insertBefore(item.getTopNode(),panel.firstCell);
item.getTopNode().style.marginBottom="20px";
item.parentNod=this;
item.parentPanel=panel;
if (this.defaultAction)item.setAction(this.defaultAction);
panel.itemsCount++;
this.gitems[this.gitemsCount]=item;
this.gitemsCount++
};
dhtmlXMenuBarObject.prototype.addItem_vertical=function(panel,item)
{
panel.items[panel.itemsCount]=item;
var tr=document.createElement("tr");
tr.style.verticalAlign="top";
tr.appendChild(item.getTopNode());
panel.firstCell.parentNode.insertBefore(tr,panel.firstCell);
item.parentNod=this;
item.parentPanel=panel;
if (this.defaultAction)item.setAction(this.defaultAction);
panel.itemsCount++;
this.gitems[this.gitemsCount]=item;
this.gitemsCount++
};
dhtmlXMenuBarObject.prototype._getGItemIndex=function(id)
{
return (this._getItemIndex(id))
};
dhtmlXMenuBarObject.prototype.clearAll=function(id)
{
for (var i=0;i<this.gitemsCount;i++)
{
var x=this.gitems[i].getTopNode();
x.parentNode.removeChild(x);
x=this.gitems[i].parentPanel;
if (x!=this.topMenu && x.topNod)
{
x.topNod.parentNode.removeChild(x.topNod);
x.topNod=null
}
};
this.items=new Array();
this.itemsCount=0;
this.gitems=new Array();
this.gitemsCount=0;
this.subMenus=new Array();
this.subMenusCount=0;
this.realWinModeStart=this.ieWinModeState=this._lastOpenedPanel=this._lastSelectedItem=null
};
dhtmlXMenuBarObject.prototype.removeItem=function(id)
{
var z=this._getGItemIndex(id);
if (z>=0)
{
var panel=this.gitems[z].parentPanel;
if (this.gitems[z].removeItem)this.gitems[z].removeItem();
if (panel.firstCell.tagName=="TR")var zw=this.gitems[z].getTopNode().parentNode
else
var zw=this.gitems[z].getTopNode().parentNode
zw.parentNode.removeChild(zw);
panel.itemsCount--;
for (var i=0;i<panel.itemsCount;i++)if (panel.items[i]==this.gitems[z])
{
panel.items[i]=panel.items[i+1];
panel.items[i+1]=this.gitems[z]
};
panel.items[panel.itemsCount]=0;
this.gitemsCount--;
for (var i=z;i<this.gitemsCount;i++)
{
this.gitems[i]=this.gitems[i+1]
};
this.gitems[this.gitemsCount]=0
}
};
dhtmlXMenuBarObject.prototype._parseXMLTree=function(that,node,level,parentNode,aTempNode,mode)
{
if (!node)
{
node=that.xmlLoader.getXMLTopNode("menu");
if (that._awaitXML)
{
aTempNode=that._awaitXML;
parentNode=aTempNode.parentPanel;
level=1;
that._awaitXML=null;
mode=this.modeValue
}
else
{
level=0;
parentNode=that;
mode=node.getAttribute("mode");
if (mode)that.setMenuMode(mode);
var menuAlign=node.getAttribute("menuAlign");
if (menuAlign)that.setBarAlign(menuAlign);
that.maxItems=node.getAttribute("maxItems")||99;
var absolutePosition=node.getAttribute("absolutePosition");
var aleft=node.getAttribute("left");
var atop=node.getAttribute("top");
if (absolutePosition)that.topNod.style.top=parseInt(atop || 0 )+"px";
if (absolutePosition)that.topNod.style.left=parseInt(aleft || 0)+"px";
if (absolutePosition=="yes")that.topNod.style.position="absolute";
var name=node.getAttribute("name");
if(name)that.setTitleText(name);
var width=node.getAttribute("width");
var height=node.getAttribute("height");
that.setBarSize(width,height);
var imageTextButtonCssClass=node.getAttribute("imageTextButtonCssClass");
var globalTextCss=node.getAttribute("globalTextCss");
that.globalSecondCss=node.getAttribute("globalSecondCss");
that.globalCss=node.getAttribute("globalCss");
that.globalTextCss=node.getAttribute("globalTextCss");
if (node.getAttribute("withoutImages")) that.withoutImages=true;
if (node.getAttribute("mixedImages")) that.mixedImages=true;
that.type=node.getAttribute("type")||"a1"
}
};
if (level)
{
var parentNode=new dhtmlXMenuBarPanelObject(parentNode,aTempNode,((mode!="classic")&&(mode!="popup")),node.getAttribute("panelWidth"),(node.getAttribute("withoutImages")?1:(node.getAttribute("mixedImages")?2:0)));
parentNode.maxItems=node.getAttribute("maxItems")||that.maxItems
};
for(var i=0;i<node.childNodes.length;i++)
{
if (node.childNodes[i].nodeType==1)
{
var localItem=node.childNodes[i]
if (!level)
{
if ((!localItem.getAttribute("className"))&&(that.globalCss))
localItem.setAttribute("className",that.globalCss)
}
else
if (!localItem.getAttribute("className"))
{
if (that.globalSecondCss)localItem.setAttribute("className",that.globalSecondCss);
else
localItem.setAttribute("className","menuButtonSecond")
};
if ((!localItem.getAttribute("textClassName"))&&(that.globalTextCss))
localItem.setAttribute("textClassName",that.globalTextCss);
var tempsrc=localItem.getAttribute("src");
if (parentNode.withoutImages)
{
localItem.setAttribute("src","");
localItem.setAttribute("src2", that.sysGfxPath+"blank.gif")
}
else
{
if ((parentNode.mixedImages)&&(tempsrc==null))
tempsrc=that.sysGfxPath+"blank.gif";
else
tempsrc=that.sysGfxPath+(tempsrc||"blank.gif");
localItem.setAttribute("src",tempsrc)
};
tempsrc=localItem.getAttribute("width");
if (tempsrc==null)
{
localItem.setAttribute("width","100%")
};
if (that._endtt)localItem.setAttribute("tooltip","");
if (that._aimsize)localItem.setAttribute("imageSize",that._aimsize);
var z=eval("window.dhtmlX"+localItem.tagName+"Object");
if (z)var TempNode= new z(localItem,node.getAttribute("type")||that.type);
else
var TempNode=null;
if (localItem.tagName=="divider")if ((level)||(that.modeValue=="popup"))
that.addItem(parentNode,new dhtmlXMenuDividerYObject(localItem.getAttribute("id")));
else
that.addItem(parentNode,new dhtmlXMenuDividerXObject(localItem.getAttribute("id")));
else
if (TempNode)if (level)that.addItem(parentNode,TempNode);
else
that.addItem(parentNode,TempNode);
if (localItem.getAttribute("disabled"))
TempNode.disable();
if ((TempNode)&&(localItem.getAttribute("submenu")))
{
TempNode.submenu=localItem.getAttribute("submenu");
TempNode.setHasChild(true)
};
if (that.checkXMLChild(localItem)) that._parseXMLTree(that,localItem,level+1,parentNode,TempNode,mode)
}
};
that._scrollCheck(parentNode);
if (level==0)
{
if (that.topMenu.correctMenuPosition)that.topMenu.correctMenuPosition(that.topMenu.topNod);
if (that.topMenu.waitCall)that.topMenu.waitCall()
}
};
dhtmlXMenuBarObject.prototype.checkXMLChild=function(node)
{
for (var i=0;i<node.childNodes.length;i++)if (node.childNodes[i].nodeType==1)return true;
return false
};
dhtmlXMenuBarObject.prototype._createPanel=function()
{
if(!this.width)this.width=1;
if(!this.height)this.height=1;
if (this.width.toString().indexOf("%")==-1) this.width=parseInt(this.width)+"px";
if (this.height.toString().indexOf("%")==-1) this.height=parseInt(this.height)+"px";
var div=document.createElement("div");
div.innerHTML='<table cellpadding="0" cellspacing="0" class="'+this.topMenu.tableCSS+'" width="'+this.width+'" height="'+this.height+'"><tbody>' +
'<tr>'+
'<td width="3px" style="display:none"><div class="menuHandle"> </div></td>'+
'<td class="'+this.topMenu.titleCSS+'" style="display:none">'+this.topMenu.tname+'</td>'+
'<td></td>'+
'<td align="right" '+(_isOpera?'':'width="100%"')+' class="'+this.topMenu.titleCSS+'"> '+this.topMenu.tname+'</td>'+
'<td > </td>'+
'</tr></tbody></table>';
var table=div.childNodes[0];
table.style.display="none";
table.setAttribute("UNSELECTABLE","on");
table.onselectstart=this.topMenu.badDummy;
this.topNod=table;
this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
this.dividerCell.menu=this;
this.preNameCell=this.dividerCell.nextSibling;
this.firstCell=this.preNameCell.nextSibling;
this.nameCell=this.firstCell.nextSibling;
this.crossCell=this.nameCell.nextSibling;
if (this.topMenu!=this)
{
this.dividerCell.style.display="none";
this.preNameCell.style.display="none";
this.nameCell.style.display="none";
this.crossCell.style.display="none";
table.className=this.topMenu.secTableCSS
};
this.topNod.style.zIndex=this.topMenu.zIndex;
if (this.topMenu.ieFix)
{
var iframe=document.createElement("IFRAME");
if (this._httpsdummy || this.topMenu.sysGfxPath)iframe.src=(this._httpsdummy||(this.topMenu.sysGfxPath+"/blank.html"));
iframe.style.zIndex=this.topMenu.zIndex-1;
iframe.style.position="absolute";
iframe.style.display="none";
iframe.scrolling="no";
iframe.frameBorder=0;
this.parentObject.appendChild(iframe);
this._del_iframe=iframe;
this.topNod.ieFix=iframe
};
this.parentObject.appendChild(table);
this._del_table=table
};
dhtmlXMenuBarObject.prototype.setMenuCSS=function(table,title,secTable)
{
this.tableCSS=table;
this.titleCSS=title;
this.secTableCSS=secTable;
this.topNod.className=this.tableCSS;
this.preNameCell.className=this.titleCSS;
this.nameCell.className=this.titleCSS
};
dhtmlXMenuBarObject.prototype._adjustGFXPath=function(path)
{
if (this.extraMode)
{
this.topNod.rows[0].cells[0].childNodes[0].src=path+'btn_up1.gif';
this.topNod.rows[this.topNod.rows.length-3].cells[0].childNodes[0].src=path+'btn_up2.gif'
}
};
dhtmlXMenuBarObject.prototype._createVPanel=function()
{
if(!this.width)this.width=120;
if(!this.height)this.height=20;
if (this.width.toString().indexOf("%")==-1) this.width=parseInt(this.width)+"px";
if (this.height.toString().indexOf("%")==-1) this.height=parseInt(this.height)+"px";
var div=document.createElement("div");
div.innerHTML='<table cellpadding="0" cellspacing="0" class="'+this.topMenu.tableCSS+'" width="'+this.width+'" ><tbody>' +
'<tr ><td class="menuScrollerDisabled" style="display:none"><img src="'+this.topMenu.sysGfxPath+'btn_up1.gif"/></td></tr>'+
'<tr><td class="'+this.topMenu.titleCSS+'" style="display:none">'+this.tname+'</td></tr>'+
'<tr><td></td></tr>'+
'<tr><td class="menuScrollerDisabled" style="display:none"><img src="'+this.topMenu.sysGfxPath+'btn_up2.gif"/></td></tr>'+
'<tr><td align="right" class="'+this.topMenu.titleCSS+'" style="display:none">'+this.tname+'</td></tr>'+
'<tr><td></td></tr>'+
'</tbody></table>';
var table=div.childNodes[0];
table.style.display='none';
this.topNod=table;
table.onselectstart=this.topMenu.badDummy;
table.setAttribute("UNSELECTABLE","on");
this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
table.menu=this;
this.scrollUp=this.dividerCell;
this.scrollonmouseover="";
this.preNameCell=table.childNodes[0].childNodes[1].childNodes[0];
this.firstCell=table.childNodes[0].childNodes[2];
this.scrollDown=table.childNodes[0].childNodes[3].childNodes[0];
this.nameCell=table.childNodes[0].childNodes[4].childNodes[0];
this.crossCell=table.childNodes[0].childNodes[5].childNodes[0];
if (this.topMenu!=this)
{
this.preNameCell.parentNode.style.display="none";
this.nameCell.parentNode.style.display="none";
this.crossCell.parentNode.style.display="none";
table.className=this.topMenu.secTableCSS
};
this.topNod.style.zIndex=this.topMenu.zIndex;
if (this.topMenu.ieFix)
{
var iframe=document.createElement("IFRAME");
iframe.style.zIndex=this.topMenu.zIndex-1;
iframe.style.position="absolute";
iframe.src=(this._httpsdummy||(this.topMenu.sysGfxPath+"blank.gif"));
iframe.style.display="none";
iframe.scrolling="no";
iframe.frameBorder=0;
this.parentObject.appendChild(iframe);
this._del_iframe=iframe;
this.topNod.ieFix=iframe
};
this.parentObject.appendChild(table);
this._del_table=table
};
function dhtmlXMenuItemObject(id,text,width,src,className,disableImage,href,target,type,image_size)
{
type=type||"a1";
var src2="";
var tooltip="";
if (id.tagName=="MenuItem")
{
type=text||"a1";
src=id.getAttribute("src");
src2=id.getAttribute("src2");
text=id.getAttribute("name");
className=id.getAttribute("className");
disableImage=id.getAttribute("disableImage");
width=id.getAttribute("width");
href=id.getAttribute("href");
if (_isKHTML)href=href.replace(/\&\#38;/g,"&");
target=id.getAttribute("target");
tooltip=id.getAttribute("tooltip");
if ((tooltip!=="")&&(!tooltip)) tooltip=text;
image_size=id.getAttribute("imageSize");
id=id.getAttribute("id")
};
if (id)this.id=id;
else this.id=(new Date()).valueOf();
src2=src2||src;
image_size=parseInt(image_size)||18;
this.topNod=0;
this.action=0;
this.persAction=0;
this.src=src;
this.text=text;
this.href=href;
this.target=target;
this.className=className||"menuButton";
this.textClassName="defaultMenuText";
this.disableImage=disableImage;
td=document.createElement("td");
this.topNod=td;
td.align="center";
td.noWrap=true;
if (width && width.toString().indexOf("%")==-1)
{
width=parseInt(width)+"px";
if (_isOpera)td.style.width=width
};
td.innerHTML="<table align='left' cellpadding='0' cellspacing='0' border='0' style='"+(width?("width:"+width+";"):"")+" height:100%;'><tr><td width='"+(2+image_size)+"px' style=' "+(src?"":"display:none;")+"'><img src='"+(src2?src2:this.dummyImg())+"' border='0' width='"+image_size+"px' height='"+image_size+"px'/></td><td width='100%' align='left' style=' "+(src?" padding-left:2px;":"")+" overflow:hidden;' ><table width='100%' height='100%' cellpadding='0' cellspacing='0'><tr><td title='"+tooltip+"' class='"+this.textClassName+"' nowrap='nowrap' >"+this.text+"</td><td width='12px'><img style='display:none' src='"+this.dummyImg()+"'/></td></tr></table></td></tr></table>";
this.imageTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];
this.childMenuTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];
this.textTag=this.childMenuTag.parentNode.parentNode.childNodes[0];
switch(type)
{
case "a1":
this.CSSTag=td;
this.CSSImageTag=null;
break;
case "a2":
this.CSSTag=td.childNodes[0];
this.CSSImageTag=null;
break;
case "a3":
this.CSSTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
this.CSSImageTag=null;
break;
case "b1":
this.CSSTag=td;
this.CSSImageTag=this.imageTag.parentNode;
break;
case "b2":
this.CSSTag=td.childNodes[0];
this.CSSImageTag=this.imageTag.parentNode;
break;
case "b3":
this.CSSTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
this.CSSImageTag=this.imageTag.parentNode;
break
};
td.id="menuItem_"+this.id;
this.CSSTag.className=this.className;
td.objectNode=this;
this.enable();
return this
};
dhtmlXMenuItemObject.prototype=new dhtmlXButtonPrototypeObject;
dhtmlXMenuItemObject.prototype.dummyImg=function()
{
return ""
};
dhtmlXMenuItemObject.prototype.enable=function()
{
if (this.disableImage)this.imageTag.src=this.src;
else
if (!this.className)this.topNod.className=this.objectNode.className;
else
this.topNod.className=this.className;
if (this.textTag)this.textTag.className=this.textClassName;
this.topNod.onmouseover=this._onmouseoverX;
this.topNod.onmouseout=this._onmouseoutX;
this.topNod.onmousedown=this._onmousedownX;
this.topNod.onmouseup=this._onclickX
};
dhtmlXMenuItemObject.prototype._onmousedownX=function(e)
{
if ((!this.objectNode.parentPanel.parentPanel)&&((this.objectNode.subMenu)||(this.objectNode.submenu))) this.objectNode._onclickX(e,this.objectNode)
};
dhtmlXMenuItemObject.prototype.setHasChild = function(mode)
{
if ((convertStringToBoolean(mode))&&(this.parentPanel.topMenu.echsw))
{
this.childMenuTag.src=this.parentPanel.topMenu.sysGfxPath+'btn_rt1.gif';
this.childMenuTag.style.display=''
}
else this.childMenuTag.style.display='none'
};
dhtmlXMenuItemObject.prototype.setText = function(newText)
{
this.textTag.innerHTML=newText
};
dhtmlXMenuItemObject.prototype._onclickX=function(e,that)
{
if (!e)e=event;
e.cancelBubble=true;
if (!that)that=this.objectNode;
var thatM=that.parentPanel.topMenu;
if (that.topNod.dstatus)return;
if (that.submenu)
{
var a_that=that;
var a_top=thatM;
thatM.loadXMLFor(that.submenu,that.id,function()
{
a_that.submenu=null;
a_that._onclickX([],a_that)
}
);
a_that.submenu=null;
return
};
if ((thatM.ieWinMode)&&(!thatM.ieWinModeState)&&(that.subMenu))
{
that.parentPanel.topMenu._onItemOver(that,that.subMenu);
if (document.body.currentActiveMenu!=thatM)if (document.body.onmouseup)
{
document.body.onmouseup()
};
if (thatM.realWinModeStart)
{
that.parentPanel.topMenu.ieWinModeState=1;
if (document.body.onmouseup!=thatM._onclickclose)
{
thatM.olddoc=document.body.onmouseup;
document.body.onmouseup=thatM._onclickclose
};
document.body.currentActiveMenu=that.parentPanel.topMenu;
thatM.realWinModeStart=0
}
else thatM.realWinModeStart=1;
return
};
if ((thatM.ieWinMode)&&(thatM.ieWinModeState)&&(that.subMenu))
{
if ((!thatM.realWinModeStart)&&(that.parentPanel==thatM))
{
thatM.realWinModeStart=1;
return
}
else
thatM.realWinModeStart=0
};
thatM.realWinModeStart=0;
thatM.ieWinModeState=0;
thatM.dropTimers(that.parentPanel);
thatM._closePanel(that.parentPanel);
thatM.lastSelectedItem=0;
thatM.probablyCloseMe=0;
thatM.lastOpenedPanel="";
if (that.parentPanel.topMenu.ieWinMode)
{
if (that.parentPanel.topMenu.olddoc)document.body.onclick=that.parentPanel.topMenu.olddoc;
else
document.body.onclick=null
};
if ((that.parentPanel.topMenu.ieWinMode)&&(!that.parentPanel.parentPanel)&&(that.subMenu))
{
return
};
that.parentPanel.topMenu._unMarkItem(that,"down");
if (that.parentPanel.topMenu._dirClick)that._onclickY(0,0);
else
setTimeout( new that.parentPanel.topMenu._delayedTimerCall(that,"_onclickY",0,0),100);
return
};
dhtmlXMenuBarObject.prototype._onclickclose=function(e)
{
var that=this.currentActiveMenu;
if (that.olddoc)document.body.onmouseup=that.olddoc;
else
document.body.onmouseup=null;
that.realWinModeStart=0;
that.lastOpenedPanel="";
that.ieWinModeState=0;
that.dropTimers(that);
that._closePanel(that);
that.lastSelectedItem=0
};
dhtmlXMenuBarObject.prototype.close=function(e)
{
if (this.olddoc)document.body.onmouseup=this.olddoc;
else
document.body.onmouseup=null;
that.realWinModeStart=0;
that.lastOpenedPanel="";
that.ieWinModeState=0;
that.dropTimers(this);
that._closePanel(this);
that.lastSelectedItem=0
};
dhtmlXMenuItemObject.prototype._onclickY=function()
{
if ((!this.persAction)||(this.persAction()))
if ((!this.action)||(this.action(this.id)))
if (this.href)
{
if (this.target)
{
var form=this.parentPanel.topMenu.hiddenForm;
form.action=this.href;
form.target=this.target;
form.method=(this.parentPanel.topMenu._hmode?this.parentPanel.topMenu._hmode:"GET");
form.submit()
}
else document.location.href=this.href;
return false
};
return false
};
dhtmlXMenuItemObject.prototype._onmouseoverY=function(e)
{
var that=this.parentPanel.topMenu;
if ((!that.ieWinMode)||(that.ieWinModeState))
this.parentPanel.topMenu._onItemOver(this,this.subMenu);
else
{
if ((that.lastSelectedItem)&&(that.lastSelectedItem!=this))
this.parentPanel.topMenu._unMarkItem(that.lastSelectedItem);
this.parentPanel.topMenu._markItem(this)
}
};
dhtmlXMenuItemObject.prototype._onmouseoutY=function(e)
{
this.parentPanel.topMenu._onItemOut(this,this.subMenu)
};
dhtmlXMenuBarObject.prototype.dropTimers=function(panel)
{
if (!panel)return;
z=panel.topNod.timeoutop;
if (z)clearTimeout(z);
if (!panel.parentPanel)return;
var z=panel.parentPanel.topNod.timeoutop;
if (z)clearTimeout(z);
var z=panel.parentItem.topNod.timeoutop;
if (z)clearTimeout(z)
};
dhtmlXMenuBarObject.prototype._onmouseoverZ=function(e)
{
if (!e)e=event;
e.cancelBubble=true;
that=this.panel.topMenu;
if (this.timeoutop)clearTimeout(this.timeoutop);
that.dropTimers(this.panel);
that._onItemOver(0,this.panel)
};
dhtmlXMenuBarObject.prototype._onmouseoutZ=function(e)
{
if (!e)e=event;
e.cancelBubble=true;
that=this.panel.topMenu;
if (this.timeoutop)clearTimeout(this.timeoutop);
if ((!that.ieWinMode))
{
this.timeoutop=setTimeout( new that._delayedTimerCall(this.panel.topMenu,"_onItemOut",0,this.panel),200)
}
};
dhtmlXMenuBarObject.prototype._delayedTimerCall=function(object,functionName,a,b,time)
{
this.callFunc=function()
{
var ax=a;
var bx=b;
object[functionName](ax,bx)
};
return this.callFunc
};
dhtmlXMenuBarObject.prototype._onItemOut=function(item,panel)
{
if (!panel)
{
if ((item)&&(!item.subMenu))
this._unMarkItem(item);
return
};
if (this.ieWinMode)if ((panel.topMenu==panel)||((item)&&(this.ieWinModeState==1))) return;
if (item)this._unMarkItem(item);
this._closePanel(panel)
};
dhtmlXMenuBarObject.prototype._onItemOver=function(item,panel)
{
if (item)
{
if ((this.lastSelectedItem)&&(this.lastSelectedItem!=item))
{
if ((!this.lastSelectedItem.subMenu)||(this.lastSelectedItem.subMenu!=item.parentPanel))
this._unMarkItem(this.lastSelectedItem)
};
this.lastSelectedItem=item;
if (this.ieWinMode)
{
this._markItem(item,"down")
}
else
{
this._markItem(item)
};
var zp=item.parentPanel;
if ((zp._lastSelectedItem)&&(zp._lastSelectedItem!=item))
if (zp._lastSelectedItem.subMenu)this._closePanel(zp._lastSelectedItem.subMenu);
item.parentPanel._lastSelectedItem=item
};
if (panel)this._openPanel(panel);
if (item.submenu)
{
var a_that=item;
var a_top=this;
this.loadXMLFor(item.submenu,item.id,function()
{
a_that.submenu=null;
a_top._onItemOver(a_that,a_that.subMenu)
}
);
a_that.submenu=null;
return
}
};
dhtmlXMenuBarObject.prototype._openPanel=function(panel)
{
if ((this.lastOpenedPanel)&&(this.lastOpenedPanel!=panel)&&(this.lastOpenedPanel.parentPanel!=panel)&&(this.lastOpenedPanel!=panel.parentPanel))
{
this._closePanel(this.lastOpenedPanel)
};
var z=panel.topNod.timeoutop;
if (z)clearTimeout(z);
if (panel.topNod.style.display=="")return;
if (this.lastOpenedPanel!=panel)
{
this.lastOpenedPanel=panel;
switch(this.modeValue)
{
case "classic":
if (panel.topMenu!=panel.parentPanel)
{
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px"
}
else
{
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)+"px";
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetHeight*1-1+"px"
};
break;
case "popup":
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px";
break;
case "betta":
if (panel.topMenu!=panel.parentPanel)
{
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+"px";
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+panel.parentItem.topNod.offsetHeight*1-1+"px"
}
else
{
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px"
};
break;
case "alfa":
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetHeight*1-1+"px";
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)+"px";
break
};
if (panel.topNod.parentNode.style.position=="absolute")
{
panel.topNod.style.top = parseInt(panel.topNod.style.top) -getAbsoluteTop( panel.topNod.parentNode)+"px";
panel.topNod.style.left = parseInt(panel.topNod.style.left)-getAbsoluteLeft(panel.topNod.parentNode)+"px"
};
panel.topNod.style.display="";
if (panel.topNod.ieFix)
{
panel.topNod.ieFix.style.top=panel.topNod.style.top;
panel.topNod.ieFix.style.left=panel.topNod.style.left;
panel.topNod.ieFix.style.width=panel.topNod.offsetWidth+"px";
panel.topNod.ieFix.style.height=panel.topNod.offsetHeight+"px";
panel.topNod.ieFix.style.display=""
}
};
if (!this._skipAPP)this._fixPanelPosition(panel)
};
dhtmlXMenuBarObject.prototype._fixPanelPosition=function(panel,mode)
{
var uf=0;
if (panel.parentPanel)
{
var xs=document.body.offsetWidth-15+document.body.scrollLeft;
var ys=document.body.offsetHeight-15+document.body.scrollTop;
if ((panel.topNod.offsetWidth+parseInt(panel.topNod.style.left))>xs)
{
if (!panel.parentPanel.extraMode)
{
var z=xs-panel.topNod.offsetWidth;
if (z<0)z=0;
panel.topNod.style.left=z+"px";
if (panel.topNod.ieFix)panel.topNod.ieFix.style.left=z+"px"
}
else
{
var z=parseInt(panel.topNod.style.left)-panel.topNod.offsetWidth-panel.parentItem.topNod.offsetWidth;
if (z<0)
{
var z2=parseInt(panel.topNod.style.top)+panel.parentItem.topNod.offsetHeight;
panel.topNod.style.top=z2+"px";
if (panel.topNod.ieFix)panel.topNod.ieFix.style.top=z2+"px";
z=xs-panel.topNod.offsetWidth;
if (z<0)z=0
};
panel.topNod.style.left=z+"px";
if (panel.topNod.ieFix)panel.topNod.ieFix.style.left=z+"px"
}
};
if ((panel.topNod.offsetHeight+parseInt(panel.topNod.style.top))>ys)
{
if (panel.parentPanel.extraMode)
{
var z=ys-panel.topNod.offsetHeight;
if (z<0)z=0;
panel.topNod.style.top=z+"px";
if (panel.topNod.ieFix)panel.topNod.ieFix.style.top=z+"px"
}
else
{
var z=parseInt(panel.topNod.style.top)-panel.topNod.offsetHeight-panel.parentItem.topNod.offsetHeight;
if (z<0)
{
var z2=parseInt(panel.topNod.style.left)+panel.parentItem.topNod.offsetWidth;
panel.topNod.style.left=z2+"px";
if (panel.topNod.ieFix)panel.topNod.ieFix.style.left=z2+"px";
uf=1;
z=ys-panel.topNod.offsetHeight;
if (z<0)z=0
};
panel.topNod.style.top=z+"px";
if (panel.topNod.ieFix)panel.topNod.ieFix.style.top=z+"px"
}
}
};
if ((uf)&&(!mode)) this._fixPanelPosition(panel,1)
};
dhtmlXMenuBarObject.prototype._closePanel=function(panel)
{
if (!panel)return;
if ((this.lastSelectedItem)&&(this.lastSelectedItem.parentPanel==panel)) this._unMarkItem(this.lastSelectedItem);
this._closeBottomPanels(panel);
this._closeTopPanels(panel);
this.lastOpenedPanel=""
};
dhtmlXMenuBarObject.prototype._closeTopPanels=function(panel)
{
if ((this.lastSelectedItem)&&(this.lastSelectedItem.parentPanel==panel)) this._unMarkItem(this.lastSelectedItem);
for (var i=0;i<panel.itemsCount;i++)
{
var zi=panel.items[i];
if ((zi.subMenu)&&(zi.subMenu.topNod.style.display!="none"))
{
zi.subMenu.topNod.style.display="none";
this._unMarkItem(zi.subMenu.parentItem);
if (zi.subMenu.topNod.ieFix)zi.subMenu.topNod.ieFix.style.display="none"
this._closeTopPanels(zi.subMenu);
return
}
}
};
dhtmlXMenuBarObject.prototype._closeBottomPanels=function(panel,ieWinMode)
{
if (panel.parentPanel)
{
if ((!this.lastSelectedItem)||(this.lastSelectedItem.parentPanel!=panel.parentPanel))
{
this._closeBottomPanels(panel.parentPanel)
}
else this.lastOpenedPanel=panel;
panel.topNod.style.display="none";
this._unMarkItem(panel.parentItem);
if (panel.topNod.ieFix)panel.topNod.ieFix.style.display="none"
}
};
dhtmlXMenuBarObject.prototype._unMarkItem=function(item)
{
item.CSSTag.className=item.className;
if (item.CSSImageTag)item.CSSImageTag.className="";
if ((item.childMenuTag.src!="")&&(this.topMenu.echsw)&&(this.topMenu.echsw2))
item.childMenuTag.src=this.topMenu.sysGfxPath+"btn_rt1.gif"
};
dhtmlXMenuBarObject.prototype._markItem=function(item,over)
{
over=over||"over";
item.CSSTag.className=item.className+over;
if (item.CSSImageTag)item.CSSImageTag.className=item.className+over+"img";
if ((item.childMenuTag.src!="")&&(this.topMenu.echsw)&&(this.topMenu.echsw2))
item.childMenuTag.src=this.topMenu.sysGfxPath+"btn_rt2.gif"
};
dhtmlXMenuBarObject.prototype.setMenuMode=function(modeValue)
{
this.modeValue=modeValue;
switch(modeValue)
{
case "classic":
this.addFirstLevel=this._addItem;
this.addSecondLevel=this.addItem_vertical;
break;
case "alfa":
this.addFirstLevel=this._addItem;
this.addSecondLevel=this._addItem;
break;
case "popup":
this.addFirstLevel=this.addItem_vertical;
this.addSecondLevel=this.addItem_vertical;
break;
case "betta":
this.addFirstLevel=this.addItem_vertical;
this.addSecondLevel=this._addItem;
break
}
};
function dhtmlXMenuDividerYObject(id)
{
this.topNod=0;
if (id)this.id=id;
else this.id=0;
td=document.createElement("td");
this.topNod=td;
td.align="center";
td.style.padding="2px 2px 1px 2px";
td.innerHTML="<div class='menuDividerY'> </div>";
if (!document.all)td.childNodes[0].style.height="0px";
return this
};
dhtmlXMenuDividerYObject.prototype = new dhtmlXButtonPrototypeObject;
function dhtmlXMenuDividerXObject(id)
{
this.topNod=0;
if (id)this.id=id;
else this.id=0;
td=document.createElement("td");
this.topNod=td;
td.align="center";
td.style.paddingRight="2px";
td.style.paddingLeft="2px";
td.width="4px";
td.innerHTML="<div class='menuDivider'></div >";
if (!document.all)
{
td.childNodes[0].style.width="0px";
td.style.padding="0px 0px 0px 0px";
td.style.margin="0px 0px 0px 0px"
};
return this
};
dhtmlXMenuDividerXObject.prototype = new dhtmlXButtonPrototypeObject;
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_js/dhtmlxmenubar_out.js
|
JavaScript
|
asf20
| 44,126
|
function dhtmlXMenuBarObject(htmlObject, width, height, name, vMode, gfxPath, httpsdummy) {
if (typeof (htmlObject) != "object") {
this.parentObject = document.getElementById(htmlObject);
} else {
this.parentObject = htmlObject;
}
if (!this.parentObject) {
this.parentObject = document.body;
}
this.setGfxPathA = this.setGfxPath;
this.setGfxPath = function () {
this.setGfxPathA.apply(this, arguments);
var self = this;
dhtmlXMenuItemObject.prototype.dummyImg = function () {
return self.sysGfxPath + "blank.gif";
};
};
if ((_isIE) && (this.parentObject == document.body)) {
var zdiv = document.createElement("DIV");
zdiv.style.position = "absolute";
zdiv.style.zIndex = 30;
zdiv.style.top = 0;
zdiv.style.left = 0;
document.body.insertBefore(zdiv, document.body.firstChild);
this.parentObject = zdiv;
}
if (!vMode) {
this.flsmd = true;
}
this.tname = name;
this.topMenu = this;
this.width = width;
this.height = height;
this.topNod = 0;
this._httpsdummy = httpsdummy;
this.ieFix = (document.all ? true : false);
var detect = navigator.userAgent.toLowerCase();
place = detect.indexOf("opera") + 1;
if (place) {
this.ieFix = false;
}
this.ieWinMode = true;
this.ieWinModeState = 0;
this.zIndex = 30;
this.maxItems = 99;
this.echsw = true;
this.sysGfxPath = gfxPath;
this.dividerCell = 0;
this.firstCell = 0;
this.nameCell = 0;
this.crossCell = 0;
this.echsw2 = true;
this.tableCSS = "menuTable";
this.titleCSS = "menuName";
this.secTableCSS = "secondMenuTable";
this.extraMode = convertStringToBoolean(vMode);
this.defaultAction = 0;
this.onShow = 0;
this.onHide = 0;
var lastOpenedPanel = 0;
var lastSelectedItem = 0;
this.items = new Array();
this.itemsCount = 0;
this.gitems = new Array();
this.gitemsCount = 0;
this.subMenus = new Array();
this.subMenusCount = 0;
if (!this.extraMode) {
this._createPanel();
} else {
this._createVPanel();
}
this.hiddenForm = document.createElement("FORM");
this.hiddenForm.style.display = "none";
this.parentObject.appendChild(this.hiddenForm);
if (this._extendedInit) {
this._extendedInit();
}
this.xmlLoader = new dtmlXMLLoaderObject(this._parseXMLTree, this);
this.setMenuMode("classic");
this.setBarSize(this.width, this.height);
this.showBar();
return this;
}
dhtmlXMenuBarObject.prototype = new dhtmlXProtobarObject;
dhtmlXMenuBarObject.prototype.setZIndex = function (zIndex) {
this.zIndex = zIndex;
this.topNod.style.zIndex = this.zIndex;
if (this.topNod.ieFix) {
this.topNod.ieFix.style.zIndex = this.zIndex - 1;
}
if ((_isIE) && (this.parentObject) && (this.parentObject.style.position == "absolute")) {
this.parentObject.style.zIndex = zIndex;
}
};
dhtmlXMenuBarObject.prototype.setIconSize = function (size) {
this._aimsize = size;
};
function dhtmlXMenuBarPanelObject(parentPanel, parentItem, mode, minWidth, withoutImages) {
this.extraMode = !convertStringToBoolean(mode);
this.parentPanel = parentPanel;
this.parentItem = parentItem;
this.parentObject = parentPanel.parentObject;
this.topMenu = parentPanel.topMenu;
this.topNod = 0;
this.dividerCell = 0;
this.firstCell = 0;
this.nameCell = 0;
this.crossCell = 0;
this.maxItems = 99;
this.items = new Array();
this.itemsCount = 0;
this.withoutImages = (withoutImages == 1);
this.mixedImages = (withoutImages == 2);
if (minWidth) {
this.width = minWidth;
}
if ((!this.topMenu.flsmd) || (this.topMenu != this.parentPanel)) {
this.parentItem.setHasChild(true);
}
if (mode) {
this._createVPanel = this.topMenu._createPanel;
} else {
this._createVPanel = this.topMenu._createVPanel;
}
this._createVPanel();
this.topNod.panel = this;
this.topNod.onmouseover = this.topMenu._onmouseoverZ;
this.topNod.onmouseout = this.topMenu._onmouseoutZ;
parentItem.subMenu = this;
this.topNod.style.position = "absolute";
this.topMenu.subMenus[this.topMenu.subMenusCount] = this;
this.topMenu.subMenusCount++;
return this;
}
dhtmlXMenuBarObject.prototype.enableIESelectBoxFix = function (mode) {
this.ieFix = convertStringToBoolean(mode);
};
dhtmlXMenuBarObject.prototype.enableTooltip = function (mode) {
this._endtt = (!convertStringToBoolean(mode));
};
dhtmlXMenuBarObject.prototype.disableSmartPositioning = function (mode) {
this._skipAPP = convertStringToBoolean(mode);
};
dhtmlXMenuBarObject.prototype.enableMenuHandle = function (mode) {
if (convertStringToBoolean(mode)) {
this.dividerCell.style.display = "";
} else {
this.dividerCell.style.display = "none";
}
};
dhtmlXMenuBarObject.prototype.enableChildIcon = function (mode) {
this.echsw = convertStringToBoolean(mode);
};
dhtmlXMenuBarObject.prototype.setHrefMode = function (mode) {
this._hmode = mode;
};
dhtmlXMenuBarObject.prototype.enableDirectOnClick = function (mode) {
this._dirClick = convertStringToBoolean(mode);
};
dhtmlXMenuBarObject.prototype.enableChildIconSwitching = function (mode) {
this.echsw2 = convertStringToBoolean(mode);
};
dhtmlXMenuBarObject.prototype.enableWindowOpenMode = function (mode) {
this.ieWinMode = convertStringToBoolean(mode);
};
dhtmlXMenuBarObject.prototype._getItemIndex = function (id) {
for (var i = 0; i < this.gitemsCount; i++) {
if (this.gitems[i].id == id) {
return i;
}
}
return -1;
};
dhtmlXMenuBarObject.prototype.getItem = function (itemId) {
var z = this._getItemIndex(itemId);
if (z >= 0) {
return this.gitems[z];
}
};
dhtmlXMenuBarObject.prototype._showScroll = function (node, order, rest, mode) {
if (!node.items[order]) {
return;
}
if (mode == "") {
if (rest == 1) {
node.cAr[2]++;
} else {
node.cAr[0]--;
}
} else {
if (rest == 1) {
node.cAr[0]++;
} else {
node.cAr[2]--;
}
}
if ((!node.items[order].CSSTag) || (node.items[order].hide)) {
node.items[order].topNod.parentNode.style.display = mode;
this._showScroll(node, order * 1 + rest * 1, rest, mode);
} else {
node.items[order].topNod.parentNode.style.display = mode;
}
};
dhtmlXMenuBarObject.prototype._fixScrollState = function (node, rest) {
if (parseInt(node.topNod.offsetWidth) > parseInt(node.topNod.width)) {
node.topNod.width = node.topNod.offsetWidth;
}
var flag = 0;
if (rest > 0) {
this._showScroll(node, node.cAr[0], 1, "none");
this._showScroll(node, node.cAr[2], 1, "");
} else {
this._showScroll(node, node.cAr[0] - 1, -1, "");
this._showScroll(node, node.cAr[2] - 1, -1, "none");
}
z.scrollState += rest * 1;
if ((node.scrollState * 1 + node.maxItems * 1) == (node.realItemsCount)) {
node.scrollDown.className = "menuScrollerDisabled";
} else {
node.scrollDown.className = "menuScrollerEnabled";
flag++;
}
if (node.scrollState == 0) {
node.scrollUp.className = "menuScrollerDisabled";
} else {
node.scrollUp.className = "menuScrollerEnabled";
flag++;
}
return flag;
};
dhtmlXMenuBarObject.prototype._scrollstart = function () {
if (this.timeoutops) {
clearTimeout(this.timeoutops);
}
z = this.parentNode.parentNode.parentNode.menu;
if (z.scrollDown == this) {
var rest = 1;
} else {
var rest = -1;
}
if (z.topMenu._fixScrollState(z, rest) == 2) {
this.timeoutops = setTimeout(new z.topMenu._delayedTimerCall(this, "onmouseover", 0, 0), 333);
}
};
dhtmlXMenuBarObject.prototype._scrollend = function (node) {
if (this.timeoutops) {
window.clearTimeout(this.timeoutops);
}
};
dhtmlXMenuBarObject.prototype._scrollCheck = function (node) {
var z_count = 0;
for (var i = 0; i < node.itemsCount; i++) {
if ((node.items[i].CSSTag) && (!node.items[i].hide)) {
z_count++;
}
}
node.realItemsCount = z_count;
node.cAr = new Array(0, 0, 0);
if ((node.realItemsCount > node.maxItems) && (node.scrollDown)) {
node.scrollDown.style.display = "";
node.scrollUp.style.display = "";
node.scrollDown.className = "menuScrollerEnabled";
node.scrollState = 0;
node.scrollUp.onmouseover = this._scrollstart;
node.scrollUp.onmouseout = this._scrollend;
node.scrollDown.onmouseover = this._scrollstart;
node.scrollDown.onmouseout = this._scrollend;
node.cAr[2] = 0;
var z_count = 0;
var b_flag = true;
for (var i = 0; i < node.itemsCount; i++) {
if ((node.items[i].CSSTag) && (!node.items[i].hide)) {
z_count++;
}
if (z_count > node.maxItems) {
node.items[i].topNod.parentNode.style.display = "none";
if (node.cAr[2] == 0) {
node.cAr[2] = i;
}
} else {
node.items[i].topNod.parentNode.style.display = "";
}
}
}
};
dhtmlXMenuBarObject.prototype._scrollClear = function (node) {
for (var i = 0; i < node.itemsCount; i++) {
if ((node.items[i].CSSTag) && (!node.items[i].hide)) {
node.items[i].topNod.parentNode.style.display = "";
}
if (node.scrollDown) {
node.scrollDown.style.display = "none";
}
if (node.scrollUp) {
node.scrollUp.style.display = "none";
}
}
};
dhtmlXMenuBarObject.prototype.getPanel = function (panelId) {
var z = this._getGItemIndex(panelId);
if (z < 0) {
return this;
} else {
return this.gitems[z].subMenu;
}
};
dhtmlXMenuBarObject.prototype.addItem = function (panel, item) {
if (this == panel) {
this.addFirstLevel(panel, item);
} else {
this.addSecondLevel(panel, item);
}
};
dhtmlXMenuBarObject.prototype._addItem = function (panel, item) {
panel.items[panel.itemsCount] = item;
panel.firstCell.parentNode.insertBefore(item.getTopNode(), panel.firstCell);
item.getTopNode().style.marginBottom = "20px";
item.parentNod = this;
item.parentPanel = panel;
if (this.defaultAction) {
item.setAction(this.defaultAction);
}
panel.itemsCount++;
this.gitems[this.gitemsCount] = item;
this.gitemsCount++;
};
dhtmlXMenuBarObject.prototype.addItem_vertical = function (panel, item) {
panel.items[panel.itemsCount] = item;
var tr = document.createElement("tr");
tr.style.verticalAlign = "top";
tr.appendChild(item.getTopNode());
panel.firstCell.parentNode.insertBefore(tr, panel.firstCell);
item.parentNod = this;
item.parentPanel = panel;
if (this.defaultAction) {
item.setAction(this.defaultAction);
}
panel.itemsCount++;
this.gitems[this.gitemsCount] = item;
this.gitemsCount++;
};
dhtmlXMenuBarObject.prototype._getGItemIndex = function (id) {
return (this._getItemIndex(id));
};
dhtmlXMenuBarObject.prototype.clearAll = function (id) {
for (var i = 0; i < this.gitemsCount; i++) {
var x = this.gitems[i].getTopNode();
x.parentNode.removeChild(x);
x = this.gitems[i].parentPanel;
if (x != this.topMenu && x.topNod) {
x.topNod.parentNode.removeChild(x.topNod);
x.topNod = null;
}
}
this.items = new Array();
this.itemsCount = 0;
this.gitems = new Array();
this.gitemsCount = 0;
this.subMenus = new Array();
this.subMenusCount = 0;
this.realWinModeStart = this.ieWinModeState = this._lastOpenedPanel = this._lastSelectedItem = null;
};
dhtmlXMenuBarObject.prototype.removeItem = function (id) {
var z = this._getGItemIndex(id);
if (z >= 0) {
var panel = this.gitems[z].parentPanel;
if (this.gitems[z].removeItem) {
this.gitems[z].removeItem();
}
if (panel.firstCell.tagName == "TR") {
var zw = this.gitems[z].getTopNode().parentNode;
} else {
var zw = this.gitems[z].getTopNode().parentNode;
}
zw.parentNode.removeChild(zw);
panel.itemsCount--;
for (var i = 0; i < panel.itemsCount; i++) {
if (panel.items[i] == this.gitems[z]) {
panel.items[i] = panel.items[i + 1];
panel.items[i + 1] = this.gitems[z];
}
}
panel.items[panel.itemsCount] = 0;
this.gitemsCount--;
for (var i = z; i < this.gitemsCount; i++) {
this.gitems[i] = this.gitems[i + 1];
}
this.gitems[this.gitemsCount] = 0;
}
};
dhtmlXMenuBarObject.prototype._parseXMLTree = function (that, node, level, parentNode, aTempNode, mode) {
if (!node) {
node = that.xmlLoader.getXMLTopNode("menu");
if (that._awaitXML) {
aTempNode = that._awaitXML;
parentNode = aTempNode.parentPanel;
level = 1;
that._awaitXML = null;
mode = this.modeValue;
} else {
level = 0;
parentNode = that;
mode = node.getAttribute("mode");
if (mode) {
that.setMenuMode(mode);
}
var menuAlign = node.getAttribute("menuAlign");
if (menuAlign) {
that.setBarAlign(menuAlign);
}
that.maxItems = node.getAttribute("maxItems") || 99;
var absolutePosition = node.getAttribute("absolutePosition");
var aleft = node.getAttribute("left");
var atop = node.getAttribute("top");
if (absolutePosition) {
that.topNod.style.top = parseInt(atop || 0) + "px";
}
if (absolutePosition) {
that.topNod.style.left = parseInt(aleft || 0) + "px";
}
if (absolutePosition == "yes") {
that.topNod.style.position = "absolute";
}
var name = node.getAttribute("name");
if (name) {
that.setTitleText(name);
}
var width = node.getAttribute("width");
var height = node.getAttribute("height");
that.setBarSize(width, height);
var imageTextButtonCssClass = node.getAttribute("imageTextButtonCssClass");
var globalTextCss = node.getAttribute("globalTextCss");
that.globalSecondCss = node.getAttribute("globalSecondCss");
that.globalCss = node.getAttribute("globalCss");
that.globalTextCss = node.getAttribute("globalTextCss");
if (node.getAttribute("withoutImages")) {
that.withoutImages = true;
}
if (node.getAttribute("mixedImages")) {
that.mixedImages = true;
}
that.type = node.getAttribute("type") || "a1";
}
}
if (level) {
var parentNode = new dhtmlXMenuBarPanelObject(parentNode, aTempNode, ((mode != "classic") && (mode != "popup")), node.getAttribute("panelWidth"), (node.getAttribute("withoutImages") ? 1 : (node.getAttribute("mixedImages") ? 2 : 0)));
parentNode.maxItems = node.getAttribute("maxItems") || that.maxItems;
}
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].nodeType == 1) {
var localItem = node.childNodes[i];
if (!level) {
if ((!localItem.getAttribute("className")) && (that.globalCss)) {
localItem.setAttribute("className", that.globalCss);
}
} else {
if (!localItem.getAttribute("className")) {
if (that.globalSecondCss) {
localItem.setAttribute("className", that.globalSecondCss);
} else {
localItem.setAttribute("className", "menuButtonSecond");
}
}
}
if ((!localItem.getAttribute("textClassName")) && (that.globalTextCss)) {
localItem.setAttribute("textClassName", that.globalTextCss);
}
var tempsrc = localItem.getAttribute("src");
if (parentNode.withoutImages) {
localItem.setAttribute("src", "");
localItem.setAttribute("src2", that.sysGfxPath + "blank.gif");
} else {
if ((parentNode.mixedImages) && (tempsrc == null)) {
tempsrc = that.sysGfxPath + "blank.gif";
} else {
tempsrc = that.sysGfxPath + (tempsrc || "blank.gif");
}
localItem.setAttribute("src", tempsrc);
}
tempsrc = localItem.getAttribute("width");
if (tempsrc == null) {
localItem.setAttribute("width", "100%");
}
if (that._endtt) {
localItem.setAttribute("tooltip", "");
}
if (that._aimsize) {
localItem.setAttribute("imageSize", that._aimsize);
}
var z = eval("window.dhtmlX" + localItem.tagName + "Object");
if (z) {
var TempNode = new z(localItem, node.getAttribute("type") || that.type);
} else {
var TempNode = null;
}
if (localItem.tagName == "divider") {
if ((level) || (that.modeValue == "popup")) {
that.addItem(parentNode, new dhtmlXMenuDividerYObject(localItem.getAttribute("id")));
} else {
that.addItem(parentNode, new dhtmlXMenuDividerXObject(localItem.getAttribute("id")));
}
} else {
if (TempNode) {
if (level) {
that.addItem(parentNode, TempNode);
} else {
that.addItem(parentNode, TempNode);
}
}
}
if (localItem.getAttribute("disabled")) {
TempNode.disable();
}
if ((TempNode) && (localItem.getAttribute("submenu"))) {
TempNode.submenu = localItem.getAttribute("submenu");
TempNode.setHasChild(true);
}
if (that.checkXMLChild(localItem)) {
that._parseXMLTree(that, localItem, level + 1, parentNode, TempNode, mode);
}
}
}
that._scrollCheck(parentNode);
if (level == 0) {
if (that.topMenu.correctMenuPosition) {
that.topMenu.correctMenuPosition(that.topMenu.topNod);
}
if (that.topMenu.waitCall) {
that.topMenu.waitCall();
}
}
};
dhtmlXMenuBarObject.prototype.checkXMLChild = function (node) {
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].nodeType == 1) {
return true;
}
}
return false;
};
dhtmlXMenuBarObject.prototype._createPanel = function () {
if (!this.width) {
this.width = 1;
}
if (!this.height) {
this.height = 1;
}
if (this.width.toString().indexOf("%") == -1) {
this.width = parseInt(this.width) + "px";
}
if (this.height.toString().indexOf("%") == -1) {
this.height = parseInt(this.height) + "px";
}
var div = document.createElement("div");
div.innerHTML = "<table cellpadding=\"0\" cellspacing=\"0\" class=\"" + this.topMenu.tableCSS + "\" width=\"" + this.width + "\" height=\"" + this.height + "\"><tbody>" + "<tr>" + "<td width=\"3px\" style=\"display:none\"><div class=\"menuHandle\"> </div></td>" + "<td class=\"" + this.topMenu.titleCSS + "\" style=\"display:none\">" + this.topMenu.tname + "</td>" + "<td></td>" + "<td align=\"right\" " + (_isOpera ? "" : "width=\"100%\"") + " class=\"" + this.topMenu.titleCSS + "\"> " + this.topMenu.tname + "</td>" + "<td > </td>" + "</tr></tbody></table>";
var table = div.childNodes[0];
table.style.display = "none";
table.setAttribute("UNSELECTABLE", "on");
table.onselectstart = this.topMenu.badDummy;
this.topNod = table;
this.dividerCell = table.childNodes[0].childNodes[0].childNodes[0];
this.dividerCell.menu = this;
this.preNameCell = this.dividerCell.nextSibling;
this.firstCell = this.preNameCell.nextSibling;
this.nameCell = this.firstCell.nextSibling;
this.crossCell = this.nameCell.nextSibling;
if (this.topMenu != this) {
this.dividerCell.style.display = "none";
this.preNameCell.style.display = "none";
this.nameCell.style.display = "none";
this.crossCell.style.display = "none";
table.className = this.topMenu.secTableCSS;
}
this.topNod.style.zIndex = this.topMenu.zIndex;
if (this.topMenu.ieFix) {
var iframe = document.createElement("IFRAME");
if (this._httpsdummy || this.topMenu.sysGfxPath) {
iframe.src = (this._httpsdummy || (this.topMenu.sysGfxPath + "/blank.html"));
}
iframe.style.zIndex = this.topMenu.zIndex - 1;
iframe.style.position = "absolute";
iframe.style.display = "none";
iframe.scrolling = "no";
iframe.frameBorder = 0;
this.parentObject.appendChild(iframe);
this._del_iframe = iframe;
this.topNod.ieFix = iframe;
}
this.parentObject.appendChild(table);
this._del_table = table;
};
dhtmlXMenuBarObject.prototype.setMenuCSS = function (table, title, secTable) {
this.tableCSS = table;
this.titleCSS = title;
this.secTableCSS = secTable;
this.topNod.className = this.tableCSS;
this.preNameCell.className = this.titleCSS;
this.nameCell.className = this.titleCSS;
};
dhtmlXMenuBarObject.prototype._adjustGFXPath = function (path) {
if (this.extraMode) {
this.topNod.rows[0].cells[0].childNodes[0].src = path + "btn_up1.gif";
this.topNod.rows[this.topNod.rows.length - 3].cells[0].childNodes[0].src = path + "btn_up2.gif";
}
};
dhtmlXMenuBarObject.prototype._createVPanel = function () {
if (!this.width) {
this.width = 120;
}
if (!this.height) {
this.height = 20;
}
if (this.width.toString().indexOf("%") == -1) {
this.width = parseInt(this.width) + "px";
}
if (this.height.toString().indexOf("%") == -1) {
this.height = parseInt(this.height) + "px";
}
var div = document.createElement("div");
div.innerHTML = "<table cellpadding=\"0\" cellspacing=\"0\" class=\"" + this.topMenu.tableCSS + "\" width=\"" + this.width + "\" ><tbody>" + "<tr ><td class=\"menuScrollerDisabled\" style=\"display:none\"><img src=\"" + this.topMenu.sysGfxPath + "btn_up1.gif\"/></td></tr>" + "<tr><td class=\"" + this.topMenu.titleCSS + "\" style=\"display:none\">" + this.tname + "</td></tr>" + "<tr><td></td></tr>" + "<tr><td class=\"menuScrollerDisabled\" style=\"display:none\"><img src=\"" + this.topMenu.sysGfxPath + "btn_up2.gif\"/></td></tr>" + "<tr><td align=\"right\" class=\"" + this.topMenu.titleCSS + "\" style=\"display:none\">" + this.tname + "</td></tr>" + "<tr><td></td></tr>" + "</tbody></table>";
var table = div.childNodes[0];
table.style.display = "none";
this.topNod = table;
table.onselectstart = this.topMenu.badDummy;
table.setAttribute("UNSELECTABLE", "on");
this.dividerCell = table.childNodes[0].childNodes[0].childNodes[0];
table.menu = this;
this.scrollUp = this.dividerCell;
this.scrollonmouseover = "";
this.preNameCell = table.childNodes[0].childNodes[1].childNodes[0];
this.firstCell = table.childNodes[0].childNodes[2];
this.scrollDown = table.childNodes[0].childNodes[3].childNodes[0];
this.nameCell = table.childNodes[0].childNodes[4].childNodes[0];
this.crossCell = table.childNodes[0].childNodes[5].childNodes[0];
if (this.topMenu != this) {
this.preNameCell.parentNode.style.display = "none";
this.nameCell.parentNode.style.display = "none";
this.crossCell.parentNode.style.display = "none";
table.className = this.topMenu.secTableCSS;
}
this.topNod.style.zIndex = this.topMenu.zIndex;
if (this.topMenu.ieFix) {
var iframe = document.createElement("IFRAME");
iframe.style.zIndex = this.topMenu.zIndex - 1;
iframe.style.position = "absolute";
iframe.src = (this._httpsdummy || (this.topMenu.sysGfxPath + "blank.gif"));
iframe.style.display = "none";
iframe.scrolling = "no";
iframe.frameBorder = 0;
this.parentObject.appendChild(iframe);
this._del_iframe = iframe;
this.topNod.ieFix = iframe;
}
this.parentObject.appendChild(table);
this._del_table = table;
};
function dhtmlXMenuItemObject(id, text, width, src, className, disableImage, href, target, type, image_size) {
type = type || "a1";
var src2 = "";
var tooltip = "";
if (id.tagName == "MenuItem") {
type = text || "a1";
src = id.getAttribute("src");
src2 = id.getAttribute("src2");
text = id.getAttribute("name");
className = id.getAttribute("className");
disableImage = id.getAttribute("disableImage");
width = id.getAttribute("width");
href = id.getAttribute("href");
if (_isKHTML) {
href = href.replace(/\&\#38;/g, "&");
}
target = id.getAttribute("target");
tooltip = id.getAttribute("tooltip");
if ((tooltip !== "") && (!tooltip)) {
tooltip = text;
}
image_size = id.getAttribute("imageSize");
id = id.getAttribute("id");
}
if (id) {
this.id = id;
} else {
this.id = (new Date()).valueOf();
}
src2 = src2 || src;
image_size = parseInt(image_size) || 18;
this.topNod = 0;
this.action = 0;
this.persAction = 0;
this.src = src;
this.text = text;
this.href = href;
this.target = target;
this.className = className || "menuButton";
this.textClassName = "defaultMenuText";
this.disableImage = disableImage;
td = document.createElement("td");
this.topNod = td;
td.align = "center";
td.noWrap = true;
if (width && width.toString().indexOf("%") == -1) {
width = parseInt(width) + "px";
if (_isOpera) {
td.style.width = width;
}
}
td.innerHTML = "<table align='left' cellpadding='0' cellspacing='0' border='0' style='" + (width ? ("width:" + width + ";") : "") + " height:100%;'><tr><td width='" + (2 + image_size) + "px' style=' " + (src ? "" : "display:none;") + "'><img src='" + (src2 ? src2 : this.dummyImg()) + "' border='0' width='" + image_size + "px' height='" + image_size + "px'/></td><td width='100%' align='left' style=' " + (src ? " padding-left:2px;" : "") + " overflow:hidden;' ><table width='100%' height='100%' cellpadding='0' cellspacing='0'><tr><td title='" + tooltip + "' class='" + this.textClassName + "' nowrap='nowrap' >" + this.text + "</td><td width='12px'><img style='display:none' src='" + this.dummyImg() + "'/></td></tr></table></td></tr></table>";
this.imageTag = td.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];
this.childMenuTag = td.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];
this.textTag = this.childMenuTag.parentNode.parentNode.childNodes[0];
switch (type) {
case "a1":
this.CSSTag = td;
this.CSSImageTag = null;
break;
case "a2":
this.CSSTag = td.childNodes[0];
this.CSSImageTag = null;
break;
case "a3":
this.CSSTag = td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
this.CSSImageTag = null;
break;
case "b1":
this.CSSTag = td;
this.CSSImageTag = this.imageTag.parentNode;
break;
case "b2":
this.CSSTag = td.childNodes[0];
this.CSSImageTag = this.imageTag.parentNode;
break;
case "b3":
this.CSSTag = td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
this.CSSImageTag = this.imageTag.parentNode;
break;
}
td.id = "menuItem_" + this.id;
this.CSSTag.className = this.className;
td.objectNode = this;
this.enable();
return this;
}
dhtmlXMenuItemObject.prototype = new dhtmlXButtonPrototypeObject;
dhtmlXMenuItemObject.prototype.dummyImg = function () {
return "";
};
dhtmlXMenuItemObject.prototype.enable = function () {
if (this.disableImage) {
this.imageTag.src = this.src;
} else {
if (!this.className) {
this.topNod.className = this.objectNode.className;
} else {
this.topNod.className = this.className;
}
}
if (this.textTag) {
this.textTag.className = this.textClassName;
}
this.topNod.onmouseover = this._onmouseoverX;
this.topNod.onmouseout = this._onmouseoutX;
this.topNod.onmousedown = this._onmousedownX;
this.topNod.onmouseup = this._onclickX;
};
dhtmlXMenuItemObject.prototype._onmousedownX = function (e) {
if ((!this.objectNode.parentPanel.parentPanel) && ((this.objectNode.subMenu) || (this.objectNode.submenu))) {
this.objectNode._onclickX(e, this.objectNode);
}
};
dhtmlXMenuItemObject.prototype.setHasChild = function (mode) {
if ((convertStringToBoolean(mode)) && (this.parentPanel.topMenu.echsw)) {
this.childMenuTag.src = this.parentPanel.topMenu.sysGfxPath + "btn_rt1.gif";
this.childMenuTag.style.display = "";
} else {
this.childMenuTag.style.display = "none";
}
};
dhtmlXMenuItemObject.prototype.setText = function (newText) {
this.textTag.innerHTML = newText;
};
dhtmlXMenuItemObject.prototype._onclickX = function (e, that) {
if (!e) {
e = event;
}
e.cancelBubble = true;
if (!that) {
that = this.objectNode;
}
var thatM = that.parentPanel.topMenu;
if (that.topNod.dstatus) {
return;
}
if (that.submenu) {
var a_that = that;
var a_top = thatM;
thatM.loadXMLFor(that.submenu, that.id, function () {
a_that.submenu = null;
a_that._onclickX([], a_that);
});
a_that.submenu = null;
return;
}
if ((thatM.ieWinMode) && (!thatM.ieWinModeState) && (that.subMenu)) {
that.parentPanel.topMenu._onItemOver(that, that.subMenu);
if (document.body.currentActiveMenu != thatM) {
if (document.body.onmouseup) {
document.body.onmouseup();
}
}
if (thatM.realWinModeStart) {
that.parentPanel.topMenu.ieWinModeState = 1;
if (document.body.onmouseup != thatM._onclickclose) {
thatM.olddoc = document.body.onmouseup;
document.body.onmouseup = thatM._onclickclose;
}
document.body.currentActiveMenu = that.parentPanel.topMenu;
thatM.realWinModeStart = 0;
} else {
thatM.realWinModeStart = 1;
}
return;
}
if ((thatM.ieWinMode) && (thatM.ieWinModeState) && (that.subMenu)) {
if ((!thatM.realWinModeStart) && (that.parentPanel == thatM)) {
thatM.realWinModeStart = 1;
return;
} else {
thatM.realWinModeStart = 0;
}
}
thatM.realWinModeStart = 0;
thatM.ieWinModeState = 0;
thatM.dropTimers(that.parentPanel);
thatM._closePanel(that.parentPanel);
thatM.lastSelectedItem = 0;
thatM.probablyCloseMe = 0;
thatM.lastOpenedPanel = "";
if (that.parentPanel.topMenu.ieWinMode) {
if (that.parentPanel.topMenu.olddoc) {
document.body.onclick = that.parentPanel.topMenu.olddoc;
} else {
document.body.onclick = null;
}
}
if ((that.parentPanel.topMenu.ieWinMode) && (!that.parentPanel.parentPanel) && (that.subMenu)) {
return;
}
that.parentPanel.topMenu._unMarkItem(that, "down");
if (that.parentPanel.topMenu._dirClick) {
that._onclickY(0, 0);
} else {
setTimeout(new that.parentPanel.topMenu._delayedTimerCall(that, "_onclickY", 0, 0), 100);
}
return;
};
dhtmlXMenuBarObject.prototype._onclickclose = function (e) {
var that = this.currentActiveMenu;
if (that.olddoc) {
document.body.onmouseup = that.olddoc;
} else {
document.body.onmouseup = null;
}
that.realWinModeStart = 0;
that.lastOpenedPanel = "";
that.ieWinModeState = 0;
that.dropTimers(that);
that._closePanel(that);
that.lastSelectedItem = 0;
};
dhtmlXMenuBarObject.prototype.close = function (e) {
if (this.olddoc) {
document.body.onmouseup = this.olddoc;
} else {
document.body.onmouseup = null;
}
that.realWinModeStart = 0;
that.lastOpenedPanel = "";
that.ieWinModeState = 0;
that.dropTimers(this);
that._closePanel(this);
that.lastSelectedItem = 0;
};
dhtmlXMenuItemObject.prototype._onclickY = function () {
if ((!this.persAction) || (this.persAction())) {
if ((!this.action) || (this.action(this.id))) {
if (this.href) {
if (this.target) {
var form = this.parentPanel.topMenu.hiddenForm;
form.action = this.href;
form.target = this.target;
form.method = (this.parentPanel.topMenu._hmode ? this.parentPanel.topMenu._hmode : "GET");
form.submit();
} else {
document.location.href = this.href;
}
return false;
}
}
}
return false;
};
dhtmlXMenuItemObject.prototype._onmouseoverY = function (e) {
var that = this.parentPanel.topMenu;
if ((!that.ieWinMode) || (that.ieWinModeState)) {
this.parentPanel.topMenu._onItemOver(this, this.subMenu);
} else {
if ((that.lastSelectedItem) && (that.lastSelectedItem != this)) {
this.parentPanel.topMenu._unMarkItem(that.lastSelectedItem);
}
this.parentPanel.topMenu._markItem(this);
}
};
dhtmlXMenuItemObject.prototype._onmouseoutY = function (e) {
this.parentPanel.topMenu._onItemOut(this, this.subMenu);
};
dhtmlXMenuBarObject.prototype.dropTimers = function (panel) {
if (!panel) {
return;
}
z = panel.topNod.timeoutop;
if (z) {
clearTimeout(z);
}
if (!panel.parentPanel) {
return;
}
var z = panel.parentPanel.topNod.timeoutop;
if (z) {
clearTimeout(z);
}
var z = panel.parentItem.topNod.timeoutop;
if (z) {
clearTimeout(z);
}
};
dhtmlXMenuBarObject.prototype._onmouseoverZ = function (e) {
if (!e) {
e = event;
}
e.cancelBubble = true;
that = this.panel.topMenu;
if (this.timeoutop) {
clearTimeout(this.timeoutop);
}
that.dropTimers(this.panel);
that._onItemOver(0, this.panel);
};
dhtmlXMenuBarObject.prototype._onmouseoutZ = function (e) {
if (!e) {
e = event;
}
e.cancelBubble = true;
that = this.panel.topMenu;
if (this.timeoutop) {
clearTimeout(this.timeoutop);
}
if ((!that.ieWinMode)) {
this.timeoutop = setTimeout(new that._delayedTimerCall(this.panel.topMenu, "_onItemOut", 0, this.panel), 200);
}
};
dhtmlXMenuBarObject.prototype._delayedTimerCall = function (object, functionName, a, b, time) {
this.callFunc = function () {
var ax = a;
var bx = b;
object[functionName](ax, bx);
};
return this.callFunc;
};
dhtmlXMenuBarObject.prototype._onItemOut = function (item, panel) {
if (!panel) {
if ((item) && (!item.subMenu)) {
this._unMarkItem(item);
}
return;
}
if (this.ieWinMode) {
if ((panel.topMenu == panel) || ((item) && (this.ieWinModeState == 1))) {
return;
}
}
if (item) {
this._unMarkItem(item);
}
this._closePanel(panel);
};
dhtmlXMenuBarObject.prototype._onItemOver = function (item, panel) {
if (item) {
if ((this.lastSelectedItem) && (this.lastSelectedItem != item)) {
if ((!this.lastSelectedItem.subMenu) || (this.lastSelectedItem.subMenu != item.parentPanel)) {
this._unMarkItem(this.lastSelectedItem);
}
}
this.lastSelectedItem = item;
if (this.ieWinMode) {
this._markItem(item, "down");
} else {
this._markItem(item);
}
var zp = item.parentPanel;
if ((zp._lastSelectedItem) && (zp._lastSelectedItem != item)) {
if (zp._lastSelectedItem.subMenu) {
this._closePanel(zp._lastSelectedItem.subMenu);
}
}
item.parentPanel._lastSelectedItem = item;
}
if (panel) {
this._openPanel(panel);
}
if (item.submenu) {
var a_that = item;
var a_top = this;
this.loadXMLFor(item.submenu, item.id, function () {
a_that.submenu = null;
a_top._onItemOver(a_that, a_that.subMenu);
});
a_that.submenu = null;
return;
}
};
dhtmlXMenuBarObject.prototype._openPanel = function (panel) {
if ((this.lastOpenedPanel) && (this.lastOpenedPanel != panel) && (this.lastOpenedPanel.parentPanel != panel) && (this.lastOpenedPanel != panel.parentPanel)) {
this._closePanel(this.lastOpenedPanel);
}
var z = panel.topNod.timeoutop;
if (z) {
clearTimeout(z);
}
if (panel.topNod.style.display == "") {
return;
}
if (this.lastOpenedPanel != panel) {
this.lastOpenedPanel = panel;
switch (this.modeValue) {
case "classic":
if (panel.topMenu != panel.parentPanel) {
panel.topNod.style.left = getAbsoluteLeft(panel.parentItem.topNod) * 1 + panel.parentItem.topNod.offsetWidth * 1 + "px";
panel.topNod.style.top = getAbsoluteTop(panel.parentItem.topNod) + "px";
} else {
panel.topNod.style.left = getAbsoluteLeft(panel.parentItem.topNod) + "px";
panel.topNod.style.top = getAbsoluteTop(panel.parentItem.topNod) * 1 + panel.parentItem.topNod.offsetHeight * 1 - 1 + "px";
}
break;
case "popup":
panel.topNod.style.left = getAbsoluteLeft(panel.parentItem.topNod) * 1 + panel.parentItem.topNod.offsetWidth * 1 + "px";
panel.topNod.style.top = getAbsoluteTop(panel.parentItem.topNod) + "px";
break;
case "betta":
if (panel.topMenu != panel.parentPanel) {
panel.topNod.style.left = getAbsoluteLeft(panel.parentItem.topNod) * 1 + "px";
panel.topNod.style.top = getAbsoluteTop(panel.parentItem.topNod) + panel.parentItem.topNod.offsetHeight * 1 - 1 + "px";
} else {
panel.topNod.style.left = getAbsoluteLeft(panel.parentItem.topNod) * 1 + panel.parentItem.topNod.offsetWidth * 1 + "px";
panel.topNod.style.top = getAbsoluteTop(panel.parentItem.topNod) + "px";
}
break;
case "alfa":
panel.topNod.style.top = getAbsoluteTop(panel.parentItem.topNod) * 1 + panel.parentItem.topNod.offsetHeight * 1 - 1 + "px";
panel.topNod.style.left = getAbsoluteLeft(panel.parentItem.topNod) + "px";
break;
}
if (panel.topNod.parentNode.style.position == "absolute") {
panel.topNod.style.top = parseInt(panel.topNod.style.top) - getAbsoluteTop(panel.topNod.parentNode) + "px";
panel.topNod.style.left = parseInt(panel.topNod.style.left) - getAbsoluteLeft(panel.topNod.parentNode) + "px";
}
panel.topNod.style.display = "";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.top = panel.topNod.style.top;
panel.topNod.ieFix.style.left = panel.topNod.style.left;
panel.topNod.ieFix.style.width = panel.topNod.offsetWidth + "px";
panel.topNod.ieFix.style.height = panel.topNod.offsetHeight + "px";
panel.topNod.ieFix.style.display = "";
}
}
if (!this._skipAPP) {
this._fixPanelPosition(panel);
}
};
dhtmlXMenuBarObject.prototype._fixPanelPosition = function (panel, mode) {
var uf = 0;
if (panel.parentPanel) {
var xs = document.body.offsetWidth - 15 + document.body.scrollLeft;
var ys = document.body.offsetHeight - 15 + document.body.scrollTop;
if ((panel.topNod.offsetWidth + parseInt(panel.topNod.style.left)) > xs) {
if (!panel.parentPanel.extraMode) {
var z = xs - panel.topNod.offsetWidth;
if (z < 0) {
z = 0;
}
panel.topNod.style.left = z + "px";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.left = z + "px";
}
} else {
var z = parseInt(panel.topNod.style.left) - panel.topNod.offsetWidth - panel.parentItem.topNod.offsetWidth;
if (z < 0) {
var z2 = parseInt(panel.topNod.style.top) + panel.parentItem.topNod.offsetHeight;
panel.topNod.style.top = z2 + "px";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.top = z2 + "px";
}
z = xs - panel.topNod.offsetWidth;
if (z < 0) {
z = 0;
}
}
panel.topNod.style.left = z + "px";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.left = z + "px";
}
}
}
if ((panel.topNod.offsetHeight + parseInt(panel.topNod.style.top)) > ys) {
if (panel.parentPanel.extraMode) {
var z = ys - panel.topNod.offsetHeight;
if (z < 0) {
z = 0;
}
panel.topNod.style.top = z + "px";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.top = z + "px";
}
} else {
var z = parseInt(panel.topNod.style.top) - panel.topNod.offsetHeight - panel.parentItem.topNod.offsetHeight;
if (z < 0) {
var z2 = parseInt(panel.topNod.style.left) + panel.parentItem.topNod.offsetWidth;
panel.topNod.style.left = z2 + "px";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.left = z2 + "px";
}
uf = 1;
z = ys - panel.topNod.offsetHeight;
if (z < 0) {
z = 0;
}
}
panel.topNod.style.top = z + "px";
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.top = z + "px";
}
}
}
}
if ((uf) && (!mode)) {
this._fixPanelPosition(panel, 1);
}
};
dhtmlXMenuBarObject.prototype._closePanel = function (panel) {
if (!panel) {
return;
}
if ((this.lastSelectedItem) && (this.lastSelectedItem.parentPanel == panel)) {
this._unMarkItem(this.lastSelectedItem);
}
this._closeBottomPanels(panel);
this._closeTopPanels(panel);
this.lastOpenedPanel = "";
};
dhtmlXMenuBarObject.prototype._closeTopPanels = function (panel) {
if ((this.lastSelectedItem) && (this.lastSelectedItem.parentPanel == panel)) {
this._unMarkItem(this.lastSelectedItem);
}
for (var i = 0; i < panel.itemsCount; i++) {
var zi = panel.items[i];
if ((zi.subMenu) && (zi.subMenu.topNod.style.display != "none")) {
zi.subMenu.topNod.style.display = "none";
this._unMarkItem(zi.subMenu.parentItem);
if (zi.subMenu.topNod.ieFix) {
zi.subMenu.topNod.ieFix.style.display = "none";
}
this._closeTopPanels(zi.subMenu);
return;
}
}
};
dhtmlXMenuBarObject.prototype._closeBottomPanels = function (panel, ieWinMode) {
if (panel.parentPanel) {
if ((!this.lastSelectedItem) || (this.lastSelectedItem.parentPanel != panel.parentPanel)) {
this._closeBottomPanels(panel.parentPanel);
} else {
this.lastOpenedPanel = panel;
}
panel.topNod.style.display = "none";
this._unMarkItem(panel.parentItem);
if (panel.topNod.ieFix) {
panel.topNod.ieFix.style.display = "none";
}
}
};
dhtmlXMenuBarObject.prototype._unMarkItem = function (item) {
item.CSSTag.className = item.className;
if (item.CSSImageTag) {
item.CSSImageTag.className = "";
}
if ((item.childMenuTag.src != "") && (this.topMenu.echsw) && (this.topMenu.echsw2)) {
item.childMenuTag.src = this.topMenu.sysGfxPath + "btn_rt1.gif";
}
};
dhtmlXMenuBarObject.prototype._markItem = function (item, over) {
over = over || "over";
item.CSSTag.className = item.className + over;
if (item.CSSImageTag) {
item.CSSImageTag.className = item.className + over + "img";
}
if ((item.childMenuTag.src != "") && (this.topMenu.echsw) && (this.topMenu.echsw2)) {
item.childMenuTag.src = this.topMenu.sysGfxPath + "btn_rt2.gif";
}
};
dhtmlXMenuBarObject.prototype.setMenuMode = function (modeValue) {
this.modeValue = modeValue;
switch (modeValue) {
case "classic":
this.addFirstLevel = this._addItem;
this.addSecondLevel = this.addItem_vertical;
break;
case "alfa":
this.addFirstLevel = this._addItem;
this.addSecondLevel = this._addItem;
break;
case "popup":
this.addFirstLevel = this.addItem_vertical;
this.addSecondLevel = this.addItem_vertical;
break;
case "betta":
this.addFirstLevel = this.addItem_vertical;
this.addSecondLevel = this._addItem;
break;
}
};
function dhtmlXMenuDividerYObject(id) {
this.topNod = 0;
if (id) {
this.id = id;
} else {
this.id = 0;
}
td = document.createElement("td");
this.topNod = td;
td.align = "center";
td.style.padding = "2px 2px 1px 2px";
td.innerHTML = "<div class='menuDividerY'> </div>";
if (!document.all) {
td.childNodes[0].style.height = "0px";
}
return this;
}
dhtmlXMenuDividerYObject.prototype = new dhtmlXButtonPrototypeObject;
function dhtmlXMenuDividerXObject(id) {
this.topNod = 0;
if (id) {
this.id = id;
} else {
this.id = 0;
}
td = document.createElement("td");
this.topNod = td;
td.align = "center";
td.style.paddingRight = "2px";
td.style.paddingLeft = "2px";
td.width = "4px";
td.innerHTML = "<div class='menuDivider'></div >";
if (!document.all) {
td.childNodes[0].style.width = "0px";
td.style.padding = "0px 0px 0px 0px";
td.style.margin = "0px 0px 0px 0px";
}
return this;
}
dhtmlXMenuDividerXObject.prototype = new dhtmlXButtonPrototypeObject;
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xMenu/xMenu_js/dhtmlxmenubar.js
|
JavaScript
|
asf20
| 41,089
|
/*light*/
div.gridbox_light {
border:1px solid #c2d5dc;
}
div.gridbox_light .xhdr{
background-image:url(imgs/skin_light_header.png);
}
div.gridbox_light table.hdr{
background-image:url(imgs/skin_light_header.png);
}
div.gridbox_light table.hdr td {
border: 1px solid;
border-color : #FDFDFD #93AFBA #93AFBA #FDFDFD;
background-color:transparent;
font-family:Tahoma;
font-size:11px;
font-weight:bold;
color:#055A78;
vertical-align:top;
text-align:left;
}
div.gridbox_light table.hdr td div{
width:auto;
padding-left:10px;
}
div.gridbox_light table.obj td {
border-width: 0px 1px 0px 1px;
border-left: 1px solid white;
border-right: 1px solid #D6D6D6;
font-family:Tahoma;
font-size:11px;
padding-right:4px;
padding-left:4px;
}
div.gridbox_light table.obj{
border-bottom: 1px solid #D6D6D6;
}
div.gridbox_light table.row20px tr td {
padding-right:4px;
padding-left:4px;
}
div.gridbox_light .dhx_combo_edit{
font-family:Tahoma;
font-size:11px;
}
div.gridbox_light table.obj tr.rowselected td{
background-color:#ededed;
color:black;
}
div.gridbox_light table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected {
background-color:#ededed;
}
div.gridbox_light .odd_light{
background-color:#E5F2F8;
}
/*modern*/
div.gridbox_modern {
border:1px solid #D6D6D6;
}
div.gridbox_modern .xhdr{
background-image:url(imgs/skin_modern_header.png);
}
div.gridbox_modern table.hdr{
background-image:url(imgs/skin_modern_header.png);
}
div.gridbox_modern table.hdr td {
border-right:1px solid #B5B5B5;
border-left:1px solid #FDFDFD;
border-top:1px solid #FDFDFD;
border-bottom:1px solid #B5B5B5;
background-color:transparent;
font-family:Tahoma;
font-size:11px;
font-weight:bold;
color:#055A78;
vertical-align:top;
text-align:left;
}
div.gridbox_modern table.hdr td div{
width:auto;
padding-left:10px;
}
div.gridbox_modern table.obj td {
border: 0px solid;
font-family:Tahoma;
font-size:11px;
padding-right:4px;
padding-left:4px;
}
div.gridbox_modern table.row20px tr td {
padding-right:4px;
padding-left:4px;
}
div.gridbox_modern .dhx_combo_edit{
font-family:Tahoma;
font-size:11px;
}
div.gridbox_modern table.obj tr.rowselected td{
background-color:#9ac2e5;
color:black;
}
div.gridbox_modern table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected {
background-color:#9ac2e5;
}
div.gridbox_modern .odd_modern{
background-color:#EDEDED;
}
/*clear*/
div.gridbox_clear .xhdr{
background-color:transparent;
}
div.gridbox_clear div.topMumba{
position:absolute;
left:0px;
width:100%;
height:3px;
background-image:url(imgs/skinC_header.png);
overflow:hidden;
padding:0px;
margin:0px;
}
div.gridbox_clear div.bottomMumba{
position:absolute;
left:0px;
width:100%;
height:3px;
background-image:url(imgs/skinD_header.png);
overflow:hidden;
}
div.gridbox_clear div.bottomMumba img,div.gridbox_clear div.topMumba img{
border:0px;
position:absolute;
top:0px;
}
div.gridbox_clear{
padding-left: 10px;
padding-right: 0px;
}
div.gridbox_clear table.hdr td {
border:0px;
background-color:transparent;
font-family:Tahoma;
font-size:11px;
font-weight:bold;
color:#055A78;
vertical-align:top;
text-align:left;
}
div.gridbox_clear table.hdr td div{
width:auto;
padding-left:10px;
padding-bottom:2px;
}
div.gridbox_clear table.obj td {
border-width: 0px 1px 0px 0px ;
border-color:#D6D6D6;
font-family:Tahoma;
font-size:11px;
padding-right:4px;
padding-left:4px;
}
div.gridbox_clear table.row20px tr td {
padding-right:4px;
padding-left:4px;
}
div.gridbox_clear .dhx_combo_edit{
font-family:Tahoma;
font-size:11px;
}
div.gridbox_clear .odd_light{
background-color:#E5F2F8;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xGrid/xGrid_css/dhtmlxgrid_skins.css
|
CSS
|
asf20
| 3,912
|
div.gridbox{
overflow:hidden;
}
div.gridbox .xhdr{
background-Color:#D4D0C8;
}
div.gridbox table.hdr td {
font-family:arial;
font-size:12px;
background-Color:#D4D0C8;
border: 1px solid;
border-color : white Gray Gray white;
text-align: center;
margin:0px;
padding:5px 0px 5px 0px ;
font-weight:normal;
-moz-user-select:none;
overflow:hidden;
}
div.gridbox table.hdr td div.hdrcell{
overflow:hidden;
}
div.gridbox table.obj td {
border: 1px solid;
border-color : white Gray Gray white;
font-family:Arial;
font-size:12px;
-moz-user-select:none;
overflow:hidden;
padding-top:0px;
padding-bottom:0px;
}
div.gridbox table.obj th {
padding:0px 0px 0px 0px ;
margin:0px 0px 0px 0px ;
}
div.gridbox table.row20px tr td{
height:20px;
white-space: nowrap;
padding:0px;
}
div.gridbox .objbox {
background-color:white;
}
div.gridbox table.obj td span.space, div.gridbox table.obj td img.space{
width:18px;
}
div.gridbox table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected {
background-color:#d8d8d8;
color:black;
}
div.gridbox table.obj tr.rowselected td{
background-color:#e1e0d7;
color:black;
}
div.gridbox table.obj td.editable{
-moz-user-select:text;
}
.dragSpanDiv{ font-size : 12px; border: 1px gray solid; background-color:white; }
.dhx_combo_select{
font-family:arial;
font-size:12px;
border:1px solid;
border-color:black silver silver black;
background-color:white;
overflow:hidden;
cursor:default;
position:absolute;
height:auto;
}
.dhx_combo_edit{
width:100%;
border:0px;
padding:0px;
margin:0px;
font:12px arial;
overflow:hidden;
}
.dhx_textarea{
border:1px solid;
border-color:black silver silver black;
position:absolute;
height:100px;
}
.dhx_clist{
background-color:white;
border:1px solid black;
padding:2px 2px 2px 2px;
}
.gridDragLine{
position:absolute;
top:10px; left:0px;
width:100%;
height:2px;
background-color:black;
overflow:hidden;
}
/*paginal output*/
DIV.pagingBlock{
font-size:12px;
font-family:verdana,arial;
}
DIV.pagingBlock .pagingCurrentPage{
font-weight:bold;
cursor:default;
}
DIV.pagingBlock .pagingPage{
cursor:pointer;
text-decoration:underline;
}
SPAN.recordsInfoBlock {
font-size:12px;
font-family:verdana,arial;
}
/*class for toolbar selectbox. used with pagingWT*/
.toolbar_select{
font-size:10px;
}
/*block selection style*/
.dhtmlxGrid_selection {
-moz-opacity: 0.5;
filter: alpha(opacity = 50);
background-color:yellow;
opacity:0.5;
border: 1px dotted black;
}
/* xp skin ------------------------------------------------------*/
div.gridbox_xp{
border:1px solid lightgrey;
}
div.gridbox_xp .xhdr{
background-image:url('imgs/header_bg_60.gif');
}
div.gridbox_xp table.hdr td {
color:#616161;
background-image:url('imgs/header_bg_60.gif');
border:0px;
text-align: center;
margin:0px;
padding:5px 0px 5px 0px ;
font-weight:bold;
-moz-user-select:none;
overflow:hidden;
}
div.gridbox_xp table.hdr td div.hdrcell{
border-left: 1px solid white;
border-right: 1px solid gray;
height:16px;
white-space : nowrap;
font-family:Arial;
font-size:12px;
}
div.gridbox_xp table.obj td {
border:0px;
border-bottom: 1px solid lightgrey;
border-right: 1px solid lightgrey;
font-family:Arial;
font-size:12px;
-moz-user-select:none;
overflow:hidden;
padding-top:0px;
padding-bottom:0px;
vertical-align:middle;
}
div.gridbox_xp table.obj tr.rowselected td{
background-color:whitesmoke;
color:black;
}
div.gridbox_xp table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected {
background-color:whitesmoke;
}
div.gridbox_xp table.row20px tr td{
height:22px;
white-space: nowrap;
padding:1px;
}
/* gray skin --------------------------------------------------*/
div.gridbox_gray {
border:1px solid gray;
background-color:#D4D0C8;
}
/* mt skin ------------------------------------------------------*/
div.gridbox_mt{
border:1px solid lightgrey;
}
div.gridbox_mt .xhdr{
background-image:url('imgs/header_bg.gif');
}
div.gridbox_mt table.hdr td {
color:#616161;
border:0px;
border-bottom: 1px solid lightgrey;
border-left: 1px solid lightgrey
text-align: center;
margin:0px;
background-image:url('imgs/header_bg.gif');
padding: 0px 0px 0px 0px;
-moz-user-select:none;
overflow:hidden;
}
div.gridbox_mt table.hdr td div.hdrcell{
height:16px;
white-space : nowrap;
font-family:Verdana;
font-size:12px;
}
div.gridbox_mt table.obj td {
border:0px;
border-bottom: 1px solid lightgrey;
border-right: 0px solid lightgrey;
font-family:Verdana;
font-size:12px;
-moz-user-select:none;
overflow:hidden;
padding-top:0px;
padding-bottom:0px;
vertical-align:middle;
}
div.gridbox_mt table.obj tr.rowselected td{
background-color:#D6D3FA;
color:black;
}
div.gridbox_mt table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected {
background-color:#D6D3FA;
}
div.gridbox_mt table.row20px tr td{
height:22px;
white-space: nowrap;
padding:1px;
}
/*------------------------------------------------------------*/
div.gridbox div.ftr{
position:absolute;
left:0px;
bottom:1px;
width:100%;
padding-right:20px;
overflow:hidden;
}
div.gridbox div.ftr td {
height:20px;
padding:0px;
padding-left:10px;
padding-right:5px;
border-top:1px solid gray;
border-right:1px solid gray;
background-color:#ffffcc;
font-style : italic;
font-family:arial;
font-size:12px;
}
div.gridbox table.hdr td.columnTargetR div.hdrcell{
border-right:3px double #FF6600;
border-left:3px solid #D4D0C8;
}
div.gridbox table.hdr td.columnTargetL div.hdrcell{
border-right:3px solid #D4D0C8;
border-left:3px double #FF6600;
}
.dhx_dragColDiv{
font-family:Arial;
font-size:12px;
background-color:#D4D0C8;
border: 1px solid;
border-color : white Gray Gray white;
text-align: center;
margin:0px;
padding:5px 20px 5px 20px ;
font-weight:normal;
filter:alpha(opacity:75);
-moz-opacity:0.75;
opacity:0.75;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xGrid/xGrid_css/dhtmlxgrid.css
|
CSS
|
asf20
| 6,411
|
//please beware that function started from _in_header_ must not be obfuscated
//toLowerCase ???
/**
* @desc: filter grid by mask
* @type: public
* @param: column - {number} zero based index of column
* @param: value - {string} filtering mask
* @param: preserve - {bool} filter current state or initial one ( false by default )
* @topic: 0
*/
dhtmlXGridObject.prototype.filterBy=function(column, value, preserve){
if (this.pagingOn) return this.filterByPaging(column, value, preserve);
if (this._dload) return this.filterBySRND(column, value, preserve);
if (this._srowsCol){
if (!preserve)
this.rowsCol=dhtmlxArray([].concat(this._srowsCol));
} else
this._srowsCol=[].concat(this.rowsCol); //backup copy
if (!this.rowsCol.length) return;
var d=true;
if (typeof(value)=="function") d=false;
if (typeof(value)=="object" && value.length)
for (var j=0; j<value.length; j++)
this._filterA(column[j],value[j],d);
else this._filterA(column,value,d);
//redraw grid
var p=this.obj.parentNode;
// p.removeChild(this.obj); //operation outside DOM is much faster
var pp=this.obj.rows[0].parentNode; //safari way
for (var i=this.obj.rows.length-1; i>0; i--)
pp.removeChild(this.obj.rows[i]);
for (var i=0; i<this.rowsCol.length; i++)
pp.appendChild(this.rowsCol[i]);
p.appendChild(this.obj); //put back in DOM
}
dhtmlXGridObject.prototype._filterA=function(column,value,d){
var e=this.cells3(this.rowsCol[0],column);
//caching exCell, as result we lost collspans
for (var i=this.rowsCol.length-1; i>=0; i--){
e.cell=this.rowsCol[i].childNodes[column];
if (d?(e.getValue().indexOf(value)==-1):(!value(e.getValue())))
this.rowsCol.splice(i,1);//filter row
}
}
dhtmlXGridObject.prototype.filterBySRND=function(column, value, preserve){
for (var i=0; i<this.rowsCol.length; i++)
if ( this.rowsCol[i] && !this.rowsBuffer[1][i]) {
this.rowsBuffer[1][i]=this.rowsCol[i];
this.rowsBuffer[0][i]=this.rowsCol[i].idd;
}
this._filterBy_core(column, value, preserve);
//redraw grid
for(var i=this.rowsCol.length-1;i>=0;i--)
if (this.rowsCol[i])
this.rowsCol[i].parentNode.removeChild(this.rowsCol[i]);
this.rowsCol=new dhtmlxArray();
this.limit=this.rowsBuffer[0].length;
this._fastAddRowSpacer(0,this.limit*this._srdh);
if (this.limit)
this._askRealRows(0);
}
dhtmlXGridObject.prototype._filterBy_core=function(column, value, preserve){
if (this._srowsBuf){
if (!preserve){
this.rowsBuffer=[dhtmlxArray([].concat(this._srowsBuf[0])),dhtmlxArray([].concat(this._srowsBuf[1]))];
}
} else{
this._srowsBuf=[[].concat(this.rowsBuffer[0]),[].concat(this.rowsBuffer[1])];
}
if (!this.rowsBuffer[0].length) return;
var d=true;
if (typeof(value)=="function") d=false;
if (typeof(value)=="object" && value.length)
for (var j=0; j<value.length; j++)
this._filterB(column[j],value[j],d);
else this._filterB(column,value,d);
}
dhtmlXGridObject.prototype._filterB=function(column,value,d){
var e=this.cells3(this.rowsCol[0],column);
//caching exCell, as result we lost collspans
for (var i=this.rowsBuffer[0].length-1; i>=0; i--){
if (this.rowsBuffer[1][i].idd){
e.cell=this.rowsBuffer[1][i].childNodes[column];
var val=e.getValue();
} else {
var val=this.rowsBuffer[1][i].getElementsByTagName("cell")[column];
if (val && val.firstChild) val=val.firstChild.data;
else val="";
}
if (d?(val.indexOf(value)==-1):(!value(val))){
this.rowsBuffer[0].splice(i,1);//filter row
this.rowsBuffer[1].splice(i,1);
}
}
}
dhtmlXGridObject.prototype.filterByPaging=function(column, value, preserve){
var a0=[]; var a1=[];
for (var i=0; i<this.rowsCol.length; i++){
a0.push(this.rowsCol[i].idd);
a1.push(this.rowsCol[i]);
}
this.rowsBuffer[1]=dhtmlxArray(a1.concat(this.rowsBuffer[1]));
this.rowsBuffer[0]=dhtmlxArray(a0.concat(this.rowsBuffer[0]));
this._filterBy_core(column, value, preserve);
//redraw grid
for(var i=this.rowsCol.length-1;i>=0;i--)
if (this.rowsCol[i].parentNode)
this.rowsCol[i].parentNode.removeChild(this.rowsCol[i]);
this.rowsCol=new dhtmlxArray();
this.limit=this.rowsBuffer[0].length;
this.changePage(1);
}
/**
* @desc: filter grid by mask
* @type: public
* @param: column - {number} zero based index of column
* @returns: {array} array of all possible data in column
* @topic: 0
*/
dhtmlXGridObject.prototype.collectValues=function(column){
var c={}; var f=[];
if (this.rowsCol.length)
var e=this.cells3(this.rowsCol[0],column);
for (var i=0; i<this.rowsCol.length; i++){
e.cell=this.rowsCol[i].childNodes[column];
var val=e.getValue();
if (val) c[val]=true;
}
for (var i=this.rowsBuffer[0].length-1; i>=0; i--){
if (!this.rowsBuffer[1][i]) continue;
if (this.rowsBuffer[1][i].idd){
e.cell=this.rowsBuffer[1][i].childNodes[column];
var val=e.getValue();
if (val) c[val]=true;
} else {
var val=this.rowsBuffer[1][i].getElementsByTagName("cell")[column];
if (val && val.firstChild){
val=val.firstChild.data;
if (val) c[val]=true;
}
}
}
for (d in c)
if (c[d]===true) f.push(d);
return f.sort();
}
dhtmlXGridObject.prototype.filterByAll=function(){
var a=[];
var b=[];
for (var i=0; i<this.filters.length; i++){
a.push(this.filters[i][0].value);
b.push(this.filters[i][1]);
}
this.filterBy(b,a);
this.callEvent("onFilterEnd",[this.filters]);
}
/**
* @desc: create a filter from any input
* @type: public
* @param: id - {string|object} input id or input html object
* @param: column - {number} index of column
* @param: preserve - {bool} filter current state or initial one ( false by default )
* @topic: 0
*/
dhtmlXGridObject.prototype.makeFilter=function(id,column,preserve){
if (!this.filters) this.filters=[];
if (typeof(id)!="object")
id=document.getElementById(id);
if(!id) return;
var self=this;
if (id.tagName=='SELECT'){
this.filters.push([id,column]);
this._loadSelectOptins(id,column);
id.onchange=function(){
self.filterByAll();
}
}
else if (id.tagName=='INPUT'){
this.filters.push([id,column]);
id.value='';
id.onkeypress=function(){
if (this._timer) window.clearTimeout(this._timer);
this._timer=window.setTimeout(function(){
self.filterByAll();
},500);
};
}
else if (id.tagName=='DIV' && id.className=="combo"){
this.filters.push([id,column]);
if (!window.dhx_globalImgPath) window.dhx_globalImgPath=this.imgURL;
var z=new dhtmlXCombo(id,"_filter","96%");
z.enableFilteringMode(true);
id.combo=z;
id.value="";
this._loadComboOptins(id,column);
z.attachEvent("onBlur",function(){
id.value=z.getSelectedValue();
self.filterByAll();
});
}
}
dhtmlXGridObject.prototype._loadSelectOptins=function(t,c){
var l=this.collectValues(c);
t.innerHTML="";
t.options[0]=new Option("","");
for (var i=0; i<l.length; i++)
t.options[t.options.length]=new Option(l[i],l[i]);
}
dhtmlXGridObject.prototype._loadComboOptins=function(t,c){
var l=this.collectValues(c);
t.combo.clearAll();
t.combo.render(false);
t.combo.addOption("","");
for (var i=0; i<l.length; i++)
t.combo.addOption(l[i],l[i]);
t.combo.render(true);
}
/**
* @desc: refresh filters values ( can be used if data in grid changed and filters need to be updated )
* @type: public
* @topic: 0
*/
dhtmlXGridObject.prototype.refreshFilters=function(){
for (var i=0; i<this.filters.length; i++){
switch(this.filters[i][0].tagName.toLowerCase()){
case "input":
break;
case "select":
this._loadSelectOptins.apply(this,this.filters[i]);
break;
case "div":
this._loadComboOptins.apply(this,this.filters[i]);
break;
}
}
}
dhtmlXGridObject.prototype._filters_ready=function(fl,code){
this.attachEvent("onXLE",this.refreshFilters);
this._filters_ready=function(){};
}
dhtmlXGridObject.prototype._in_header_text_filter=function(t,i){
t.innerHTML="<input type='text' style='width:98%; font-size:8pt; font-family:Tahoma;'>";
t.onclick=function(e){ (e||event).cancelBubble=true; return false; }
this.makeFilter(t.firstChild,i);
this._filters_ready();
}
dhtmlXGridObject.prototype._in_header_select_filter=function(t,i){
t.innerHTML="<select style='width:98%; font-size:8pt; font-family:Tahoma;'></select>";
t.onclick=function(e){ (e||event).cancelBubble=true; return false; }
this.makeFilter(t.firstChild,i);
this._filters_ready();
}
dhtmlXGridObject.prototype._in_header_combo_filter=function(t,i){
t.innerHTML="<div style='width:100%; padding-left:2px; overflow:hidden; font-size:8pt; font-family:Tahoma; -moz-user-select:text;' class='combo'></div>";
t.onselectstart=function(){ return (event.cancelBubble=true); }
t.onclick=function(e){ (e||event).cancelBubble=true; return false; }
this.makeFilter(t.firstChild,i);
this._filters_ready();
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xGrid/xGrid_js/dhtmlxgrid_filter.js
|
JavaScript
|
asf20
| 9,190
|
function dhx_init_tabbars()
{
var z=document.getElementsByTagName("div");
for (var i=0;i<z.length;i++)if(z[i].className.indexOf("dhtmlxTabBar")!=-1)
{
var n=z[i];
var id=n.id;
var k=new Array();
for (var j=0;j<n.childNodes.length;j++)if (n.childNodes[j].tagName)k[k.length]=n.childNodes[j];
var w=new dhtmlXTabBar(id,n.getAttribute("mode")||"top",n.getAttribute("tabheight")||20);
window[id]=w;
acs=n.getAttribute("onbeforeinit");
if (acs)eval(acs);
if (n.getAttribute("enableForceHiding")) w.enableForceHiding(true);
w.setImagePath(n.getAttribute("imgpath"));
var acs=n.getAttribute("margin");
if (acs!=null)w._margin=acs;
acs=n.getAttribute("align");
if (acs)w._align=acs;
acs=n.getAttribute("hrefmode");
if (acs)w.setHrefMode(acs);
acs=n.getAttribute("offset");
if (acs!=null)w._offset=acs;
acs=n.getAttribute("tabstyle");
if (acs!=null)w.setStyle(acs);
acs=n.getAttribute("select");
var clrs=n.getAttribute("skinColors");
if (clrs)w.setSkinColors(clrs.split(",")[0],clrs.split(",")[1]);
for (var j=0;j<k.length;j++)
{
var m=k[j];
w.addTab(m.id,m.getAttribute("name"),m.getAttribute("width"),null,m.getAttribute("row"));
var href=m.getAttribute("href");
if (href)w.setContentHref(m.id,href);
else w.setContent(m.id,m);
if ((!w._dspN)&&(m.style.display=="none"))
m.style.display=""
};
if (k.length)w.setTabActive(acs||k[0].id);
acs=n.getAttribute("oninit");
if (acs)eval(acs)
}
};
dhtmlxEvent(window,"load",dhx_init_tabbars);
|
zzfls-pj
|
trunk/WebRoot/include/js/components/Tabbar/Tabbar_js/dhtmlxtabbar_start.js
|
JavaScript
|
asf20
| 1,806
|
/* "STANDARD" SKIN */
/* USER-BUTTON "TRAY" */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_tray_default {
background-image: url("../imgs/dhxwins_standard_button_tray/active/btns_default/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_tray_default {
background-image: url("../imgs/dhxwins_standard_button_tray/inactive/btns_default/btn_tray.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_tray_disabled {
background-image: url("../imgs/dhxwins_standard_button_tray/active/btns_disabled/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_tray_disabled {
background-image: url("../imgs/dhxwins_standard_button_tray/inactive/btns_disabled/btn_tray.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_tray_over_default {
background-image: url("../imgs/dhxwins_standard_button_tray/active/btns_over_default/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_tray_over_default {
background-image: url("../imgs/dhxwins_standard_button_tray/inactive/btns_over_default/btn_tray.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_tray_over_pressed {
background-image: url("../imgs/dhxwins_standard_button_tray/active/btns_over_pressed/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_tray_over_pressed {
background-image: url("../imgs/dhxwins_standard_button_tray/inactive/btns_over_pressed/btn_tray.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_standard_userbtn_tray.css
|
CSS
|
asf20
| 1,675
|
/* "AQUA DARK" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full {
height: 31px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full {
height: 31px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 31px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 31px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_dark/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 31px;
background-image: url("../imgs/dhxwins_aqua_dark/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 31px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_dark/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.td_body_full table.body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.td_body_full table.body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_dark td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_dark/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_aqua_dark {
position: absolute;
top: 8px;
left: 26px;
color: #FFFFFF;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_aqua_dark {
position: absolute;
top: 8px;
left: 26px;
color: #868686;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_aqua_dark {
position: absolute;
top: 8px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_aqua_dark {
position: absolute;
top: 8px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark {
position: absolute;
right: 6px;
top: 7px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark {
position: absolute;
right: 6px;
top: 7px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div {
width: 16px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div {
width: 16px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_dark table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_aqua_dark/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_aqua_dark.css
|
CSS
|
asf20
| 21,579
|
/* "CLEAR GREEN" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_clear_green {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 8px;
background-image: url("../imgs/dhxwins_clear_green/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 7px;
background-image: url("../imgs/dhxwins_clear_green/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../imgs/dhxwins_clear_green/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../imgs/dhxwins_clear_green/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 8px;
background-image: url("../imgs/dhxwins_clear_green/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 7px;
background-image: url("../imgs/dhxwins_clear_green/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../imgs/dhxwins_clear_green/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../imgs/dhxwins_clear_green/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../imgs/dhxwins_clear_green/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../imgs/dhxwins_clear_green/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_green/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_green/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_clear_green/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_clear_green/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_green/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_green td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_green/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_clear_green {
position: absolute;
top: 9px;
left: 20px;
color: #383838;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_clear_green {
position: absolute;
top: 9px;
left: 20px;
color: #999999;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_clear_green {
position: absolute;
top: 12px;
left: 6px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_clear_green {
position: absolute;
top: 12px;
left: 6px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green {
position: absolute;
right: 6px;
top: 9px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green {
position: absolute;
right: 6px;
top: 9px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_park_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_park_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_close_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_close_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_help_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_help_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_stick_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_stick_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_clear_green/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_green table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_clear_green/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_clear_green.css
|
CSS
|
asf20
| 21,965
|
/* "WEB" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_web {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full {
height: 21px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full {
height: 21px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 21px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 21px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 21px;
width: 5px;
background-image: url("../imgs/dhxwins_web/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 21px;
width: 5px;
background-image: url("../imgs/dhxwins_web/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 21px;
background-image: url("../imgs/dhxwins_web/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 21px;
background-image: url("../imgs/dhxwins_web/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 21px;
width: 5px;
background-image: url("../imgs/dhxwins_web/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 21px;
width: 5px;
background-image: url("../imgs/dhxwins_web/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_web/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_web/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_web/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_web/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_web/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_web/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_web/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_web/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_web/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_web td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_web/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_web {
position: absolute;
top: 3px;
left: 28px;
color: #FFFFFF;
font-family: Tahoma;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_web {
position: absolute;
top: 3px;
left: 28px;
color: #909090;
font-family: Tahoma;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_web {
position: absolute;
top: 2px;
left: 6px;
width: 18px;
height: 18px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_web {
position: absolute;
top: 2px;
left: 6px;
width: 18px;
height: 18px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web {
position: absolute;
right: 6px;
top: 2px;
height: 17px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web {
position: absolute;
right: 6px;
top: 2px;
height: 17px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div {
width: 17px;
height: 17px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div {
width: 17px;
height: 17px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_park_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_park_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_close_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_close_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_help_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_help_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_stick_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_stick_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_web/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_web/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_web/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_web/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_web table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_web/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_web table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_web/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_web.css
|
CSS
|
asf20
| 20,597
|
/* "CLEAR BLUE" USER BUTTON TRAY */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_default {
background-image: url("../imgs/dhxwins_clear_button_tray/active/btns_default/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_default {
background-image: url("../imgs/dhxwins_clear_button_tray/inactive/btns_default/btn_tray.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_disabled {
background-image: url("../imgs/dhxwins_clear_button_tray/active/btns_disabled/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_disabled {
background-image: url("../imgs/dhxwins_clear_button_tray/inactive/btns_disabled/btn_tray.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_over_default {
background-image: url("../imgs/dhxwins_clear_button_tray/active/btns_over_default/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_over_default {
background-image: url("../imgs/dhxwins_clear_button_tray/inactive/btns_over_default/btn_tray.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_over_pressed {
background-image: url("../imgs/dhxwins_clear_button_tray/active/btns_over_pressed/btn_tray.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_tray_over_pressed {
background-image: url("../imgs/dhxwins_clear_button_tray/inactive/btns_over_pressed/btn_tray.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_clear_userbtn_tray.css
|
CSS
|
asf20
| 1,655
|
/* "STANDARD" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_standard {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td {
/* background: none; */
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td {
/* background: none; */
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 6px;
background-image: url("../imgs/dhxwins_standard/active/header_left.gif");
/* background-position: bottom; */
background-position: center top;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/header_left.gif");
/* background-position: bottom; */
background-position: center top;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../imgs/dhxwins_standard/active/header_middle.gif");
/* background-position: bottom; */
background-position: center top;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../imgs/dhxwins_standard/inactive/header_middle.gif");
/* background-position: bottom; */
background-position: center top;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 6px;
background-image: url("../imgs/dhxwins_standard/active/header_right.gif");
/* background-position: bottom; */
background-position: center top;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/header_right.gif");
/* background-position: bottom; */
background-position: center top;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.standard td.td_body_full table.body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.standard td.td_body_full table.body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../imgs/dhxwins_standard/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
overflow: hidden;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #EDECEB;
overflow: hidden;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../imgs/dhxwins_standard/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_standard/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_standard/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_active table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_standard/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_standard td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_standard/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 2px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_standard {
position: absolute;
top: 9px;
left: 22px;
color: #606060;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_standard {
position: absolute;
top: 9px;
left: 22px;
color: #9D9D9D;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_standard {
position: absolute;
top: 12px;
left: 8px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_standard {
position: absolute;
top: 12px;
left: 8px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
/* PROGRESS */
div.dhtmlx_window_active div.dhtmlx_wins_progress_standard {
position: absolute;
top: 8px;
left: 4px;
width: 15px;
height: 15px;
background-image: url("../imgs/dhxwins_standard/active/progress.gif");
background-repeat: no-repeat;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_progress_standard {
position: absolute;
top: 8px;
left: 4px;
width: 15px;
height: 15px;
background-image: url("../imgs/dhxwins_standard/inactive/progress.gif");
background-repeat: no-repeat;
}
/* STATUSBAR */
div.dhtmlx_window_active div.dhtmlx_wins_statusbar_standard {
position: absolute;
overflow: hidden;
margin: 0px;
margin-top: 1px;
padding-top: 1px;
padding: 0px;
border-top: #A4A3A3 1px solid;
background-color: #DFDEDE;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_statusbar_standard {
position: absolute;
overflow: hidden;
margin: 0px;
margin-top: 1px;
padding-top: 1px;
padding: 0px;
border-top: #A4A3A3 1px solid;
background-color: #DFDEDE;
}
/* dhtmlxMenu */
div.dhtmlxMenuInWin {
background-color: #DFDEDE;
border-bottom: #A4A3A3 1px solid;
height: 22px;
height=25px;
margin-top=-1px;
overflow: hidden;
width: 100%;
}
/* dhtmlxToolbar */
div.dhtmlxToolbarInWin {
white-space: nowrap;
overflow: hidden;
background-color: #DFDEDE;
border-bottom: #909090 1px solid;
overflow: hidden;
width: 100%;
}
/* dhtmlxStatusBar */
div.dhtmlxWebStatusBarInWin {
position: absolute;
left: 0px;
bottom: 0px;
bottom=-1px;
overflow: hidden;
width: 100%;
background-color: #DFDEDE;
border-top: #909090 1px solid;
vertical-align: middle;
font-family: Tahoma;
font-size: 10px;
padding-left: 2px;
line-height: 16px;
line-height=17px;
color: #707070;
font-weight: bold;
cursor: default;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard {
position: absolute;
right: 6px;
top: 9px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard {
position: absolute;
right: 6px;
top: 9px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td.dhtmlx_wins_btn_visible {
width: 16px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td.dhtmlx_wins_btn_visible {
width: 16px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td.dhtmlx_wins_btn_hidden {
display: none;
width: 16px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td.dhtmlx_wins_btn_hidden {
display: none;
width: 16px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div {
width: 15px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div {
width: 15px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_park_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_park_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_close_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_close_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_help_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_help_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_stick_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_stick_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_standard/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_standard/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_standard/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_standard/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_standard/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_standard/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_standard.css
|
CSS
|
asf20
| 23,527
|
/* "MODERN BLUE" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full {
height: 39px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full {
height: 39px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 39px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 39px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_blue/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 39px;
background-image: url("../imgs/dhxwins_modern_blue/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 39px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_blue/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_modern_blue/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F6F6EE;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F6F6EE;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_modern_blue/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_blue/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_modern_blue/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_blue/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_blue/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_modern_blue {
position: absolute;
top: 7px;
left: 27px;
color: #FFFFFF;
font-family: Arial;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_modern_blue {
position: absolute;
top: 7px;
left: 27px;
color: #CCCCCC;
font-family: Arial;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_modern_blue {
position: absolute;
top: 6px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_modern_blue {
position: absolute;
top: 6px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue {
position: absolute;
right: 10px;
top: 7px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue {
position: absolute;
right: 10px;
top: 7px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_park_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_park_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_close_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_close_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_help_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_help_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_blue table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_modern_blue/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_modern_blue.css
|
CSS
|
asf20
| 22,015
|
/* "DHX BLACK" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full {
height: 21px;
-moz-user-select: none;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full {
height: 21px;
-moz-user-select: none;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 21px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 21px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 21px;
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 21px;
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 2px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 21px;
background-image: url("../imgs/dhxwins_dhx_black/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 21px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 21px;
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 21px;
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 2px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.td_body_full table.body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.td_body_full table.body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 2px;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #FFFFFF;
overflow: hidden;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #FFFFFF;
overflow: hidden;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #FFFFFF;
overflow: hidden;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #FFFFFF;
overflow: hidden;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_dhx_black/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_dhx_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_dhx_black {
position: absolute;
top: 4px;
left: 22px;
color: #999999;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_dhx_black {
position: absolute;
top: 4px;
left: 22px;
color: #555555;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_dhx_black {
position: absolute;
top: 6px;
left: 8px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_dhx_black {
position: absolute;
top: 6px;
left: 8px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black {
position: absolute;
right: 5px;
top: 2px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black {
position: absolute;
right: 5px;
top: 2px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div {
width: 17px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div {
width: 17px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_park_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_park_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_close_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_close_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_help_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_help_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_sticked.gif");
}
/* dock (user button, used in layout) */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_default/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_default/btn_dock.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_disabled {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_disabled/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_disabled {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_disabled/btn_dock.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_over_default {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_default/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_over_default {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_default/btn_dock.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/active/btns_over_pressed/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_dhx_black table td div.button_dock_over_pressed {
background-image: url("../imgs/dhxwins_dhx_black/inactive/btns_over_pressed/btn_dock.gif");
}
/* PROGRESS */
div.dhtmlx_window_active div.dhtmlx_wins_progress_dhx_black {
position: absolute;
top: 5px;
left: 6px;
width: 11px;
height: 11px;
background-image: url("../imgs/dhxwins_dhx_black/active/progress.gif");
background-repeat: no-repeat;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_progress_dhx_black {
position: absolute;
top: 5px;
left: 6px;
width: 11px;
height: 11px;
background-image: url("../imgs/dhxwins_dhx_black/inactive/progress.gif");
background-repeat: no-repeat;
}
/* dhtmlxStatusBar */
div.dhtmlxWebStatusBarInWin_dhx_black {
position: absolute;
bottom: 0px;
bottom=2px;
overflow: hidden;
width=100%;
left: 0px;
right: 0px;
background-color: #555555;
border-top: #333333 1px solid;
vertical-align: middle;
font-family: Tahoma;
font-size: 11px;
padding-left: 4px;
padding-right: 4px;
line-height: 17px;
line-height=16px;
color: #BFBFBF;
height: 40px;
margin-top=-2px;
font-weight: normal;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive .dhx_tablist_zone, div.dhtmlx_window_active .dhx_tablist_zone{
background-color:black;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_dhx_black.css
|
CSS
|
asf20
| 24,355
|
/* "MODERN BLACK" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_modern_black {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full {
height: 39px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full {
height: 39px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 39px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 39px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_black/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_black/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 39px;
background-image: url("../imgs/dhxwins_modern_black/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 39px;
background-image: url("../imgs/dhxwins_modern_black/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_black/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_black/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_modern_black/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_modern_black/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F6F6EE;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F6F6EE;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_modern_black/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_modern_black/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_black/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_black/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_modern_black/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_modern_black/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_black/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_black td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_black/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_modern_black {
position: absolute;
top: 7px;
left: 27px;
color: #FFFFFF;
font-family: Arial;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_modern_black {
position: absolute;
top: 7px;
left: 27px;
color: #CCCCCC;
font-family: Arial;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_modern_black {
position: absolute;
top: 6px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_modern_black {
position: absolute;
top: 6px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black {
position: absolute;
right: 10px;
top: 7px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black {
position: absolute;
right: 10px;
top: 7px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_park_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_park_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_close_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_close_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_help_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_help_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_stick_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_stick_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_modern_black/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_black table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_modern_black/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_modern_black.css
|
CSS
|
asf20
| 22,186
|
/* "CLEAR BLUE" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td {
/* background: none; */
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td {
/* background: none; */
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 8px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 7px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 8px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 7px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_blue td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_clear_blue {
position: absolute;
top: 9px;
left: 20px;
color: #383838;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_clear_blue {
position: absolute;
top: 9px;
left: 20px;
color: #999999;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_clear_blue {
position: absolute;
top: 12px;
left: 6px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_clear_blue {
position: absolute;
top: 12px;
left: 6px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
/* STATUSBAR */
div.dhtmlx_window_active div.dhtmlx_wins_statusbar_clear_blue {
position: absolute;
overflow: hidden;
margin: 0px;
margin-top: 1px;
padding-top: 1px;
padding: 0px;
border-top: #A4A3A3 1px solid;
background-color: #E6E5E5;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_statusbar_clear_blue {
position: absolute;
overflow: hidden;
margin: 0px;
margin-top: 1px;
padding-top: 1px;
padding: 0px;
border-top: #A4A3A3 1px solid;
background-color: #E6E5E5;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue {
position: absolute;
right: 6px;
top: 9px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue {
position: absolute;
right: 6px;
top: 9px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_park_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_park_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_park_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_park_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_park_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_park_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_park_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_park_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax1_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_minmax2_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_close_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_close_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_close_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_close_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_close_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_close_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_close_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_close_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_help_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_help_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_help_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_help_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_help_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_help_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_help_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_help_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_stick_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_disabled {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_over_default {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_blue table td div.button_sticked_over_pressed {
background-image: url("../xWindow_imgs/dhxwins_clear_blue/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_clear_blue.css
|
CSS
|
asf20
| 22,889
|
/* dhtmlxWindows */
/* viewport */
div.dhtmlx_winviewport {
position: absolute;
/* border: #909090 1px dashed; */
overflow: hidden;
}
/* main container */
div.dhtmlx_window_active {
position: absolute;
overflow: hidden;
}
div.dhtmlx_window_inactive {
position: absolute;
overflow: hidden;
}
/* content cover */
div.dhx_content_cover_blocker {
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
/*
filter: alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
background-color: #909090;
*/
filter: alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
background: #FFFFFF;
}
/* cover for modal windows */
iframe.dhx_modal_cover_ifr {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
filter: alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
background-color: #FFFFFF;
}
div.dhx_modal_cover_dv {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
border: none;
filter: alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
background-color: #EEEEEE; /*#D3E7FF;*/
}
iframe.dhx_ie6_wincover_forsel {
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
overflow: hidden;
filter: alpha(opacity=0);
background-color: #FFFFFF;
z-index: -1;
}
/* content cover */
div.dhx_carcass_resmove {
position: absolute;
filter: alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
background-color: #E0E0E0;
border: #909090 1px solid;
}
/* cover for vp for move/resize */
div.dhx_content_vp_cover {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
filter: alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
background-color: #FFFFFF;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows.css
|
CSS
|
asf20
| 1,742
|
/* "WEB" SKIN */
/* user button: tray */
div.dhtmlx_window_active div.buttons_web table td div.button_tray_default {
background-image: url("../imgs/dhxwins_web_button_tray/active/btns_default/btn_tray.gif");
}
div.dhtmlx_window_inactive div.buttons_web table td div.button_tray_default {
background-image: url("../imgs/dhxwins_web_button_tray/inactive/btns_default/btn_tray.gif");
}
div.dhtmlx_window_active div.buttons_web table td div.button_tray_disabled {
background-image: url("../imgs/dhxwins_web_button_tray/active/btns_disabled/btn_tray.gif");
}
div.dhtmlx_window_inactive div.buttons_web table td div.button_tray_disabled {
background-image: url("../imgs/dhxwins_web_button_tray/inactive/btns_disabled/btn_tray.gif");
}
div.dhtmlx_window_active div.buttons_web table td div.button_tray_over_default {
background-image: url("../imgs/dhxwins_web_button_tray/active/btns_over_default/btn_tray.gif");
}
div.dhtmlx_window_inactive div.buttons_web table td div.button_tray_over_default {
background-image: url("../imgs/dhxwins_web_button_tray/inactive/btns_over_default/btn_tray.gif");
}
div.dhtmlx_window_active div.buttons_web table td div.button_tray_over_pressed {
background-image: url("../imgs/dhxwins_web_button_tray/active/btns_over_pressed/btn_tray.gif");
}
div.dhtmlx_window_inactive div.buttons_web table td div.button_tray_over_pressed {
background-image: url("../imgs/dhxwins_web_button_tray/inactive/btns_over_pressed/btn_tray.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_web_userbtn_tray.css
|
CSS
|
asf20
| 1,495
|
/* "AQUA SKY" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full {
height: 31px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full {
height: 31px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 31px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 31px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_sky/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 31px;
background-image: url("../imgs/dhxwins_aqua_sky/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 31px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_sky/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.td_body_full table.body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.td_body_full table.body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_sky td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_sky/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_aqua_sky {
position: absolute;
top: 8px;
left: 26px;
color: #FFFFFF;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_aqua_sky {
position: absolute;
top: 8px;
left: 26px;
color: #868686;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_aqua_sky {
position: absolute;
top: 8px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_aqua_sky {
position: absolute;
top: 8px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky {
position: absolute;
right: 6px;
top: 7px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky {
position: absolute;
right: 6px;
top: 7px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div {
width: 16px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div {
width: 16px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_sky table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_aqua_sky/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_aqua_sky.css
|
CSS
|
asf20
| 21,408
|
/* "MODERN RED" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_modern_red {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full {
height: 39px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full {
height: 39px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 39px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 39px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_red/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_red/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 39px;
background-image: url("../imgs/dhxwins_modern_red/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 39px;
background-image: url("../imgs/dhxwins_modern_red/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_red/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 39px;
width: 11px;
background-image: url("../imgs/dhxwins_modern_red/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_modern_red/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 2px;
background-image: url("../imgs/dhxwins_modern_red/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F6F6EE;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F6F6EE;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F4F4F4;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_modern_red/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 2px;
background-image: url("../imgs/dhxwins_modern_red/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_red/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_red/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_modern_red/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 2px;
background-image: url("../imgs/dhxwins_modern_red/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_red/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_modern_red td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 2px;
height: 2px;
background-image: url("../imgs/dhxwins_modern_red/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_modern_red {
position: absolute;
top: 7px;
left: 27px;
color: #FFFFFF;
font-family: Arial;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_modern_red {
position: absolute;
top: 7px;
left: 27px;
color: #CCCCCC;
font-family: Arial;
font-size: 12px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_modern_red {
position: absolute;
top: 6px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_modern_red {
position: absolute;
top: 6px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red {
position: absolute;
right: 10px;
top: 7px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red {
position: absolute;
right: 10px;
top: 7px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_park_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_park_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_close_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_close_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_help_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_help_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_stick_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_stick_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_modern_red/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_modern_red table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_modern_red/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_modern_red.css
|
CSS
|
asf20
| 21,844
|
/* USER-BUTTON TEMPLATE CSS */
/* %skin% replace with skin name */
/* %button_root_folder% replace with button root folder */
/* %button_name% replace with button name */
/* %button_filename% replace with button filename */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_default {
background-image: url("../imgs/%button_root_folder%/active/btns_default/%button_filename%");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_default {
background-image: url("../imgs/%button_root_folder%/inactive/btns_default/%button_filename%");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_disabled {
background-image: url("../imgs/%button_root_folder%/active/btns_disabled/%button_filename%");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_disabled {
background-image: url("../imgs/%button_root_folder%/inactive/btns_disabled/%button_filename%");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_over_default {
background-image: url("../imgs/%button_root_folder%/active/btns_over_default/%button_filename%");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_over_default {
background-image: url("../imgs/%button_root_folder%/inactive/btns_over_default/%button_filename%");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_over_pressed {
background-image: url("../imgs/%button_root_folder%/active/btns_over_pressed/%button_filename%");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_%skin% table td div.button_%button_name%_over_pressed {
background-image: url("../imgs/%button_root_folder%/inactive/btns_over_pressed/%button_filename%");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_user_button_template.css
|
CSS
|
asf20
| 1,893
|
<IMG SRC="../xWindow_imgs/dhxwins_aqua_dark/active/header_middle.gif" WIDTH="10" HEIGHT="31" BORDER="0" ALT="">
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/aa.html
|
HTML
|
asf20
| 111
|
/* "AQUA ORANGE" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full {
height: 31px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full {
height: 31px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 31px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 31px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_orange/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 31px;
background-image: url("../imgs/dhxwins_aqua_orange/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 31px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_orange/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 31px;
width: 10px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.td_body_full table.body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.td_body_full table.body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #F5F5F5;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_aqua_orange td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 3px;
height: 3px;
background-image: url("../imgs/dhxwins_aqua_orange/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_aqua_orange {
position: absolute;
top: 8px;
left: 26px;
color: #FFFFFF;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_aqua_orange {
position: absolute;
top: 8px;
left: 26px;
color: #868686;
font-family: Arial;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_aqua_orange {
position: absolute;
top: 8px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_aqua_orange {
position: absolute;
top: 8px;
left: 6px;
width: 16px;
height: 16px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange {
position: absolute;
right: 6px;
top: 7px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange {
position: absolute;
right: 6px;
top: 7px;
height: 15px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div {
width: 16px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div {
width: 16px;
height: 15px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_aqua_orange table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_aqua_orange/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_aqua_orange.css
|
CSS
|
asf20
| 21,921
|
/* "CLEAR SILVER" SKIN */
/* inner table*/
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver {
background: none;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td {
background: none;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td {
background: none;
}
/* HEADER */
/* full header td */
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full {
height: 32px;
-moz-user-select: none;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header {
height: 32px;
-moz-user-select: none;
cursor: default;
}
/* header left side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 7px;
background-image: url("../imgs/dhxwins_clear_silver/active/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_left {
height: 32px;
width: 7px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/header_left.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* header middle side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../imgs/dhxwins_clear_silver/active/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_middle {
height: 32px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/header_middle.gif");
background-position: bottom;
background-repeat: repeat-x;
cursor: default;
font-size: 2px;
}
/* header right side */
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 7px;
background-image: url("../imgs/dhxwins_clear_silver/active/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_header_full table.dhtmlx_wins_header td.dhtmlx_wins_td_header_right {
height: 32px;
width: 7px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/header_right.gif");
background-position: bottom;
background-repeat: no-repeat;
cursor: default;
font-size: 1px;
}
/* BODY */
/*
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td {
font-size: 1px;
}
*/
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../imgs/dhxwins_clear_silver/active/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_left {
width: 6px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/body_middle_left.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content {
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
overflow: auto;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_content div.dhtmlx_wins_body_content {
/* width: 100%; */
position: relative;
font-family: Tahoma;
font-size: 10px;
color: #000000;
font-weight: normal;
background-color: #E6E5E5;
overflow: auto;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../imgs/dhxwins_clear_silver/active/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_middle_right {
width: 6px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/body_middle_right.gif");
background-repeat: repeat-y;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_silver/active/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_left {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/body_bottom_left.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_clear_silver/active/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_middle {
height: 6px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/body_bottom_middle.gif");
background-repeat: repeat-x;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_active table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_silver/active/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
div.dhtmlx_window_inactive table.dhtmlx_wins_clear_silver td.dhtmlx_wins_td_body_full table.dhtmlx_wins_body td.dhtmlx_wins_body_border_bottom_right {
width: 6px;
height: 6px;
background-image: url("../imgs/dhxwins_clear_silver/inactive/body_bottom_right.gif");
background-repeat: no-repeat;
-moz-user-select: none;
font-size: 1px;
}
/* TITLE */
div.dhtmlx_window_active div.dhtmlx_wins_title_clear_silver {
position: absolute;
top: 9px;
left: 20px;
color: #383838;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_title_clear_silver {
position: absolute;
top: 9px;
left: 20px;
color: #999999;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
cursor: default;
white-space: nowrap;
overflow: hidden;
-moz-user-select: none;
}
/* ICON */
div.dhtmlx_window_active img.dhtmlx_wins_icon_clear_silver {
position: absolute;
top: 12px;
left: 6px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive img.dhtmlx_wins_icon_clear_silver {
position: absolute;
top: 12px;
left: 6px;
width: 9px;
height: 9px;
border: none;
-moz-user-select: none;
}
/* BUTTONS */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver {
position: absolute;
right: 6px;
top: 9px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver {
position: absolute;
right: 6px;
top: 9px;
height: 16px;
border: none;
background: none;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td.dhtmlx_wins_btn_visible {
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td.dhtmlx_wins_btn_hidden {
display: none;
width: 17px;
text-align: left;
cursor: default;
-moz-user-select: none;
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div {
width: 16px;
height: 16px;
-moz-user-select: none;
background-repeat: no-repeat;
cursor: default;
}
/* park */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_park_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_park_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_park_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_park_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_park.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_park.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_park_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_park.gif");
}
/* minmax maximize */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_minmax1.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_minmax1.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax1_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_minmax1.gif");
}
/* minmax restore */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_minmax2.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_minmax2.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_minmax2_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_minmax2.gif");
}
/* close */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_close_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_close_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_close_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_close_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_close.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_close.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_close_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_close.gif");
}
/* help */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_help_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_help_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_help_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_help_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_help.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_help.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_help_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_help.gif");
}
/* stick */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_stick.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_stick.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_stick_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_stick.gif");
}
/* sticked */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_disabled {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_disabled/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_over_default {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_default/btn_sticked.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/active/btns_over_pressed/btn_sticked.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_clear_silver table td div.button_sticked_over_pressed {
background-image: url("../imgs/dhxwins_clear_silver/inactive/btns_over_pressed/btn_sticked.gif");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_css/dhtmlxwindows_clear_silver.css
|
CSS
|
asf20
| 22,136
|
//v.2.0 build 81009
/*
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
*/
dhtmlXWindows.prototype._enableStatusBar = function() {this._attachStatusBar = function(win, bar, show) {var wt = (win._toolbarT!=null?win._toolbarT:0);var mt = (win._menuT!=null?win._menuT:0);win._sbId = win._sidd;win._sbH = (_isIE?19:18);win._sbB = (_isIE?20:19);win.sb = win._content.childNodes[3];win.sb.className = "dhtmlxWebStatusBarInWin_"+this.skin;win._content.childNodes[3].style.display = "";win._content.childNodes[3].style.height = win._sbH + "px";win._content.childNodes[2].style.top = wt + mt + "px";win._content.childNodes[2].style.bottom = win._sbB + "px";if (_isIE){win._IEFixMTS = true;var pad = 19 + wt + mt;win._content.childNodes[2].style.paddingBottom = pad+"px"};win.sb.setText = function(text) {this.innerHTML = text};win.sb.getText = function() {return this.innerHTML};if (win.accordion != null){win.accordion.setSizes()};if (win.layout != null){win.layout.setSizes(win)};return win.sb}};
//v.2.0 build 81009
/*
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
*/
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_js/dhtmlxwindows_sb.js
|
JavaScript
|
asf20
| 1,410
|
//v.2.0 build 81009
/*
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
*/
dhtmlXWindows.prototype._enableWebMenu = function() {this._attachWebMenu = function(win) {win._menuId = win._midd;win._menuH = (_isIE?25:22);win._menuT = (_isIE?24:23);win.menu = new dhtmlXMenuObject(win._menuId, "topId");var skin = "glassy_blue";switch (this.skin) {case "glassy_blue":
case "glassy_blue_light":
win._menuH = 23;win._menuT = 23;break;case "dhx_black":
case "dhx_blue":
skin = this.skin;if (win.toolbar != null){win._menuH = 25;win._menuT = 25;win._content.childNodes[0].className += " dhtmlxMenu_"+this._skin+"_bottom_border"}else {win._menuH = 24;win._menuT = 24};break};win.menu.setSkin(skin);win._content.childNodes[0].style.display = "";win._content.childNodes[0].style.height = win._menuH + "px";win._content.childNodes[2].style.top = win._menuT + (win._toolbarT!=null?win._toolbarT:0) + "px";if (_isIE){win._IEFixMTS = true;var pad = win._menuT + (win._toolbarT!=null?win._toolbarT:0) + (win._sbH!=null?win._sbH:0);win._content.childNodes[2].style.paddingBottom = pad + "px"};if (_isOpera && win.layout != null){win.layout._fixCellsContentOpera950()};if (win.accordion != null){win.accordion.setSizes()};if (win.layout != null){win.layout.setSizes(win)};return win.menu}};
//v.2.0 build 81009
/*
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
*/
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xWindow/xWindow_js/dhtmlxwindows_wmn.js
|
JavaScript
|
asf20
| 1,701
|
.defaultTreeTable{
margin : 0px;
padding : 0px;
border : 0px;
}
.containerTableStyle {
overflow : auto;
position:relative;
top:0;
font-size : 12px;
}
.containerTableStyleRTL span {
direction: rtl;
unicode-bidi: bidi-override;
}
.containerTableStyleRTL { direction: rtl; overflow : auto; position:relative; top:0; font-size : 12px;}
.standartTreeRow{ font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 12px; -moz-user-select: none; }
.selectedTreeRow{ background-color : #F4D799; color:white; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 12px; -moz-user-select: none; }
.dragAndDropRow{ background-color : navy; color:white; }
.standartTreeRow_lor{ text-decoration:underline; background-color : #FFFFF0; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 12px; -moz-user-select: none; }
.selectedTreeRow_lor{ text-decoration:underline; background-color : navy; color:white; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; font-size : 12px; -moz-user-select: none; }
.standartTreeImage{ width:18px; height:18px; overflow:hidden; border:0; padding:0; margin:0;
font-size:1px; }
.hiddenRow { width:1px; overflow:hidden; }
.dragSpanDiv,.dragSpanDiv td{ font-size : 12px; background-color:white; }
.selectionBox{
background-color: #FFFFCC;
}
.selectionBar {
top:0;
background-color: Black;
position:absolute;
overflow:hidden;
height: 2px;
z-index : 11;
}
.intreeeditRow{
width:100%; font-size:8pt; height:16px; border:1px solid silver; padding:0; margin:0;
-moz-user-select: text;
}
.dhx_tree_textSign{
font-size:8pt;
font-family:monospace;
width:21px;
color:black;
padding:0px;
margin:0px;
cursor:pointer;
text-align: center;
}
.dhx_tree_opacity{
opacity:0;
-moz-opacity:0;
filter:alpha(opacity=0);
}
.dhx_bg_img_fix{
width:18px;
height:18px;
background-repeat: no-repeat;
background-position: center;
background-position-x: center;
background-position-y: center;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_css/dhtmlxtree.css
|
CSS
|
asf20
| 2,105
|
function dhtmlXTreeObject(htmlObject, width, height, rootId) {
if (_isIE) {
try {
document.execCommand("BackgroundImageCache", false, true);
}
catch (e) {
}
}
if (typeof (htmlObject) != "object") {
this.parentObject = document.getElementById(htmlObject);
} else {
this.parentObject = htmlObject;
}
this._itim_dg = true;
this.dlmtr = ",";
this.dropLower = false;
this.enableIEImageFix();
this.xmlstate = 0;
this.mytype = "tree";
this.smcheck = true;
this.width = width;
this.height = height;
this.rootId = rootId;
this.childCalc = null;
this.def_img_x = "18px";
this.def_img_y = "18px";
this.def_line_img_x = "18px";
this.def_line_img_y = "18px";
this._dragged = new Array();
this._selected = new Array();
this.style_pointer = "pointer";
if (navigator.appName == "Microsoft Internet Explorer") {
this.style_pointer = "hand";
}
this._aimgs = true;
this.htmlcA = " [";
this.htmlcB = "]";
this.lWin = window;
this.cMenu = 0;
this.mlitems = 0;
this.dadmode = 0;
this.slowParse = false;
this.autoScroll = true;
this.hfMode = 0;
this.nodeCut = new Array();
this.XMLsource = 0;
this.XMLloadingWarning = 0;
this._idpull = {};
this._pullSize = 0;
this.treeLinesOn = true;
this.tscheck = false;
this.timgen = true;
this.dpcpy = false;
this._ld_id = null;
this.imPath = "treeGfx/";
this.checkArray = new Array("iconUnCheckAll.gif", "iconCheckAll.gif", "iconCheckGray.gif", "iconUncheckDis.gif", "iconCheckDis.gif", "iconCheckDis.gif");
this.radioArray = new Array("radio_off.gif", "radio_on.gif", "radio_on.gif", "radio_off.gif", "radio_on.gif", "radio_on.gif");
this.lineArray = new Array("line2.gif", "line3.gif", "line4.gif", "blank.gif", "blank.gif", "line1.gif");
this.minusArray = new Array("minus2.gif", "minus3.gif", "minus4.gif", "minus.gif", "minus5.gif");
this.plusArray = new Array("plus2.gif", "plus3.gif", "plus4.gif", "plus.gif", "plus5.gif");
this.imageArray = new Array("leaf.gif", "folderOpen.gif", "folderClosed.gif");
this.cutImg = new Array(0, 0, 0);
this.cutImage = "but_cut.gif";
this.dragger = new dhtmlDragAndDropObject();
this.htmlNode = new dhtmlXTreeItemObject(this.rootId, "", 0, this);
this.htmlNode.htmlNode.childNodes[0].childNodes[0].style.display = "none";
this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[0].className = "hiddenRow";
this.allTree = this._createSelf();
this.allTree.appendChild(this.htmlNode.htmlNode);
if (_isFF) {
this.allTree.childNodes[0].width = "100%";
}
this.allTree.onselectstart = new Function("return false;");
//********************æ°å¢å ********************
if (_isMacOS) {
this.allTree.oncontextmenu = function (e) {
return self._doContClick(e || window.event);
};
}
this.allTree.onmousedown = function (e) {
return self._doContClick(e || window.event);
};
//********************************************
this.XMLLoader = new dtmlXMLLoaderObject(this._parseXMLTree, this, true, this.no_cashe);
if (_isIE) {
this.preventIECashing(true);
}
var self = this;
if (window.addEventListener) {
window.addEventListener("unload", function () {
try {
self.destructor();
}
catch (e) {
}
}, false);
}
if (window.attachEvent) {
window.attachEvent("onunload", function () {
try {
self.destructor();
}
catch (e) {
}
});
}
this.dhx_Event();
return this;
}
dhtmlXTreeObject.prototype.enableIEImageFix = function (mode) {
if (!mode) {
this._getImg = function (id) {
return document.createElement((id == this.rootId) ? "div" : "img");
};
this._setSrc = function (a, b) {
a.src = b;
};
this._getSrc = function (a) {
return a.src;
};
} else {
this._getImg = function () {
var z = document.createElement("DIV");
z.innerHTML = " ";
z.style.width = "18px";
z.style.height = "18px";
return z;
};
this._setSrc = function (a, b) {
a.style.backgroundImage = "url(" + b + ")";
};
this._getSrc = function (a) {
var z = a.style.backgroundImage;
return a.substr(4, a.length - 5);
};
}
};
dhtmlXTreeObject.prototype.destructor = function () {
for (var a in this._idpull) {
var z = this._idpull[a];
if (!z) {
continue;
}
z.parentObject = null;
z.treeNod = null;
z.childNodes = null;
z.span = null;
z.tr.nodem = null;
z.tr = null;
z.htmlNode.objBelong = null;
z.htmlNode = null;
this._idpull[a] = null;
}
this.allTree.innerHTML = "";
this.XMLLoader.destructor();
for (var a in this) {
this[a] = null;
}
};
function cObject() {
return this;
}
cObject.prototype = new Object;
cObject.prototype.clone = function () {
function _dummy() {
}
_dummy.prototype = this;
return new _dummy();
};
function dhtmlXTreeItemObject(itemId, itemText, parentObject, treeObject, actionHandler, mode) {
this.htmlNode = "";
this.acolor = "";
this.scolor = "";
this.tr = 0;
this.childsCount = 0;
this.tempDOMM = 0;
this.tempDOMU = 0;
this.dragSpan = 0;
this.dragMove = 0;
this.span = 0;
this.closeble = 1;
this.childNodes = new Array();
this.userData = new cObject();
this.checkstate = 0;
this.treeNod = treeObject;
this.label = itemText;
this.parentObject = parentObject;
this.actionHandler = actionHandler;
this.images = new Array(treeObject.imageArray[0], treeObject.imageArray[1], treeObject.imageArray[2]);
this.id = treeObject._globalIdStorageAdd(itemId, this);
if (this.treeNod.checkBoxOff) {
this.htmlNode = this.treeNod._createItem(1, this, mode);
} else {
this.htmlNode = this.treeNod._createItem(0, this, mode);
}
this.htmlNode.objBelong = this;
return this;
}
dhtmlXTreeObject.prototype._globalIdStorageAdd = function (itemId, itemObject) {
if (this._globalIdStorageFind(itemId, 1, 1)) {
itemId = itemId + "_" + (new Date()).valueOf();
return this._globalIdStorageAdd(itemId, itemObject);
}
this._idpull[itemId] = itemObject;
this._pullSize++;
return itemId;
};
dhtmlXTreeObject.prototype._globalIdStorageSub = function (itemId) {
if (this._idpull[itemId]) {
this._unselectItem(this._idpull[itemId]);
this._idpull[itemId] = null;
this._pullSize--;
}
if ((this._locker) && (this._locker[itemId])) {
this._locker[itemId] = false;
}
};
dhtmlXTreeObject.prototype._globalIdStorageFind = function (itemId, skipXMLSearch, skipParsing, isreparse) {
var z = this._idpull[itemId];
if (z) {
return z;
}
return null;
};
dhtmlXTreeObject.prototype._escape = function (str) {
switch (this.utfesc) {
case "none":
return str;
break;
case "utf8":
return encodeURI(str);
break;
default:
return escape(str);
break;
}
};
dhtmlXTreeObject.prototype._drawNewTr = function (htmlObject, node) {
var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td");
td1.appendChild(document.createTextNode(" "));
td2.colSpan = 3;
td2.appendChild(htmlObject);
tr.appendChild(td1);
tr.appendChild(td2);
return tr;
};
dhtmlXTreeObject.prototype.loadXMLString = function (xmlString, afterCall) {
var that = this;
if (!this.parsCount) {
this.callEvent("onXLS", [that, null]);
}
this.xmlstate = 1;
if (afterCall) {
this.XMLLoader.waitCall = afterCall;
}
this.XMLLoader.loadXMLString(xmlString);
};
dhtmlXTreeObject.prototype.loadXML = function (file, afterCall) {
var that = this;
if (!this.parsCount) {
this.callEvent("onXLS", [that, this._ld_id]);
}
this._ld_id = null;
this.xmlstate = 1;
this.XMLLoader = new dtmlXMLLoaderObject(this._parseXMLTree, this, true, this.no_cashe);
if (afterCall) {
this.XMLLoader.waitCall = afterCall;
}
this.XMLLoader.loadXML(file);
};
dhtmlXTreeObject.prototype._attachChildNode = function (parentObject, itemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs, beforeNode, afterNode) {
if (beforeNode) {
parentObject = beforeNode.parentObject;
}
if (((parentObject.XMLload == 0) && (this.XMLsource)) && (!this.XMLloadingWarning)) {
parentObject.XMLload = 1;
this._loadDynXML(parentObject.id);
}
var Count = parentObject.childsCount;
var Nodes = parentObject.childNodes;
if (afterNode) {
if (afterNode.tr.previousSibling.previousSibling) {
beforeNode = afterNode.tr.previousSibling.nodem;
} else {
optionStr = optionStr.replace("TOP", "") + ",TOP";
}
}
if (beforeNode) {
var ik, jk;
for (ik = 0; ik < Count; ik++) {
if (Nodes[ik] == beforeNode) {
for (jk = Count; jk != ik; jk--) {
Nodes[1 + jk] = Nodes[jk];
}
break;
}
}
ik++;
Count = ik;
}
if (optionStr) {
var tempStr = optionStr.split(",");
for (var i = 0; i < tempStr.length; i++) {
switch (tempStr[i]) {
case "TOP":
if (parentObject.childsCount > 0) {
beforeNode = new Object;
beforeNode.tr = parentObject.childNodes[0].tr.previousSibling;
}
parentObject._has_top = true;
for (ik = Count; ik > 0; ik--) {
Nodes[ik] = Nodes[ik - 1];
}
Count = 0;
break;
}
}
}
Nodes[Count] = new dhtmlXTreeItemObject(itemId, itemText, parentObject, this, null, 1);
itemId = Nodes[Count].id;
if (image1) {
Nodes[Count].images[0] = image1;
}
if (image2) {
Nodes[Count].images[1] = image2;
}
if (image3) {
Nodes[Count].images[2] = image3;
}
parentObject.childsCount++;
var tr = this._drawNewTr(Nodes[Count].htmlNode);
if ((this.XMLloadingWarning) || (this._hAdI)) {
Nodes[Count].htmlNode.parentNode.parentNode.style.display = "none";
}
if ((beforeNode) && (beforeNode.tr.nextSibling)) {
parentObject.htmlNode.childNodes[0].insertBefore(tr, beforeNode.tr.nextSibling);
} else {
if (this.parsingOn == parentObject.id) {
this.parsedArray[this.parsedArray.length] = tr;
} else {
parentObject.htmlNode.childNodes[0].appendChild(tr);
}
}
if ((beforeNode) && (!beforeNode.span)) {
beforeNode = null;
}
if (this.XMLsource) {
if ((childs) && (childs != 0)) {
Nodes[Count].XMLload = 0;
} else {
Nodes[Count].XMLload = 1;
}
}
Nodes[Count].tr = tr;
tr.nodem = Nodes[Count];
if (parentObject.itemId == 0) {
tr.childNodes[0].className = "hiddenRow";
}
if ((parentObject._r_logic) || (this._frbtr)) {
this._setSrc(Nodes[Count].htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0], this.imPath + this.radioArray[0]);
}
if (optionStr) {
var tempStr = optionStr.split(",");
for (var i = 0; i < tempStr.length; i++) {
switch (tempStr[i]) {
case "SELECT":
this.selectItem(itemId, false);
break;
case "CALL":
this.selectItem(itemId, true);
break;
case "CHILD":
Nodes[Count].XMLload = 0;
break;
case "CHECKED":
if (this.XMLloadingWarning) {
this.setCheckList += this.dlmtr + itemId;
} else {
this.setCheck(itemId, 1);
}
break;
case "HCHECKED":
this._setCheck(Nodes[Count], "unsure");
break;
case "OPEN":
Nodes[Count].openMe = 1;
break;
}
}
}
if (!this.XMLloadingWarning) {
if ((this._getOpenState(parentObject) < 0) && (!this._hAdI)) {
this.openItem(parentObject.id);
}
if (beforeNode) {
this._correctPlus(beforeNode);
this._correctLine(beforeNode);
}
this._correctPlus(parentObject);
this._correctLine(parentObject);
this._correctPlus(Nodes[Count]);
if (parentObject.childsCount >= 2) {
this._correctPlus(Nodes[parentObject.childsCount - 2]);
this._correctLine(Nodes[parentObject.childsCount - 2]);
}
if (parentObject.childsCount != 2) {
this._correctPlus(Nodes[0]);
}
if (this.tscheck) {
this._correctCheckStates(parentObject);
}
if (this._onradh) {
if (this.xmlstate == 1) {
var old = this.onXLE;
this.onXLE = function (id) {
this._onradh(itemId);
if (old) {
old(id);
}
};
} else {
this._onradh(itemId);
}
}
}
return Nodes[Count];
};
dhtmlXTreeObject.prototype.insertNewItem = function (parentId, itemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs) {
var parentObject = this._globalIdStorageFind(parentId);
if (!parentObject) {
return (-1);
}
var nodez = this._attachChildNode(parentObject, itemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs);
return nodez;
};
dhtmlXTreeObject.prototype.insertNewChild = function (parentId, itemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs) {
return this.insertNewItem(parentId, itemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs);
};
dhtmlXTreeObject.prototype._parseXMLTree = function (dhtmlObject, node, parentId, level, xml_obj, start) {
if (!xml_obj) {
xml_obj = dhtmlObject.XMLLoader;
}
dhtmlObject.skipLock = true;
if (!dhtmlObject.parsCount) {
dhtmlObject.parsCount = 1;
} else {
dhtmlObject.parsCount++;
}
dhtmlObject.XMLloadingWarning = 1;
var nodeAskingCall = "";
if (!node) {
node = xml_obj.getXMLTopNode("tree");
parentId = node.getAttribute("id");
if (node.getAttribute("radio")) {
dhtmlObject.htmlNode._r_logic = true;
}
dhtmlObject.parsingOn = parentId;
dhtmlObject.parsedArray = new Array();
dhtmlObject.setCheckList = "";
}
var temp = dhtmlObject._globalIdStorageFind(parentId);
if ((temp.childsCount) && (!start) && (!dhtmlObject._edsbps) && (!temp._has_top)) {
var preNode = temp.childNodes[temp.childsCount - 1];
} else {
var preNode = 0;
}
if (node.getAttribute("order")) {
dhtmlObject._reorderXMLBranch(node);
}
var npl = 0;
for (var i = start || 0; i < node.childNodes.length; i++) {
if ((node.childNodes[i].nodeType == 1) && (node.childNodes[i].tagName == "item")) {
temp.XMLload = 1;
if ((dhtmlObject._epgps) && (dhtmlObject._epgpsC == npl)) {
this._setNextPageSign(temp, npl + 1 * (start || 0), level, node);
break;
}
var nodx = node.childNodes[i];
var name = nodx.getAttribute("text");
var cId = nodx.getAttribute("id");
if ((typeof (dhtmlObject.waitUpdateXML) == "object") && (!dhtmlObject.waitUpdateXML[cId])) {
dhtmlObject._parseXMLTree(dhtmlObject, node.childNodes[i], cId, 1, xml_obj);
continue;
}
var im0 = nodx.getAttribute("im0");
var im1 = nodx.getAttribute("im1");
var im2 = nodx.getAttribute("im2");
var aColor = nodx.getAttribute("aCol");
var sColor = nodx.getAttribute("sCol");
var chd = nodx.getAttribute("child");
var imw = nodx.getAttribute("imwidth");
var imh = nodx.getAttribute("imheight");
var atop = nodx.getAttribute("top");
var aradio = nodx.getAttribute("radio");
var topoffset = nodx.getAttribute("topoffset");
var aopen = nodx.getAttribute("open");
var aselect = nodx.getAttribute("select");
var acall = nodx.getAttribute("call");
var achecked = nodx.getAttribute("checked");
var closeable = nodx.getAttribute("closeable");
var tooltip = nodx.getAttribute("tooltip");
var nocheckbox = nodx.getAttribute("nocheckbox");
var disheckbox = nodx.getAttribute("disabled");
var style = nodx.getAttribute("style");
var locked = nodx.getAttribute("locked");
var zST = "";
if (aselect) {
zST += ",SELECT";
}
if (atop) {
zST += ",TOP";
}
if (acall) {
nodeAskingCall = cId;
}
if (achecked == -1) {
zST += ",HCHECKED";
} else {
if (achecked) {
zST += ",CHECKED";
}
}
if (aopen) {
zST += ",OPEN";
}
if (dhtmlObject.waitUpdateXML) {
if (dhtmlObject._globalIdStorageFind(cId)) {
var newNode = dhtmlObject.updateItem(cId, name, im0, im1, im2, achecked);
} else {
if (npl == 0) {
zST += ",TOP";
} else {
preNode = temp.childNodes[npl];
}
var newNode = dhtmlObject._attachChildNode(temp, cId, name, 0, im0, im1, im2, zST, chd, 0, preNode);
preNode = null;
}
} else {
var newNode = dhtmlObject._attachChildNode(temp, cId, name, 0, im0, im1, im2, zST, chd, 0, preNode);
}
if (tooltip) {
newNode.span.parentNode.parentNode.title = tooltip;
}
if (style) {
if (newNode.span.style.cssText) {
newNode.span.style.cssText += (";" + style);
} else {
newNode.span.setAttribute("style", newNode.span.getAttribute("style") + ";" + style);
}
}
if (aradio) {
newNode._r_logic = true;
}
if (nocheckbox) {
newNode.span.parentNode.previousSibling.previousSibling.childNodes[0].style.display = "none";
newNode.nocheckbox = true;
}
if (disheckbox) {
if (achecked != null) {
dhtmlObject._setCheck(newNode, convertStringToBoolean(achecked));
}
dhtmlObject.disableCheckbox(newNode, 1);
}
newNode._acc = chd || 0;
if (dhtmlObject.parserExtension) {
dhtmlObject.parserExtension._parseExtension(node.childNodes[i], dhtmlObject.parserExtension, cId, parentId);
}
dhtmlObject.setItemColor(newNode, aColor, sColor);
if (locked == "1") {
dhtmlObject._lockItem(newNode, true, true);
}
if ((imw) || (imh)) {
dhtmlObject.setIconSize(imw, imh, newNode);
}
if ((closeable == "0") || (closeable == "1")) {
dhtmlObject.setItemCloseable(newNode, closeable);
}
var zcall = "";
if (topoffset) {
dhtmlObject.setItemTopOffset(newNode, topoffset);
}
if ((!dhtmlObject.slowParse) && (!dhtmlObject.waitUpdateXML)) {
zcall = dhtmlObject._parseXMLTree(dhtmlObject, node.childNodes[i], cId, 1, xml_obj);
}
if (zcall != "") {
nodeAskingCall = zcall;
}
npl++;
} else {
dhtmlObject.checkUserData(node.childNodes[i], parentId);
}
}
if (!level) {
if (dhtmlObject.waitUpdateXML) {
dhtmlObject.waitUpdateXML = false;
for (var i = temp.childsCount - 1; i >= 0; i--) {
if (temp.childNodes[i]._dmark) {
dhtmlObject.deleteItem(temp.childNodes[i].id);
}
}
}
var parsedNodeTop = dhtmlObject._globalIdStorageFind(dhtmlObject.parsingOn);
for (var i = 0; i < dhtmlObject.parsedArray.length; i++) {
parsedNodeTop.htmlNode.childNodes[0].appendChild(dhtmlObject.parsedArray[i]);
}
dhtmlObject.lastLoadedXMLId = parentId;
dhtmlObject.XMLloadingWarning = 0;
var chArr = dhtmlObject.setCheckList.split(dhtmlObject.dlmtr);
for (var n = 0; n < chArr.length; n++) {
if (chArr[n]) {
dhtmlObject.setCheck(chArr[n], 1);
}
}
if ((dhtmlObject.XMLsource) && (dhtmlObject.tscheck) && (dhtmlObject.smcheck) && (temp.id != dhtmlObject.rootId)) {
if (temp.checkstate === 0) {
dhtmlObject._setSubChecked(0, temp);
} else {
if (temp.checkstate === 1) {
dhtmlObject._setSubChecked(1, temp);
}
}
}
if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("5.5") != -1) {
window.setTimeout(function () {
dhtmlObject._redrawFrom(dhtmlObject, null, start);
}, 10);
} else {
dhtmlObject._redrawFrom(dhtmlObject, null, start);
}
if (nodeAskingCall != "") {
dhtmlObject.selectItem(nodeAskingCall, true);
}
if (dhtmlObject._branchUpdate) {
dhtmlObject._branchUpdateNext(node);
}
}
if (dhtmlObject.parsCount == 1) {
dhtmlObject.parsingOn = null;
if ((!dhtmlObject._edsbps) || (!dhtmlObject._edsbpsA.length)) {
window.setTimeout(function () {
if (dhtmlObject.onXLE) {
dhtmlObject.onXLE(dhtmlObject, parentId);
}
dhtmlObject.callEvent("onXLE", [dhtmlObject, parentId]);
}, 1);
dhtmlObject.xmlstate = 0;
}
dhtmlObject.skipLock = false;
}
dhtmlObject.parsCount--;
if ((dhtmlObject._epgps) && (start)) {
this._setPrevPageSign(temp, (start || 0), level, node);
}
return nodeAskingCall;
};
dhtmlXTreeObject.prototype._branchUpdateNext = function (node) {
var items = this.XMLLoader.doXPath("./item", node);
for (var i = 0; i < items.length; i++) {
this._branchUpdate++;
this.smartRefreshItem(items[i].getAttribute("id"), items[i]);
}
this._branchUpdate--;
};
dhtmlXTreeObject.prototype.checkUserData = function (node, parentId) {
if ((node.nodeType == 1) && (node.tagName == "userdata")) {
var name = node.getAttribute("name");
if ((name) && (node.childNodes[0])) {
this.setUserData(parentId, name, node.childNodes[0].data);
}
}
};
dhtmlXTreeObject.prototype._redrawFrom = function (dhtmlObject, itemObject, start, visMode) {
if (!itemObject) {
var tempx = dhtmlObject._globalIdStorageFind(dhtmlObject.lastLoadedXMLId);
dhtmlObject.lastLoadedXMLId = -1;
if (!tempx) {
return 0;
}
} else {
tempx = itemObject;
}
var acc = 0;
for (var i = (start ? start - 1 : 0); i < tempx.childsCount; i++) {
if ((!this._branchUpdate) || (this._getOpenState(tempx) == 1)) {
if ((!itemObject) || (visMode == 1)) {
tempx.childNodes[i].htmlNode.parentNode.parentNode.style.display = "";
}
}
if (tempx.childNodes[i].openMe == 1) {
this._openItem(tempx.childNodes[i]);
tempx.childNodes[i].openMe = 0;
}
dhtmlObject._redrawFrom(dhtmlObject, tempx.childNodes[i]);
}
if ((!tempx.unParsed) && ((tempx.XMLload) || (!this.XMLsource))) {
tempx._acc = acc;
}
dhtmlObject._correctLine(tempx);
dhtmlObject._correctPlus(tempx);
};
dhtmlXTreeObject.prototype._createSelf = function () {
var div = document.createElement("div");
div.className = "containerTableStyle";
div.style.width = this.width;
div.style.height = this.height;
this.parentObject.appendChild(div);
return div;
};
dhtmlXTreeObject.prototype._xcloseAll = function (itemObject) {
if (itemObject.unParsed) {
return;
}
if (this.rootId != itemObject.id) {
var Nodes = itemObject.htmlNode.childNodes[0].childNodes;
var Count = Nodes.length;
for (var i = 1; i < Count; i++) {
Nodes[i].style.display = "none";
}
this._correctPlus(itemObject);
}
for (var i = 0; i < itemObject.childsCount; i++) {
if (itemObject.childNodes[i].childsCount) {
this._xcloseAll(itemObject.childNodes[i]);
}
}
};
dhtmlXTreeObject.prototype._xopenAll = function (itemObject) {
this._HideShow(itemObject, 2);
for (var i = 0; i < itemObject.childsCount; i++) {
this._xopenAll(itemObject.childNodes[i]);
}
};
dhtmlXTreeObject.prototype._correctPlus = function (itemObject) {
var imsrc = itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[0].lastChild;
var imsrc2 = itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[2].childNodes[0];
var workArray = this.lineArray;
if ((this.XMLsource) && (!itemObject.XMLload)) {
var workArray = this.plusArray;
this._setSrc(imsrc2, this.imPath + itemObject.images[2]);
if (this._txtimg) {
return (imsrc.innerHTML = "[+]");
}
} else {
if ((itemObject.childsCount) || (itemObject.unParsed)) {
if ((itemObject.htmlNode.childNodes[0].childNodes[1]) && (itemObject.htmlNode.childNodes[0].childNodes[1].style.display != "none")) {
if (!itemObject.wsign) {
var workArray = this.minusArray;
}
this._setSrc(imsrc2, this.imPath + itemObject.images[1]);
if (this._txtimg) {
return (imsrc.innerHTML = "[-]");
}
} else {
if (!itemObject.wsign) {
var workArray = this.plusArray;
}
this._setSrc(imsrc2, this.imPath + itemObject.images[2]);
if (this._txtimg) {
return (imsrc.innerHTML = "[+]");
}
}
} else {
this._setSrc(imsrc2, this.imPath + itemObject.images[0]);
}
}
var tempNum = 2;
if (!itemObject.treeNod.treeLinesOn) {
this._setSrc(imsrc, this.imPath + workArray[3]);
} else {
if (itemObject.parentObject) {
tempNum = this._getCountStatus(itemObject.id, itemObject.parentObject);
}
this._setSrc(imsrc, this.imPath + workArray[tempNum]);
}
};
dhtmlXTreeObject.prototype._correctLine = function (itemObject) {
var sNode = itemObject.parentObject;
if (sNode) {
if ((this._getLineStatus(itemObject.id, sNode) == 0) || (!this.treeLinesOn)) {
for (var i = 1; i <= itemObject.childsCount; i++) {
itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundImage = "";
itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundRepeat = "";
}
} else {
for (var i = 1; i <= itemObject.childsCount; i++) {
itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundImage = "url(" + this.imPath + this.lineArray[5] + ")";
itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundRepeat = "repeat-y";
}
}
}
};
dhtmlXTreeObject.prototype._getCountStatus = function (itemId, itemObject) {
if (itemObject.childsCount <= 1) {
if (itemObject.id == this.rootId) {
return 4;
} else {
return 0;
}
}
if (itemObject.childNodes[0].id == itemId) {
if (!itemObject.id) {
return 2;
} else {
return 1;
}
}
if (itemObject.childNodes[itemObject.childsCount - 1].id == itemId) {
return 0;
}
return 1;
};
dhtmlXTreeObject.prototype._getLineStatus = function (itemId, itemObject) {
if (itemObject.childNodes[itemObject.childsCount - 1].id == itemId) {
return 0;
}
return 1;
};
dhtmlXTreeObject.prototype._HideShow = function (itemObject, mode) {
if ((this.XMLsource) && (!itemObject.XMLload)) {
if (mode == 1) {
return;
}
itemObject.XMLload = 1;
this._loadDynXML(itemObject.id);
return;
}
var Nodes = itemObject.htmlNode.childNodes[0].childNodes;
var Count = Nodes.length;
if (Count > 1) {
if (((Nodes[1].style.display != "none") || (mode == 1)) && (mode != 2)) {
this.allTree.childNodes[0].border = "1";
this.allTree.childNodes[0].border = "0";
nodestyle = "none";
} else {
nodestyle = "";
}
for (var i = 1; i < Count; i++) {
Nodes[i].style.display = nodestyle;
}
}
this._correctPlus(itemObject);
};
dhtmlXTreeObject.prototype._getOpenState = function (itemObject) {
var z = itemObject.htmlNode.childNodes[0].childNodes;
if (z.length <= 1) {
return 0;
}
if (z[1].style.display != "none") {
return 1;
} else {
return -1;
}
};
dhtmlXTreeObject.prototype.onRowClick2 = function () {
if (!this.parentObject.treeNod.callEvent("onDblClick", [this.parentObject.id, this.parentObject.treeNod])) {
return 0;
}
if ((this.parentObject.closeble) && (this.parentObject.closeble != "0")) {
this.parentObject.treeNod._HideShow(this.parentObject);
} else {
this.parentObject.treeNod._HideShow(this.parentObject, 2);
}
};
dhtmlXTreeObject.prototype.onRowClick = function () {
var that = this.parentObject.treeNod;
if (!that.callEvent("onOpenStart", [this.parentObject.id, that._getOpenState(this.parentObject)])) {
return 0;
}
if ((this.parentObject.closeble) && (this.parentObject.closeble != "0")) {
that._HideShow(this.parentObject);
} else {
that._HideShow(this.parentObject, 2);
}
if (that.checkEvent("onOpenEnd")) {
if (!that.xmlstate) {
that.callEvent("onOpenEnd", [this.parentObject.id, that._getOpenState(this.parentObject)]);
} else {
that._oie_onXLE = that.onXLE;
that.onXLE = that._epnFHe;
}
}
};
dhtmlXTreeObject.prototype._epnFHe = function (that, id, flag) {
this.callEvent("onOpenEnd", [id, that.getOpenState(id)]);
that.onXLE = that._oie_onXLE;
if (!flag) {
if (that.onXLE) {
that.onXLE(that, id);
}
}
};
dhtmlXTreeObject.prototype.onRowClickDown = function (e) {
e = e || window.event;
var that = this.parentObject.treeNod;
that._selectItem(this.parentObject, e);
};
dhtmlXTreeObject.prototype.getSelectedItemId = function () {
var str = new Array();
for (var i = 0; i < this._selected.length; i++) {
str[i] = this._selected[i].id;
}
return (str.join(this.dlmtr));
};
dhtmlXTreeObject.prototype._selectItem = function (node, e) {
if (this._onSSCF) {
this._onSSCFold = this.getSelectedItemId();
}
this._unselectItems();
this._markItem(node);
if (this._onSSCF) {
var z = this.getSelectedItemId();
if (z != this._onSSCFold) {
this.callEvent("onSelect", [z]);
}
}
};
dhtmlXTreeObject.prototype._markItem = function (node) {
if (node.scolor) {
node.span.style.color = node.scolor;
}
node.span.className = "selectedTreeRow";
node.i_sel = true;
this._selected[this._selected.length] = node;
};
dhtmlXTreeObject.prototype.getIndexById = function (itemId) {
var z = this._globalIdStorageFind(itemId);
if (!z) {
return null;
}
return this._getIndex(z);
};
dhtmlXTreeObject.prototype._getIndex = function (w) {
var z = w.parentObject;
for (var i = 0; i < z.childsCount; i++) {
if (z.childNodes[i] == w) {
return i;
}
}
};
dhtmlXTreeObject.prototype._unselectItem = function (node) {
if ((node) && (node.i_sel)) {
node.span.className = "standartTreeRow";
if (node.acolor) {
node.span.style.color = node.acolor;
}
node.i_sel = false;
for (var i = 0; i < this._selected.length; i++) {
if (!this._selected[i].i_sel) {
this._selected.splice(i, 1);
break;
}
}
}
};
dhtmlXTreeObject.prototype._unselectItems = function () {
for (var i = 0; i < this._selected.length; i++) {
var node = this._selected[i];
node.span.className = "standartTreeRow";
if (node.acolor) {
node.span.style.color = node.acolor;
}
node.i_sel = false;
}
this._selected = new Array();
};
dhtmlXTreeObject.prototype.onRowSelect = function (e, htmlObject, mode) {
e = e || window.event;
var obj = this.parentObject;
if (htmlObject) {
obj = htmlObject.parentObject;
}
var that = obj.treeNod;
var lastId = that.getSelectedItemId();
if ((!e) || (!e.skipUnSel)) {
that._selectItem(obj, e);
}
if (!mode) {
if ((e) && (e.button == 2)) {
that.callEvent("onRightClick", [obj.id, e]);
}
if (obj.actionHandler) {
obj.actionHandler(obj.id, lastId);
} else {
that.callEvent("onClick", [obj.id, lastId]);
}
}
};
dhtmlXTreeObject.prototype._correctCheckStates = function (dhtmlObject) {
if (!this.tscheck) {
return;
}
if (dhtmlObject.id == this.rootId) {
return;
}
var act = dhtmlObject.childNodes;
var flag1 = 0;
var flag2 = 0;
if (dhtmlObject.childsCount == 0) {
return;
}
for (var i = 0; i < dhtmlObject.childsCount; i++) {
if (act[i].dscheck) {
continue;
}
if (act[i].checkstate == 0) {
flag1 = 1;
} else {
if (act[i].checkstate == 1) {
flag2 = 1;
} else {
flag1 = 1;
flag2 = 1;
break;
}
}
}
if ((flag1) && (flag2)) {
this._setCheck(dhtmlObject, "unsure");
} else {
if (flag1) {
this._setCheck(dhtmlObject, false);
} else {
this._setCheck(dhtmlObject, true);
}
}
this._correctCheckStates(dhtmlObject.parentObject);
};
dhtmlXTreeObject.prototype.onCheckBoxClick = function (e) {
if (this.parentObject.dscheck) {
return true;
}
if (this.treeNod.tscheck) {
if (this.parentObject.checkstate == 1) {
this.treeNod._setSubChecked(false, this.parentObject);
} else {
this.treeNod._setSubChecked(true, this.parentObject);
}
} else {
if (this.parentObject.checkstate == 1) {
this.treeNod._setCheck(this.parentObject, false);
} else {
this.treeNod._setCheck(this.parentObject, true);
}
}
this.treeNod._correctCheckStates(this.parentObject.parentObject);
return this.treeNod.callEvent("onCheck", [this.parentObject.id, this.parentObject.checkstate]);
};
dhtmlXTreeObject.prototype._createItem = function (acheck, itemObject, mode) {
var table = document.createElement("table");
table.cellSpacing = 0;
table.cellPadding = 0;
table.border = 0;
if (this.hfMode) {
table.style.tableLayout = "fixed";
}
table.style.margin = 0;
table.style.padding = 0;
var tbody = document.createElement("tbody");
var tr = document.createElement("tr");
var td1 = document.createElement("td");
td1.className = "standartTreeImage";
if (this._txtimg) {
var img0 = document.createElement("div");
td1.appendChild(img0);
img0.className = "dhx_tree_textSign";
} else {
var img0 = this._getImg(itemObject.id);
img0.border = "0";
if (img0.tagName == "IMG") {
img0.align = "absmiddle";
}
td1.appendChild(img0);
img0.style.padding = 0;
img0.style.margin = 0;
img0.style.width = this.def_line_img_x;
img0.style.height = this.def_line_img_y;
}
var td11 = document.createElement("td");
var inp = this._getImg(this.cBROf ? this.rootId : itemObject.id);
inp.checked = 0;
this._setSrc(inp, this.imPath + this.checkArray[0]);
inp.style.width = "16px";
inp.style.height = "16px";
if (!acheck) {
(((_isOpera) || (_isKHTML)) ? td11 : inp).style.display = "none";
}
td11.appendChild(inp);
if ((!this.cBROf) && (inp.tagName == "IMG")) {
inp.align = "absmiddle";
}
inp.onclick = this.onCheckBoxClick;
inp.treeNod = this;
inp.parentObject = itemObject;
td11.width = "20px";
var td12 = document.createElement("td");
td12.className = "standartTreeImage";
var img = this._getImg(itemObject.id);
img.onmousedown = this._preventNsDrag;
img.ondragstart = this._preventNsDrag;
img.border = "0";
if (this._aimgs) {
img.parentObject = itemObject;
if (img.tagName == "IMG") {
img.align = "absmiddle";
}
img.onclick = this.onRowSelect;
}
if (!mode) {
this._setSrc(img, this.imPath + this.imageArray[0]);
}
td12.appendChild(img);
img.style.padding = 0;
img.style.margin = 0;
if (this.timgen) {
img.style.width = this.def_img_x;
img.style.height = this.def_img_y;
} else {
img.style.width = "0px";
img.style.height = "0px";
if (_isOpera) {
td12.style.display = "none";
}
}
var td2 = document.createElement("td");
td2.className = "standartTreeRow";
itemObject.span = document.createElement("span");
itemObject.span.className = "standartTreeRow";
if (this.mlitems) {
itemObject.span.style.width = this.mlitems;
itemObject.span.style.display = "block";
} else {
td2.noWrap = true;
}
if (!_isKHTML) {
td2.style.width = "100%";
}
itemObject.span.innerHTML = itemObject.label;
td2.appendChild(itemObject.span);
td2.parentObject = itemObject;
td1.parentObject = itemObject;
td2.onclick = this.onRowSelect;
td1.onclick = this.onRowClick;
td2.ondblclick = this.onRowClick2;
if (this.ettip) {
tr.title = itemObject.label;
}
if (this.dragAndDropOff) {
if (this._aimgs) {
this.dragger.addDraggableItem(td12, this);
td12.parentObject = itemObject;
}
this.dragger.addDraggableItem(td2, this);
}
itemObject.span.style.paddingLeft = "5px";
itemObject.span.style.paddingRight = "5px";
td2.style.verticalAlign = "";
td2.style.fontSize = "10pt";
td2.style.cursor = this.style_pointer;
tr.appendChild(td1);
tr.appendChild(td11);
tr.appendChild(td12);
tr.appendChild(td2);
tbody.appendChild(tr);
table.appendChild(tbody);
if (this.ehlt) {
tr.onmousemove = this._itemMouseIn;
tr[(_isIE) ? "onmouseleave" : "onmouseout"] = this._itemMouseOut;
}
if (this.checkEvent && this.checkEvent("onRightClick")) {
tr.oncontextmenu = Function("e", "this.childNodes[0].parentObject.treeNod.callEvent('onRightClick',[this.childNodes[0].parentObject.id,(e||window.event)]);return false;");
}
return table;
};
dhtmlXTreeObject.prototype.setImagePath = function (newPath) {
this.imPath = newPath;
};
dhtmlXTreeObject.prototype.setOnRightClickHandler = function (func) {
this.attachEvent("onRightClick", func);
};
dhtmlXTreeObject.prototype.setOnClickHandler = function (func) {
this.attachEvent("onClick", func);
};
dhtmlXTreeObject.prototype.setOnSelectStateChange = function (func) {
this.attachEvent("onSelect", func);
this._onSSCF = true;
};
dhtmlXTreeObject.prototype.setXMLAutoLoading = function (filePath) {
this.XMLsource = filePath;
};
dhtmlXTreeObject.prototype.setOnCheckHandler = function (func) {
this.attachEvent("onCheck", func);
};
dhtmlXTreeObject.prototype.setOnOpenHandler = function (func) {
this.attachEvent("onOpenStart", func);
};
dhtmlXTreeObject.prototype.setOnOpenStartHandler = function (func) {
this.attachEvent("onOpenStart", func);
};
dhtmlXTreeObject.prototype.setOnOpenEndHandler = function (func) {
this.attachEvent("onOpenEnd", func);
};
dhtmlXTreeObject.prototype.setOnDblClickHandler = function (func) {
this.attachEvent("onDblClick", func);
};
dhtmlXTreeObject.prototype.openAllItems = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
this._xopenAll(temp);
};
dhtmlXTreeObject.prototype.getOpenState = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return "";
}
return this._getOpenState(temp);
};
dhtmlXTreeObject.prototype.closeAllItems = function (itemId) {
if (itemId === window.undefined) {
itemId = this.rootId;
}
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
this._xcloseAll(temp);
this.allTree.childNodes[0].border = "1";
this.allTree.childNodes[0].border = "0";
};
dhtmlXTreeObject.prototype.setUserData = function (itemId, name, value) {
var sNode = this._globalIdStorageFind(itemId, 0, true);
if (!sNode) {
return;
}
if (name == "hint") {
sNode.htmlNode.childNodes[0].childNodes[0].title = value;
}
if (sNode.userData["t_" + name] === undefined) {
if (!sNode._userdatalist) {
sNode._userdatalist = name;
} else {
sNode._userdatalist += "," + name;
}
}
sNode.userData["t_" + name] = value;
};
dhtmlXTreeObject.prototype.getUserData = function (itemId, name) {
var sNode = this._globalIdStorageFind(itemId, 0, true);
if (!sNode) {
return;
}
return sNode.userData["t_" + name];
};
dhtmlXTreeObject.prototype.getItemColor = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
var res = new Object();
if (temp.acolor) {
res.acolor = temp.acolor;
}
if (temp.acolor) {
res.scolor = temp.scolor;
}
return res;
};
dhtmlXTreeObject.prototype.setItemColor = function (itemId, defaultColor, selectedColor) {
if ((itemId) && (itemId.span)) {
var temp = itemId;
} else {
var temp = this._globalIdStorageFind(itemId);
}
if (!temp) {
return 0;
} else {
if (temp.i_sel) {
if (selectedColor) {
temp.span.style.color = selectedColor;
}
} else {
if (defaultColor) {
temp.span.style.color = defaultColor;
}
}
if (selectedColor) {
temp.scolor = selectedColor;
}
if (defaultColor) {
temp.acolor = defaultColor;
}
}
};
dhtmlXTreeObject.prototype.getItemText = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
return (temp.htmlNode.childNodes[0].childNodes[0].childNodes[3].childNodes[0].innerHTML);
};
dhtmlXTreeObject.prototype.getParentId = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if ((!temp) || (!temp.parentObject)) {
return "";
}
return temp.parentObject.id;
};
dhtmlXTreeObject.prototype.changeItemId = function (itemId, newItemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
temp.id = newItemId;
temp.span.contextMenuId = newItemId;
this._idpull[newItemId] = this._idpull[itemId];
this._idpull[itemId] = null;
};
dhtmlXTreeObject.prototype.doCut = function () {
if (this.nodeCut) {
this.clearCut();
}
this.nodeCut = (new Array()).concat(this._selected);
for (var i = 0; i < this.nodeCut.length; i++) {
var tempa = this.nodeCut[i];
tempa._cimgs = new Array();
tempa._cimgs[0] = tempa.images[0];
tempa._cimgs[1] = tempa.images[1];
tempa._cimgs[2] = tempa.images[2];
tempa.images[0] = tempa.images[1] = tempa.images[2] = this.cutImage;
this._correctPlus(tempa);
}
};
dhtmlXTreeObject.prototype.doPaste = function (itemId) {
var tobj = this._globalIdStorageFind(itemId);
if (!tobj) {
return 0;
}
for (var i = 0; i < this.nodeCut.length; i++) {
if (this._checkPNodes(tobj, this.nodeCut[i])) {
continue;
}
this._moveNode(this.nodeCut[i], tobj);
}
this.clearCut();
};
dhtmlXTreeObject.prototype.clearCut = function () {
for (var i = 0; i < this.nodeCut.length; i++) {
var tempa = this.nodeCut[i];
tempa.images[0] = tempa._cimgs[0];
tempa.images[1] = tempa._cimgs[1];
tempa.images[2] = tempa._cimgs[2];
this._correctPlus(tempa);
}
this.nodeCut = new Array();
};
dhtmlXTreeObject.prototype._moveNode = function (itemObject, targetObject) {
return this._moveNodeTo(itemObject, targetObject);
};
dhtmlXTreeObject.prototype._fixNodesCollection = function (target, zParent) {
var flag = 0;
var icount = 0;
var Nodes = target.childNodes;
var Count = target.childsCount - 1;
if (zParent == Nodes[Count]) {
return;
}
for (var i = 0; i < Count; i++) {
if (Nodes[i] == Nodes[Count]) {
Nodes[i] = Nodes[i + 1];
Nodes[i + 1] = Nodes[Count];
}
}
for (var i = 0; i < Count + 1; i++) {
if (flag) {
var temp = Nodes[i];
Nodes[i] = flag;
flag = temp;
} else {
if (Nodes[i] == zParent) {
flag = Nodes[i];
Nodes[i] = Nodes[Count];
}
}
}
};
dhtmlXTreeObject.prototype._recreateBranch = function (itemObject, targetObject, beforeNode, level) {
var i;
var st = "";
if (beforeNode) {
for (i = 0; i < targetObject.childsCount; i++) {
if (targetObject.childNodes[i] == beforeNode) {
break;
}
}
if (i != 0) {
beforeNode = targetObject.childNodes[i - 1];
} else {
st = "TOP";
beforeNode = "";
}
}
var newNode = this._attachChildNode(targetObject, itemObject.id, itemObject.label, 0, itemObject.images[0], itemObject.images[1], itemObject.images[2], st, 0, beforeNode);
newNode._userdatalist = itemObject._userdatalist;
newNode.userData = itemObject.userData.clone();
newNode.XMLload = itemObject.XMLload;
for (var i = 0; i < itemObject.childsCount; i++) {
this._recreateBranch(itemObject.childNodes[i], newNode, 0, 1);
}
return newNode;
};
dhtmlXTreeObject.prototype._moveNodeTo = function (itemObject, targetObject, beforeNode) {
if (itemObject.treeNod._nonTrivialNode) {
return itemObject.treeNod._nonTrivialNode(this, targetObject, beforeNode, itemObject);
}
if (targetObject.mytype) {
var framesMove = (itemObject.treeNod.lWin != targetObject.lWin);
} else {
var framesMove = (itemObject.treeNod.lWin != targetObject.treeNod.lWin);
}
if (!this.callEvent("onDrag", [itemObject.id, targetObject.id, (beforeNode ? beforeNode.id : null), itemObject.treeNod, targetObject.treeNod])) {
return false;
}
if ((targetObject.XMLload == 0) && (this.XMLsource)) {
targetObject.XMLload = 1;
this._loadDynXML(targetObject.id);
}
this.openItem(targetObject.id);
var oldTree = itemObject.treeNod;
var c = itemObject.parentObject.childsCount;
var z = itemObject.parentObject;
if ((framesMove) || (oldTree.dpcpy)) {
var _otiid = itemObject.id;
itemObject = this._recreateBranch(itemObject, targetObject, beforeNode);
if (!oldTree.dpcpy) {
oldTree.deleteItem(_otiid);
}
} else {
var Count = targetObject.childsCount;
var Nodes = targetObject.childNodes;
Nodes[Count] = itemObject;
itemObject.treeNod = targetObject.treeNod;
targetObject.childsCount++;
var tr = this._drawNewTr(Nodes[Count].htmlNode);
if (!beforeNode) {
targetObject.htmlNode.childNodes[0].appendChild(tr);
if (this.dadmode == 1) {
this._fixNodesCollection(targetObject, beforeNode);
}
} else {
targetObject.htmlNode.childNodes[0].insertBefore(tr, beforeNode.tr);
this._fixNodesCollection(targetObject, beforeNode);
Nodes = targetObject.childNodes;
}
}
if ((!oldTree.dpcpy) && (!framesMove)) {
var zir = itemObject.tr;
if ((document.all) && (navigator.appVersion.search(/MSIE\ 5\.0/gi) != -1)) {
window.setTimeout(function () {
zir.parentNode.removeChild(zir);
}, 250);
} else {
itemObject.parentObject.htmlNode.childNodes[0].removeChild(itemObject.tr);
}
if ((!beforeNode) || (targetObject != itemObject.parentObject)) {
for (var i = 0; i < z.childsCount; i++) {
if (z.childNodes[i].id == itemObject.id) {
z.childNodes[i] = 0;
break;
}
}
} else {
z.childNodes[z.childsCount - 1] = 0;
}
oldTree._compressChildList(z.childsCount, z.childNodes);
z.childsCount--;
}
if ((!framesMove) && (!oldTree.dpcpy)) {
itemObject.tr = tr;
tr.nodem = itemObject;
itemObject.parentObject = targetObject;
if (oldTree != targetObject.treeNod) {
if (itemObject.treeNod._registerBranch(itemObject, oldTree)) {
return;
}
this._clearStyles(itemObject);
this._redrawFrom(this, itemObject.parentObject);
}
this._correctPlus(targetObject);
this._correctLine(targetObject);
this._correctLine(itemObject);
this._correctPlus(itemObject);
if (beforeNode) {
this._correctPlus(beforeNode);
} else {
if (targetObject.childsCount >= 2) {
this._correctPlus(Nodes[targetObject.childsCount - 2]);
this._correctLine(Nodes[targetObject.childsCount - 2]);
}
}
this._correctPlus(Nodes[targetObject.childsCount - 1]);
if (this.tscheck) {
this._correctCheckStates(targetObject);
}
if (oldTree.tscheck) {
oldTree._correctCheckStates(z);
}
}
if (c > 1) {
oldTree._correctPlus(z.childNodes[c - 2]);
oldTree._correctLine(z.childNodes[c - 2]);
}
oldTree._correctPlus(z);
oldTree._correctLine(z);
this.callEvent("onDrop", [itemObject.id, targetObject.id, (beforeNode ? beforeNode.id : null), oldTree, targetObject.treeNod]);
return itemObject.id;
};
dhtmlXTreeObject.prototype._clearStyles = function (itemObject) {
var td1 = itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[1];
var td3 = td1.nextSibling.nextSibling;
itemObject.span.innerHTML = itemObject.label;
itemObject.i_sel = false;
if (itemObject._aimgs) {
this.dragger.removeDraggableItem(td1.nextSibling);
}
if (this.checkBoxOff) {
td1.childNodes[0].style.display = "";
td1.childNodes[0].onclick = this.onCheckBoxClick;
this._setSrc(td1.childNodes[0], this.imPath + this.checkArray[itemObject.checkstate]);
} else {
td1.childNodes[0].style.display = "none";
}
td1.childNodes[0].treeNod = this;
itemObject.span.onmousedown = function () {
};
this.dragger.removeDraggableItem(td3);
if (this.dragAndDropOff) {
this.dragger.addDraggableItem(td3, this);
}
if (this._aimgs) {
this.dragger.addDraggableItem(td1.nextSibling, this);
}
td3.childNodes[0].className = "standartTreeRow";
td3.onclick = this.onRowSelect;
td3.ondblclick = this.onRowClick2;
td1.previousSibling.onclick = this.onRowClick;
this._correctLine(itemObject);
this._correctPlus(itemObject);
for (var i = 0; i < itemObject.childsCount; i++) {
this._clearStyles(itemObject.childNodes[i]);
}
};
dhtmlXTreeObject.prototype._registerBranch = function (itemObject, oldTree) {
itemObject.id = this._globalIdStorageAdd(itemObject.id, itemObject);
itemObject.treeNod = this;
if (oldTree) {
oldTree._globalIdStorageSub(itemObject.id);
}
for (var i = 0; i < itemObject.childsCount; i++) {
this._registerBranch(itemObject.childNodes[i], oldTree);
}
return 0;
};
dhtmlXTreeObject.prototype.enableThreeStateCheckboxes = function (mode) {
this.tscheck = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.setOnMouseInHandler = function (func) {
this.ehlt = true;
this.attachEvent("onMouseIn", func);
};
dhtmlXTreeObject.prototype.setOnMouseOutHandler = function (func) {
this.ehlt = true;
this.attachEvent("onMouseOut", func);
};
dhtmlXTreeObject.prototype.enableTreeImages = function (mode) {
this.timgen = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.enableFixedMode = function (mode) {
this.hfMode = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.enableCheckBoxes = function (mode, hidden) {
this.checkBoxOff = convertStringToBoolean(mode);
this.cBROf = (!(this.checkBoxOff || convertStringToBoolean(hidden)));
};
dhtmlXTreeObject.prototype.setStdImages = function (image1, image2, image3) {
this.imageArray[0] = image1;
this.imageArray[1] = image2;
this.imageArray[2] = image3;
};
dhtmlXTreeObject.prototype.enableTreeLines = function (mode) {
this.treeLinesOn = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.setImageArrays = function (arrayName, image1, image2, image3, image4, image5) {
switch (arrayName) {
case "plus":
this.plusArray[0] = image1;
this.plusArray[1] = image2;
this.plusArray[2] = image3;
this.plusArray[3] = image4;
this.plusArray[4] = image5;
break;
case "minus":
this.minusArray[0] = image1;
this.minusArray[1] = image2;
this.minusArray[2] = image3;
this.minusArray[3] = image4;
this.minusArray[4] = image5;
break;
}
};
dhtmlXTreeObject.prototype.openItem = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
} else {
return this._openItem(temp);
}
};
dhtmlXTreeObject.prototype._openItem = function (item) {
var state = this._getOpenState(item);
if ((state < 0) || (((this.XMLsource) && (!item.XMLload)))) {
if (!this.callEvent("onOpenStart", [item.id, state])) {
return 0;
}
this._HideShow(item, 2);
if (this._epnFH) {
if (this.onXLE == this._epnFHe) {
this._epnFHe(this, item.id, true);
}
if (!this.xmlstate) {
this._epnFH(item.id, this._getOpenState(item));
} else {
this._oie_onXLE = this.onXLE;
this.onXLE = this._epnFHe;
}
}
}
if (item.parentObject) {
this._openItem(item.parentObject);
}
};
dhtmlXTreeObject.prototype.closeItem = function (itemId) {
if (this.rootId == itemId) {
return 0;
}
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
if (temp.closeble) {
this._HideShow(temp, 1);
}
};
dhtmlXTreeObject.prototype.getLevel = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
return this._getNodeLevel(temp, 0);
};
dhtmlXTreeObject.prototype.setItemCloseable = function (itemId, flag) {
flag = convertStringToBoolean(flag);
if ((itemId) && (itemId.span)) {
var temp = itemId;
} else {
var temp = this._globalIdStorageFind(itemId);
}
if (!temp) {
return 0;
}
temp.closeble = flag;
};
dhtmlXTreeObject.prototype._getNodeLevel = function (itemObject, count) {
if (itemObject.parentObject) {
return this._getNodeLevel(itemObject.parentObject, count + 1);
}
return (count);
};
dhtmlXTreeObject.prototype.hasChildren = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
} else {
if ((this.XMLsource) && (!temp.XMLload)) {
return true;
} else {
return temp.childsCount;
}
}
};
dhtmlXTreeObject.prototype._getLeafCount = function (itemNode) {
var a = 0;
for (var b = 0; b < itemNode.childsCount; b++) {
if (itemNode.childNodes[b].childsCount == 0) {
a++;
}
}
return a;
};
dhtmlXTreeObject.prototype.setItemText = function (itemId, newLabel, newTooltip) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
temp.label = newLabel;
temp.span.innerHTML = newLabel;
temp.span.parentNode.parentNode.title = newTooltip || "";
};
dhtmlXTreeObject.prototype.getItemTooltip = function (itemId) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return "";
}
return (temp.span.parentNode.parentNode.title || "");
};
dhtmlXTreeObject.prototype.refreshItem = function (itemId) {
if (!itemId) {
itemId = this.rootId;
}
var temp = this._globalIdStorageFind(itemId);
this.deleteChildItems(itemId);
this._loadDynXML(itemId);
};
dhtmlXTreeObject.prototype.setItemImage2 = function (itemId, image1, image2, image3) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
temp.images[1] = image2;
temp.images[2] = image3;
temp.images[0] = image1;
this._correctPlus(temp);
};
dhtmlXTreeObject.prototype.setItemImage = function (itemId, image1, image2) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
if (image2) {
temp.images[1] = image1;
temp.images[2] = image2;
} else {
temp.images[0] = image1;
}
this._correctPlus(temp);
};
dhtmlXTreeObject.prototype.getSubItems = function (itemId) {
var temp = this._globalIdStorageFind(itemId, 0, 1);
if (!temp) {
return 0;
}
var z = "";
for (i = 0; i < temp.childsCount; i++) {
if (!z) {
z = temp.childNodes[i].id;
} else {
z += this.dlmtr + temp.childNodes[i].id;
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllScraggyItems = function (node) {
var z = "";
for (var i = 0; i < node.childsCount; i++) {
if ((node.childNodes[i].unParsed) || (node.childNodes[i].childsCount > 0)) {
if (node.childNodes[i].unParsed) {
var zb = this._getAllScraggyItemsXML(node.childNodes[i].unParsed, 1);
} else {
var zb = this._getAllScraggyItems(node.childNodes[i]);
}
if (zb) {
if (z) {
z += this.dlmtr + zb;
} else {
z = zb;
}
}
} else {
if (!z) {
z = node.childNodes[i].id;
} else {
z += this.dlmtr + node.childNodes[i].id;
}
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllFatItems = function (node) {
var z = "";
for (var i = 0; i < node.childsCount; i++) {
if ((node.childNodes[i].unParsed) || (node.childNodes[i].childsCount > 0)) {
if (!z) {
z = node.childNodes[i].id;
} else {
z += this.dlmtr + node.childNodes[i].id;
}
if (node.childNodes[i].unParsed) {
var zb = this._getAllFatItemsXML(node.childNodes[i].unParsed, 1);
} else {
var zb = this._getAllFatItems(node.childNodes[i]);
}
if (zb) {
z += this.dlmtr + zb;
}
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllSubItems = function (itemId, z, node) {
if (node) {
temp = node;
} else {
var temp = this._globalIdStorageFind(itemId);
}
if (!temp) {
return 0;
}
z = "";
for (var i = 0; i < temp.childsCount; i++) {
if (!z) {
z = temp.childNodes[i].id;
} else {
z += this.dlmtr + temp.childNodes[i].id;
}
var zb = this._getAllSubItems(0, z, temp.childNodes[i]);
if (zb) {
z += this.dlmtr + zb;
}
}
return z;
};
dhtmlXTreeObject.prototype.selectItem = function (itemId, mode, preserve) {
mode = convertStringToBoolean(mode);
var temp = this._globalIdStorageFind(itemId);
if ((!temp) || (!temp.parentObject)) {
return 0;
}
if (this.XMLloadingWarning) {
temp.parentObject.openMe = 1;
} else {
this._openItem(temp.parentObject);
}
var ze = null;
if (preserve) {
ze = new Object;
ze.ctrlKey = true;
if (temp.i_sel) {
ze.skipUnSel = true;
}
}
if (mode) {
this.onRowSelect(ze, temp.htmlNode.childNodes[0].childNodes[0].childNodes[3], false);
} else {
this.onRowSelect(ze, temp.htmlNode.childNodes[0].childNodes[0].childNodes[3], true);
}
};
dhtmlXTreeObject.prototype.getSelectedItemText = function () {
var str = new Array();
for (var i = 0; i < this._selected.length; i++) {
str[i] = this._selected[i].span.innerHTML;
}
return (str.join(this.dlmtr));
};
dhtmlXTreeObject.prototype._compressChildList = function (Count, Nodes) {
Count--;
for (var i = 0; i < Count; i++) {
if (Nodes[i] == 0) {
Nodes[i] = Nodes[i + 1];
Nodes[i + 1] = 0;
}
}
};
dhtmlXTreeObject.prototype._deleteNode = function (itemId, htmlObject, skip) {
if ((!htmlObject) || (!htmlObject.parentObject)) {
return 0;
}
var tempos = 0;
var tempos2 = 0;
if (htmlObject.tr.nextSibling) {
tempos = htmlObject.tr.nextSibling.nodem;
}
if (htmlObject.tr.previousSibling) {
tempos2 = htmlObject.tr.previousSibling.nodem;
}
var sN = htmlObject.parentObject;
var Count = sN.childsCount;
var Nodes = sN.childNodes;
for (var i = 0; i < Count; i++) {
if (Nodes[i].id == itemId) {
if (!skip) {
sN.htmlNode.childNodes[0].removeChild(Nodes[i].tr);
}
Nodes[i] = 0;
break;
}
}
this._compressChildList(Count, Nodes);
if (!skip) {
sN.childsCount--;
}
if (tempos) {
this._correctPlus(tempos);
this._correctLine(tempos);
}
if (tempos2) {
this._correctPlus(tempos2);
this._correctLine(tempos2);
}
if (this.tscheck) {
this._correctCheckStates(sN);
}
if (!skip) {
this._globalIdStorageRecSub(htmlObject);
}
};
dhtmlXTreeObject.prototype.setCheck = function (itemId, state) {
var sNode = this._globalIdStorageFind(itemId, 0, 1);
if (!sNode) {
return;
}
if (state === "unsure") {
this._setCheck(sNode, state);
} else {
state = convertStringToBoolean(state);
if ((this.tscheck) && (this.smcheck)) {
this._setSubChecked(state, sNode);
} else {
this._setCheck(sNode, state);
}
}
if (this.smcheck) {
this._correctCheckStates(sNode.parentObject);
}
};
dhtmlXTreeObject.prototype._setCheck = function (sNode, state) {
if (((sNode.parentObject._r_logic) || (this._frbtr)) && (state)) {
if (this._frbtrs) {
if (this._frbtrL) {
this._setCheck(this._frbtrL, 0);
}
this._frbtrL = sNode;
} else {
for (var i = 0; i < sNode.parentObject.childsCount; i++) {
this._setCheck(sNode.parentObject.childNodes[i], 0);
}
}
}
var z = sNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];
if (state == "unsure") {
sNode.checkstate = 2;
} else {
if (state) {
sNode.checkstate = 1;
} else {
sNode.checkstate = 0;
}
}
if (sNode.dscheck) {
sNode.checkstate = sNode.dscheck;
}
this._setSrc(z, this.imPath + ((sNode.parentObject._r_logic || this._frbtr) ? this.radioArray : this.checkArray)[sNode.checkstate]);
};
dhtmlXTreeObject.prototype.setSubChecked = function (itemId, state) {
var sNode = this._globalIdStorageFind(itemId);
this._setSubChecked(state, sNode);
this._correctCheckStates(sNode.parentObject);
};
dhtmlXTreeObject.prototype._setSubChecked = function (state, sNode) {
state = convertStringToBoolean(state);
if (!sNode) {
return;
}
if (((sNode.parentObject._r_logic) || (this._frbtr)) && (state)) {
for (var i = 0; i < sNode.parentObject.childsCount; i++) {
this._setSubChecked(0, sNode.parentObject.childNodes[i]);
}
}
if (sNode._r_logic || this._frbtr) {
this._setSubChecked(state, sNode.childNodes[0]);
} else {
for (var i = 0; i < sNode.childsCount; i++) {
this._setSubChecked(state, sNode.childNodes[i]);
}
}
var z = sNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];
if (state) {
sNode.checkstate = 1;
} else {
sNode.checkstate = 0;
}
if (sNode.dscheck) {
sNode.checkstate = sNode.dscheck;
}
this._setSrc(z, this.imPath + ((sNode.parentObject._r_logic || this._frbtr) ? this.radioArray : this.checkArray)[sNode.checkstate]);
};
dhtmlXTreeObject.prototype.isItemChecked = function (itemId) {
var sNode = this._globalIdStorageFind(itemId);
if (!sNode) {
return;
}
return sNode.checkstate;
};
dhtmlXTreeObject.prototype.deleteChildItems = function (itemId) {
var sNode = this._globalIdStorageFind(itemId);
if (!sNode) {
return;
}
var j = sNode.childsCount;
for (var i = 0; i < j; i++) {
this._deleteNode(sNode.childNodes[0].id, sNode.childNodes[0]);
}
};
dhtmlXTreeObject.prototype.deleteItem = function (itemId, selectParent) {
if ((!this._onrdlh) || (this._onrdlh(itemId))) {
var z = this._deleteItem(itemId, selectParent);
}
this.allTree.childNodes[0].border = "1";
this.allTree.childNodes[0].border = "0";
};
dhtmlXTreeObject.prototype._deleteItem = function (itemId, selectParent, skip) {
selectParent = convertStringToBoolean(selectParent);
var sNode = this._globalIdStorageFind(itemId);
if (!sNode) {
return;
}
var pid = this.getParentId(itemId);
var zTemp = sNode.parentObject;
this._deleteNode(itemId, sNode, skip);
this._correctPlus(zTemp);
this._correctLine(zTemp);
if ((selectParent) && (pid != this.rootId)) {
this.selectItem(pid, 1);
}
return zTemp;
};
dhtmlXTreeObject.prototype._globalIdStorageRecSub = function (itemObject) {
for (var i = 0; i < itemObject.childsCount; i++) {
this._globalIdStorageRecSub(itemObject.childNodes[i]);
this._globalIdStorageSub(itemObject.childNodes[i].id);
}
this._globalIdStorageSub(itemObject.id);
var z = itemObject;
z.span = null;
z.tr.nodem = null;
z.tr = null;
z.htmlNode = null;
};
dhtmlXTreeObject.prototype.insertNewNext = function (itemId, newItemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs) {
var sNode = this._globalIdStorageFind(itemId);
if ((!sNode) || (!sNode.parentObject)) {
return (0);
}
var nodez = this._attachChildNode(0, newItemId, itemText, itemActionHandler, image1, image2, image3, optionStr, childs, sNode);
return nodez;
};
dhtmlXTreeObject.prototype.getItemIdByIndex = function (itemId, index) {
var z = this._globalIdStorageFind(itemId);
if ((!z) || (index > z.childsCount)) {
return null;
}
return z.childNodes[index].id;
};
dhtmlXTreeObject.prototype.getChildItemIdByIndex = function (itemId, index) {
var z = this._globalIdStorageFind(itemId);
if ((!z) || (index >= z.childsCount)) {
return null;
}
return z.childNodes[index].id;
};
dhtmlXTreeObject.prototype.setDragHandler = function (func) {
this.attachEvent("onDrag", func);
};
dhtmlXTreeObject.prototype._clearMove = function () {
if (this._lastMark) {
this._lastMark.className = this._lastMark.className.replace(/dragAndDropRow/g, "");
this._lastMark = null;
}
this.allTree.className = this.allTree.className.replace(" selectionBox", "");
};
dhtmlXTreeObject.prototype.enableDragAndDrop = function (mode, rmode) {
if (mode == "temporary_disabled") {
this.dADTempOff = false;
mode = true;
} else {
this.dADTempOff = true;
}
this.dragAndDropOff = convertStringToBoolean(mode);
if (this.dragAndDropOff) {
this.dragger.addDragLanding(this.allTree, this);
}
if (arguments.length > 1) {
this._ddronr = (!convertStringToBoolean(rmode));
}
};
dhtmlXTreeObject.prototype._setMove = function (htmlNode, x, y) {
if (htmlNode.parentObject.span) {
var a1 = getAbsoluteTop(htmlNode);
var a2 = getAbsoluteTop(this.allTree);
this.dadmodec = this.dadmode;
this.dadmodefix = 0;
var zN = htmlNode.parentObject.span;
zN.className += " dragAndDropRow";
this._lastMark = zN;
}
};
dhtmlXTreeObject.prototype._autoScroll = function (node, a1, a2) {
if (this.autoScroll) {
if (node) {
a1 = getAbsoluteTop(node);
a2 = getAbsoluteTop(this.allTree);
}
if ((a1 - a2 - parseInt(this.allTree.scrollTop)) > (parseInt(this.allTree.offsetHeight) - 50)) {
this.allTree.scrollTop = parseInt(this.allTree.scrollTop) + 20;
}
if ((a1 - a2) < (parseInt(this.allTree.scrollTop) + 30)) {
this.allTree.scrollTop = parseInt(this.allTree.scrollTop) - 20;
}
}
};
dhtmlXTreeObject.prototype._createDragNode = function (htmlObject, e) {
if (!this.dADTempOff) {
return null;
}
var obj = htmlObject.parentObject;
if (!obj.i_sel) {
this._selectItem(obj, e);
}
var dragSpan = document.createElement("div");
var text = new Array();
if (this._itim_dg) {
for (var i = 0; i < this._selected.length; i++) {
text[i] = "<table cellspacing='0' cellpadding='0'><tr><td><img width='18px' height='18px' src='" + this._getSrc(this._selected[i].span.parentNode.previousSibling.childNodes[0]) + "'></td><td>" + this._selected[i].span.innerHTML + "</td></tr><table>";
}
} else {
text = this.getSelectedItemText().split(this.dlmtr);
}
dragSpan.innerHTML = text.join("");
dragSpan.style.position = "absolute";
dragSpan.className = "dragSpanDiv";
this._dragged = (new Array()).concat(this._selected);
return dragSpan;
};
dhtmlXTreeObject.prototype._focusNode = function (item) {
var z = getAbsoluteTop(item.htmlNode) - getAbsoluteTop(this.allTree);
if ((z > (this.allTree.scrollTop + this.allTree.offsetHeight - 30)) || (z < this.allTree.scrollTop)) {
this.allTree.scrollTop = z;
}
};
dhtmlXTreeObject.prototype._preventNsDrag = function (e) {
if ((e) && (e.preventDefault)) {
e.preventDefault();
return false;
}
return false;
};
dhtmlXTreeObject.prototype._drag = function (sourceHtmlObject, dhtmlObject, targetHtmlObject) {
if (this._autoOpenTimer) {
clearTimeout(this._autoOpenTimer);
}
if (!targetHtmlObject.parentObject) {
targetHtmlObject = this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];
this.dadmodec = 0;
}
this._clearMove();
var z = sourceHtmlObject.parentObject.treeNod;
if ((z) && (z._clearMove)) {
z._clearMove("");
}
if ((!this.dragMove) || (this.dragMove())) {
if ((!z) || (!z._clearMove) || (!z._dragged)) {
var col = new Array(sourceHtmlObject.parentObject);
} else {
var col = z._dragged;
}
var trg = targetHtmlObject.parentObject;
for (var i = 0; i < col.length; i++) {
var newID = this._moveNode(col[i], trg);
if ((this.dadmodec) && (newID !== false)) {
trg = this._globalIdStorageFind(newID, true, true);
}
if ((newID) && (!this._sADnD)) {
this.selectItem(newID, 0, 1);
}
}
}
if (z) {
z._dragged = new Array();
}
};
dhtmlXTreeObject.prototype._dragIn = function (htmlObject, shtmlObject, x, y) {
if (!this.dADTempOff) {
return 0;
}
var fobj = shtmlObject.parentObject;
var tobj = htmlObject.parentObject;
if ((!tobj) && (this._ddronr)) {
return;
}
if (!this.callEvent("onDragIn", [fobj.id, tobj ? tobj.id : null, fobj.treeNod, this])) {
return 0;
}
if (!tobj) {
this.allTree.className += " selectionBox";
} else {
if (fobj.childNodes == null) {
this._setMove(htmlObject, x, y);
return htmlObject;
}
var stree = fobj.treeNod;
for (var i = 0; i < stree._dragged.length; i++) {
if (this._checkPNodes(tobj, stree._dragged[i])) {
this._autoScroll(htmlObject);
return 0;
}
}
this._setMove(htmlObject, x, y);
if (this._getOpenState(tobj) <= 0) {
this._autoOpenId = tobj.id;
this._autoOpenTimer = window.setTimeout(new callerFunction(this._autoOpenItem, this), 1000);
}
}
return htmlObject;
};
dhtmlXTreeObject.prototype._autoOpenItem = function (e, treeObject) {
treeObject.openItem(treeObject._autoOpenId);
};
dhtmlXTreeObject.prototype._dragOut = function (htmlObject) {
this._clearMove();
if (this._autoOpenTimer) {
clearTimeout(this._autoOpenTimer);
}
};
dhtmlXTreeObject.prototype._loadDynXML = function (id, src) {
src = src || this.XMLsource;
var sn = (new Date()).valueOf();
this._ld_id = id;
alert(src + getUrlSymbol(src) + "uid=" + sn + "&id=" + this._escape(id));
this.loadXML(src + getUrlSymbol(src) + "uid=" + sn + "&id=" + this._escape(id));
};
dhtmlXTreeObject.prototype._checkPNodes = function (item1, item2) {
if (item2 == item1) {
return 1;
}
if (item1.parentObject) {
return this._checkPNodes(item1.parentObject, item2);
} else {
return 0;
}
};
dhtmlXTreeObject.prototype.preventIECashing = function (mode) {
this.no_cashe = convertStringToBoolean(mode);
this.XMLLoader.rSeed = this.no_cashe;
};
dhtmlXTreeObject.prototype.setEscapingMode = function (mode) {
this.utfesc = mode;
};
dhtmlXTreeObject.prototype.enableHighlighting = function (mode) {
this.ehlt = true;
this.ehlta = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype._itemMouseOut = function () {
var that = this.childNodes[3].parentObject;
var tree = that.treeNod;
tree.callEvent("onMouseOut", [that.id]);
if (that.id == tree._l_onMSI) {
tree._l_onMSI = null;
}
if (!tree.ehlt) {
return;
}
that.span.className = that.span.className.replace("_lor", "");
};
dhtmlXTreeObject.prototype._itemMouseIn = function () {
var that = this.childNodes[3].parentObject;
var tree = that.treeNod;
if (tree._l_onMSI != that.id) {
tree.callEvent("onMouseIn", [that.id]);
}
tree._l_onMSI = that.id;
if (!tree.ehlt) {
return;
}
that.span.className = that.span.className.replace("_lor", "");
that.span.className = that.span.className.replace(/((standart|selected)TreeRow)/, "$1_lor");
};
dhtmlXTreeObject.prototype.enableActiveImages = function (mode) {
this._aimgs = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.focusItem = function (itemId) {
var sNode = this._globalIdStorageFind(itemId);
if (!sNode) {
return (0);
}
this._focusNode(sNode);
};
dhtmlXTreeObject.prototype.getAllSubItems = function (itemId) {
return this._getAllSubItems(itemId);
};
dhtmlXTreeObject.prototype.getAllChildless = function () {
return this._getAllScraggyItems(this.htmlNode);
};
dhtmlXTreeObject.prototype.getAllLeafs = dhtmlXTreeObject.prototype.getAllChildless;
dhtmlXTreeObject.prototype._getAllScraggyItems = function (node) {
var z = "";
for (var i = 0; i < node.childsCount; i++) {
if ((node.childNodes[i].unParsed) || (node.childNodes[i].childsCount > 0)) {
if (node.childNodes[i].unParsed) {
var zb = this._getAllScraggyItemsXML(node.childNodes[i].unParsed, 1);
} else {
var zb = this._getAllScraggyItems(node.childNodes[i]);
}
if (zb) {
if (z) {
z += this.dlmtr + zb;
} else {
z = zb;
}
}
} else {
if (!z) {
z = node.childNodes[i].id;
} else {
z += this.dlmtr + node.childNodes[i].id;
}
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllFatItems = function (node) {
var z = "";
for (var i = 0; i < node.childsCount; i++) {
if ((node.childNodes[i].unParsed) || (node.childNodes[i].childsCount > 0)) {
if (!z) {
z = node.childNodes[i].id;
} else {
z += this.dlmtr + node.childNodes[i].id;
}
if (node.childNodes[i].unParsed) {
var zb = this._getAllFatItemsXML(node.childNodes[i].unParsed, 1);
} else {
var zb = this._getAllFatItems(node.childNodes[i]);
}
if (zb) {
z += this.dlmtr + zb;
}
}
}
return z;
};
dhtmlXTreeObject.prototype.getAllItemsWithKids = function () {
return this._getAllFatItems(this.htmlNode);
};
dhtmlXTreeObject.prototype.getAllFatItems = dhtmlXTreeObject.prototype.getAllItemsWithKids;
dhtmlXTreeObject.prototype.getAllChecked = function () {
return this._getAllChecked("", "", 1);
};
dhtmlXTreeObject.prototype.getAllUnchecked = function (itemId) {
if (itemId) {
itemId = this._globalIdStorageFind(itemId);
}
return this._getAllChecked(itemId, "", 0);
};
dhtmlXTreeObject.prototype.getAllPartiallyChecked = function () {
return this._getAllChecked("", "", 2);
};
dhtmlXTreeObject.prototype.getAllCheckedBranches = function () {
var temp = this._getAllChecked("", "", 1);
if (temp != "") {
temp += this.dlmtr;
}
return temp + this._getAllChecked("", "", 2);
};
dhtmlXTreeObject.prototype._getAllChecked = function (htmlNode, list, mode) {
if (!htmlNode) {
htmlNode = this.htmlNode;
}
if (htmlNode.checkstate == mode) {
if (!htmlNode.nocheckbox) {
if (list) {
list += this.dlmtr + htmlNode.id;
} else {
list = htmlNode.id;
}
}
}
var j = htmlNode.childsCount;
for (var i = 0; i < j; i++) {
list = this._getAllChecked(htmlNode.childNodes[i], list, mode);
}
if (list) {
return list;
} else {
return "";
}
};
dhtmlXTreeObject.prototype.setItemStyle = function (itemId, style_string) {
var temp = this._globalIdStorageFind(itemId);
if (!temp) {
return 0;
}
if (!temp.span.style.cssText) {
temp.span.setAttribute("style", temp.span.getAttribute("style") + ";" + style_string);
} else {
temp.span.style.cssText += (";" + style_string);
}
};
dhtmlXTreeObject.prototype.enableImageDrag = function (mode) {
this._itim_dg = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.setOnDragIn = function (func) {
this.attachEvent("onDragIn", func);
};
dhtmlXTreeObject.prototype.enableDragAndDropScrolling = function (mode) {
this.autoScroll = convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.dhx_Event = function () {
this.dhx_SeverCatcherPath = "";
this.attachEvent = function (original, catcher, CallObj) {
CallObj = CallObj || this;
original = "ev_" + original;
if ((!this[original]) || (!this[original].addEvent)) {
var z = new this.eventCatcher(CallObj);
z.addEvent(this[original]);
this[original] = z;
}
return (original + ":" + this[original].addEvent(catcher));
};
this.callEvent = function (name, arguments) {
if (this["ev_" + name]) {
return this["ev_" + name].apply(this, arguments);
}
return true;
};
this.checkEvent = function (name) {
if (this["ev_" + name]) {
return true;
}
return false;
};
this.eventCatcher = function (obj) {
var dhx_catch = new Array();
var m_obj = obj;
var func_server = function (catcher, rpc) {
catcher = catcher.split(":");
var postVar = "";
var postVar2 = "";
var target = catcher[1];
if (catcher[1] == "rpc") {
postVar = "<?xml version=\"1.0\"?><methodCall><methodName>" + catcher[2] + "</methodName><params>";
postVar2 = "</params></methodCall>";
target = rpc;
}
var z = function () {
return true;
};
return z;
};
var z = function () {
if (dhx_catch) {
var res = true;
}
for (var i = 0; i < dhx_catch.length; i++) {
if (dhx_catch[i] != null) {
var zr = dhx_catch[i].apply(m_obj, arguments);
res = res && zr;
}
}
return res;
};
z.addEvent = function (ev) {
if (typeof (ev) != "function") {
if (ev && ev.indexOf && ev.indexOf("server:") === 0) {
ev = new func_server(ev, m_obj.rpcServer);
} else {
ev = eval(ev);
}
}
if (ev) {
return dhx_catch.push(ev) - 1;
}
return false;
};
z.removeEvent = function (id) {
dhx_catch[id] = null;
};
return z;
};
this.detachEvent = function (id) {
if (id != false) {
var list = id.split(":");
this[list[0]].removeEvent(list[1]);
}
};
};
/*############æ°å¢å åè½##################*/
dhtmlXTreeObject.prototype.enableContextMenu = function (menu) {
if (menu) {
this.cMenu = menu;
}
};
dhtmlXTreeObject.prototype._doContClick = function (ev) {
if (ev.button != 2) {
if (this.Lt) {
this.cMenu._contextEnd();
}
return true;
}
var el = (_isIE ? ev.srcElement : ev.target);
while ((el) && (el.tagName != "BODY")) {
if (el.parentObject) {
break;
}
el = el.parentNode;
}
if ((!el) || (!el.parentObject)) {
return true;
}
var obj = el.parentObject;
this.Lt = (obj.cMenu || this.cMenu);
if (this.Lt) {
el.contextMenuId = obj.id;
el.contextMenu = this.Lt;
el.a = this.Lt._contextStart;
if (_isIE) {
ev.srcElement.oncontextmenu = function () {
event.cancelBubble = true;
return false;
};
}
el.a(el, ev);
el.a = null;
ev.cancelBubble = true;
return false;
}
return true;
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlxtree.js
|
JavaScript
|
asf20
| 79,737
|
dhtmlXTreeObject.prototype.makeDragable=function(obj,func)
{
if (typeof(obj)!="object")
obj=document.getElementById(obj);
dragger=new dhtmlDragAndDropObject();
dropper=new dhx_dragSomethingInTree();
dragger.addDraggableItem(obj,dropper);
obj.dragLanding=null;
obj.ondragstart=dropper._preventNsDrag;
obj.onselectstart=new Function("return false;");
obj.parentObject=new Object;
obj.parentObject.img=obj;
obj.parentObject.treeNod=dropper;
dropper._customDrop=func;
};
dhtmlXTreeObject.prototype.makeAllDraggable=function(func)
{
var z=document.getElementsByTagName("div");
for (var i=0;i<z.length;i++)if (z[i].getAttribute("dragInDhtmlXTree"))
this.makeDragable(z[i],func);
};
function dhx_dragSomethingInTree()
{
this.lWin=window;
this._createDragNode=function(node)
{
var dragSpan=document.createElement('div');
dragSpan.style.position="absolute";
dragSpan.innerHTML=node.innerHTML;
dragSpan.style.zIndex=12;
return dragSpan;
};
this._preventNsDrag=function(e)
{
(e||window.event).cancelBubble=true;
if ((e)&&(e.preventDefault))
{
e.preventDefault();
return false;
};
return false;
};
this._nonTrivialNode=function(tree,item,bitem,source)
{
if (this._customDrop)return this._customDrop(tree,source.img.id,item.id,bitem?bitem.id:null);
var image=(source.img.getAttribute("image")||"");
var id=source.img.id||"new";
var text=(source.img.getAttribute("text")||(_isIE?source.img.innerText:source.img.textContent));
tree[bitem?"insertNewNext":"insertNewItem"](bitem?bitem.id:item.id,id,text,"",image,image,image);
};
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlxTree_dragIn.js
|
JavaScript
|
asf20
| 1,779
|
var _all_used_trees=new Array();
dhtmlXTreeObject.prototype._createSelfA2=dhtmlXTreeObject.prototype._createSelf;
dhtmlXTreeObject.prototype._createSelf=function()
{
_all_used_trees[_all_used_trees.length]=this;
return this._createSelfA2();
};
window.onerror=function (a,b,c,d)
{
var d=document.createElement("DIV");
d.style.cssText="position:absolute;background-color:white;top:10px;left:10px;z-index:20;width:500px;border: 2px silver outset;";
var dh="<div style='width:100%;color:red;font-size:8pt;font-family:Arial;font-weight:bold;'>Javascript Error</div>";
dh+="<div style='width:100%;font-size:8pt;font-family:Arial;'>The next error ocured :<br/> <strong>"+a+"</strong> in <strong>"+b+"</strong> at line <strong>"+c+"</strong></div>";
dh+="<div style='width:100%;font-size:8pt;font-family:Arial;'>If you think that error can be caused by dhtmlxtree press the 'Generate report' button and send generated report to <a href='email:dhtmlx@scand.com'>dhtmlx@scand.com</a> </div>";
dh+="<input style='font-size:8pt;font-family:Arial;' onclick='dhtmlxtreeReport(this)' type='button' value='Generate report'/><input style='font-size:8pt;font-family:Arial;' type='button' value='Close' onclick='this.parentNode.parentNode.removeChild(this.parentNode);'/>";
dh+="<div/>";
d.innerHTML=dh;
document.body.appendChild(d);
return true;
};
function dhtmlxtreeErrorReport(a,b,c)
{
var str=a+" ["+b+"]";
if (a=='LoadXML')
{
str+="<br/>"+c[0].responseText+"</br>"+c[0].status;
};
window.onerror(str, "none", "none");
};
function dhtmlxtreeReport(node)
{
var that=node.parentNode;
that.lastChild.innerHTML="<textarea style='width:100%;height:300px;'></textarea>";
var rep=that.childNodes[1].innerHTML;
for (var a=0;a<_all_used_trees.length;a++)
{
var atree=_all_used_trees[a];
rep+="\n\n Tree "+a+"\n";
for (b in atree)
{
if (typeof(atree[b])=="function") continue;
rep+=b+"="+atree[b]+"\n";
};
rep+="---------------------\n";
if (atree.XMLLoader)
{
try
{
var z=atree.XMLLoader.getXMLTopNode("tree")
if (document.all)rep+=z.xml+"\n";
else
{
var xmlSerializer = new XMLSerializer();
rep+=xmlSerializer.serializeToString(z)+"\n";
};
}
catch(e)
{
rep+="XML not recognised\n";
};
};
rep+="---------------------\n";
for (var i=0;i<atree.globalNodeStorage.length;i++)
{
var n=atree.globalNodeStorage[i];
rep+="Node: "+n.id;
rep+=" Childs: "+n.childsCount;
for (var j=0;j<n.childsCount;j++)rep+=" ch"+j+":"+n.childNodes[j].id;
rep+="\n";
};
};
that.lastChild.childNodes[0].value=rep;
};
dhtmlxError.catchError("ALL",dhtmlxtreeErrorReport);
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlxtree_er.js
|
JavaScript
|
asf20
| 3,094
|
function dhtmlXTreeFromHTML(obj)
{
if (typeof(obj)!="object")
obj=document.getElementById(obj);
var n=obj;
var id=n.id;
var cont="";
for (var j=0;j<obj.childNodes.length;j++)if (obj.childNodes[j].nodeType=="1")
{
if (obj.childNodes[j].tagName=="XMP")
{
var cHead=obj.childNodes[j];
for (var m=0;m<cHead.childNodes.length;m++)cont+=cHead.childNodes[m].data;
}
else if (obj.childNodes[j].tagName.toLowerCase()=="ul")
cont=dhx_li2trees(obj.childNodes[j],new Array(),0);
break;
};
obj.innerHTML="";
var t=new dhtmlXTreeObject(obj,"100%","100%",0);
var z_all=new Array();
for ( b in t )z_all[b.toLowerCase()]=b;var atr=obj.attributes;for (var a=0;a<atr.length;a++)if ((atr[a].name.indexOf("set")==0)||(atr[a].name.indexOf("enable")==0))
{
var an=atr[a].name;
if (!t[an])an=z_all[atr[a].name];
t[an].apply(t,atr[a].value.split(","));
};
if (typeof(cont)=="object")
{
t.XMLloadingWarning=1;
for (var i=0;i<cont.length;i++)
{
var n=t.insertNewItem(cont[i][0],(i+1),cont[i][1]);
if (cont[i][2])t._setCheck(n,true);
};
t.XMLloadingWarning=0;
t.lastLoadedXMLId=0;
t._redrawFrom(t);
}
else
t.loadXMLString("<tree id='0'>"+cont+"</tree>");
window[id]=t;
return t;
};
function dhx_init_trees()
{
var z=document.getElementsByTagName("div");
for (var i=0;i<z.length;i++)if (z[i].className=="dhtmlxTree")dhtmlXTreeFromHTML(z[i])
};
function dhx_li2trees(tag,data,ind)
{
for (var i=0;i<tag.childNodes.length;i++)
{
var z=tag.childNodes[i];
if ((z.nodeType==1)&&(z.tagName.toLowerCase()=="li"))
{
var c="";
var ul=null;
var check=z.getAttribute("checked");
for (var j=0;j<z.childNodes.length;j++)
{
var zc=z.childNodes[j];
if (zc.nodeType==3)c+=zc.data;
else if (zc.tagName.toLowerCase()!="ul") c+=zc.outerHTML?zc.outerHTML:zc.innerHTML;
else ul=zc;
};
data[data.length]=[ind,c,check];
if (ul)data=dhx_li2trees(ul,data,data.length);
};
};
return data;
};
if (window.addEventListener)window.addEventListener("load",dhx_init_trees,false);
else if (window.attachEvent)window.attachEvent("onload",dhx_init_trees);
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlxtree_start.js
|
JavaScript
|
asf20
| 2,543
|
dhtmlXTreeObject.prototype.setOnLoadingStart_lf=function(func)
{
if (typeof(func)=="function") this.onXLS_2=func;
else this.onXLS_2=eval(func);
};
dhtmlXTreeObject.prototype.setOnLoadingEnd_lf=function(func)
{
if (typeof(func)=="function") this.onXLE_2=func;
else this.onXLE_2=eval(func);
};
dhtmlXTreeObject.prototype.enableLoadingItem=function(text)
{
this.setOnLoadingStart(this._showFakeItem);
this.setOnLoadingEnd(this._hideFakeItem);
this.setOnLoadingStart=this.setOnLoadingStart_lf;
this.setOnLoadingEnd=this.setOnLoadingEnd_lf;
this._tfi_text=text||"Loading...";
};
dhtmlXTreeObject.prototype._showFakeItem=function(tree,id)
{
if (this.onXLS_2)this.onXLS_2(tree,id);
if ((id===null)||(this._globalIdStorageFind("fake_load_xml_"+id))) return;
this.insertNewItem(id,"fake_load_xml_"+id,this._tfi_text);
};
dhtmlXTreeObject.prototype._hideFakeItem=function(tree,id)
{
if (this.onXLE_2)this.onXLE_2(tree,id);
if (id===null)return;
this.deleteItem("fake_load_xml_"+id);
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlXTree_lf.js
|
JavaScript
|
asf20
| 1,068
|
function myObjTree(a,b,c,d)
{
var a = new dhtmlXTreeObject(a,b,c,d);
a.enableCheckBoxes(1);
a.enableDragAndDrop("yes");
return a;
};
dhtmlXTreeObject.prototype.disableCheckBoxes=function()
{
this.enableCheckBoxes(false);
};
dhtmlXTreeObject.prototype.disableDragAndDrop=function()
{
this.enableDragAndDrop(false);
};
dhtmlXTreeObject.prototype.initXMLAutoLoading=function(name)
{
this.setXMLAutoLoading(name);
};
dhtmlXTreeObject.prototype.getSelectedItems=function()
{
return this.getSelectedItemText();
};
dhtmlXTreeObject.prototype.getSelectedItemsId=function()
{
return this.getSelectedItemId();
};
dhtmlXTreeObject.prototype.getItemIdByIndex=function(itemId,index)
{
return this.getChildItemIdByIndex(itemId,index);
};
dhtmlXTreeObject.prototype.insertNewChild=function(pid,id,label,action,im1,im2,im3,optStr,as)
{
this.insertNewItem(pid,id,label,action,im1,im2,im3,optStr,as);
};
dhtmlXTreeObject.prototype.collapseAllChildren=function(id)
{
this.closeAllItems(id);
};
dhtmlXTreeObject.prototype.expandAllChildren=function(id)
{
this.openAllItems(id);
};
dhtmlXTreeObject.prototype.refreshNode=function(id)
{
this.refreshItem(id);
};
dhtmlXTreeObject.prototype.setLabel=function(id,text)
{
this.setItemText(id,text);
};
dhtmlXTreeObject.prototype.getLabel=function(id)
{
return this.getItemText(id);
};
dhtmlXTreeObject.prototype.setCheckAction=function(func)
{
return this.setOnCheckHandler(func);
};
dhtmlXTreeObject.prototype.setOpenAction=function(func)
{
return this.setOnOpenHandler(func);
};
dhtmlXTreeObject.prototype.setDefaultAction=function(func)
{
return this.setOnClickHandler(func);
};
dhtmlXTreeObject.prototype.setDblClickAction=function(func)
{
return this.setOnDblClickHandler(func);
};
dhtmlXTreeObject.prototype.setDragFunction=function(func)
{
return this.setDragHandler(func);
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlXTree_bc.js
|
JavaScript
|
asf20
| 1,969
|
function jsonPointer(data,parent){
this.d=data;
this.dp=parent;
}
jsonPointer.prototype={
text:function(){ var afff=function(n){ var p=[]; for(var i=0; i<n.length; i++) p.push("{"+sfff(n[i])+"}"); return p.join(","); }; var sfff=function(n){ var p=[]; for (var a in n) if (typeof(n[a])=="object"){ if (a.length) p.push(a+":["+afff(n[a])+"]"); else p.push(a+":{"+sfff(n[a])+"}"); }else p.push(a+':"'+n[a]+'"'); return p.join(","); }; return "{"+sfff(this.d)+"}"; },
get:function(name){return this.d[name]; },
exists:function(){return !!this.d },
content:function(){return this.d.content; },
each:function(name,f,t){ var a=this.d[name]; var c=new jsonPointer(); if (a) for (var i=0; i<a.length; i++) { c.d=a[i]; f.apply(t,[c,i]); } },
get_all:function(){ return this.d; },
sub:function(name){ return new jsonPointer(this.d[name],this.d) },
sub_exists:function(name){ return !!this.d[name]; },
each_x:function(name,rule,f,t,i){ var a=this.d[name]; var c=new jsonPointer(0,this.d); if (a) for (i=i||0; i<a.length; i++) if (a[i][rule]) { c.d=a[i]; if(f.apply(t,[c,i])==-1) return; } },
up:function(name){ return new jsonPointer(this.d.parentNode,this.d); },
set:function(name,val){ this.d[name]=val; },
clone:function(name){ return new jsonPointer(this.d,this.dp); },
through:function(name,rule,v,f,t){ var a=this.d[name]; if (a.length) for (var i=0; i<a.length; i++) { if (a[i][rule]!=null && a[i][rule]!="" && (!v || a[i][rule]==v )) { var c=new jsonPointer(a[i],this.d); f.apply(t,[c,i]); } var w=this.d; this.d=a[i]; if (this.sub_exists(name)) this.through(name,rule,v,f,t); this.d=w; } }
}
/**
* @desc: load tree from js array file|stream
* @type: public
* @param: file - link to JSArray file
* @param: afterCall - function which will be called after xml loading
* @topic: 0
*/
dhtmlXTreeObject.prototype.loadJSArrayFile=function(file,afterCall){
if (!this.parsCount) this.callEvent("onXLS",[this,this._ld_id]); this._ld_id=null; this.xmlstate=1;
var that=this;
this.XMLLoader=new dtmlXMLLoaderObject(function(){
eval("var z="+arguments[4].xmlDoc.responseText);
that.loadJSArray(z);
},this,true,this.no_cashe);
if (afterCall) this.XMLLoader.waitCall=afterCall;
this.XMLLoader.loadXML(file);
};
/**
* @desc: load tree from csv file|stream
* @type: public
* @param: file - link to CSV file
* @param: afterCall - function which will be called after xml loading
* @topic: 0
*/
dhtmlXTreeObject.prototype.loadCSV=function(file,afterCall){
if (!this.parsCount) this.callEvent("onXLS",[this,this._ld_id]); this._ld_id=null; this.xmlstate=1;
var that=this;
this.XMLLoader=new dtmlXMLLoaderObject(function(){
that.loadCSVString(arguments[4].xmlDoc.responseText);
},this,true,this.no_cashe);
if (afterCall) this.XMLLoader.waitCall=afterCall;
this.XMLLoader.loadXML(file);
};
/**
* @desc: load tree from js array object
* @type: public
* @param: ar - js array
* @param: afterCall - function which will be called after xml loading
* @topic: 0
*/
dhtmlXTreeObject.prototype.loadJSArray=function(ar,afterCall){
//array id,parentid,text
var z=[];
for (var i=0; i<ar.length; i++){
if (!z[ar[i][1]]) z[ar[i][1]]=[];
z[ar[i][1]].push({id:ar[i][0],text:ar[i][2]});
}
var top={id: this.rootId};
var f=function(top,f){
if (z[top.id]){
top.item=z[top.id];
for (var j=0; j<top.item.length; j++)
f(top.item[j],f);
}
}
f(top,f);
this.loadJSONObject(top,afterCall);
}
/**
* @desc: load tree from csv string
* @type: public
* @param: csv - csv string
* @param: afterCall - function which will be called after xml loading
* @topic: 0
*/
dhtmlXTreeObject.prototype.loadCSVString=function(csv,afterCall){
//array id,parentid,text
var z=[];
var ar=csv.split("\n");
for (var i=0; i<ar.length; i++){
var t=ar[i].split(",");
if (!z[t[1]]) z[t[1]]=[];
z[t[1]].push({id:t[0],text:t[2]});
}
var top={id: this.rootId};
var f=function(top,f){
if (z[top.id]){
top.item=z[top.id];
for (var j=0; j<top.item.length; j++)
f(top.item[j],f);
}
}
f(top,f);
this.loadJSONObject(top,afterCall);
}
/**
* @desc: load tree from json object
* @type: public
* @param: json - json object
* @param: afterCall - function which will be called after xml loading
* @topic: 0
*/
dhtmlXTreeObject.prototype.loadJSONObject=function(json,afterCall){
if (!this.parsCount) this.callEvent("onXLS",[this,null]);this.xmlstate=1;
var p=new jsonPointer(json);
this._parse(p);
this._p=p;
if (afterCall) afterCall();
};
/**
* @desc: load tree from json file
* @type: public
* @param: file - link to JSON file
* @param: afterCall - function which will be called after xml loading
* @topic: 0
*/
dhtmlXTreeObject.prototype.loadJSON=function(file,afterCall){
if (!this.parsCount) this.callEvent("onXLS",[this,this._ld_id]); this._ld_id=null; this.xmlstate=1;
var that=this;
this.XMLLoader=new dtmlXMLLoaderObject(function(){
eval("var t="+arguments[4].xmlDoc.responseText);
var p=new jsonPointer(t);
that._parse(p);
that._p=p;
},this,true,this.no_cashe);
if (afterCall) this.XMLLoader.waitCall=afterCall;
this.XMLLoader.loadXML(file);
};
//two methods below are kind of ugly, but it is nearly impossible to create beautiful serialization with current tree data storage
/**
* @desc: return tree as json string
* @type: public
* @topic: 0
*/
dhtmlXTreeObject.prototype.serializeTreeToJSON=function(){
var out=["{id:'"+this.rootId+"', item:["];
var p=[];
for (var i=0; i<this.htmlNode.childsCount; i++)
p.push(this._serializeItemJSON(this.htmlNode.childNodes[i]));
out.push(p.join(","));
out.push("]}");
return out.join("");
};
dhtmlXTreeObject.prototype._serializeItemJSON=function(itemNode){
var out=[];
if (itemNode.unParsed)
return (itemNode.unParsed.text());
if (this._selected.length)
var lid=this._selected[0].id;
else lid="";
var text=itemNode.span.innerHTML;
if (this._xescapeEntities)
for (var i=0; i<this._serEnts.length; i++)
text=text.replace(this._serEnts[i][2],this._serEnts[i][1]);
if (!this._xfullXML)
out.push('{ id:"'+itemNode.id+'", '+(this._getOpenState(itemNode)==1?' open:"1", ':'')+(lid==itemNode.id?' select:"1",':'')+' text:"'+text+'"'+( ((this.XMLsource)&&(itemNode.XMLload==0))?", child:\"1\" ":""));
else
out.push('{ id:"'+itemNode.id+'", '+(this._getOpenState(itemNode)==1?' open:"1", ':'')+(lid==itemNode.id?' select:"1",':'')+' text:"'+text+'", im0:"'+itemNode.images[0]+'", im1:"'+itemNode.images[1]+'", im2:"'+itemNode.images[2]+'" '+(itemNode.acolor?(', aCol:"'+itemNode.acolor+'" '):'')+(itemNode.scolor?(', sCol:"'+itemNode.scolor+'" '):'')+(itemNode.checkstate==1?', checked:"1" ':(itemNode.checkstate==2?', checked:"-1"':''))+(itemNode.closeable?', closeable:"1" ':''));
if ((this._xuserData)&&(itemNode._userdatalist))
{
out.push(", userdata:[");
var names=itemNode._userdatalist.split(",");
var p=[];
for (var i=0; i<names.length; i++)
p.push+="{ name:\""+names[i]+"\" , content:\""+itemNode.userData["t_"+names[i]]+"\" }";
out.push(p.join(",")); out.push("]");
}
if (itemNode.childsCount){
out.push(", item:[");
var p=[];
for (var i=0; i<itemNode.childsCount; i++)
p.push(this._serializeItemJSON(itemNode.childNodes[i]));
out.push(p.join(","));
out.push("]\n");
}
out.push("}\n")
return out.join("");
}
|
zzfls-pj
|
trunk/WebRoot/include/js/components/xTree/xTree_js/dhtmlxtree_json.js
|
JavaScript
|
asf20
| 7,861
|
function dtmlXMLLoaderObject(funcObject, dhtmlObject,async,rSeed)
{
this.xmlDoc="";
if(arguments.length==2)this.async=true;
else
this.async=async;
this.onloadAction=funcObject||null;
this.mainObject=dhtmlObject||null;
this.waitCall=null;
this.rSeed=rSeed||false;
return this;
};
dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject)
{
this.check=function ()
{
if ((dhtmlObject)&&(dhtmlObject.onloadAction!=null))
{
if ((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState == 4))
{
dhtmlObject.onloadAction(dhtmlObject.mainObject,null,null,null,dhtmlObject);
if (dhtmlObject.waitCall)
{
dhtmlObject.waitCall();
dhtmlObject.waitCall=null;
};
dhtmlObject=null;
};
};
};
return this.check;
};
dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName)
{
if (this.xmlDoc.responseXML)
{
var temp=this.xmlDoc.responseXML.getElementsByTagName(tagName);
var z=temp[0];
}
else
var z=this.xmlDoc.documentElement;
if (z)
{
this._retry=false;
return z;
};
if ((_isIE)&&(!this._retry))
{
var xmlString=this.xmlDoc.responseText;
this._retry=true;
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.async=false;
this.xmlDoc.loadXML(xmlString);
return this.getXMLTopNode(tagName);
};
dhtmlxError.throwError("LoadXML","Incorrect XML",[this.xmlDoc,this.mainObject]);
return document.createElement("DIV");
};
dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString)
{
try
{
var parser = new DOMParser();
this.xmlDoc = parser.parseFromString(xmlString,"text/xml");
}
catch(e)
{
this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
this.xmlDoc.async=this.async;
this.xmlDoc.loadXML(xmlString);
};
this.onloadAction(this.mainObject,null,null,null,this);
if (this.waitCall)
{
this.waitCall();
this.waitCall=null;
};
};
dtmlXMLLoaderObject.prototype.loadXML=function(filePath,postMode,postVars,rpc)
{
this.filePath=filePath;
if (this.rSeed)filePath+=((filePath.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();
if ((!_isIE)&&(window.XMLHttpRequest))
this.xmlDoc = new XMLHttpRequest();
else
{
if (document.implementation && document.implementation.createDocument)
{
this.xmlDoc = document.implementation.createDocument("", "", null);
this.xmlDoc.onload = new this.waitLoadFunction(this);
this.xmlDoc.load(filePath);
return;
}
else
this.xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
};
this.xmlDoc.open(postMode?"POST":"GET",filePath,this.async);
if (rpc)
{
this.xmlDoc.setRequestHeader("User-Agent", "dhtmlxRPC v0.1 (" + navigator.userAgent + ")");
this.xmlDoc.setRequestHeader("Content-type", "text/xml");
}
else
if (postMode)this.xmlDoc.setRequestHeader('Content-type','application/x-www-form-urlencoded');
this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
this.xmlDoc.send(null||postVars);
};
dtmlXMLLoaderObject.prototype.destructor=function()
{
this.onloadAction=null;
this.mainObject=null;
this.xmlDoc=null;
return null;
};
function callerFunction(funcObject,dhtmlObject)
{
this.handler=function(e)
{
if (!e)e=window.event;
funcObject(e,dhtmlObject);
return true;
};
return this.handler;
};
function getAbsoluteLeft(htmlObject)
{
var xPos = htmlObject.offsetLeft;
var temp = htmlObject.offsetParent;
while (temp != null)
{
xPos += temp.offsetLeft;
temp = temp.offsetParent;
};
return xPos;
};
function getAbsoluteTop(htmlObject)
{
var yPos = htmlObject.offsetTop;
var temp = htmlObject.offsetParent;
while (temp != null)
{
yPos += temp.offsetTop;
temp = temp.offsetParent;
};
return yPos;
};
function convertStringToBoolean(inputString)
{
if (typeof(inputString)=="string") inputString=inputString.toLowerCase();
switch(inputString)
{
case "1":
case "true":
case "yes":
case "y":
case 1:
case true:
return true;
break;
default: return false;
};
};
function getUrlSymbol(str)
{
if(str.indexOf("?")!=-1)
return "&"
else
return "?"
};
function dhtmlDragAndDropObject()
{
if (window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;
this.lastLanding=0;
this.dragNode=0;
this.dragStartNode=0;
this.dragStartObject=0;
this.tempDOMU=null;
this.tempDOMM=null;
this.waitDrag=0;
window.dhtmlDragAndDrop=this;
return this;
};
dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode)
{
htmlNode.onmousedown=null;
htmlNode.dragStarter=null;
htmlNode.dragLanding=null;
};
dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode,dhtmlObject)
{
htmlNode.onmousedown=this.preCreateDragCopy;
htmlNode.dragStarter=dhtmlObject;
this.addDragLanding(htmlNode,dhtmlObject);
};
dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode,dhtmlObject)
{
htmlNode.dragLanding=dhtmlObject;
};
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e)
{
if (window.dhtmlDragAndDrop.waitDrag)
{
window.dhtmlDragAndDrop.waitDrag=0;
document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
return false;
};
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;
if ((e)&&(e.preventDefault))
{
e.preventDefault();
return false;
};
return false;
};
dhtmlDragAndDropObject.prototype.callDrag=function(e)
{
if (!e)e=window.event;
dragger=window.dhtmlDragAndDrop;
if ((e.button==0)&&(_isIE)) return dragger.stopDrag();
if (!dragger.dragNode)
{
dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,e);
if (!dragger.dragNode)return dragger.stopDrag();
dragger.gldragNode=dragger.dragNode;
document.body.appendChild(dragger.dragNode);
document.body.onmouseup=dragger.stopDrag;
dragger.waitDrag=0;
dragger.dragNode.pWindow=window;
dragger.initFrameRoute();
};
if (dragger.dragNode.parentNode!=window.document.body)
{
var grd=dragger.gldragNode;
if (dragger.gldragNode.old)grd=dragger.gldragNode.old;
grd.parentNode.removeChild(grd);
var oldBody=dragger.dragNode.pWindow;
if (_isIE)
{
var div=document.createElement("Div");
div.innerHTML=dragger.dragNode.outerHTML;
dragger.dragNode=div.childNodes[0];
}
else dragger.dragNode=dragger.dragNode.cloneNode(true);
dragger.dragNode.pWindow=window;
dragger.gldragNode.old=dragger.dragNode;
document.body.appendChild(dragger.dragNode);
oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode;
};
dragger.dragNode.style.left=e.clientX+15+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";
dragger.dragNode.style.top=e.clientY+3+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";
if (!e.srcElement)var z=e.target;
else z=e.srcElement;
dragger.checkLanding(z,e);
};
dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n)
{
if (window.name)
{
var el =parent.frames[window.name].frameElement.offsetParent;
var fx=0;
var fy=0;
while (el)
{
fx += el.offsetLeft;
fy += el.offsetTop;
el = el.offsetParent;
};
if ((parent.dhtmlDragAndDrop))
{
var ls=parent.dhtmlDragAndDrop.calculateFramePosition(1);
fx+=ls.split('_')[0]*1;
fy+=ls.split('_')[1]*1;
};
if (n)return fx+"_"+fy;
else this.fx=fx;
this.fy=fy;
};
return "0_0";
};
dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject,e)
{
if ((htmlObject)&&(htmlObject.dragLanding))
{
if (this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding);
this.lastLanding=htmlObject;
this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,e.clientX, e.clientY,e);
this.lastLanding_scr=(_isIE?e.srcElement:e.target);
}
else
{
if ((htmlObject)&&(htmlObject.tagName!="BODY")) this.checkLanding(htmlObject.parentNode,e);
else
{
if (this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding,e.clientX, e.clientY,e);
this.lastLanding=0;
if (this._onNotFound)this._onNotFound();
};
};
};
dhtmlDragAndDropObject.prototype.stopDrag=function(e,mode)
{
dragger=window.dhtmlDragAndDrop;
if (!mode)
{
dragger.stopFrameRoute();
var temp=dragger.lastLanding;
dragger.lastLanding=null;
if (temp)temp.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,temp,(_isIE?event.srcElement:e.target));
};
dragger.lastLanding=null;
if ((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(win)
{
if (win)window.dhtmlDragAndDrop.stopDrag(1,1);
for (var i=0;i<window.frames.length;i++)if ((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window);
if ((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
parent.dhtmlDragAndDrop.stopFrameRoute(window);
};
dhtmlDragAndDropObject.prototype.initFrameRoute=function(win,mode)
{
if (win)
{
window.dhtmlDragAndDrop.preCreateDragCopy();
window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;
window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;
window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;
window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;
window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;
window.waitDrag=0;
if (((!_isIE)&&(mode))&&((!_isFF)||(_FFrv<1.8)))
window.dhtmlDragAndDrop.calculateFramePosition();
};
if ((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
parent.dhtmlDragAndDrop.initFrameRoute(window);
for (var i=0;i<window.frames.length;i++)if ((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
window.frames[i].dhtmlDragAndDrop.initFrameRoute(window,((!win||mode)?1:0));
};
var _isFF=false;
var _isIE=false;
var _isOpera=false;
var _isKHTML=false;
var _isMacOS=false;
if (navigator.userAgent.indexOf('Macintosh')!= -1) _isMacOS=true;
if ((navigator.userAgent.indexOf('Safari')!= -1)||(navigator.userAgent.indexOf('Konqueror')!= -1))
_isKHTML=true;
else if (navigator.userAgent.indexOf('Opera')!= -1)
{
_isOpera=true;
_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6,3));
}
else if(navigator.appName.indexOf("Microsoft")!=-1)
_isIE=true;
else
{
_isFF=true;
var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1])
};
function isIE()
{
if(navigator.appName.indexOf("Microsoft")!=-1)
if (navigator.userAgent.indexOf('Opera')== -1)
return true;
return false;
};
dtmlXMLLoaderObject.prototype.doXPath = function(xpathExp,docObj)
{
if ((_isOpera)||(_isKHTML)) return this.doXPathOpera(xpathExp,docObj);
if(_isIE)
{
if(!docObj)if(!this.xmlDoc.nodeName)docObj = this.xmlDoc.responseXML
else
docObj = this.xmlDoc;
return docObj.selectNodes(xpathExp);
}
else
{
var nodeObj = docObj;
if(!docObj)
{
if(!this.xmlDoc.nodeName)
{
docObj = this.xmlDoc.responseXML
}
else
{
docObj = this.xmlDoc;
};
};
if(docObj.nodeName.indexOf("document")!=-1)
{
nodeObj = docObj;
}
else
{
nodeObj = docObj;
docObj = docObj.ownerDocument;
};
var rowsCol = new Array();
var col = docObj.evaluate(xpathExp, nodeObj, null, XPathResult.ANY_TYPE,null);
var thisColMemb = col.iterateNext();
while (thisColMemb)
{
rowsCol[rowsCol.length] = thisColMemb;
thisColMemb = col.iterateNext();
};
return rowsCol;
};
};
function _dhtmlxError(type,name,params)
{
if (!this.catches)this.catches=new Array();
return this;
};
_dhtmlxError.prototype.catchError=function(type,func_name)
{
this.catches[type]=func_name;
};
_dhtmlxError.prototype.throwError=function(type,name,params)
{
if (this.catches[type])return this.catches[type](type,name,params);
if (this.catches["ALL"])return this.catches["ALL"](type,name,params);
alert("Error type: " + arguments[0]+"\nDescription: " + arguments[1] );
return null;
};
window.dhtmlxError=new _dhtmlxError();
dtmlXMLLoaderObject.prototype.doXPathOpera = function(xpathExp,docObj)
{
var z=xpathExp.replace(/[\/]+/gi,"/").split('/');
var obj=null;
var i=1;
if (!z.length)return [];
if (z[0]==".")obj=[docObj];
else if (z[0]=="")
{
obj=this.xmlDoc.responseXML.getElementsByTagName(z[i].replace(/\[[^\]]*\]/g,""));
i++;
}
else return [];
for (i;i<z.length;i++)obj=this._getAllNamedChilds(obj,z[i]);
if (z[i-1].indexOf("[")!=-1)
obj=this._filterXPath(obj,z[i-1]);
return obj;
};
dtmlXMLLoaderObject.prototype._filterXPath = function(a,b)
{
var c=new Array();
var b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");
for (var i=0;i<a.length;i++)if (a[i].getAttribute(b))
c[c.length]=a[i];
return c;
};
dtmlXMLLoaderObject.prototype._getAllNamedChilds = function(a,b)
{
var c=new Array();
for (var i=0;i<a.length;i++)for (var j=0;
j<a[i].childNodes.length;
j++)if (a[i].childNodes[j].tagName==b)c[c.length]=a[i].childNodes[j];
return c;
};
function dhtmlXHeir(a,b)
{
for (c in b)if (typeof(b[c])=="function") a[c]=b[c];return a;
};
function dhtmlxEvent(el,event,handler)
{
if (el.addEventListener)el.addEventListener(event,handler,false);
else if (el.attachEvent)el.attachEvent("on"+event,handler);
};
|
zzfls-pj
|
trunk/WebRoot/include/js/components/comm_js/dhtmlxcommon.js
|
JavaScript
|
asf20
| 16,029
|
var binfo = (function()
{
var ua = navigator.userAgent.toLowerCase();
return {
ie : /*@cc_on!@*/false,
i7 : /*@cc_on!@*/false && (parseInt(ua.match(/msie (\d+)/)[1], 10) >= 7),
//获得页面属性
getPageConf :function() {
var db = document.body;
var dd = document.documentElement;
pageConf = {screenW:screen.width, screenH:screen.height,clientHD:dd.clientHeight,clientWD:dd.clientWidth,clientH:db.clientHeight,clientW:db.clientWidth,offsetW:db.offsetWidth,offsetH:db.offsetHeight};
return pageConf;
}
};
})();
var config = { opac : 0.50, bgcolor : '#fff', bzi : null, it : null, il : null };
var tool =
{
restyle : function(e)
{
e.style.cssText = 'margin:0;padding:0;background-image:none;background-color:transparent;border:0;';
},
ststyle : function(e, dict)
{
var style = e.style;
for (var n in dict) style[n] = dict[n];
},
getestyle : function(e, p)
{
if (binfo.ie)
return e.currentStyle[p];
else
return e.ownerDocument.defaultView.getComputedStyle(e, '').getPropertyValue(p);
},
stopac : function(e, opac)
{
if (binfo.ie)
{
opac = Math.round(opac * 100);
e.style.filter = ( opac > 100 ? '' : 'alpha(opacity=' + opac + ')' );
}
else
e.style.opacity = opac;
},
getvoid : function()
{
if (binfo.ie)
return ( binfo.i7 ? '' : 'javascript:\'\'' );
return 'javascript:void(0)';
},
//添加事件
addevt : function(o, e, l)
{
if (binfo.ie)
o.attachEvent('on' + e, l);
else
o.addEventListener(e, l, false);
},
//去除事件
remevt : function(o, e, l)
{
if (binfo.ie)
o.detachEvent('on' + e, l);
else
o.removeEventListener(e, l, false);
},
isdtd : function(doc)
{
return ( 'CSS1Compat' == ( doc.compatMode || 'CSS1Compat' ) );
},
getclsize : function(w)
{
if (binfo.ie)
{
var oSize, doc = w.document.documentElement;
oSize = ( doc && doc.clientWidth ) ? doc : w.document.body;
if (oSize)
return { w : oSize.clientWidth, h : oSize.clientHeight };
else
return { w : 0, h : 0 };
}
else
return { w : w.innerWidth, h : w.innerHeight };
},
getev : function()
{
if (binfo.ie) return window.event;
var func = tool.getev.caller;
while (func != null)
{
var arg = func.arguments[0];
if (arg && (arg + '').indexOf('Event') >= 0) return arg;
func = func.caller;
}
return null;
},
getepos : function(o)
{
var l, t;
if (o.getBoundingClientRect)
{
var el = o.getBoundingClientRect();
l = el.left;
t = el.top;
}
else
{
l = o.offsetLeft - Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
t = o.offsetTop - Math.max(document.documentElement.scrollTop, document.body.scrollTop);
}
return { x : l, y : t };
},
getspos : function(w)
{
if (binfo.ie)
{
var doc = w.document;
var oPos = { X : doc.documentElement.scrollLeft, Y : doc.documentElement.scrollTop };
if (oPos.X > 0 || oPos.Y > 0) return oPos;
return { X : doc.body.scrollLeft, Y : doc.body.scrollTop };
}
else
return { X : w.pageXOffset, Y : w.pageYOffset };
},
getlink : function(c)
{
if (c.length == 0) return;
return '<' + 'link href="' + c + '" type="text/css" rel="stylesheet"/>';
},
regdoll : function(w)
{
if (binfo.ie)
w.$ = w.document.getElementById;
else
w.$ = function(id) {
return w.document.getElementById(id);
};
},
getedoc : function(e)
{
return e.ownerDocument || e.document;
},
disctmenu : function(doc)
{
doc.oncontextmenu = function(e)
{
e = e || event || this.parentWindow.event;
var o = e.srcElement || e.target;
if (!( o.type == 'password' || o.type == 'text' || o.type == 'textarea' ))
{
if (binfo.ie) e.returnValue = false; else e.preventDefault();
}
};
},
getpath : function()
{
var bp, len, sc = document.getElementsByTagName('script');
for (var i = 0; i < sc.length; i++)
{
bp = sc[i].src.substring(0, sc[i].src.toLowerCase().indexOf('lhgdialog.js'));
len = bp.lastIndexOf('/');
if (len > 0) bp = bp.substring(0, len + 1);
if (bp) break;
}
if (binfo.ie && bp.indexOf('../') != -1)
{
var fp = window.location.href;
fp = fp.substring(0, fp.lastIndexOf('/'));
while (bp.indexOf('../') >= 0)
{
bp = bp.substring(3);
fp = fp.substring(0, fp.lastIndexOf('/'));
}
return fp + '/' + bp;
} else return bp;
},
//删除节点
remnode : function(n) {
return n.parentNode.removeChild(n);
}
};
var lhgdialog = (function()
{
var array_win = new Array();
//添加数组项
var Array_AddItem = function(item) {
for (var i = 0; i < array_win.length; i++) {
if (array_win[i] == item) return;
}
array_win.push(item);
};
//删除数组项
var Array_RemoveItem = function(item) {
var tmpArray = new Array();
for (var i = 0; i < array_win.length; i++) {
if (array_win[i] != item) tmpArray.push(array_win[i]);
}
array_win = tmpArray;
tmpArray = null;
};
//判断是否在数组中存在
var indexOfArray = function(value, arr)
{
if (!(typeof(value) == "string" || typeof(value) == "number")) return false;
for (var i in arr)
{
if (arr[i] == value) return true;
}
return false;
};
var twin = window, cover;
//循环找到最顶层
//while( twin.parent && twin.parent != twin )
//{
// try{ if( twin.parent.document.domain != document.domain ) break; } catch(e){break;}
//twin = twin.parent;
//}
var tdoc = twin.document;
//获取层次级别
var getzi = function()
{
if (!config.bzi) config.bzi = 999;
return ++config.bzi;
};
//设置窗口大小
var resizehdl = function()
{
if (!cover) return;
var rel = tool.isdtd(tdoc) ? tdoc.documentElement : tdoc.body;
tool.ststyle(cover,
{
'width' : Math.max(rel.scrollWidth, rel.clientWidth, tdoc.scrollWidth || 0) - 1 + 'px',
'height' : Math.max(rel.scrollHeight, rel.clientHeight, tdoc.scrollHeight || 0) - 1 + 'px'
});
};
//重新设置窗口样式
var reIframe = function(win, w, h, t, l) {
tool.ststyle(win, { 'top' : t,'left' : l,'width' : w, 'height' : h});
}
//获取元素对象
var getElById = function(i) {
return document.getElementById(i);
}
var oldWidth = "", oldHeight = "",oldTop = "",oldLeft = "",isNewWin = 0;
var finalWidth = "", finalHeight = "",finalTop = "",finalLeft = "";
//共有方法
return {
/**
* 打开窗口方法
* @param n 窗口id
* @param t 窗口标题头内容
* @param p 连接路径
* @param w 窗口宽度
* @param h 窗口高度
* @param c 窗口蒙板
* @param i 窗口是否是外部链接
* @param s 窗口是否定位
* @param l 窗口位置
* @param o 窗口创建位置
* @param q:窗口级别 one 一级 ,two 二级;
*/
opendlg : function(n, t, p, w, h, c, i, s, l, o, q)
{
//判断窗口是否创建
if (indexOfArray(n, array_win)) {
isNewWin = 1;
}
if (isNewWin == 1) {
getElById(n).style.display = "";
if (cover) cover.style.display = "";
getElById(n).style.zIndex=getzi(); //打开多个页面 切换
return;
}
;
if (c) this.dcover(o); else {
if (cover) cover = null;
}
var dinfo = { tit : t, page : p, win : window, topw : twin, link : i, sc : s ,vp : o};
var clsize = tool.getclsize(twin), spos = tool.getspos(twin);
var schdl = function()
{
var rel = tool.getspos(twin);
tool.ststyle(dfrm, { 'top' : rel.Y + config.it + 'px', 'left' : rel.X + config.il + 'px' });
};
var it = ( l && l.top ) ? spos.Y + l.top : Math.max(spos.Y + ( clsize.h - h - 20 ) / 2, 0);
var il = ( l && l.left ) ? spos.X + l.left : Math.max(spos.X + ( clsize.w - w - 20 ) / 2, 0);
if (getElById(o)) { //webos 打开窗口 默认 top=0px
it = 0;
}
if (getElById(o)) {
getElById(o).style.zIndex = getzi() + 1;
var dfrm = document.createElement("iframe");
} else {
dfrm = tdoc.createElement('iframe');
}
;
tool.restyle(dfrm);
if (n) dfrm.id = n;
if (n) dfrm.name = n;
dfrm.frameBorder = 0;
if (getElById(o)) {
dfrm.src = tool.getpath() + 'webos.html';
} else {
if(q == "two"){
dfrm.src = tool.getpath() + 'lhgdialog_child.html'; //二级窗口
}else{
dfrm.src = tool.getpath() + 'lhgdialog.html'; //一级窗口
}
}
tool.ststyle(dfrm,
{
'position' : 'absolute', 'top' : it + 'px', 'left' : il + 'px',
'width' : w + 'px', 'height' : h + 'px', 'zIndex' : getzi()
});
if (s) {
config.it = it - spos.Y;
config.il = il - spos.X;
}
;
if (s) tool.addevt(twin, 'scroll', schdl);
if (getElById(o)) {
getElById(o).appendChild(dfrm);
} else {
tdoc.body.appendChild(dfrm);
}
;
dfrm._dlgargs = dinfo;
//将创建窗口加入数组
Array_AddItem(n);
},
/**
* 关闭窗口
* @param d 窗口对象或窗口ID
* @param c 蒙罩层
*/
closdlg : function(d, c)
{
var dlg = ( 'object' == typeof(d) ) ? d.frameElement : document.getElementById(d);
if (dlg) tool.remnode(dlg);
if (c) this.hcover(c);
//删除数组中创建窗口的id
Array_RemoveItem(dlg.id);
isNewWin = null;
oldWidth = null;
oldHeight = null;
oldTop = null;
oldLeft = null;
},
//获得活动窗口ID
getActiveWinId : function() {
var id,c = 0;
if (array_win.length == 0) {
return "";
}
;
if (array_win.length == 1) {
return array_win[0]
}
;
for (var i = 0; i < array_win.length; i++) {
var a = getElById(array_win[i]).style.zIndex;
if (a > c) {
c = a;
id = array_win[i];
}
}
return id;
},
//最大化窗口
isMax : false,
winMax : function(win) {
if (!win) return;
var ifWidth = win.style.width;
var ifHeight = win.style.height;
var ifTop = win.style.top;
var ifLeft = win.style.left;
if (win.parentNode.tagName.toUpperCase() != "BODY") {
var winWidth = win.parentNode.style.width;
var winHeight = win.parentNode.style.height;
} else {
winWidth = document.body.clientWidth + 'px';
winHeight = document.body.clientHeight - 5 + 'px';
}
if (!this.isMax && !this.isMin) {
finalTop = ifTop;
finalLeft = ifLeft;
finalWidth = ifWidth;
finalHeight = ifHeight;
reIframe(win, winWidth, winHeight, '0px', '0px');
oldTop = ifTop;
oldLeft = ifLeft;
oldWidth = ifWidth;
oldHeight = ifHeight;
this.isMax = true;
}else if(this.isMax && !this.isMin){
reIframe(win, oldWidth, oldHeight, oldTop, oldLeft);
this.isMax = false;
}else if(!this.isMax && this.isMin){
reIframe(win, finalWidth, finalHeight, finalTop, finalLeft);
this.isMin = false;
}else if(this.isMax && this.isMin){
reIframe(win, finalWidth, finalHeight, finalTop, finalLeft);
this.isMax = false;
this.isMin = false;
}
},
//最小化窗口
isMin : false,
winMin : function(win,oBtn) {
if (!win) return;
var ifWidth = win.style.width;
var ifHeight = win.style.height;
var ifTop = win.style.top;
var ifLeft = win.style.left;
if (win.parentNode.tagName.toUpperCase() != "BODY") {
var winWidth = win.parentNode.style.width;
var winHeight = win.parentNode.style.height;
} else {
winWidth = document.body.clientWidth + 'px';
winHeight = document.body.clientHeight - 5 + 'px';
}
if (!this.isMin && !this.isMax) {
finalTop = ifTop;
finalLeft = ifLeft;
finalWidth = ifWidth;
finalHeight = ifHeight;
oBtn.title = '还原';
oBtn.className = "obtn_active_over2";
reIframe(win, ifWidth, '30px', '0px', '0px');
oldTop = ifTop;
oldLeft = ifLeft;
oldWidth = ifWidth;
oldHeight = ifHeight;
this.isMin = true;
// }else if(this.isMin && !this.isMax){
// reIframe(win, oldWidth, oldHeight, oldTop, oldLeft);
// this.isMin = false;
}else if(!this.isMin && this.isMax){
reIframe(win, ifWidth, '30px', '0px', '0px');
this.isMin = true;
// }else if(this.isMin && this.isMax){
// reIframe(win, finalWidth, finalHeight, finalTop, finalLeft);
// reIframe(win, winWidth, winHeight, '0px', '0px');
// this.isMin = false;
}
},
// //最小化窗口
// winMin : function(win, c) {
// if (!win) return;
// if (c) {
// c.style.display = "none"
// }
// ;
// win.style.display = "none";
// },
//显示窗口
showdlg : function(win) {
if (!win) return;
win.style.display = "";
},
//隐藏窗口
hiddendlg : function(win) {
if (!win) return;
win.style.display = "none";
},
//创建蒙罩层
dcover : function(o) {
if (getElById(o)) {
cover = document.createElement("div");
} else {
cover = tdoc.createElement('div');
}
;
tool.restyle(cover);
tool.ststyle(cover,
{
'position' : 'absolute', 'zIndex' : getzi(), 'top' : '0px',
'left' : '0px', 'backgroundColor' : config.bgcolor
});
tool.stopac(cover, config.opac);
if (binfo.ie && !binfo.i7)
{
if (getElById(o)) {
var ifrm = document.createElement('iframe');
} else {
ifrm = tdoc.createElement('iframe');
}
tool.restyle(ifrm);
ifrm.hideFocus = true;
ifrm.frameBorder = 10;
ifrm.src = tool.getvoid();
tool.ststyle(ifrm,
{
'width' : '100%', 'height' : '100%', 'position' : 'absolute', 'left' : '0px',
'top' : '0px', 'filter' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'
});
cover.appendChild(ifrm);
}
tool.addevt(twin, 'resize', resizehdl);
resizehdl();
if (getElById(o)) {
getElById(o).appendChild(cover);
} else {
tdoc.body.appendChild(cover);
}
;
},
//返回蒙罩层对象
gcover : function() {
return cover;
},
//销毁蒙罩层对象
hcover : function(o) {
tool.remnode(o);
cover = null;
o = null;
}
};
})();
|
zzfls-pj
|
trunk/WebRoot/include/js/window/lhgdialog.js
|
JavaScript
|
asf20
| 18,070
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
var W = frameElement._dlgargs.win, dlgcover = W.lhgdialog.gcover();
var pageConf = W.binfo.getPageConf();
function A() {
return frameElement._dlgargs;
}
window.focus();
W.tool.regdoll(window);
document.write(W.tool.getlink('lhgdialog.css'));
if (W.binfo.ie)
{
try {
document.execCommand('BackgroundImageCache', false, true);
} catch(e) {
}
}
var recontze = function()
{
if (W.binfo.ie && !W.binfo.i7)
{
$('contain').style.height = document.body.offsetHeight - 2;
$('contain').style.width = document.body.offsetWidth - 2;
}
$('contain').style.height = document.body.offsetHeight-1;
$('contain').style.width = document.body.offsetWidth-1;
var h = $('contain').offsetHeight;
h -= $('dtit').offsetHeight;
h -= $('dfoot').offsetHeight;
$('dinner').style.height = Math.max(h - 9, 0) + 'px';
};
//创建遮罩层
var crtel = function(t, l, w, h)
{
var vpObj = frameElement.parentNode;
if (vpObj) {
var o = parent.document.createElement('div');
} else {
var o = A().topw.document.createElement('div');
}
W.tool.ststyle(o,
{
'position' : 'absolute', 'top' : t + 'px', 'left' : l + 'px', border : '1px solid #000',
'width' : w + 'px', 'height' : h + 'px', 'zIndex' : W.config.bzi + 1, 'backgroundColor' : '#666'
});
W.tool.stopac(o, 0.30);
if (vpObj) {
vpObj.appendChild(o);
} else {
A().topw.document.body.appendChild(o);
}
return o;
};
var drag = function() {
var regwin = [], lacoor, curpos, tdark;
var cluphdl = function() {
for (var i = 0; i < regwin.length; i++) {
W.tool.remevt(regwin[i].document, 'mousemove', dragmovehdl);
W.tool.remevt(regwin[i].document, 'mouseup', draguphdl);
}
};
var dragmovehdl = function(evt) { //onmousemove
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
curpos =
{
x : curpos.x + ( curcoor.x - lacoor.x ),
y : curpos.y + ( curcoor.y - lacoor.y )
};
lacoor = curcoor;
tdark.style.left = curpos.x + 'px';
tdark.style.top = curpos.y + 'px';
};
//---解决添加到平台中拖拽蒙版问题
var getStrFromRight = function(str, i) {
l = str.length;
return str.substring(0, l - i);
};
var getActiveWinConf = function() {
if (!W.lhgdialog.getActiveWinId()) return;
var winConf = { w : "", h : "",t:"",l:"" };
with (frameElement.style) {
winConf.w = getStrFromRight(width, 2);
winConf.h = getStrFromRight(height, 2);
winConf.t = getStrFromRight(top, 2);
winConf.l = getStrFromRight(left, 2)
}
return winConf;
};
var draguphdl = function(evt) {//onmouseup
var actWinConf = getActiveWinConf();
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
cluphdl();
W.tool.remnode(tdark);
lacoor = null;
tdark = null;
if (curpos.y < 0) curpos.y = 0;
if (curpos.y > pageConf.clientH - actWinConf.h) curpos.y = pageConf.clientH - actWinConf.h;
if (curpos.x < 0) curpos.x = 0;
if (curpos.x > pageConf.clientW - actWinConf.w) curpos.x = pageConf.clientW - actWinConf.w;
W.tool.ststyle(frameElement, { top : curpos.y + 'px', left : curpos.x + 'px' });
if (A().sc) {
var tp = W.tool.getspos(A().topw);
W.config.it = curpos.y - tp.Y;
W.config.il = curpos.x - tp.X;
}
;
};
return {
downhdl : function(evt) { //onmousedown
var view = null;
if (!evt) {
view = W.tool.getedoc(this).parentWindow;
evt = view.event;
} else view = evt.view;
var tget = evt.srcElement || evt.target;
if (tget.id == 'xbtn' || tget.id == 'obtn' || tget.id == 'mbtn') return;
var fw = frameElement.offsetWidth, fh = frameElement.offsetHeight;
curpos = { x : frameElement.offsetLeft, y : frameElement.offsetTop };
lacoor = { x : evt.screenX, y : evt.screenY };
tdark = crtel(curpos.y, curpos.x, fw, fh);
for (var i = 0; i < regwin.length; i++) {
W.tool.addevt(regwin[i].document, 'mousemove', dragmovehdl);
W.tool.addevt(regwin[i].document, 'mouseup', draguphdl);
}
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl: function(w) {
regwin.push(w);
}
};
}();
var resize = function() {
var regwin = [], lacoor, curpos, tdark, frsize;
var movehdl = function(evt) {
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
frsize = { w : curcoor.x - lacoor.x, h : curcoor.y - lacoor.y };
if (frsize.w < 200 || frsize.h < 100) {
frsize.w = 200;
frsize.h = 100
}
;
W.tool.ststyle(tdark, { width : frsize.w + 'px', height: frsize.h + 'px', top : curpos.y + 'px', left : curpos.x + 'px' });
};
var uphdl = function(evt) {
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
for (var i = 0; i < regwin.length; i++) {
W.tool.remevt(regwin[i].document, 'mousemove', movehdl);
W.tool.remevt(regwin[i].document, 'mouseup', uphdl);
}
W.tool.ststyle(frameElement, { width : frsize.w + 'px', height : frsize.h + 'px' });
recontze();
W.tool.remnode(tdark);
lacoor = null;
tdark = null;
if (W.binfo.ie && !W.binfo.i7 && $('frmain')) $('frmain').height = $('dinner').style.height;
};
return {
downhdl : function(evt) {
var view = null;
if (!evt) {
view = W.tool.getedoc(this).parentWindow;
evt = view.event;
} else view = evt.view;
var fw = frameElement.offsetWidth, fh = frameElement.offsetHeight;
curpos = { x : frameElement.offsetLeft, y : frameElement.offsetTop };
frsize = { w : fw, h : fh };
lacoor = { x : evt.screenX - fw, y : evt.screenY - fh };
tdark = crtel(curpos.y, curpos.x, fw, fh);
for (var i = 0; i < regwin.length; i++) {
W.tool.addevt(regwin[i].document, 'mousemove', movehdl);
W.tool.addevt(regwin[i].document, 'mouseup', uphdl);
}
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl : function(w) {
regwin.push(w);
}
};
}();
(function() {
window.onload = function() {
recontze();
loadbtnevt();
$('throbber').style.visibility = '';
loadinnfrm();
if (W.binfo.ie) window.document.onmousedown = setop; else window.onmousedown = setop;
$('dtit').onmousedown = drag.downhdl;
drag.reghdl(window);
drag.reghdl(A().topw);
drag.reghdl(W);
//$('dtit').onmousemove = drag.downhdl; drag.reghdl(window); drag.reghdl(A().topw); drag.reghdl(W);
$('dark').onmousedown = resize.downhdl;
resize.reghdl(window);
resize.reghdl(A().topw);
resize.reghdl(W);
if (A().link) $('throbber').style.visibility = 'hidden';
W.tool.disctmenu(document);
};
var setop = function(evt) {
if (!evt) evt = event || this.parentWindow.event;
W.tool.ststyle(frameElement, {'zIndex':parseInt(W.config.bzi, 10) + 1});
W.config.bzi = frameElement.style.zIndex;
evt.cancelBubble = true;
};
var loadinnfrm = function() {
if (A().link == 'hcode') {
$('dinner').innerHTML = A().page;
} else {
var sy = A().link ? '' : 'style="visibility:hidden;" ';
$('dinner').innerHTML = '<iframe id="frmain" src="' + A().page + '" name="frmain" frameborder="0" ' +
'width="100%" height="100%" scrolling="auto" ' + sy + 'allowtransparency="true"><\/iframe>';
document.getElementById("frmain").src = A().page; //重新刷新iframe 的 src 否则会出现页面交叉现象 王艳春
}
};
window.loadinndlg = function() {
if (!frameElement.parentNode) return null;
var frmain = $('frmain'), innwin = frmain.contentWindow, inndoc = innwin.document;
$('throbber').style.visibility = 'hidden';
frmain.style.visibility = '';
if (W.binfo.ie) inndoc.onmousedown = setop; else innwin.onmousedown = setop;
drag.reghdl(innwin);
resize.reghdl(innwin);
innwin.focus();
return W;
};
window.cancel = function() {
return closedlg();
};
window.closedlg = function() {
if ($('frmain')) $('frmain').src = W.tool.getvoid();
$('throbber').style.visibility = 'hidden';
W.lhgdialog.closdlg(window, dlgcover);
};
var loadbtnevt = function() {
if (W.binfo.ie) {
var img = new Image();
img.src = "images/btn_close.gif";
}
;
//crebtn('cbtn', '关 闭', cancel);
$('txt').innerHTML = A().tit;
$('xbtn').onmouseover = function() {
this.className = "xbtn_active_over";
};
$('xbtn').onmouseout = function() {
this.className = "xbtn_active";
};
$('xbtn').title = "关闭";
$('xbtn').onclick = cancel;
var title = "";
$('obtn').onmouseover = function() {
if (W.lhgdialog.isMax || W.lhgdialog.isMin) {
this.className = "obtn_active_over2";
$('obtn').title = "还原";
} else {
this.className = "obtn_active_over";
$('obtn').title = "最大化";
}
};
$('obtn').onmouseout = function() {
if (W.lhgdialog.isMax) {
this.className = "obtn_active2";
} else {
this.className = "obtn_active";
}
};
$('obtn').onclick = winMax;
$('mbtn').onmouseover = function() {
// if (W.lhgdialog.isMin) {
// this.className = "mbtn_active_over";
// $('mbtn').title = "还原";
// } else {
this.className = "mbtn_active_over";
$('mbtn').title = "最小化";
// }
};
$('mbtn').onmouseout = function() {
// if (W.lhgdialog.isMin) {
// this.className = "mbtn_active";
// } else {
this.className = "mbtn_active";
// }
};
$('mbtn').onclick = winMin;
};
window.winMax = function() {
W.lhgdialog.winMax(frameElement);
recontze();
};
window.winMin = function() {
W.lhgdialog.winMin(frameElement,$('obtn'));
};
window.hiddenwin = function() {
W.lhgdialog.hiddendlg(frameElement);
};
window.showdlg = function() {
W.lhgdialog.showdlg(frameElement);
}
window.crebtn = function(i, t, f) {
if ($(i)) {
$(i).innerHTML = '<span>' + t + '</span>';
$(i).onclick = f;
} else {
var li = document.createElement('li'), span = document.createElement('span');
li.id = i;
span.innerHTML = t;
li.appendChild(span);
li.onmouseover = function() {
this.style.backgroundPosition = '0 -42px';
};
li.onmouseout = function() {
this.style.backgroundPosition = '0 -21px';
};
li.onclick = f;
$('btns').appendChild(li);
li = span = null;
}
};
window.rembtn = function(id) {
if ($(id)) $('btns').removeChild($(id));
};
window.remTopbtn = function(id) {
if ($(id)) $('dtit').removeChild($(id));
};
})();
</script>
</head>
<body>
<div id="contain" class="contain">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="win_active_top_left"><img src="images/standard/active/bank.gif" width="4" border="0"></td>
<td class="win_active_top_center" valign="middle">
<div id="dtit" class="dlgtit_active">
<span id="txt"></span>
<span id="xbtn" class="xbtn_active"></span>
<span id="obtn" class="obtn_active"></span>
<span id="mbtn" class="mbtn_active"></span>
</div>
</td>
<td class="win_active_top_right" width="4"></td>
</tr>
<tr>
<td class="win_active_center_left"></td>
<td class="win_active_center_center">
<div id="dinner" class="dlginner"></div>
<div id="dfoot" class="dlgfoot">
<ul id="btns">
<li id="dark"></li>
</ul>
</div>
</td>
<td class="win_active_center_right"></td>
</tr>
<tr>
<td class="win_active_bottom_left"></td>
<td class="win_active_bottom_center"></td>
<td class="win_active_bottom_right"><img src="images/standard/active/bank.gif" width="4" height="6"
border="0"></td>
</tr>
</table>
</div>
<div id="throbber" style="position:absolute;visibility:hidden;">正在加载窗口内容,请稍等....</div>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/js/window/lhgdialog.html
|
HTML
|
asf20
| 14,445
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
var W = frameElement._dlgargs.win, dlgcover = W.lhgdialog.gcover();
var pageConf = W.binfo.getPageConf();
function A() {
return frameElement._dlgargs;
}
window.focus();
W.tool.regdoll(window);
document.write(W.tool.getlink('lhgdialog.css'));
if (W.binfo.ie)
{
try {
document.execCommand('BackgroundImageCache', false, true);
} catch(e) {
}
}
var recontze = function()
{
if (W.binfo.ie && !W.binfo.i7)
{
$('contain').style.height = document.body.offsetHeight - 2;
$('contain').style.width = document.body.offsetWidth - 2;
}
$('contain').style.height = document.body.offsetHeight-1;
$('contain').style.width = document.body.offsetWidth-1;
var h = $('contain').offsetHeight;
h -= $('dtit').offsetHeight;
h -= $('dfoot').offsetHeight;
$('dinner').style.height = Math.max(h - 9, 0) + 'px';
};
//创建遮罩层
var crtel = function(t, l, w, h)
{
var vpObj = frameElement.parentNode;
if (vpObj) {
var o = parent.document.createElement('div');
} else {
var o = A().topw.document.createElement('div');
}
W.tool.ststyle(o,
{
'position' : 'absolute', 'top' : t + 'px', 'left' : l + 'px', border : '1px solid #000',
'width' : w + 'px', 'height' : h + 'px', 'zIndex' : W.config.bzi + 1, 'backgroundColor' : '#666'
});
W.tool.stopac(o, 0.30);
if (vpObj) {
vpObj.appendChild(o);
} else {
A().topw.document.body.appendChild(o);
}
return o;
};
var drag = function() {
var regwin = [], lacoor, curpos, tdark;
var cluphdl = function() {
for (var i = 0; i < regwin.length; i++) {
W.tool.remevt(regwin[i].document, 'mousemove', dragmovehdl);
W.tool.remevt(regwin[i].document, 'mouseup', draguphdl);
}
};
var dragmovehdl = function(evt) { //onmousemove
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
curpos =
{
x : curpos.x + ( curcoor.x - lacoor.x ),
y : curpos.y + ( curcoor.y - lacoor.y )
};
lacoor = curcoor;
tdark.style.left = curpos.x + 'px';
tdark.style.top = curpos.y + 'px';
};
//---解决添加到平台中拖拽蒙版问题
var getStrFromRight = function(str, i) {
l = str.length;
return str.substring(0, l - i);
};
var getActiveWinConf = function() {
if (!W.lhgdialog.getActiveWinId()) return;
var winConf = { w : "", h : "",t:"",l:"" };
with (frameElement.style) {
winConf.w = getStrFromRight(width, 2);
winConf.h = getStrFromRight(height, 2);
winConf.t = getStrFromRight(top, 2);
winConf.l = getStrFromRight(left, 2)
}
return winConf;
};
var draguphdl = function(evt) {//onmouseup
var actWinConf = getActiveWinConf();
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
cluphdl();
W.tool.remnode(tdark);
lacoor = null;
tdark = null;
if (curpos.y < 0) curpos.y = 0;
if (curpos.y > pageConf.clientH - actWinConf.h) curpos.y = pageConf.clientH - actWinConf.h;
if (curpos.x < 0) curpos.x = 0;
if (curpos.x > pageConf.clientW - actWinConf.w) curpos.x = pageConf.clientW - actWinConf.w;
W.tool.ststyle(frameElement, { top : curpos.y + 'px', left : curpos.x + 'px' });
if (A().sc) {
var tp = W.tool.getspos(A().topw);
W.config.it = curpos.y - tp.Y;
W.config.il = curpos.x - tp.X;
}
;
};
return {
downhdl : function(evt) { //onmousedown
var view = null;
if (!evt) {
view = W.tool.getedoc(this).parentWindow;
evt = view.event;
} else view = evt.view;
var tget = evt.srcElement || evt.target;
if (tget.id == 'xbtn' || tget.id == 'obtn' || tget.id == 'mbtn') return;
var fw = frameElement.offsetWidth, fh = frameElement.offsetHeight;
curpos = { x : frameElement.offsetLeft, y : frameElement.offsetTop };
lacoor = { x : evt.screenX, y : evt.screenY };
tdark = crtel(curpos.y, curpos.x, fw, fh);
for (var i = 0; i < regwin.length; i++) {
W.tool.addevt(regwin[i].document, 'mousemove', dragmovehdl);
W.tool.addevt(regwin[i].document, 'mouseup', draguphdl);
}
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl: function(w) {
regwin.push(w);
}
};
}();
var resize = function() {
var regwin = [], lacoor, curpos, tdark, frsize;
var movehdl = function(evt) {
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
frsize = { w : curcoor.x - lacoor.x, h : curcoor.y - lacoor.y };
if (frsize.w < 200 || frsize.h < 100) {
frsize.w = 200;
frsize.h = 100
}
;
W.tool.ststyle(tdark, { width : frsize.w + 'px', height: frsize.h + 'px', top : curpos.y + 'px', left : curpos.x + 'px' });
};
var uphdl = function(evt) {
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
for (var i = 0; i < regwin.length; i++) {
W.tool.remevt(regwin[i].document, 'mousemove', movehdl);
W.tool.remevt(regwin[i].document, 'mouseup', uphdl);
}
W.tool.ststyle(frameElement, { width : frsize.w + 'px', height : frsize.h + 'px' });
recontze();
W.tool.remnode(tdark);
lacoor = null;
tdark = null;
if (W.binfo.ie && !W.binfo.i7 && $('frmain')) $('frmain').height = $('dinner').style.height;
};
return {
downhdl : function(evt) {
var view = null;
if (!evt) {
view = W.tool.getedoc(this).parentWindow;
evt = view.event;
} else view = evt.view;
var fw = frameElement.offsetWidth, fh = frameElement.offsetHeight;
curpos = { x : frameElement.offsetLeft, y : frameElement.offsetTop };
frsize = { w : fw, h : fh };
lacoor = { x : evt.screenX - fw, y : evt.screenY - fh };
tdark = crtel(curpos.y, curpos.x, fw, fh);
for (var i = 0; i < regwin.length; i++) {
W.tool.addevt(regwin[i].document, 'mousemove', movehdl);
W.tool.addevt(regwin[i].document, 'mouseup', uphdl);
}
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl : function(w) {
regwin.push(w);
}
};
}();
(function() {
window.onload = function() {
recontze();
loadbtnevt();
$('throbber').style.visibility = '';
loadinnfrm();
if (W.binfo.ie) window.document.onmousedown = setop; else window.onmousedown = setop;
$('dtit').onmousedown = drag.downhdl;
drag.reghdl(window);
drag.reghdl(A().topw);
drag.reghdl(W);
//$('dtit').onmousemove = drag.downhdl; drag.reghdl(window); drag.reghdl(A().topw); drag.reghdl(W);
$('dark').onmousedown = resize.downhdl;
resize.reghdl(window);
resize.reghdl(A().topw);
resize.reghdl(W);
if (A().link) $('throbber').style.visibility = 'hidden';
W.tool.disctmenu(document);
};
var setop = function(evt) {
if (!evt) evt = event || this.parentWindow.event;
W.tool.ststyle(frameElement, {'zIndex':parseInt(W.config.bzi, 10) + 1});
W.config.bzi = frameElement.style.zIndex;
evt.cancelBubble = true;
};
var loadinnfrm = function() {
if (A().link == 'hcode') {
$('dinner').innerHTML = A().page;
} else {
var sy = A().link ? '' : 'style="visibility:hidden;" ';
$('dinner').innerHTML = '<iframe id="frmain" src="' + A().page + '" name="frmain" frameborder="0" ' +
'width="100%" height="100%" scrolling="auto" ' + sy + 'allowtransparency="true"><\/iframe>';
document.getElementById("frmain").src = A().page; //重新刷新iframe 的 src 否则会出现页面交叉现象 王艳春
}
};
window.loadinndlg = function() {
if (!frameElement.parentNode) return null;
var frmain = $('frmain'), innwin = frmain.contentWindow, inndoc = innwin.document;
$('throbber').style.visibility = 'hidden';
frmain.style.visibility = '';
if (W.binfo.ie) inndoc.onmousedown = setop; else innwin.onmousedown = setop;
drag.reghdl(innwin);
resize.reghdl(innwin);
innwin.focus();
return W;
};
window.cancel = function() {
return closedlg();
};
window.closedlg = function() {
if ($('frmain')) $('frmain').src = W.tool.getvoid();
$('throbber').style.visibility = 'hidden';
W.lhgdialog.closdlg(window, dlgcover);
};
var loadbtnevt = function() {
if (W.binfo.ie) {
var img = new Image();
img.src = "images/btn_close.gif";
}
;
//crebtn('cbtn', '关 闭', cancel);
$('txt').innerHTML = A().tit;
$('xbtn').onmouseover = function() {
this.className = "xbtn_active_over";
};
$('xbtn').onmouseout = function() {
this.className = "xbtn_active";
};
$('xbtn').title = "关闭";
$('xbtn').onclick = cancel;
var title = "";
$('obtn').onmouseover = function() {
if (W.lhgdialog.isMax) {
this.className = "obtn_active_over2";
$('obtn').title = "还原";
} else {
this.className = "obtn_active_over";
$('obtn').title = "最大化";
}
};
$('obtn').onmouseout = function() {
if (W.lhgdialog.isMax) {
this.className = "obtn_active2";
} else {
this.className = "obtn_active";
}
};
$('obtn').onclick = winMax;
$('mbtn').onmouseover = function() {
if (W.lhgdialog.isMin) {
this.className = "mbtn_active_over";
$('mbtn').title = "还原";
} else {
this.className = "mbtn_active_over";
$('mbtn').title = "最小化";
}
};
$('mbtn').onmouseout = function() {
if (W.lhgdialog.isMin) {
this.className = "mbtn_active";
} else {
this.className = "mbtn_active";
}
};
$('mbtn').onclick = winMin;
};
window.winMax = function() {
W.lhgdialog.winMax(frameElement);
recontze();
};
window.winMin = function() {
W.lhgdialog.winMin(frameElement);
};
window.hiddenwin = function() {
W.lhgdialog.hiddendlg(frameElement);
};
window.showdlg = function() {
W.lhgdialog.showdlg(frameElement);
}
window.crebtn = function(i, t, f) {
if ($(i)) {
$(i).innerHTML = '<span>' + t + '</span>';
$(i).onclick = f;
} else {
var li = document.createElement('li'), span = document.createElement('span');
li.id = i;
span.innerHTML = t;
li.appendChild(span);
li.onmouseover = function() {
this.style.backgroundPosition = '0 -42px';
};
li.onmouseout = function() {
this.style.backgroundPosition = '0 -21px';
};
li.onclick = f;
$('btns').appendChild(li);
li = span = null;
}
};
window.rembtn = function(id) {
if ($(id)) $('btns').removeChild($(id));
};
window.remTopbtn = function(id) {
if ($(id)) $('dtit').removeChild($(id));
};
})();
</script>
</head>
<body>
<div id="contain" class="contain">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="win_active_top_left"><img src="images/standard/active/bank.gif" width="4" border="0"></td>
<td class="win_active_top_center" valign="middle">
<div id="dtit" class="dlgtit_active">
<span id="txt"></span>
<span id="xbtn" class="xbtn_active"></span>
<span id="obtn" class="obtn_active"></span>
<span id="mbtn" class="mbtn_active"></span>
</div>
</td>
<td class="win_active_top_right" width="4"></td>
</tr>
<tr>
<td class="win_active_center_left"></td>
<td class="win_active_center_center">
<div id="dinner" class="dlginner"></div>
<div id="dfoot" class="dlgfoot">
<ul id="btns">
<li id="dark"></li>
</ul>
</div>
</td>
<td class="win_active_center_right"></td>
</tr>
<tr>
<td class="win_active_bottom_left"></td>
<td class="win_active_bottom_center"></td>
<td class="win_active_bottom_right"><img src="images/standard/active/bank.gif" width="4" height="6"
border="0"></td>
</tr>
</table>
</div>
<div id="throbber" style="position:absolute;visibility:hidden;">正在加载窗口内容,请稍等....</div>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/js/window/lhgdialog_child.html
|
HTML
|
asf20
| 14,396
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
var W = frameElement._dlgargs.win, dlgcover = W.lhgdialog.gcover();
var pageConf = W.binfo.getPageConf();
function A() {
return frameElement._dlgargs;
}
window.focus();
W.tool.regdoll(window);
document.write(W.tool.getlink('lhgdialog.css'));
if (W.binfo.ie)
{
try {
document.execCommand('BackgroundImageCache', false, true);
} catch(e) {
}
}
var recontze = function()
{
if (W.binfo.ie && !W.binfo.i7)
{
$('contain').style.height = document.body.offsetHeight - 2;
$('contain').style.width = document.body.offsetWidth - 2;
}
$('contain').style.height = document.body.offsetHeight-1;
$('contain').style.width = document.body.offsetWidth-1;
var h = $('contain').offsetHeight;
h -= $('dtit').offsetHeight;
h -= $('dfoot').offsetHeight;
$('dinner').style.height = Math.max(h - 9, 0) + 'px';
};
//创建遮罩层
var crtel = function(t, l, w, h)
{
var vpObj = frameElement.parentNode;
if (vpObj) {
var o = parent.document.createElement('div');
} else {
var o = A().topw.document.createElement('div');
}
W.tool.ststyle(o,
{
'position' : 'absolute', 'top' : t + 'px', 'left' : l + 'px', border : '1px solid #000',
'width' : w + 'px', 'height' : h + 'px', 'zIndex' : W.config.bzi + 1, 'backgroundColor' : '#666'
});
W.tool.stopac(o, 0.30);
if (vpObj) {
vpObj.appendChild(o);
} else {
A().topw.document.body.appendChild(o);
}
return o;
};
var drag = function() {
var regwin = [], lacoor, curpos, tdark;
var cluphdl = function() {
for (var i = 0; i < regwin.length; i++) {
W.tool.remevt(regwin[i].document, 'mousemove', dragmovehdl);
W.tool.remevt(regwin[i].document, 'mouseup', draguphdl);
}
};
var dragmovehdl = function(evt) { //onmousemove
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
curpos =
{
x : curpos.x + ( curcoor.x - lacoor.x ),
y : curpos.y + ( curcoor.y - lacoor.y )
};
lacoor = curcoor;
tdark.style.left = curpos.x + 'px';
tdark.style.top = curpos.y + 'px';
};
//---解决添加到平台中拖拽蒙版问题
var getStrFromRight = function(str, i) {
l = str.length;
return str.substring(0, l - i);
};
var getActiveWinConf = function() {
if (!W.lhgdialog.getActiveWinId()) return;
var winConf = { w : "", h : "",t:"",l:"" };
with (frameElement.style) {
winConf.w = getStrFromRight(width, 2);
winConf.h = getStrFromRight(height, 2);
winConf.t = getStrFromRight(top, 2);
winConf.l = getStrFromRight(left, 2)
}
return winConf;
};
var draguphdl = function(evt) {//onmouseup
var actWinConf = getActiveWinConf();
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
cluphdl();
W.tool.remnode(tdark);
lacoor = null;
tdark = null;
if (curpos.y < 0) curpos.y = 0;
if (curpos.y > pageConf.clientH - actWinConf.h) curpos.y = pageConf.clientH - actWinConf.h;
if (curpos.x < 0) curpos.x = 0;
if (curpos.x > pageConf.clientW - actWinConf.w) curpos.x = pageConf.clientW - actWinConf.w;
W.tool.ststyle(frameElement, { top : curpos.y + 'px', left : curpos.x + 'px' });
if (A().sc) {
var tp = W.tool.getspos(A().topw);
W.config.it = curpos.y - tp.Y;
W.config.il = curpos.x - tp.X;
}
;
};
return {
downhdl : function(evt) { //onmousedown
var view = null;
if (!evt) {
view = W.tool.getedoc(this).parentWindow;
evt = view.event;
} else view = evt.view;
var tget = evt.srcElement || evt.target;
if (tget.id == 'xbtn' || tget.id == 'obtn' || tget.id == 'mbtn') return;
var fw = frameElement.offsetWidth, fh = frameElement.offsetHeight;
curpos = { x : frameElement.offsetLeft, y : frameElement.offsetTop };
lacoor = { x : evt.screenX, y : evt.screenY };
tdark = crtel(curpos.y, curpos.x, fw, fh);
for (var i = 0; i < regwin.length; i++) {
W.tool.addevt(regwin[i].document, 'mousemove', dragmovehdl);
W.tool.addevt(regwin[i].document, 'mouseup', draguphdl);
}
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl: function(w) {
regwin.push(w);
}
};
}();
var resize = function() {
var regwin = [], lacoor, curpos, tdark, frsize;
var movehdl = function(evt) {
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
var curcoor = { x : evt.screenX, y : evt.screenY };
frsize = { w : curcoor.x - lacoor.x, h : curcoor.y - lacoor.y };
if (frsize.w < 200 || frsize.h < 100) {
frsize.w = 200;
frsize.h = 100
}
;
W.tool.ststyle(tdark, { width : frsize.w + 'px', height: frsize.h + 'px', top : curpos.y + 'px', left : curpos.x + 'px' });
};
var uphdl = function(evt) {
if (!lacoor) return;
if (!evt) evt = W.tool.getedoc(this).parentWindow.event;
for (var i = 0; i < regwin.length; i++) {
W.tool.remevt(regwin[i].document, 'mousemove', movehdl);
W.tool.remevt(regwin[i].document, 'mouseup', uphdl);
}
W.tool.ststyle(frameElement, { width : frsize.w + 'px', height : frsize.h + 'px' });
recontze();
W.tool.remnode(tdark);
lacoor = null;
tdark = null;
if (W.binfo.ie && !W.binfo.i7 && $('frmain')) $('frmain').height = $('dinner').style.height;
};
return {
downhdl : function(evt) {
var view = null;
if (!evt) {
view = W.tool.getedoc(this).parentWindow;
evt = view.event;
} else view = evt.view;
var fw = frameElement.offsetWidth, fh = frameElement.offsetHeight;
curpos = { x : frameElement.offsetLeft, y : frameElement.offsetTop };
frsize = { w : fw, h : fh };
lacoor = { x : evt.screenX - fw, y : evt.screenY - fh };
tdark = crtel(curpos.y, curpos.x, fw, fh);
for (var i = 0; i < regwin.length; i++) {
W.tool.addevt(regwin[i].document, 'mousemove', movehdl);
W.tool.addevt(regwin[i].document, 'mouseup', uphdl);
}
if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false;
},
reghdl : function(w) {
regwin.push(w);
}
};
}();
(function() {
window.onload = function() {
recontze();
loadbtnevt();
$('throbber').style.visibility = '';
loadinnfrm();
if (W.binfo.ie) window.document.onmousedown = setop; else window.onmousedown = setop;
$('dtit').onmousedown = drag.downhdl;
drag.reghdl(window);
drag.reghdl(A().topw);
drag.reghdl(W);
//$('dtit').onmousemove = drag.downhdl; drag.reghdl(window); drag.reghdl(A().topw); drag.reghdl(W);
$('dark').onmousedown = resize.downhdl;
resize.reghdl(window);
resize.reghdl(A().topw);
resize.reghdl(W);
if (A().link) $('throbber').style.visibility = 'hidden';
W.tool.disctmenu(document);
};
var setop = function(evt) {
if (!evt) evt = event || this.parentWindow.event;
W.tool.ststyle(frameElement, {'zIndex':parseInt(W.config.bzi, 10) + 1});
W.config.bzi = frameElement.style.zIndex;
evt.cancelBubble = true;
};
var loadinnfrm = function() {
if (A().link == 'hcode') {
$('dinner').innerHTML = A().page;
} else {
var sy = A().link ? '' : 'style="visibility:hidden;" ';
$('dinner').innerHTML = '<iframe id="frmain" src="' + A().page + '" name="frmain" frameborder="0" ' +
'width="100%" height="100%" scrolling="auto" ' + sy + 'allowtransparency="true"><\/iframe>';
document.getElementById("frmain").src = A().page; //重新刷新iframe 的 src 否则会出现页面交叉现象 王艳春
}
};
window.loadinndlg = function() {
if (!frameElement.parentNode) return null;
var frmain = $('frmain'), innwin = frmain.contentWindow, inndoc = innwin.document;
$('throbber').style.visibility = 'hidden';
frmain.style.visibility = '';
if (W.binfo.ie) inndoc.onmousedown = setop; else innwin.onmousedown = setop;
drag.reghdl(innwin);
resize.reghdl(innwin);
innwin.focus();
return W;
};
window.cancel = function() {
return closedlg();
};
window.closedlg = function() {
if ($('frmain')) $('frmain').src = W.tool.getvoid();
$('throbber').style.visibility = 'hidden';
W.lhgdialog.closdlg(window, dlgcover);
};
var loadbtnevt = function() {
if (W.binfo.ie) {
var img = new Image();
img.src = "images/btn_close.gif";
}
;
//crebtn('cbtn', '关 闭', cancel);
$('txt').innerHTML = A().tit;
$('xbtn').onmouseover = function() {
this.className = "xbtn_active_over";
};
$('xbtn').onmouseout = function() {
this.className = "xbtn_active";
};
$('xbtn').title = "关闭";
$('xbtn').onclick = cancel;
var title = "";
$('obtn').onmouseover = function() {
if (W.lhgdialog.isMax) {
this.className = "obtn_active_over2";
$('obtn').title = "向下还原";
} else {
this.className = "obtn_active_over";
$('obtn').title = "最大化";
}
};
$('obtn').onmouseout = function() {
if (W.lhgdialog.isMax) {
this.className = "obtn_active2";
} else {
this.className = "obtn_active";
}
};
$('obtn').onclick = winMax;
$('mbtn').onmouseover = function() {
this.className = "mbtn_active_over";
};
$('mbtn').onmouseout = function() {
this.className = "mbtn_active";
};
$('mbtn').title = "最小化";
$('mbtn').onclick = winMin;
};
window.winMax = function() {
W.lhgdialog.winMax(frameElement);
recontze();
};
window.winMin = function() {
W.lhgdialog.winMin(frameElement, dlgcover);
};
window.hiddenwin = function() {
W.lhgdialog.hiddendlg(frameElement);
};
window.showdlg = function() {
W.lhgdialog.showdlg(frameElement);
}
window.crebtn = function(i, t, f) {
if ($(i)) {
$(i).innerHTML = '<span>' + t + '</span>';
$(i).onclick = f;
} else {
var li = document.createElement('li'), span = document.createElement('span');
li.id = i;
span.innerHTML = t;
li.appendChild(span);
li.onmouseover = function() {
this.style.backgroundPosition = '0 -42px';
};
li.onmouseout = function() {
this.style.backgroundPosition = '0 -21px';
};
li.onclick = f;
$('btns').appendChild(li);
li = span = null;
}
};
window.rembtn = function(id) {
if ($(id)) $('btns').removeChild($(id));
};
window.remTopbtn = function(id) {
if ($(id)) $('dtit').removeChild($(id));
};
})();
</script>
</head>
<body>
<div id="contain" class="contain">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="win_active_top_left"><img src="images/standard/active/bank.gif" width="4" border="0"></td>
<td class="win_active_top_center" valign="middle">
<div id="dtit" class="dlgtit_active">
<span id="txt"></span>
<span id="xbtn" class="xbtn_active"></span>
<span id="obtn" class="obtn_active"></span>
<span id="mbtn" class="mbtn_active"></span>
</div>
</td>
<td class="win_active_top_right" width="4"></td>
</tr>
<tr>
<td class="win_active_center_left"></td>
<td class="win_active_center_center">
<div id="dinner" class="dlginner"></div>
<!--<div id="dfoot" class="dlgfoot">-->
<!--<ul id="btns">-->
<!--<li id="dark"></li>-->
<!--</ul>-->
<!--</div>-->
</td>
<td class="win_active_center_right"></td>
</tr>
<tr>
<td class="win_active_bottom_left"></td>
<td class="win_active_bottom_center"></td>
<td class="win_active_bottom_right"><img src="images/standard/active/bank.gif" width="4" height="6"
border="0"></td>
</tr>
</table>
</div>
<div id="dfoot" style="top: -5px;height: 0px;_width: 100%;right: 0;bottom: 0;left: 0;">
<ul id="btns">
<li id="dark"></li>
</ul>
</div>
<div id="throbber" style="position:absolute;visibility:hidden;">正在加载窗口内容,请稍等....</div>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/js/window/webos.html
|
HTML
|
asf20
| 14,354
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>lhgdialog - samples</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{margin:0;padding:0;font:14px Verdana, Arial, sans-serif;line-height:200%;}
#content{padding-left:50px;padding-right:50px;}
#content h2{font-size:18px;color:#1E9300;padding-top:8px;margin-bottom:8px;}
#content h3{margin-top:8px;margin-bottom:8px;FONT:bold 14px 宋体,tahoma,arial,sans-serif;COLOR:#0033CC;}
#content div{margin-top:10px;margin-bottom:10px;border:#666 solid 1px;padding:10px;}
#content span{color:#f00;font-weight:bold;}
ul, ol{color:#000000;}
</style>
<script type="text/javascript" src="lhgdialog.js"></script>
<script type="text/javascript">
function open1()
{
lhgdialog.opendlg( 'win1','不带遮罩层的普通窗口', '_content/content1.html', 600, 300,true,true,"","","test" );
}
function open2()
{
lhgdialog.opendlg( 'win2','带遮罩层的普通窗口', '_content/content1.html', 400, 300, true );
}
function open3()
{
lhgdialog.opendlg( 'win3','内容页为外部连接的窗口', 'http://www.qq.com', 640, 480, false, true );
}
function open4()
{
lhgdialog.opendlg( 'win4','内容页为html代码的窗口', '<div style="color:red;font-size:14px;">lhgdialog弹出窗口</div>', 400, 300, false, 'hcode' );
}
function open5()
{
lhgdialog.opendlg( 'win5','带遮罩层带子窗口的窗口', '_content/content2.html', 400, 300, true );
}
function open6()
{
lhgdialog.opendlg( 'win6','被调用页面关闭的窗口', '_content/content1.html', 400, 300, false, false, 'win1' );
}
function closdlg()
{
lhgdialog.closdlg('win6');
}
function open7()
{
lhgdialog.opendlg('win7', '在指定位置弹出窗口并随滚动条滚动', '_content/content1.html', 400, 300, false, false, true, { top:100, left:100 } );
}
function open8()
{
lhgdialog.opendlg( 'win8','返回值到调用页面', '_content/content3.html', 400, 300 );
}
function open9()
{
lhgdialog.opendlg( 'win9','窗口1', '_content/content4.html', 400, 300, false, false );
}
function open10()
{
lhgdialog.opendlg( 'win10','窗口2', '_content/content5.html', 400, 300, false, false );
}
function open11()
{
lhgdialog.opendlg('win11', '创建其它按钮', '_content/content6.html', 400, 300 );
}
function open12()
{
//tool.getev()函数为取得触发事件,用这个函数可以不需要在open12()函数加任何参数。
//e为取得事件触发对象,w为取得对象宽度,h为取得对象高度。
//tool.getepos()函数为取得触发对象的相对于body的定位。
var ev = tool.getev(), e = ev.srcElement || ev.target;
var l, t, w = e.offsetWidth, h = e.offsetHeight;
var pos = tool.getepos(e);
//使窗口显示在触发对象的右边
l = pos.x + w; t = pos.y;
//使窗口显示在触发对象的下边
//l = pos.x; t = pos.y + h;
lhgdialog.opendlg('win12', '在按钮的右边或下边弹出窗口', '_content/content1.html', 400, 300, false, false, false, { top : t, left : l } );
//如果你不想用到窗口在触发对象位置弹出窗口可把lhgdailog.js里的tool对象的tool.getev()和tool.getepos()2个函数删除。
}
</script>
</head>
<body><div id="test" style="border:#f00 1px solid;width:900px;height:300px;overflow:hidden;position: absolute;top:300px;">dddd</div>
<div id="content"> ddddddddddddd
<h2>lhgdialog - samples</h2><hr />
<h3>1. 不带遮罩层的普通窗口 </h3>
<div>
<input type="button" id="a" value="不带遮罩层的普通窗口" onclick="open1()"/><br/>
<input type="button" id="aa" value="隐藏窗口" onclick="lhgdialog.hiddendlg('win1')"/>
<input type="button" id="aaa" value="显示窗口" onclick="lhgdialog.showdlg('win1')"/>
<input type="button" id="aaa" value="窗口最大化" onclick="lhgdialog.winMax('win1')"/>
<input type="button" id="aaa" value="获取窗口ID" onclick="alert(lhgdialog.getActiveWinId())"/>
<input type="button" id="aaa" value="获取窗口大小" onclick="lhgdialog.getActiveWinConf()"/>
<input type="button" id="aaa" value="获取页面属性" onclick="binfo.getPageConf()"/>
<span>调用代码:lhgdialog.opendlg( '不带遮罩层的普通窗口', '_content/content1.html', 600, 300 );</span>
</div>
<h3>2. 带遮罩层的普通窗口 </h3>
<div>
<input type="button" id="b" value="带遮罩层的普通窗口" onclick="open2()"/><br/>
<span>调用代码:lhgdialog.opendlg( '带遮罩层的普通窗口', '_content/content1.html', 400, 300, true );</span>
</div>
<h3>3. 内容页为外部连接的窗口</h3>
<div>
<input type="button" id="c" value="内容页为外部连接的窗口" onclick="open3()"/><br/>
<span>调用代码:lhgdialog.opendlg( '内容页为外部连接的窗口', 'http://www.google.com', 640, 480, '', true );</span>
</div>
<h3>4. 内容页为html代码的窗口</h3>
<div>
<input type="button" id="d" value="内容页为html代码的窗口" onclick="open4()"/><br/>
<span>调用代码:lhgdialog.opendlg( '内容页为html代码的窗口', '<div style="color:red;font-size:14px;">lhgdialog弹出窗口</div>', 400, 300, '', 'hcode' );</span>
</div>
<h3>5. 带遮罩层带子窗口的窗口</h3>
<div>
<input type="button" id="e" value="带遮罩层带子窗口的窗口" onclick="open5()"/><br/>
<span>调用代码:lhgdialog.opendlg( '带遮罩层带子窗口的窗口', '_content/content2.html', 400, 300, true );</span><br/>
<span>子窗口的调用代码(写在content2.html里):D.lhgdialog.opendlg( '我是子窗口', '', 400, 300, true );</span>
</div>
<h3>6. 在调用页面按钮关闭弹出窗口</h3>
<div>
<input type="button" id="f" value="被调用页面关闭的窗口" onclick="open6();"/><input type="button" value="关闭弹出窗口" onclick="closdlg();"/><br/>
<span>调用代码:lhgdialog.opendlg( '被调用页面关闭的窗口', '_content/content1.html', 400, 300, false, false, 'win1' );</span><br/>
<span>关闭窗口按钮代码:lhgdialog.closdlg('win1');</span>
</div>
<h3>7. 在指定位置弹出窗口并随滚动条滚动</h3>
<div>
<input type="button" id="g" value="在指定位置弹出窗口并随滚动条滚动" onclick="open7()"/><br/>
<span>调用代码:lhgdialog.opendlg( '窗口在右下角弹出并随滚动条滚动', '_content/content1.html', 400, 300, false, false, '', true, { top:100, left:100 } );</span><br/>
<span>注:可指定为右下角和右上角,最后一个参数为1时为右上角,为2时为右下角。</span>
</div>
<h3>8. 返回值到调用页面</h3>
<div>
<input type="button" id="h" value="返回值到调用页面" onclick="open8()"/><input type="text" id="getval" value="窗口的值返回到这里"/><br/>
<span>调用代码:lhgdialog.opendlg( '返回值到调用页面', '_content/content3.html', 400, 300 );</span><br/>
<span>注:返回值的代码都在conent3.html里,你可打开这个文件查看</span>
</div>
<h3>9. 多窗口之间的传值</h3>
<div>
<input type="button" id="i" value="窗口1" onclick="open9();"/><input type="button" id="j" value="窗口2" onclick="open10();"/><br/>
<span>调用代码:窗口1:lhgdialog.opendlg( '窗口1', '_content/content4.html', 400, 300, false, false, 'dlg1');</span><br/>
<span>窗口2:lhgdialog.opendlg( '窗口2', '_content/content5.html', 400, 300, false, false, 'dlg2' );</span><br/>
<span>注:传值操作的代码都在content4.html和content5.html里,可打开查看。</span>
</div>
<h3>10. 创建其它按钮</h3>
<div>
<input type="button" id="h" value="创建其它按钮" onclick="open11()"/><br/>
<span>调用代码:lhgdialog.opendlg( '创建其它按钮', '_content/content6.html', 400, 300 );</span><br/>
<span>注:创建其它按钮的方法都在content6.html里,可打开查看。</span>
</div>
<h3>11. 在按钮的右边或下边弹出窗口</h3>
<div>
<input type="button" id="h" value="在按钮的右边或下边弹出窗口" onclick="open12()"/><br/>
<span>调用代码:lhgdialog.opendlg( '在按钮的右边或下边弹出窗口', '_content/content1.html', 400, 300, false, false, '', false, { top : t, left : l } );</span><br/>
<span>注:详细的方法请看open12函数</span>
</div>
</div>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/js/window/_demo.html
|
HTML
|
asf20
| 8,693
|
function myTools() {
}
/**
* 从url中取数据
*/
myTools.getQueryString = function (id) {
var name, value, i;
var str = location.href;
var num = str.indexOf("?");
str = str.substr(num + 1);
var arrtmp = str.split("&");
for (var i = 0; i < arrtmp.length; i++) {
num = arrtmp[i].indexOf("=");
if (num > 0) {
name = arrtmp[i].substring(0, num);
value = arrtmp[i].substr(num + 1);
this[name] = value;
}
}
return this[id];
};
myTools.bindForm = function (formName, data) {
try {
for (var key in data) {
var obj = document.getElementById(formName + "_" + key);
if (obj) {
if (obj.tagName.toLowerCase() == "input")
if (obj.type.toLowerCase() == "checkbox") {
var bCheck = data[key];
if (bCheck == 1)
obj.checked = true;
}
obj.value = data[key];
}
}
} catch (e) {
alert("客户端绑定错误:\n" + "\nmessage:\n\t" + e.message);
}
};
/*
* 窗口组件 -----------------------------------------
*/
var win = (function () {
return {
/**
* 创建窗口
*
* @param n:窗口id;
* @param t:窗口标题头内容;
* @param p:连接路径;
* @param w:窗口宽度;
* @param h:窗口高度;
* @param c:窗口蒙板;
* @param i:窗口是否是外部链接;
* @param s:窗口是否定位;
* @param l:窗口位置;
* @param o:窗口父对象;
* @param q:窗口级别
* one 一级 ,two 二级;
*/
open:function (n, t, p, w, h, c, i, s, l, o, q) {
lhgdialog.opendlg(n, t, p, w, h, c, i, s, l, o, q);
},
/**
* 创建窗口工具栏上的按钮
*
* @param n:按钮id;
* @param t:按钮标题头内容;
* @param c:按钮单击事件方法
*/
crebtn:function (n, t, c) {
window.parent.crebtn(n, t, c);
},
/**
* 删除窗口工具栏上的按钮
*
* @param n:按钮id;
*/
rembtn:function (n) {
window.parent.rembtn(n);
},
/**
* 删除窗口标题栏上的按钮
*
* @param n:按钮id;
*/
remTopbtn:function (n) {
window.parent.remTopbtn(n);
},
/**
* 取得窗口父级对象
*
* @param n:窗口id;
*/
getParent:function (n) {
return window.parent.parent;
},
/**
* 关闭窗口
*
* @param n:窗口id;
*/
close:function (n) {
window.parent.cancel(n);
},
/**
* 取得窗口的属性 w 宽 h 高
*
* @return wc Object;
*/
getWinConf:function () {
var wc = {
w:window.parent.innerWidth,
h:window.parent.innerHeight
};
return wc;
}
};
})();
// ================第一个元素获得焦点==========================
//window.attachEvent('onload', firstElemOnfocus);
if (window.addEventListener) {
window.addEventListener('DOMContentLoaded', firstElemOnfocus, false); //firefox
window.addEventListener('load', firstElemOnfocus, false);
} else if (window.attachEvent) {
window.attachEvent('onload', firstElemOnfocus); //IE
}
function firstElemOnfocus() {
var obj = document.all;
if (!obj)return;
var flg = false;
for (var i = 0; i < obj.length; i++) {
var el = obj[i];
if (!el.disabled) {
switch (el.type) {
case "text":
case "password":
case "textarea":
el.focus();
flg = true;
break;
}
}
if (flg)
break;
}
}
function getModuleOperationByUserDMAndModuleDM(user_dm, module_dm, page_jb, viewDIV) {
var contextPath = contextPath ? contextPath : parent.parent.contextPath;
var json = {
url:contextPath + "/server/base/selectAll.do",
showMsg:false,
msg:"数据加载中.....",
params:{
"USER_DM":user_dm,
"MODULE_DM":module_dm,
"PAGE_JB":page_jb,
"SQLID":"module.selectOpertionBY_USER__AND_MODULE"
},
callback:[ function (json) {
getModuleOperationByUserDMAndModuleDMCallBack(json, viewDIV);
} ]
};
// new Ajax().sendData(json);
AjaxTools.ajax(json);
}
function getModuleOperationByUserDMAndModuleDMCallBack(json, viewDIV) {
var html = "";
for (var i = 0; i < json.data.length; i++) {
var d = json.data[i];
html += "<input type=\"button\" class=\"button\" value=\""
+ d.MODULE_NAME + "\" onclick=\"" + d.MODULE_URL + "\">";
}
document.getElementById(viewDIV).innerHTML = html;
}
/**
* 将字符串str1长度不够length时,左侧补充str2
*/
function LPad(str1, str2, length) {
for (var i = str1.length; i < length; i++) {
str1 = str2 + "" + str1;
}
return str1;
}
getPage = function (curPage, totalPage) {
if (curPage <= 0) {
return 0;
} else if (parseInt(curPage) >= parseInt(totalPage)) {
return parseInt(totalPage) - 1;
} else {
return curPage;
}
};
// 获取form表单数据
function getContent(theform) {
var els = theform.elements;
var len = els.length;
var queryString = "";
this.addField = function (name, value) {
if (queryString.length > 0) {
queryString += "&";
}
queryString += name + "=" + value;
};
for (var i = 0; i < len; i++) {
var el = els[i];
if (!el.disabled) {
switch (el.type) {
case "text":
case "password":
case "hidden":
case "textarea":
this.addField(el.name, el.value);
break;
case "select-one":
if (el.selectedIndex >= 0) {
this.addField(el.name,
el.options[el.selectedIndex].value);
}
break;
case "select-multiple":
for (var j = 0; j < el.options.length; j++) {
if (el.options[j].selected) {
this.addField(el.name, el.options[j].value);
}
}
break;
case "checkbox":
case "radio":
if (el.checked) {
this.addField(el.name, el.value);
}
break;
}
}
}
return queryString.substring(0, queryString.length);
}
;
//=====================表格处理=======================================//
function myTable() {
}
function add_event(tr) {
tr.onmouseover = function () {
tr.className += ' hover';
};
tr.onmouseout = function () {
tr.className = tr.className.replace(' hover', '');
};
}
function stripe(table) {
var trs = table.getElementsByTagName("tr");
for (var i = 1; i < trs.length; i++) {
var tr = trs[i];
tr.className = i % 2 != 0 ? 'odd' : 'even';
add_event(tr);
}
}
function setTableCss(tableId) {
var table = document.getElementById(tableId);
if (table.className == 'datagrid1' || table.className == 'datagrid2'
|| table.className == 'datagrid3' || table.className == 'datagrid4') {
stripe(table);
}
}
/**
*单选 取得选中的记录的id
*/
myTable.getSelectedID = function () {
var options = document.getElementsByName("options");
var flg = false;
var id = "";
for (var i = 0; i < options.length; i++) {
if (options[i].checked) {
if (flg) {
alert("不能多选!");
return false;
}
id = options[i].value;
flg = true;
}
}
if (flg) {
return id;
} else {
alert("请选择操作对象!");
return false;
}
};
/**
*取得选中的记录的id 允许多选, 以逗号分隔返回
*/
myTable.getSelectedIDS = function () {
var options = document.getElementsByName("options");
var flg = false;
var id = "";
for (var i = 0; i < options.length; i++) {
if (options[i].checked) {
var val = options[i].value;
id = id.length > 0 ? (id + "," + val) : val;
flg = true;
}
}
return id;
};
/**
*grid 全选
*/
myTable.checkAll = function () {
var options = document.getElementsByName("options");
var flag = false;
for (var i = 0; i < options.length; i++) {
if (options[i].checked) {
flag = true;
break;
}
}
if (flag) {
for (var i = 0; i < options.length; i++) {
options[i].checked = false;
}
} else {
for (var i = 0; i < options.length; i++) {
options[i].checked = true;
}
}
};
//=============================================================
function RowSelect(row, name) {
if (!name) name = "row";
if (window[name]) {
window[name].className = window[name].getAttribute("oldClass");
}
row.className = "tableRowSelected";
window[name] = row;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/commons.js
|
JavaScript
|
asf20
| 10,044
|
<html>
<head>
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
<title>My97DatePicker</title>
<script type="text/javascript" src="config.js"></script>
<script>
if(parent==window)
location.href = 'http://www.my97.net';
var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;
if ($pdp.eCont) {
$dp = {};
for (var p in $pdp) {
$dp[p] = $pdp[p];
}
}
else
$dp = $pdp;
$dp.getLangIndex = function(name){
var arr = langList;
for (var i = 0; i < arr.length; i++) {
if (arr[i].name == name) {
return i;
}
}
return -1;
}
$dp.getLang = function(name){
var index = $dp.getLangIndex(name);
if (index == -1) {
index = 0;
}
return langList[index];
}
$dp.realLang = $dp.getLang($dp.lang);
document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>");
for (var i = 0; i < skinList.length; i++) {
document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>');
}
</script>
<script type="text/javascript" src="calendar.js"></script>
</head>
<body leftmargin="0" topmargin="0" onload="$c.autoSize()" tabindex=0>
</body>
</html>
<script>new My97DP();</script>
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/My97DatePicker.htm
|
HTML
|
asf20
| 1,389
|
/*
* My97 DatePicker 4.7 Skin:whyGreen
*/
.WdateDiv{
width:180px;
background-color:#fff;
border:#C5E1E4 1px solid;
padding:2px;
}
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
.WdateDiv .NavImg a{
cursor:pointer;
display:block;
width:16px;
height:16px;
margin-top:1px;
}
.WdateDiv .NavImgll a{
float:left;
background:url(img.gif) no-repeat;
}
.WdateDiv .NavImgl a{
float:left;
background:url(img.gif) no-repeat -16px 0px;
}
.WdateDiv .NavImgr a{
float:right;
background:url(img.gif) no-repeat -32px 0px;
}
.WdateDiv .NavImgrr a{
float:right;
background:url(img.gif) no-repeat -48px 0px;
}
.WdateDiv #dpTitle{
height:24px;
padding:1px;
border:#c5d9e8 1px solid;
background:url(bg.jpg);
margin-bottom:2px;
}
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
border:0px;
height:20px;
width:50px;
color:#034c50;
background-color:transparent;
cursor:pointer;
}
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
border:#939393 1px solid;
font-weight:bold;
color:#034c50;
height:20px;
width:50px;
}
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#A3C6C8 1px solid;
display:none;
}
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
color:#11777C;
}
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
.WdateDiv .invalidMenu{
color:#aaa;
}
.WdateDiv .YMenu{
margin-top:20px;
}
.WdateDiv .MMenu{
margin-top:20px;
*width:62px;
}
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
.WdateDiv .MTitle{
color:#13777e;
background-color:#bdebee;
}
.WdateDiv .WdayTable2{
border-collapse:collapse;
border:#BEE9F0 1px solid;
}
.WdateDiv .WdayTable2 table{
border:0;
}
.WdateDiv .WdayTable{
line-height:20px;
color:#13777e;
background-color:#edfbfb;
border:#BEE9F0 1px solid;
}
.WdateDiv .WdayTable td{
text-align:center;
}
.WdateDiv .Wday{
cursor:pointer;
}
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#74d2d9 ;
}
.WdateDiv .Wwday{
cursor:pointer;
color:#ab1e1e;
}
.WdateDiv .WwdayOn{
cursor:pointer;
background-color:#74d2d9;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A7E2E7;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
.WdateDiv .WotherDay{
cursor:pointer;
color:#0099CC;
}
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .WinvalidDay{
color:#aaa;
}
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
color:#497F7F;
}
.WdateDiv #dpTime input{
height:20px;
width:18px;
text-align:center;
color:#333;
border:#61CAD0 1px solid;
}
.WdateDiv #dpTime .tB{
border-right:0px;
}
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
margin-top:3px;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
margin-top:2px;
border:#38B1B9 1px solid;
background-color:#CFEBEE;
color:#08575B;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/skin/whyGreen/datepicker.css
|
CSS
|
asf20
| 3,933
|
.Wdate{
border:#999 1px solid;
height:20px;
background:#fff url(datePicker.gif) no-repeat right;
}
.WdateFmtErr{
font-weight:bold;
color:red;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/skin/WdatePicker.css
|
CSS
|
asf20
| 158
|
/*
* My97 DatePicker 4.7
*/
.WdateDiv{
width:180px;
background-color:#FFFFFF;
border:#bbb 1px solid;
padding:2px;
}
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
.WdateDiv .NavImg a{
display:block;
cursor:pointer;
height:16px;
width:16px;
}
.WdateDiv .NavImgll a{
float:left;
background:transparent url(img.gif) no-repeat scroll 0 0;
}
.WdateDiv .NavImgl a{
float:left;
background:transparent url(img.gif) no-repeat scroll -16px 0;
}
.WdateDiv .NavImgr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -32px 0;
}
.WdateDiv .NavImgrr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -48px 0;
}
.WdateDiv #dpTitle{
height:24px;
margin-bottom:2px;
padding:1px;
}
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
height:20px;
border:0px;
width:50px;
cursor:pointer;
}
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
font-weight:bold;
height:20px;
color:blue;
border:#ccc 1px solid;
width:50px;
}
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#ccc 1px solid;
display:none;
}
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
}
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
.WdateDiv .invalidMenu{
color:#aaa;
}
.WdateDiv .YMenu{
margin-top:20px;
}
.WdateDiv .MMenu{
margin-top:20px;
*width:62px;
}
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
.WdateDiv .MTitle{
background-color:#BDEBEE;
}
.WdateDiv .WdayTable2{
border-collapse:collapse;
border:#c5d9e8 1px solid;
}
.WdateDiv .WdayTable2 table{
border:0;
}
.WdateDiv .WdayTable{
line-height:20px;
border:#c5d9e8 1px solid;
}
.WdateDiv .WdayTable td{
text-align:center;
}
.WdateDiv .Wday{
cursor:pointer;
}
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .Wwday{
cursor:pointer;
color:#FF2F2F;
}
.WdateDiv .WwdayOn{
cursor:pointer;
color:#000;
background-color:#C0EBEF;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A9E4E9;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
.WdateDiv .WotherDay{
cursor:pointer;
color:#6A6AFF;
}
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .WinvalidDay{
color:#aaa;
}
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
}
.WdateDiv #dpTime input{
width:18px;
height:20px;
text-align:center;
border:#ccc 1px solid;
}
.WdateDiv #dpTime .tB{
border-right:0px;
}
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
border:#ccc 1px solid;
margin-top:2px;
margin-right:1px;
}
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/skin/default/datepicker.css
|
CSS
|
asf20
| 3,726
|
var langList =
[
{name:'en', charset:'UTF-8'},
{name:'zh-cn', charset:'UTF-8'},
{name:'zh-tw', charset:'UTF-8'}
];
var skinList =
[
{name:'default', charset:'UTF-8'},
{name:'whyGreen', charset:'UTF-8'}
];
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/config.js
|
JavaScript
|
asf20
| 223
|
var $lang={
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?",
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
clearStr: "\u6E05\u7A7A",
todayStr: "\u4ECA\u5929",
okStr: "\u78BA\u5B9A",
updateStr: "\u78BA\u5B9A",
timeStr: "\u6642\u9593",
quickStr: "\u5FEB\u901F\u9078\u64C7",
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!'
}
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/lang/zh-tw.js
|
JavaScript
|
asf20
| 1,088
|
var $lang={
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?",
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
clearStr: "\u6E05\u7A7A",
todayStr: "\u4ECA\u5929",
okStr: "\u786E\u5B9A",
updateStr: "\u786E\u5B9A",
timeStr: "\u65F6\u95F4",
quickStr: "\u5FEB\u901F\u9009\u62E9",
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!'
}
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/lang/zh-cn.js
|
JavaScript
|
asf20
| 1,089
|
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"],
clearStr: "Clear",
todayStr: "Today",
okStr: "OK",
updateStr: "OK",
timeStr: "Time",
quickStr: "Quick Selection",
err_1: 'MinDate Cannot be bigger than MaxDate!'
}
|
zzfls-pj
|
trunk/WebRoot/include/js/My97DatePicker/lang/en.js
|
JavaScript
|
asf20
| 644
|
/*
* JQuery zTree exedit 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of exedit
var _consts = {
event: {
DRAG: "ztree_drag",
DROP: "ztree_drop",
REMOVE: "ztree_remove",
RENAME: "ztree_rename"
},
id: {
EDIT: "_edit",
INPUT: "_input",
REMOVE: "_remove"
},
move: {
TYPE_INNER: "inner",
TYPE_PREV: "prev",
TYPE_NEXT: "next"
},
node: {
CURSELECTED_EDIT: "curSelectedNode_Edit",
TMPTARGET_TREE: "tmpTargetzTree",
TMPTARGET_NODE: "tmpTargetNode"
}
},
//default setting of exedit
_setting = {
edit: {
enable: false,
editNameSelectAll: false,
showRemoveBtn: true,
showRenameBtn: true,
removeTitle: "remove",
renameTitle: "rename",
drag: {
autoExpandTrigger: false,
isCopy: true,
isMove: true,
prev: true,
next: true,
inner: true,
minMoveSize: 5,
borderMax: 10,
borderMin: -5,
maxShowNodeNum: 5,
autoOpenTime: 500
}
},
view: {
addHoverDom: null,
removeHoverDom: null
},
callback: {
beforeDrag:null,
beforeDragOpen:null,
beforeDrop:null,
beforeEditName:null,
beforeRename:null,
onDrag:null,
onDrop:null,
onRename:null
}
},
//default root of exedit
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.curEditNode = null;
r.curEditInput = null;
r.curHoverNode = null;
r.dragFlag = 0;
r.dragNodeShowBefore = [];
r.dragMaskList = new Array();
r.showHoverDom = true;
},
//default cache of exedit
_initCache = function(treeId) {},
//default bind event of exedit
_bindEvent = function(setting) {
var o = setting.treeObj;
var c = consts.event;
o.unbind(c.RENAME);
o.bind(c.RENAME, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRename, [event, treeId, treeNode]);
});
o.unbind(c.REMOVE);
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
o.unbind(c.DRAG);
o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
o.unbind(c.DROP);
o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
});
},
//default event proxy of exedit
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
relatedTarget = e.relatedTarget,
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null,
tmp = null;
if (tools.eqs(e.type, "mouseover")) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "hoverOverNode";
}
} else if (tools.eqs(e.type, "mouseout")) {
tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (!tmp) {
tId = "remove";
nodeEventType = "hoverOutNode";
}
} else if (tools.eqs(e.type, "mousedown")) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "mousedownNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "mousedownNode" :
nodeEventCallback = _handler.onMousedownNode;
break;
case "hoverOverNode" :
nodeEventCallback = _handler.onHoverOverNode;
break;
case "hoverOutNode" :
nodeEventCallback = _handler.onHoverOutNode;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of exedit
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
n.isHover = false;
n.editNameFlag = false;
},
//update zTreeObj, add method of edit
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.cancelEditName = function(newName) {
var root = data.getRoot(setting),
nameKey = setting.data.key.name,
node = root.curEditNode;
if (!root.curEditNode) return;
view.cancelCurEditNode(setting, newName?newName:node[nameKey]);
}
zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
if (!node) return null;
if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
var newNode = tools.clone(node);
if (!targetNode) {
targetNode = null;
moveType = consts.move.TYPE_INNER;
}
if (moveType == consts.move.TYPE_INNER) {
function copyCallback() {
view.addNodes(setting, targetNode, [newNode], isSilent);
}
if (tools.canAsync(setting, targetNode)) {
view.asyncNode(setting, targetNode, isSilent, copyCallback);
} else {
copyCallback();
}
} else {
view.addNodes(setting, targetNode.parentNode, [newNode], isSilent);
view.moveNode(setting, targetNode, newNode, moveType, false, isSilent);
}
return newNode;
}
zTreeTools.editName = function(node) {
if (!node || !node.tId || node !== data.getNodeCache(setting, node.tId)) return;
if (node.parentTId) view.expandCollapseParentNode(setting, node.getParentNode(), true);
view.editNode(setting, node)
}
zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
if (!node) return node;
if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
return null;
} else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $("#" + node.tId).find("#" + targetNode.tId).length > 0)) {
return null;
} else if (!targetNode) {
targetNode = null;
}
function moveCallback() {
view.moveNode(setting, targetNode, node, moveType, false, isSilent);
}
if (tools.canAsync(setting, targetNode)) {
view.asyncNode(setting, targetNode, isSilent, moveCallback);
} else {
moveCallback();
}
return node;
}
zTreeTools.setEditable = function(editable) {
setting.edit.enable = editable;
return this.refresh();
}
},
//method of operate data
_data = {
setSonNodeLevel: function(setting, parentNode, node) {
if (!node) return;
var childKey = setting.data.key.children;
node.level = (parentNode)? parentNode.level + 1 : 0;
if (!node[childKey]) return;
for (var i = 0, l = node[childKey].length; i < l; i++) {
if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
}
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onHoverOverNode: function(event, node) {
var setting = data.getSetting(event.data.treeId),
root = data.getRoot(setting);
if (root.curHoverNode != node) {
_handler.onHoverOutNode(event);
}
root.curHoverNode = node;
view.addHoverDom(setting, node);
},
onHoverOutNode: function(event, node) {
var setting = data.getSetting(event.data.treeId),
root = data.getRoot(setting);
if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
view.removeTreeDom(setting, root.curHoverNode);
root.curHoverNode = null;
}
},
onMousedownNode: function(eventMouseDown, _node) {
var i,l,
setting = data.getSetting(eventMouseDown.data.treeId),
root = data.getRoot(setting);
//right click can't drag & drop
if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
//input of edit node name can't drag & drop
var target = eventMouseDown.target,
_nodes = data.getRoot(setting).curSelectedList,
nodes = [];
if (!data.isSelectedNode(setting, _node)) {
nodes = [_node];
} else {
for (i=0, l=_nodes.length; i<l; i++) {
if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode"+consts.id.INPUT) !== null) {
return true;
}
nodes.push(_nodes[i]);
if (nodes[0].parentTId !== _nodes[i].parentTId) {
nodes = [_node];
break;
}
}
}
view.editNodeBlur = true;
view.cancelCurEditNode(setting, null, true);
var doc = $(document), curNode, tmpArrow, tmpTarget,
isOtherTree = false,
targetSetting = setting,
preNode, nextNode,
preTmpTargetNodeId = null,
preTmpMoveType = null,
tmpTargetNodeId = null,
moveType = consts.move.TYPE_INNER,
mouseDownX = eventMouseDown.clientX,
mouseDownY = eventMouseDown.clientY,
startTime = (new Date()).getTime();
if (tools.uCanDo(setting)) {
doc.bind("mousemove", _docMouseMove);
}
function _docMouseMove(event) {
//avoid start drag after click node
if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize
&& Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) {
return true;
}
var i, l, tmpNode, tmpDom, tmpNodes,
childKey = setting.data.key.children;
tools.noSel(setting);
$("body").css("cursor", "pointer");
if (root.dragFlag == 0) {
if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) {
_docMouseUp(event);
return true;
}
for (i=0, l=nodes.length; i<l; i++) {
if (i==0) {
root.dragNodeShowBefore = [];
}
tmpNode = nodes[i];
if (tmpNode.isParent && tmpNode.open) {
view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
root.dragNodeShowBefore[tmpNode.tId] = true;
} else {
root.dragNodeShowBefore[tmpNode.tId] = false;
}
}
root.dragFlag = 1;
root.showHoverDom = false;
tools.showIfameMask(setting, true);
//sort
var isOrder = true, lastIndex = -1;
if (nodes.length>1) {
var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
tmpNodes = [];
for (i=0, l=pNodes.length; i<l; i++) {
if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) {
if (isOrder && lastIndex > -1 && (lastIndex+1) !== i) {
isOrder = false;
}
tmpNodes.push(pNodes[i]);
lastIndex = i;
}
if (nodes.length === tmpNodes.length) {
nodes = tmpNodes;
break;
}
}
}
if (isOrder) {
preNode = nodes[0].getPreNode();
nextNode = nodes[nodes.length-1].getNextNode();
}
//set node in selected
curNode = $("<ul class='zTreeDragUL'></ul>");
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
tmpNode.editNameFlag = false;
view.selectNode(setting, tmpNode, i>0);
view.removeTreeDom(setting, tmpNode);
tmpDom = $("<li id='"+ tmpNode.tId +"_tmp'></li>");
tmpDom.append($("#" + tmpNode.tId + consts.id.A).clone());
tmpDom.css("padding", "0");
tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
curNode.append(tmpDom);
if (i == setting.edit.drag.maxShowNodeNum-1) {
tmpDom = $("<li id='"+ tmpNode.tId +"_moretmp'><a> ... </a></li>");
curNode.append(tmpDom);
break;
}
}
curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
curNode.addClass(setting.treeObj.attr("class"));
curNode.appendTo("body");
tmpArrow = $("<span class='tmpzTreeMove_arrow'></span>");
tmpArrow.attr("id", "zTreeMove_arrow_tmp");
tmpArrow.appendTo("body");
setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
}
if (root.dragFlag == 1) {
if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
event.target = (xT.length > 0) ? xT.get(0) : event.target;
} else if (tmpTarget) {
tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
.removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
}
tmpTarget = null;
tmpTargetNodeId = null;
//judge drag & drop in multi ztree
isOtherTree = false;
targetSetting = setting;
var settings = data.getSettings();
for (var s in settings) {
if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
&& (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
isOtherTree = true;
targetSetting = settings[s];
}
}
var docScrollTop = doc.scrollTop(),
docScrollLeft = doc.scrollLeft(),
treeOffset = targetSetting.treeObj.offset(),
scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
dTop = (event.clientY + docScrollTop - treeOffset.top),
dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
dLeft = (event.clientX + docScrollLeft - treeOffset.left),
dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
if (event.target.id && targetSetting.treeObj.find("#" + event.target.id).length > 0) {
//get node <li> dom
var targetObj = event.target;
while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
targetObj = targetObj.parentNode;
}
var canMove = true;
//don't move to self or children of self
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
if (targetObj.id === tmpNode.tId) {
canMove = false;
break;
} else if ($("#" + tmpNode.tId).find("#" + targetObj.id).length > 0) {
canMove = false;
break;
}
}
if (canMove) {
if (event.target.id &&
(event.target.id == (targetObj.id + consts.id.A) || $(event.target).parents("#" + targetObj.id + consts.id.A).length > 0)) {
tmpTarget = $(targetObj);
tmpTargetNodeId = targetObj.id;
}
}
}
//the mouse must be in zTree
tmpNode = nodes[0];
if (isTreeInner && (event.target.id == targetSetting.treeId || $(event.target).parents("#" + targetSetting.treeId).length>0)) {
//judge mouse move in root of ztree
if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
tmpTarget = targetSetting.treeObj;
}
//auto scroll top
if (isTop) {
targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
} else if (isBottom) {
targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
}
if (isLeft) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
} else if (isRight) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
}
//auto scroll left
if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
}
}
curNode.css({
"top": (event.clientY + docScrollTop + 3) + "px",
"left": (event.clientX + docScrollLeft + 3) + "px"
});
var dX = 0;
var dY = 0;
if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
if (!canPrev && !canNext && !canInner) {
tmpTarget = null;
tmpTargetNodeId = "";
moveType = consts.move.TYPE_INNER;
tmpArrow.css({
"display":"none"
});
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null
}
} else {
var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
tmpTop = tmpTargetA.offset().top,
tmpLeft = tmpTargetA.offset().left,
prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
dX = 1 - tmpArrow.width();
dY = tmpTop - tmpArrow.height()/2;
moveType = consts.move.TYPE_PREV;
} else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
dX = 1 - tmpArrow.width();
dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
moveType = consts.move.TYPE_NEXT;
}else {
dX = 5 - tmpArrow.width();
dY = tmpTop;
moveType = consts.move.TYPE_INNER;
}
tmpArrow.css({
"display":"block",
"top": dY + "px",
"left": (tmpLeft + dX) + "px"
});
tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
startTime = (new Date()).getTime();
}
if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
var startTimer = true;
if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
} else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
startTimer = false;
}
if (startTimer) {
window.zTreeMoveTimer = setTimeout(function() {
if (moveType != consts.move.TYPE_INNER) return;
if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
&& tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
view.switchNode(targetSetting, tmpTargetNode);
if (targetSetting.edit.drag.autoExpandTrigger) {
targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
}
}
}, targetSetting.edit.drag.autoOpenTime+50);
window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
}
}
}
} else {
moveType = consts.move.TYPE_INNER;
if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
tmpTarget.addClass(consts.node.TMPTARGET_TREE);
} else {
tmpTarget = null;
}
tmpArrow.css({
"display":"none"
});
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
}
}
preTmpTargetNodeId = tmpTargetNodeId;
preTmpMoveType = moveType;
}
return false;
}
doc.bind("mouseup", _docMouseUp);
function _docMouseUp(event) {
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
}
preTmpTargetNodeId = null;
preTmpMoveType = null;
doc.unbind("mousemove", _docMouseMove);
doc.unbind("mouseup", _docMouseUp);
doc.unbind("selectstart", _docSelect);
$("body").css("cursor", "auto");
if (tmpTarget) {
tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
.removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
}
tools.showIfameMask(setting, false);
root.showHoverDom = true;
if (root.dragFlag == 0) return;
root.dragFlag = 0;
var i, l, tmpNode;
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
if (tmpNode.isParent && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) {
view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
delete root.dragNodeShowBefore[tmpNode.tId];
}
}
if (curNode) curNode.remove();
if (tmpArrow) tmpArrow.remove();
var isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy);
if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId==nodes[0].parentTId && moveType == consts.move.TYPE_INNER) {
tmpTarget = null;
}
if (tmpTarget) {
var dragTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId);
if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) return;
var newNodes = isCopy ? tools.clone(nodes) : nodes;
function dropCallback() {
if (isOtherTree) {
if (!isCopy) {
for(var i=0, l=nodes.length; i<l; i++) {
view.removeNode(setting, nodes[i]);
}
}
if (moveType == consts.move.TYPE_INNER) {
view.addNodes(targetSetting, dragTargetNode, newNodes);
} else {
view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
if (moveType == consts.move.TYPE_PREV) {
for (i=0, l=newNodes.length; i<l; i++) {
view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
}
} else {
for (i=-1, l=newNodes.length-1; i<l; l--) {
view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
}
}
}
} else {
if (isCopy && moveType == consts.move.TYPE_INNER) {
view.addNodes(targetSetting, dragTargetNode, newNodes);
} else {
if (isCopy) {
view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
}
if (moveType == consts.move.TYPE_PREV) {
for (i=0, l=newNodes.length; i<l; i++) {
view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
}
} else {
for (i=-1, l=newNodes.length-1; i<l; l--) {
view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
}
}
}
}
for (i=0, l=newNodes.length; i<l; i++) {
view.selectNode(targetSetting, newNodes[i], i>0);
}
$("#" + newNodes[0].tId).focus().blur();
}
if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
} else {
dropCallback();
}
setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
} else {
for (i=0, l=nodes.length; i<l; i++) {
view.selectNode(targetSetting, nodes[i], i>0);
}
setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
}
}
doc.bind("selectstart", _docSelect);
function _docSelect() {
return false;
}
//Avoid FireFox's Bug
//If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
if(eventMouseDown.preventDefault) {
eventMouseDown.preventDefault();
}
return true;
}
},
//method of tools for zTree
_tools = {
getAbs: function (obj) {
var oRect = obj.getBoundingClientRect();
return [oRect.left,oRect.top]
},
inputFocus: function(inputObj) {
if (inputObj.get(0)) {
inputObj.focus();
tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
}
},
inputSelect: function(inputObj) {
if (inputObj.get(0)) {
inputObj.focus();
inputObj.select();
}
},
setCursorPosition: function(obj, pos){
if(obj.setSelectionRange) {
obj.focus();
obj.setSelectionRange(pos,pos);
} else if (obj.createTextRange) {
var range = obj.createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStart('character', pos);
range.select();
}
},
showIfameMask: function(setting, showSign) {
var root = data.getRoot(setting);
//clear full mask
while (root.dragMaskList.length > 0) {
root.dragMaskList[0].remove();
root.dragMaskList.shift();
}
if (showSign) {
//show mask
var iframeList = $("iframe");
for (var i = 0, l = iframeList.length; i < l; i++) {
var obj = iframeList.get(i),
r = tools.getAbs(obj),
dragMask = $("<div id='zTreeMask_" + i + "' class='zTreeMask' style='background-color:yellow;opacity: 0.3;filter: alpha(opacity=30); top:" + r[1] + "px; left:" + r[0] + "px; width:" + obj.offsetWidth + "px; height:" + obj.offsetHeight + "px;'></div>");
dragMask.appendTo("body");
root.dragMaskList.push(dragMask);
}
}
}
},
//method of operate ztree dom
_view = {
addEditBtn: function(setting, node) {
if (node.editNameFlag || $("#" + node.tId + consts.id.EDIT).length > 0) {
return;
}
if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
return;
}
var aObj = $("#" + node.tId + consts.id.A),
editStr = "<span class='button edit' id='" + node.tId + consts.id.EDIT + "' title='"+tools.apply(setting.edit.renameTitle, [setting.treeId, node], setting.edit.renameTitle)+"' treeNode"+consts.id.EDIT+" style='display:none;'></span>";
aObj.append(editStr);
$("#" + node.tId + consts.id.EDIT).bind('click',
function() {
if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
view.editNode(setting, node);
return false;
}
).show();
},
addRemoveBtn: function(setting, node) {
if (node.editNameFlag || $("#" + node.tId + consts.id.REMOVE).length > 0) {
return;
}
if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
return;
}
var aObj = $("#" + node.tId + consts.id.A),
removeStr = "<span class='button remove' id='" + node.tId + consts.id.REMOVE + "' title='"+tools.apply(setting.edit.removeTitle, [setting.treeId, node], setting.edit.removeTitle)+"' treeNode"+consts.id.REMOVE+" style='display:none;'></span>";
aObj.append(removeStr);
$("#" + node.tId + consts.id.REMOVE).bind('click',
function() {
if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
view.removeNode(setting, node);
setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
return false;
}
).bind('mousedown',
function(eventMouseDown) {
return true;
}
).show();
},
addHoverDom: function(setting, node) {
if (data.getRoot(setting).showHoverDom) {
node.isHover = true;
if (setting.edit.enable) {
view.addEditBtn(setting, node);
view.addRemoveBtn(setting, node);
}
tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
}
},
cancelCurEditNode: function (setting, forceName) {
var root = data.getRoot(setting),
nameKey = setting.data.key.name,
node = root.curEditNode;
if (node) {
var inputObj = root.curEditInput;
var newName = forceName ? forceName:inputObj.val();
if (!forceName && tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName], true) === false) {
node.editNameFlag = true;
return false;
} else {
node[nameKey] = newName ? newName:inputObj.val();
if (!forceName) {
setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node]);
}
}
var aObj = $("#" + node.tId + consts.id.A);
aObj.removeClass(consts.node.CURSELECTED_EDIT);
inputObj.unbind();
view.setNodeName(setting, node);
node.editNameFlag = false;
root.curEditNode = null;
root.curEditInput = null;
view.selectNode(setting, node, false);
}
root.noSelection = true;
return true;
},
editNode: function(setting, node) {
var root = data.getRoot(setting);
view.editNodeBlur = false;
if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
return;
}
var nameKey = setting.data.key.name;
node.editNameFlag = true;
view.removeTreeDom(setting, node);
view.cancelCurEditNode(setting);
view.selectNode(setting, node, false);
$("#" + node.tId + consts.id.SPAN).html("<input type=text class='rename' id='" + node.tId + consts.id.INPUT + "' treeNode" + consts.id.INPUT + " >");
var inputObj = $("#" + node.tId + consts.id.INPUT);
inputObj.attr("value", node[nameKey]);
if (setting.edit.editNameSelectAll) {
tools.inputSelect(inputObj);
} else {
tools.inputFocus(inputObj);
}
inputObj.bind('blur', function(event) {
if (!view.editNodeBlur) {
view.cancelCurEditNode(setting);
}
}).bind('keydown', function(event) {
if (event.keyCode=="13") {
view.editNodeBlur = true;
view.cancelCurEditNode(setting, null, true);
} else if (event.keyCode=="27") {
view.cancelCurEditNode(setting, node[nameKey]);
}
}).bind('click', function(event) {
return false;
}).bind('dblclick', function(event) {
return false;
});
$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED_EDIT);
root.curEditInput = inputObj;
root.noSelection = false;
root.curEditNode = node;
},
moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
var root = data.getRoot(setting),
childKey = setting.data.key.children;
if (targetNode == node) return;
if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
var oldParentNode = (node.parentTId ? node.getParentNode(): root),
targetNodeIsRoot = (targetNode === null || targetNode == root);
if (targetNodeIsRoot && targetNode === null) targetNode = root;
if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
moveType = consts.move.TYPE_INNER;
}
if (moveType == consts.move.TYPE_INNER) {
if (targetNodeIsRoot) {
//parentTId of root node is null
node.parentTId = null;
} else {
if (!targetNode.isParent) {
targetNode.isParent = true;
targetNode.open = !!targetNode.open;
view.setNodeLineIcos(setting, targetNode);
}
node.parentTId = targetNode.tId;
}
}
//move node Dom
var targetObj, target_ulObj;
if (targetNodeIsRoot) {
targetObj = setting.treeObj;
target_ulObj = targetObj;
} else {
if (!isSilent && moveType == consts.move.TYPE_INNER) {
view.expandCollapseNode(setting, targetNode, true, false);
} else if (!isSilent) {
view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
}
targetObj = $("#" + targetNode.tId);
target_ulObj = $("#" + targetNode.tId + consts.id.UL);
if (!target_ulObj.get(0)) {
var ulstr = [];
view.makeUlHtml(setting, targetNode, ulstr, '');
targetObj.append(ulstr.join(''));
}
target_ulObj = $("#" + targetNode.tId + consts.id.UL);
}
var nodeDom = $("#" + node.tId);
if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
target_ulObj.append(nodeDom);
} else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
targetObj.before(nodeDom);
} else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
targetObj.after(nodeDom);
}
//repair the data after move
var i,l,
tmpSrcIndex = -1,
tmpTargetIndex = 0,
oldNeighbor = null,
newNeighbor = null,
oldLevel = node.level;
if (node.isFirstNode) {
tmpSrcIndex = 0;
if (oldParentNode[childKey].length > 1 ) {
oldNeighbor = oldParentNode[childKey][1];
oldNeighbor.isFirstNode = true;
}
} else if (node.isLastNode) {
tmpSrcIndex = oldParentNode[childKey].length -1;
oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
oldNeighbor.isLastNode = true;
} else {
for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
if (oldParentNode[childKey][i].tId == node.tId) {
tmpSrcIndex = i;
break;
}
}
}
if (tmpSrcIndex >= 0) {
oldParentNode[childKey].splice(tmpSrcIndex, 1);
}
if (moveType != consts.move.TYPE_INNER) {
for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
}
}
if (moveType == consts.move.TYPE_INNER) {
if (!targetNode[childKey]) targetNode[childKey] = new Array();
if (targetNode[childKey].length > 0) {
newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
newNeighbor.isLastNode = false;
}
targetNode[childKey].splice(targetNode[childKey].length, 0, node);
node.isLastNode = true;
node.isFirstNode = (targetNode[childKey].length == 1);
} else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
newNeighbor = targetNode;
newNeighbor.isFirstNode = false;
node.parentTId = targetNode.parentTId;
node.isFirstNode = true;
node.isLastNode = false;
} else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
newNeighbor = targetNode;
newNeighbor.isLastNode = false;
node.parentTId = targetNode.parentTId;
node.isFirstNode = false;
node.isLastNode = true;
} else {
if (moveType == consts.move.TYPE_PREV) {
targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
} else {
targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
}
node.parentTId = targetNode.parentTId;
node.isFirstNode = false;
node.isLastNode = false;
}
data.fixPIdKeyValue(setting, node);
data.setSonNodeLevel(setting, node.getParentNode(), node);
//repair node what been moved
view.setNodeLineIcos(setting, node);
view.repairNodeLevelClass(setting, node, oldLevel)
//repair node's old parentNode dom
if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
//old parentNode has no child nodes
oldParentNode.isParent = false;
oldParentNode.open = false;
var tmp_ulObj = $("#" + oldParentNode.tId + consts.id.UL),
tmp_switchObj = $("#" + oldParentNode.tId + consts.id.SWITCH),
tmp_icoObj = $("#" + oldParentNode.tId + consts.id.ICON);
view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
tmp_ulObj.css("display", "none");
} else if (oldNeighbor) {
//old neigbor node
view.setNodeLineIcos(setting, oldNeighbor);
}
//new neigbor node
if (newNeighbor) {
view.setNodeLineIcos(setting, newNeighbor);
}
//repair checkbox / radio
if (!!setting.check && setting.check.enable && view.repairChkClass) {
view.repairChkClass(setting, oldParentNode);
view.repairParentChkClassWithSelf(setting, oldParentNode);
if (oldParentNode != node.parent)
view.repairParentChkClassWithSelf(setting, node);
}
//expand parents after move
if (!isSilent) {
view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
}
},
removeEditBtn: function(node) {
$("#" + node.tId + consts.id.EDIT).unbind().remove();
},
removeRemoveBtn: function(node) {
$("#" + node.tId + consts.id.REMOVE).unbind().remove();
},
removeTreeDom: function(setting, node) {
node.isHover = false;
view.removeEditBtn(node);
view.removeRemoveBtn(node);
tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
},
repairNodeLevelClass: function(setting, node, oldLevel) {
if (oldLevel === node.level) return;
var liObj = $("#" + node.tId),
aObj = $("#" + node.tId + consts.id.A),
ulObj = $("#" + node.tId + consts.id.UL),
oldClass = "level" + oldLevel,
newClass = "level" + node.level;
liObj.removeClass(oldClass);
liObj.addClass(newClass);
aObj.removeClass(oldClass);
aObj.addClass(newClass);
ulObj.removeClass(oldClass);
ulObj.addClass(newClass);
}
},
_z = {
tools: _tools,
view: _view,
event: event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addZTreeTools(_zTreeTools);
var _cancelPreSelectedNode = view.cancelPreSelectedNode;
view.cancelPreSelectedNode = function (setting, node) {
var list = data.getRoot(setting).curSelectedList;
for (var i=0, j=list.length; i<j; i++) {
if (!node || node === list[i]) {
view.removeTreeDom(setting, list[i]);
if (node) break;
}
}
if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments);
}
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) {
_createNodes.apply(view, arguments);
}
if (!nodes) return;
if (view.repairParentChkClassWithSelf) {
view.repairParentChkClassWithSelf(setting, parentNode);
}
}
view.makeNodeUrl = function(setting, node) {
return (node.url && !setting.edit.enable) ? node.url : null;
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var root = data.getRoot(setting);
if (root.curEditNode === node) root.curEditNode = null;
if (_removeNode) {
_removeNode.apply(view, arguments);
}
}
var _selectNode = view.selectNode;
view.selectNode = function(setting, node, addFlag) {
var root = data.getRoot(setting);
if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
return false;
}
if (_selectNode) _selectNode.apply(view, arguments);
view.addHoverDom(setting, node);
return true;
}
var _uCanDo = tools.uCanDo;
tools.uCanDo = function(setting, e) {
var root = data.getRoot(setting);
if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) {
return true;
}
return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true);
}
})(jQuery);
|
zzfls-pj
|
trunk/WebRoot/include/js/zTree/js/jquery.ztree.exedit-3.2.js
|
JavaScript
|
asf20
| 43,020
|
/*
* JQuery zTree excheck 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of excheck
var _consts = {
event: {
CHECK: "ztree_check"
},
id: {
CHECK: "_check"
},
checkbox: {
STYLE: "checkbox",
DEFAULT: "chk",
DISABLED: "disable",
FALSE: "false",
TRUE: "true",
FULL: "full",
PART: "part",
FOCUS: "focus"
},
radio: {
STYLE: "radio",
TYPE_ALL: "all",
TYPE_LEVEL: "level"
}
},
//default setting of excheck
_setting = {
check: {
enable: false,
autoCheckTrigger: false,
chkStyle: _consts.checkbox.STYLE,
nocheckInherit: false,
radioType: _consts.radio.TYPE_LEVEL,
chkboxType: {
"Y": "ps",
"N": "ps"
}
},
data: {
key: {
checked: "checked"
}
},
callback: {
beforeCheck:null,
onCheck:null
}
},
//default root of excheck
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.radioCheckedList = [];
},
//default cache of excheck
_initCache = function(treeId) {},
//default bind event of excheck
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.CHECK);
o.bind(c.CHECK, function (event, treeId, node) {
tools.apply(setting.callback.onCheck, [event, treeId, node]);
});
},
//default event proxy of excheck
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null;
if (tools.eqs(e.type, "mouseover")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoverCheck";
}
} else if (tools.eqs(e.type, "mouseout")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoutCheck";
}
} else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "checkNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "checkNode" :
nodeEventCallback = _handler.onCheckNode;
break;
case "mouseoverCheck" :
nodeEventCallback = _handler.onMouseoverCheck;
break;
case "mouseoutCheck" :
nodeEventCallback = _handler.onMouseoutCheck;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checkedKey = setting.data.key.checked;
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
n[checkedKey] = !!n[checkedKey];
n.checkedOld = n[checkedKey];
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
n.chkDisabled = !!n.chkDisabled || (parentNode && !!parentNode.chkDisabled);
if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
n.halfCheck = !!n.halfCheck;
n.check_Child_State = -1;
n.check_Focus = false;
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
if (isLastNode) {
data.makeChkFlag(setting, parentNode);
}
},
//add dom for check
_beforeA = function(setting, node, html) {
var checkedKey = setting.data.key.checked;
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
var r = data.getRoot(setting);
r.radioCheckedList.push(node);
}
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
}
},
//update zTreeObj, add method of check
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
var checkedKey = this.setting.data.key.checked;
if (node.chkDisabled === true) return;
if (checked !== true && checked !== false) {
checked = !node[checkedKey];
}
callbackFlag = !!callbackFlag;
if (node[checkedKey] === checked && !checkTypeFlag) {
return;
} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
return;
}
if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
node[checkedKey] = checked;
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
if (callbackFlag) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
zTreeTools.checkAllNodes = function(checked) {
view.repairAllChk(this.setting, !!checked);
}
zTreeTools.getCheckedNodes = function(checked) {
var childKey = this.setting.data.key.children;
checked = (checked !== false);
return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
}
zTreeTools.getChangeCheckedNodes = function() {
var childKey = this.setting.data.key.children;
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
}
zTreeTools.setChkDisabled = function(node, disabled) {
disabled = !!disabled;
view.repairSonChkDisabled(this.setting, node, disabled);
if (!disabled) view.repairParentChkDisabled(this.setting, node, disabled);
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
if (!node || !this.setting.check.enable) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
}
}
},
//method of operate data
_data = {
getRadioCheckedList: function(setting) {
var checkedList = data.getRoot(setting).radioCheckedList;
for (var i=0, j=checkedList.length; i<j; i++) {
if(!data.getNodeCache(setting, checkedList[i].tId)) {
checkedList.splice(i, 1);
i--; j--;
}
}
return checkedList;
},
getCheckStatus: function(setting, node) {
if (!setting.check.enable || node.nocheck) return null;
var checkedKey = setting.data.key.checked,
r = {
checked: node[checkedKey],
half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
};
return r;
},
getTreeCheckedNodes: function(setting, nodes, checked, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] == checked) {
results.push(nodes[i]);
}
data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
}
return results;
},
getTreeChangeCheckedNodes: function(setting, nodes, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
results.push(nodes[i]);
}
data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
}
return results;
},
makeChkFlag: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
chkFlag = -1;
if (node[childKey]) {
var start = false;
for (var i = 0, l = node[childKey].length; i < l; i++) {
var cNode = node[childKey][i];
var tmp = -1;
if (setting.check.chkStyle == consts.radio.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 2;
} else if (cNode.nocheck !== true && cNode[checkedKey]) {
tmp = 2;
} else {
tmp = cNode.check_Child_State > 0 ? 2:0;
}
if (tmp == 2) {
chkFlag = 2; break;
} else if (tmp == 0){
chkFlag = 0;
}
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 1;
} else if (cNode.nocheck !== true && cNode[checkedKey] ) {
tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
} else {
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
}
if (tmp === 1) {
chkFlag = 1; break;
} else if (tmp === 2 && start && tmp !== chkFlag) {
chkFlag = 1; break;
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
chkFlag = 1; break;
} else if (tmp > -1) {
chkFlag = tmp;
}
if (!start) start = (cNode.nocheck !== true);
}
}
}
node.check_Child_State = chkFlag;
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onCheckNode: function (event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkedKey = setting.data.key.checked;
if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
node[checkedKey] = !node[checkedKey];
view.checkNodeRelation(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
view.repairParentChkClassWithSelf(setting, node);
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
return true;
},
onMouseoverCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = true;
view.setChkClass(setting, checkObj, node);
return true;
},
onMouseoutCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = false;
view.setChkClass(setting, checkObj, node);
return true;
}
},
//method of tools for zTree
_tools = {
},
//method of operate ztree dom
_view = {
checkNodeRelation: function(setting, node) {
var pNode, i, l,
childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
r = consts.radio;
if (setting.check.chkStyle == r.STYLE) {
var checkedList = data.getRadioCheckedList(setting);
if (node[checkedKey]) {
if (setting.check.radioType == r.TYPE_ALL) {
for (i = checkedList.length-1; i >= 0; i--) {
pNode = checkedList[i];
pNode[checkedKey] = false;
checkedList.splice(i, 1);
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
if (pNode.parentTId != node.parentTId) {
view.repairParentChkClassWithSelf(setting, pNode);
}
}
checkedList.push(node);
} else {
var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
for (i = 0, l = parentNode[childKey].length; i < l; i++) {
pNode = parentNode[childKey][i];
if (pNode[checkedKey] && pNode != node) {
pNode[checkedKey] = false;
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
}
}
}
} else if (setting.check.radioType == r.TYPE_ALL) {
for (i = 0, l = checkedList.length; i < l; i++) {
if (node == checkedList[i]) {
checkedList.splice(i, 1);
break;
}
}
}
} else {
if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, false);
}
if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, false);
}
}
},
makeChkClass: function(setting, node) {
var checkedKey = setting.data.key.checked,
c = consts.checkbox, r = consts.radio,
fullStyle = "";
if (node.chkDisabled === true) {
fullStyle = c.DISABLED;
} else if (node.halfCheck) {
fullStyle = c.PART;
} else if (setting.check.chkStyle == r.STYLE) {
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
} else {
fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
}
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
return "button " + c.DEFAULT + " " + chkName;
},
repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
var checkedKey = setting.data.key.checked,
childKey = setting.data.key.children,
root = data.getRoot(setting);
for (var i = 0, l = root[childKey].length; i<l ; i++) {
var node = root[childKey][i];
if (node.nocheck !== true) {
node[checkedKey] = checked;
}
view.setSonNodeCheckBox(setting, node, checked);
}
}
},
repairChkClass: function(setting, node) {
if (!node) return;
data.makeChkFlag(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
},
repairParentChkClass: function(setting, node) {
if (!node || !node.parentTId) return;
var pNode = node.getParentNode();
view.repairChkClass(setting, pNode);
view.repairParentChkClass(setting, pNode);
},
repairParentChkClassWithSelf: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children;
if (node[childKey] && node[childKey].length > 0) {
view.repairParentChkClass(setting, node[childKey][0]);
} else {
view.repairParentChkClass(setting, node);
}
},
repairSonChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
var childKey = setting.data.key.children;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l; i++) {
var sNode = node[childKey][i];
view.repairSonChkDisabled(setting, sNode, chkDisabled);
}
}
},
repairParentChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled);
},
setChkClass: function(setting, obj, node) {
if (!obj) return;
if (node.nocheck === true) {
obj.hide();
} else {
obj.show();
}
obj.removeClass();
obj.addClass(view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value, srcNode) {
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
data.makeChkFlag(setting, node);
if (node.nocheck !== true && node.chkDisabled !== true) {
node[checkedKey] = value;
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
if (node.parentTId) {
var pSign = true;
if (!value) {
var pNodes = node.getParentNode()[childKey];
for (var i = 0, l = pNodes.length; i < l; i++) {
if ((pNodes[i].nocheck !== true && pNodes[i][checkedKey])
|| (pNodes[i].nocheck === true && pNodes[i].check_Child_State > 0)) {
pSign = false;
break;
}
}
}
if (pSign) {
view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
}
}
},
setSonNodeCheckBox: function(setting, node, value, srcNode) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
var hasDisable = false;
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
var sNode = node[childKey][i];
view.setSonNodeCheckBox(setting, sNode, value, srcNode);
if (sNode.chkDisabled === true) hasDisable = true;
}
}
if (node != data.getRoot(setting) && node.chkDisabled !== true) {
if (hasDisable && node.nocheck !== true) {
data.makeChkFlag(setting, node);
}
if (node.nocheck !== true) {
node[checkedKey] = value;
if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
} else {
node.check_Child_State = -1;
}
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
},
_z = {
tools: _tools,
view: _view,
event: _event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addBeforeA(_beforeA);
data.addZTreeTools(_zTreeTools);
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var parentNode = node.getParentNode();
if (_removeNode) _removeNode.apply(view, arguments);
if (!node || !parentNode) return;
view.repairChkClass(setting, parentNode);
view.repairParentChkClass(setting, parentNode);
}
})(jQuery);
|
zzfls-pj
|
trunk/WebRoot/include/js/zTree/js/jquery.ztree.excheck-3.2.js
|
JavaScript
|
asf20
| 20,717
|
/*
* JQuery zTree core 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
var settings = {}, roots = {}, caches = {}, zId = 0,
//default consts of core
_consts = {
event: {
NODECREATED: "ztree_nodeCreated",
CLICK: "ztree_click",
EXPAND: "ztree_expand",
COLLAPSE: "ztree_collapse",
ASYNC_SUCCESS: "ztree_async_success",
ASYNC_ERROR: "ztree_async_error"
},
id: {
A: "_a",
ICON: "_ico",
SPAN: "_span",
SWITCH: "_switch",
UL: "_ul"
},
line: {
ROOT: "root",
ROOTS: "roots",
CENTER: "center",
BOTTOM: "bottom",
NOLINE: "noline",
LINE: "line"
},
folder: {
OPEN: "open",
CLOSE: "close",
DOCU: "docu"
},
node: {
CURSELECTED: "curSelectedNode"
}
},
//default setting of core
_setting = {
treeId: "",
treeObj: null,
view: {
addDiyDom: null,
autoCancelSelected: true,
dblClickExpand: true,
expandSpeed: "fast",
fontCss: {},
nameIsHTML: false,
selectedMulti: true,
showIcon: true,
showLine: true,
showTitle: true
},
data: {
key: {
children: "children",
name: "name",
title: "",
url: "url"
},
simpleData: {
enable: false,
idKey: "id",
pIdKey: "pId",
rootPId: null
},
keep: {
parent: false,
leaf: false
}
},
async: {
enable: false,
contentType: "application/x-www-form-urlencoded",
type: "post",
dataType: "text",
url: "",
autoParam: [],
otherParam: [],
dataFilter: null
},
callback: {
beforeAsync:null,
beforeClick:null,
beforeRightClick:null,
beforeMouseDown:null,
beforeMouseUp:null,
beforeExpand:null,
beforeCollapse:null,
beforeRemove:null,
onAsyncError:null,
onAsyncSuccess:null,
onNodeCreated:null,
onClick:null,
onRightClick:null,
onMouseDown:null,
onMouseUp:null,
onExpand:null,
onCollapse:null,
onRemove:null
}
},
//default root of core
//zTree use root to save full data
_initRoot = function (setting) {
var r = data.getRoot(setting);
if (!r) {
r = {};
data.setRoot(setting, r);
}
r.children = [];
r.expandTriggerFlag = false;
r.curSelectedList = [];
r.noSelection = true;
r.createdNodes = [];
},
//default cache of core
_initCache = function(setting) {
var c = data.getCache(setting);
if (!c) {
c = {};
data.setCache(setting, c);
}
c.nodes = [];
c.doms = [];
},
//default bindEvent of core
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.NODECREATED);
o.bind(c.NODECREATED, function (event, treeId, node) {
tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
});
o.unbind(c.CLICK);
o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
});
o.unbind(c.EXPAND);
o.bind(c.EXPAND, function (event, treeId, node) {
tools.apply(setting.callback.onExpand, [event, treeId, node]);
});
o.unbind(c.COLLAPSE);
o.bind(c.COLLAPSE, function (event, treeId, node) {
tools.apply(setting.callback.onCollapse, [event, treeId, node]);
});
o.unbind(c.ASYNC_SUCCESS);
o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
});
o.unbind(c.ASYNC_ERROR);
o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
});
},
//default event proxy of core
_eventProxy = function(event) {
var target = event.target,
setting = settings[event.data.treeId],
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null,
tmp = null;
if (tools.eqs(event.type, "mousedown")) {
treeEventType = "mousedown";
} else if (tools.eqs(event.type, "mouseup")) {
treeEventType = "mouseup";
} else if (tools.eqs(event.type, "contextmenu")) {
treeEventType = "contextmenu";
} else if (tools.eqs(event.type, "click")) {
if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
tId = target.parentNode.id;
nodeEventType = "switchNode";
} else {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "clickNode";
}
}
} else if (tools.eqs(event.type, "dblclick")) {
treeEventType = "dblclick";
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "switchNode";
}
}
if (treeEventType.length > 0 && tId.length == 0) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {tId = tmp.parentNode.id;}
}
// event to node
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "switchNode" :
if (!node.isParent) {
nodeEventType = "";
} else if (tools.eqs(event.type, "click")
|| (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
nodeEventCallback = handler.onSwitchNode;
} else {
nodeEventType = "";
}
break;
case "clickNode" :
nodeEventCallback = handler.onClickNode;
break;
}
}
// event to zTree
switch (treeEventType) {
case "mousedown" :
treeEventCallback = handler.onZTreeMousedown;
break;
case "mouseup" :
treeEventCallback = handler.onZTreeMouseup;
break;
case "dblclick" :
treeEventCallback = handler.onZTreeDblclick;
break;
case "contextmenu" :
treeEventCallback = handler.onZTreeContextmenu;
break;
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of core
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var childKey = setting.data.key.children;
n.level = level;
n.tId = setting.treeId + "_" + (++zId);
n.parentTId = parentNode ? parentNode.tId : null;
if (n[childKey] && n[childKey].length > 0) {
if (typeof n.open == "string") n.open = tools.eqs(n.open, "true");
n.open = !!n.open;
n.isParent = true;
n.zAsync = true;
} else {
n.open = false;
if (typeof n.isParent == "string") n.isParent = tools.eqs(n.isParent, "true");
n.isParent = !!n.isParent;
n.zAsync = !n.isParent;
}
n.isFirstNode = isFirstNode;
n.isLastNode = isLastNode;
n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
n.getPreNode = function() {return data.getPreNode(setting, n);};
n.getNextNode = function() {return data.getNextNode(setting, n);};
n.isAjaxing = false;
data.fixPIdKeyValue(setting, n);
},
_init = {
bind: [_bindEvent],
caches: [_initCache],
nodes: [_initNode],
proxys: [_eventProxy],
roots: [_initRoot],
beforeA: [],
afterA: [],
innerBeforeA: [],
innerAfterA: [],
zTreeTools: []
},
//method of operate data
data = {
addNodeCache: function(setting, node) {
data.getCache(setting).nodes[node.tId] = node;
},
addAfterA: function(afterA) {
_init.afterA.push(afterA);
},
addBeforeA: function(beforeA) {
_init.beforeA.push(beforeA);
},
addInnerAfterA: function(innerAfterA) {
_init.innerAfterA.push(innerAfterA);
},
addInnerBeforeA: function(innerBeforeA) {
_init.innerBeforeA.push(innerBeforeA);
},
addInitBind: function(bindEvent) {
_init.bind.push(bindEvent);
},
addInitCache: function(initCache) {
_init.caches.push(initCache);
},
addInitNode: function(initNode) {
_init.nodes.push(initNode);
},
addInitProxy: function(initProxy) {
_init.proxys.push(initProxy);
},
addInitRoot: function(initRoot) {
_init.roots.push(initRoot);
},
addNodesData: function(setting, parentNode, nodes) {
var childKey = setting.data.key.children;
if (!parentNode[childKey]) parentNode[childKey] = [];
if (parentNode[childKey].length > 0) {
parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
}
parentNode.isParent = true;
parentNode[childKey] = parentNode[childKey].concat(nodes);
},
addSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
if (!data.isSelectedNode(setting, node)) {
root.curSelectedList.push(node);
}
},
addCreatedNode: function(setting, node) {
if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
var root = data.getRoot(setting);
root.createdNodes.push(node);
}
},
addZTreeTools: function(zTreeTools) {
_init.zTreeTools.push(zTreeTools);
},
exSetting: function(s) {
$.extend(true, _setting, s);
},
fixPIdKeyValue: function(setting, node) {
if (setting.data.simpleData.enable) {
node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
}
},
getAfterA: function(setting, node, array) {
for (var i=0, j=_init.afterA.length; i<j; i++) {
_init.afterA[i].apply(this, arguments);
}
},
getBeforeA: function(setting, node, array) {
for (var i=0, j=_init.beforeA.length; i<j; i++) {
_init.beforeA[i].apply(this, arguments);
}
},
getInnerAfterA: function(setting, node, array) {
for (var i=0, j=_init.innerAfterA.length; i<j; i++) {
_init.innerAfterA[i].apply(this, arguments);
}
},
getInnerBeforeA: function(setting, node, array) {
for (var i=0, j=_init.innerBeforeA.length; i<j; i++) {
_init.innerBeforeA[i].apply(this, arguments);
}
},
getCache: function(setting) {
return caches[setting.treeId];
},
getNextNode: function(setting, node) {
if (!node) return null;
var childKey = setting.data.key.children,
p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
if (node.isLastNode) {
return null;
} else if (node.isFirstNode) {
return p[childKey][1];
} else {
for (var i=1, l=p[childKey].length-1; i<l; i++) {
if (p[childKey][i] === node) {
return p[childKey][i+1];
}
}
}
return null;
},
getNodeByParam: function(setting, nodes, key, value) {
if (!nodes || !key) return null;
var childKey = setting.data.key.children;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i][key] == value) {
return nodes[i];
}
var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);
if (tmp) return tmp;
}
return null;
},
getNodeCache: function(setting, tId) {
if (!tId) return null;
var n = caches[setting.treeId].nodes[tId];
return n ? n : null;
},
getNodes: function(setting) {
return data.getRoot(setting)[setting.data.key.children];
},
getNodesByParam: function(setting, nodes, key, value) {
if (!nodes || !key) return [];
var childKey = setting.data.key.children,
result = [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i][key] == value) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));
}
return result;
},
getNodesByParamFuzzy: function(setting, nodes, key, value) {
if (!nodes || !key) return [];
var childKey = setting.data.key.children,
result = [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (typeof nodes[i][key] == "string" && nodes[i][key].indexOf(value)>-1) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
}
return result;
},
getNodesByFilter: function(setting, nodes, filter, isSingle) {
if (!nodes) return (isSingle ? null : []);
var childKey = setting.data.key.children,
result = isSingle ? null : [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (tools.apply(filter, [nodes[i]], false)) {
if (isSingle) {return nodes[i];}
result.push(nodes[i]);
}
var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle);
if (isSingle && !!tmpResult) {return tmpResult;}
result = isSingle ? tmpResult : result.concat(tmpResult);
}
return result;
},
getPreNode: function(setting, node) {
if (!node) return null;
var childKey = setting.data.key.children,
p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
if (node.isFirstNode) {
return null;
} else if (node.isLastNode) {
return p[childKey][p[childKey].length-2];
} else {
for (var i=1, l=p[childKey].length-1; i<l; i++) {
if (p[childKey][i] === node) {
return p[childKey][i-1];
}
}
}
return null;
},
getRoot: function(setting) {
return setting ? roots[setting.treeId] : null;
},
getSetting: function(treeId) {
return settings[treeId];
},
getSettings: function() {
return settings;
},
getTitleKey: function(setting) {
return setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title;
},
getZTreeTools: function(treeId) {
var r = this.getRoot(this.getSetting(treeId));
return r ? r.treeTools : null;
},
initCache: function(setting) {
for (var i=0, j=_init.caches.length; i<j; i++) {
_init.caches[i].apply(this, arguments);
}
},
initNode: function(setting, level, node, parentNode, preNode, nextNode) {
for (var i=0, j=_init.nodes.length; i<j; i++) {
_init.nodes[i].apply(this, arguments);
}
},
initRoot: function(setting) {
for (var i=0, j=_init.roots.length; i<j; i++) {
_init.roots[i].apply(this, arguments);
}
},
isSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
for (var i=0, j=root.curSelectedList.length; i<j; i++) {
if(node === root.curSelectedList[i]) return true;
}
return false;
},
removeNodeCache: function(setting, node) {
var childKey = setting.data.key.children;
if (node[childKey]) {
for (var i=0, l=node[childKey].length; i<l; i++) {
arguments.callee(setting, node[childKey][i]);
}
}
delete data.getCache(setting).nodes[node.tId];
},
removeSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
for (var i=0, j=root.curSelectedList.length; i<j; i++) {
if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {
root.curSelectedList.splice(i, 1);
i--;j--;
}
}
},
setCache: function(setting, cache) {
caches[setting.treeId] = cache;
},
setRoot: function(setting, root) {
roots[setting.treeId] = root;
},
setZTreeTools: function(setting, zTreeTools) {
for (var i=0, j=_init.zTreeTools.length; i<j; i++) {
_init.zTreeTools[i].apply(this, arguments);
}
},
transformToArrayFormat: function (setting, nodes) {
if (!nodes) return [];
var childKey = setting.data.key.children,
r = [];
if (tools.isArray(nodes)) {
for (var i=0, l=nodes.length; i<l; i++) {
r.push(nodes[i]);
if (nodes[i][childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
}
} else {
r.push(nodes);
if (nodes[childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
}
return r;
},
transformTozTreeFormat: function(setting, sNodes) {
var i,l,
key = setting.data.simpleData.idKey,
parentKey = setting.data.simpleData.pIdKey,
childKey = setting.data.key.children;
if (!key || key=="" || !sNodes) return [];
if (tools.isArray(sNodes)) {
var r = [];
var tmpMap = [];
for (i=0, l=sNodes.length; i<l; i++) {
tmpMap[sNodes[i][key]] = sNodes[i];
}
for (i=0, l=sNodes.length; i<l; i++) {
if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
if (!tmpMap[sNodes[i][parentKey]][childKey])
tmpMap[sNodes[i][parentKey]][childKey] = [];
tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
} else {
r.push(sNodes[i]);
}
}
return r;
}else {
return [sNodes];
}
}
},
//method of event proxy
event = {
bindEvent: function(setting) {
for (var i=0, j=_init.bind.length; i<j; i++) {
_init.bind[i].apply(this, arguments);
}
},
bindTree: function(setting) {
var eventParam = {
treeId: setting.treeId
},
o = setting.treeObj;
o.unbind('click', event.proxy);
o.bind('click', eventParam, event.proxy);
o.unbind('dblclick', event.proxy);
o.bind('dblclick', eventParam, event.proxy);
o.unbind('mouseover', event.proxy);
o.bind('mouseover', eventParam, event.proxy);
o.unbind('mouseout', event.proxy);
o.bind('mouseout', eventParam, event.proxy);
o.unbind('mousedown', event.proxy);
o.bind('mousedown', eventParam, event.proxy);
o.unbind('mouseup', event.proxy);
o.bind('mouseup', eventParam, event.proxy);
o.unbind('contextmenu', event.proxy);
o.bind('contextmenu', eventParam, event.proxy);
},
doProxy: function(e) {
var results = [];
for (var i=0, j=_init.proxys.length; i<j; i++) {
var proxyResult = _init.proxys[i].apply(this, arguments);
results.push(proxyResult);
if (proxyResult.stop) {
break;
}
}
return results;
},
proxy: function(e) {
var setting = data.getSetting(e.data.treeId);
if (!tools.uCanDo(setting, e)) return true;
var results = event.doProxy(e),
r = true, x = false;
for (var i=0, l=results.length; i<l; i++) {
var proxyResult = results[i];
if (proxyResult.nodeEventCallback) {
x = true;
r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
if (proxyResult.treeEventCallback) {
x = true;
r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
}
try{
if (x && $("input:focus").length == 0) {
tools.noSel(setting);
}
} catch(e) {}
return r;
}
},
//method of event handler
handler = {
onSwitchNode: function (event, node) {
var setting = settings[event.data.treeId];
if (node.open) {
if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;
data.getRoot(setting).expandTriggerFlag = true;
view.switchNode(setting, node);
} else {
if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;
data.getRoot(setting).expandTriggerFlag = true;
view.switchNode(setting, node);
}
return true;
},
onClickNode: function (event, node) {
var setting = settings[event.data.treeId],
clickFlag = ( (setting.view.autoCancelSelected && event.ctrlKey) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && event.ctrlKey && setting.view.selectedMulti) ? 2 : 1;
if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
if (clickFlag === 0) {
view.cancelPreSelectedNode(setting, node);
} else {
view.selectNode(setting, node, clickFlag === 2);
}
setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);
return true;
},
onZTreeMousedown: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {
tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);
}
return true;
},
onZTreeMouseup: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {
tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);
}
return true;
},
onZTreeDblclick: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);
}
return true;
},
onZTreeContextmenu: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
}
return (typeof setting.callback.onRightClick) != "function";
}
},
//method of tools for zTree
tools = {
apply: function(fun, param, defaultValue) {
if ((typeof fun) == "function") {
return fun.apply(zt, param?param:[]);
}
return defaultValue;
},
canAsync: function(setting, node) {
var childKey = setting.data.key.children;
return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));
},
clone: function (jsonObj) {
var buf;
if (jsonObj instanceof Array) {
buf = [];
var i = jsonObj.length;
while (i--) {
buf[i] = arguments.callee(jsonObj[i]);
}
return buf;
}else if (typeof jsonObj == "function"){
return jsonObj;
}else if (jsonObj instanceof Object){
buf = {};
for (var k in jsonObj) {
buf[k] = arguments.callee(jsonObj[k]);
}
return buf;
}else{
return jsonObj;
}
},
eqs: function(str1, str2) {
return str1.toLowerCase() === str2.toLowerCase();
},
isArray: function(arr) {
return Object.prototype.toString.apply(arr) === "[object Array]";
},
getMDom: function (setting, curDom, targetExpr) {
if (!curDom) return null;
while (curDom && curDom.id !== setting.treeId) {
for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {
if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {
return curDom;
}
}
curDom = curDom.parentNode;
}
return null;
},
noSel: function(setting) {
var r = data.getRoot(setting);
if (r.noSelection) {
try {
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
} catch(e){}
}
},
uCanDo: function(setting, e) {
return true;
}
},
//method of operate ztree dom
view = {
addNodes: function(setting, parentNode, newNodes, isSilent) {
if (setting.data.keep.leaf && parentNode && !parentNode.isParent) {
return;
}
if (!tools.isArray(newNodes)) {
newNodes = [newNodes];
}
if (setting.data.simpleData.enable) {
newNodes = data.transformTozTreeFormat(setting, newNodes);
}
if (parentNode) {
var target_switchObj = $("#" + parentNode.tId + consts.id.SWITCH),
target_icoObj = $("#" + parentNode.tId + consts.id.ICON),
target_ulObj = $("#" + parentNode.tId + consts.id.UL);
if (!parentNode.open) {
view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);
view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
parentNode.open = false;
target_ulObj.css({
"display": "none"
});
}
data.addNodesData(setting, parentNode, newNodes);
view.createNodes(setting, parentNode.level + 1, newNodes, parentNode);
if (!isSilent) {
view.expandCollapseParentNode(setting, parentNode, true);
}
} else {
data.addNodesData(setting, data.getRoot(setting), newNodes);
view.createNodes(setting, 0, newNodes, null);
}
},
appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {
if (!nodes) return [];
var html = [],
childKey = setting.data.key.children,
nameKey = setting.data.key.name,
titleKey = data.getTitleKey(setting);
for (var i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i],
tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
tmpPChild = tmpPNode[childKey],
isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),
isLastNode = (i == (nodes.length - 1));
if (initFlag) {
data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);
data.addNodeCache(setting, node);
}
var childHtml = [];
if (node[childKey] && node[childKey].length > 0) {
//make child html first, because checkType
childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
}
if (openFlag) {
var url = view.makeNodeUrl(setting, node),
fontcss = view.makeNodeFontCss(setting, node),
fontStyle = [];
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}
html.push("<li id='", node.tId, "' class='level", node.level,"' tabindex='0' hidefocus='true' treenode>",
"<span id='", node.tId, consts.id.SWITCH,
"' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>");
data.getBeforeA(setting, node, html);
html.push("<a id='", node.tId, consts.id.A, "' class='level", node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
"'");
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && node[titleKey]) {html.push("title='", node[titleKey].replace(/'/g,"'").replace(/</g,'<').replace(/>/g,'>'),"'");}
html.push(">");
data.getInnerBeforeA(setting, node, html);
var name = setting.view.nameIsHTML ? node[nameKey] : node[nameKey].replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
html.push("<span id='", node.tId, consts.id.ICON,
"' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
"'>",name,"</span>");
data.getInnerAfterA(setting, node, html);
html.push("</a>");
data.getAfterA(setting, node, html);
if (node.isParent && node.open) {
view.makeUlHtml(setting, node, html, childHtml.join(''));
}
html.push("</li>");
data.addCreatedNode(setting, node);
}
}
return html;
},
appendParentULDom: function(setting, node) {
var html = [],
nObj = $("#" + node.tId),
ulObj = $("#" + node.tId + consts.id.UL),
childKey = setting.data.key.children,
childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
view.makeUlHtml(setting, node, html, childHtml.join(''));
if (!nObj.get(0) && !!node.parentTId) {
view.appendParentULDom(setting, node.getParentNode());
nObj = $("#" + node.tId);
}
if (ulObj.get(0)) {
ulObj.remove();
}
nObj.append(html.join(''));
view.createNodeCallback(setting);
},
asyncNode: function(setting, node, isSilent, callback) {
var i, l;
if (node && !node.isParent) {
tools.apply(callback);
return false;
} else if (node && node.isAjaxing) {
return false;
} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
tools.apply(callback);
return false;
}
if (node) {
node.isAjaxing = true;
var icoObj = $("#" + node.tId + consts.id.ICON);
icoObj.attr({"style":"", "class":"button ico_loading"});
}
var isJson = (setting.async.contentType == "application/json"), tmpParam = isJson ? "{" : "", jTemp="";
for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
if (pKey.length>1) {
spKey = pKey[1];
pKey = pKey[0];
}
if (isJson) {
jTemp = (typeof node[pKey] == "string") ? '"' : '';
tmpParam += '"' + spKey + ('":' + jTemp + node[pKey]).replace(/'/g,'\\\'') + jTemp + ',';
} else {
tmpParam += spKey + ("=" + node[pKey]).replace(/&/g,'%26') + "&";
}
}
if (tools.isArray(setting.async.otherParam)) {
for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
if (isJson) {
jTemp = (typeof setting.async.otherParam[i + 1] == "string") ? '"' : '';
tmpParam += '"' + setting.async.otherParam[i] + ('":' + jTemp + setting.async.otherParam[i + 1]).replace(/'/g,'\\\'') + jTemp + ",";
} else {
tmpParam += setting.async.otherParam[i] + ("=" + setting.async.otherParam[i + 1]).replace(/&/g,'%26') + "&";
}
}
} else {
for (var p in setting.async.otherParam) {
if (isJson) {
jTemp = (typeof setting.async.otherParam[p] == "string") ? '"' : '';
tmpParam += '"' + p + ('":' + jTemp + setting.async.otherParam[p]).replace(/'/g,'\\\'') + jTemp + ",";
} else {
tmpParam += p + ("=" + setting.async.otherParam[p]).replace(/&/g,'%26') + "&";
}
}
}
if (tmpParam.length > 1) tmpParam = tmpParam.substring(0, tmpParam.length-1);
if (isJson) tmpParam += "}";
$.ajax({
contentType: setting.async.contentType,
type: setting.async.type,
url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
data: tmpParam,
dataType: setting.async.dataType,
success: function(msg) {
var newNodes = [];
try {
if (!msg || msg.length == 0) {
newNodes = [];
} else if (typeof msg == "string") {
newNodes = eval("(" + msg + ")");
} else {
newNodes = msg;
}
} catch(err) {}
if (node) {
node.isAjaxing = null;
node.zAsync = true;
}
view.setNodeLineIcos(setting, node);
if (newNodes && newNodes != "") {
newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
} else {
view.addNodes(setting, node, [], !!isSilent);
}
setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
tools.apply(callback);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (node) node.isAjaxing = null;
view.setNodeLineIcos(setting, node);
setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
}
});
return true;
},
cancelPreSelectedNode: function (setting, node) {
var list = data.getRoot(setting).curSelectedList;
for (var i=0, j=list.length-1; j>=i; j--) {
if (!node || node === list[j]) {
$("#" + list[j].tId + consts.id.A).removeClass(consts.node.CURSELECTED);
view.setNodeName(setting, list[j]);
if (node) {
data.removeSelectedNode(setting, node);
break;
}
}
}
if (!node) data.getRoot(setting).curSelectedList = [];
},
createNodeCallback: function(setting) {
if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
var root = data.getRoot(setting);
while (root.createdNodes.length>0) {
var node = root.createdNodes.shift();
tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
if (!!setting.callback.onNodeCreated) {
setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
}
}
}
},
createNodes: function(setting, level, nodes, parentNode) {
if (!nodes || nodes.length == 0) return;
var root = data.getRoot(setting),
childKey = setting.data.key.children,
openFlag = !parentNode || parentNode.open || !!$("#" + parentNode[childKey][0].tId).get(0);
root.createdNodes = [];
var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
if (!parentNode) {
setting.treeObj.append(zTreeHtml.join(''));
} else {
var ulObj = $("#" + parentNode.tId + consts.id.UL);
if (ulObj.get(0)) {
ulObj.append(zTreeHtml.join(''));
}
}
view.createNodeCallback(setting);
},
expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
var root = data.getRoot(setting),
childKey = setting.data.key.children;
if (!node) {
tools.apply(callback, []);
return;
}
if (root.expandTriggerFlag) {
var _callback = callback;
callback = function(){
if (_callback) _callback();
if (node.open) {
setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
} else {
setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
}
};
root.expandTriggerFlag = false;
}
if (node.open == expandFlag) {
tools.apply(callback, []);
return;
}
if (!node.open && node.isParent && ((!$("#" + node.tId + consts.id.UL).get(0)) || (node[childKey] && node[childKey].length>0 && !$("#" + node[childKey][0].tId).get(0)))) {
view.appendParentULDom(setting, node);
}
var ulObj = $("#" + node.tId + consts.id.UL),
switchObj = $("#" + node.tId + consts.id.SWITCH),
icoObj = $("#" + node.tId + consts.id.ICON);
if (node.isParent) {
node.open = !node.open;
if (node.iconOpen && node.iconClose) {
icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
}
if (node.open) {
view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
if (animateFlag == false || setting.view.expandSpeed == "") {
ulObj.show();
tools.apply(callback, []);
} else {
if (node[childKey] && node[childKey].length > 0) {
ulObj.slideDown(setting.view.expandSpeed, callback);
} else {
ulObj.show();
tools.apply(callback, []);
}
}
} else {
view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
ulObj.hide();
tools.apply(callback, []);
} else {
ulObj.slideUp(setting.view.expandSpeed, callback);
}
}
} else {
tools.apply(callback, []);
}
},
expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
if (!node) return;
if (!node.parentTId) {
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
return;
} else {
view.expandCollapseNode(setting, node, expandFlag, animateFlag);
}
if (node.parentTId) {
view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
}
},
expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
var root = data.getRoot(setting),
childKey = setting.data.key.children,
treeNodes = (node) ? node[childKey]: root[childKey],
selfAnimateSign = (node) ? false : animateFlag,
expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
data.getRoot(setting).expandTriggerFlag = false;
if (treeNodes) {
for (var i = 0, l = treeNodes.length; i < l; i++) {
if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
}
}
data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
},
makeNodeFontCss: function(setting, node) {
var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
},
makeNodeIcoClass: function(setting, node) {
var icoCss = ["ico"];
if (!node.isAjaxing) {
icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
if (node.isParent) {
icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
} else {
icoCss.push(consts.folder.DOCU);
}
}
return "button " + icoCss.join('_');
},
makeNodeIcoStyle: function(setting, node) {
var icoStyle = [];
if (!node.isAjaxing) {
var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
icoStyle.push("width:0px;height:0px;");
}
}
return icoStyle.join('');
},
makeNodeLineClass: function(setting, node) {
var lineClass = [];
if (setting.view.showLine) {
if (node.level == 0 && node.isFirstNode && node.isLastNode) {
lineClass.push(consts.line.ROOT);
} else if (node.level == 0 && node.isFirstNode) {
lineClass.push(consts.line.ROOTS);
} else if (node.isLastNode) {
lineClass.push(consts.line.BOTTOM);
} else {
lineClass.push(consts.line.CENTER);
}
} else {
lineClass.push(consts.line.NOLINE);
}
if (node.isParent) {
lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
} else {
lineClass.push(consts.folder.DOCU);
}
return view.makeNodeLineClassEx(node) + lineClass.join('_');
},
makeNodeLineClassEx: function(node) {
return "button level" + node.level + " switch ";
},
makeNodeTarget: function(node) {
return (node.target || "_blank");
},
makeNodeUrl: function(setting, node) {
var urlKey = setting.data.key.url;
return node[urlKey] ? node[urlKey] : null;
},
makeUlHtml: function(setting, node, html, content) {
html.push("<ul id='", node.tId, consts.id.UL, "' class='level", node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>");
html.push(content);
html.push("</ul>");
},
makeUlLineClass: function(setting, node) {
return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
},
removeChildNodes: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
nodes = node[childKey];
if (!nodes) return;
for (var i = 0, l = nodes.length; i < l; i++) {
data.removeNodeCache(setting, nodes[i]);
}
data.removeSelectedNode(setting);
delete node[childKey];
if (!setting.data.keep.parent) {
node.isParent = false;
node.open = false;
var tmp_switchObj = $("#" + node.tId + consts.id.SWITCH),
tmp_icoObj = $("#" + node.tId + consts.id.ICON);
view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
$("#" + node.tId + consts.id.UL).remove();
} else {
$("#" + node.tId + consts.id.UL).empty();
}
},
removeNode: function(setting, node) {
var root = data.getRoot(setting),
childKey = setting.data.key.children,
parentNode = (node.parentTId) ? node.getParentNode() : root;
node.isFirstNode = false;
node.isLastNode = false;
node.getPreNode = function() {return null;};
node.getNextNode = function() {return null;};
$("#" + node.tId).remove();
data.removeNodeCache(setting, node);
data.removeSelectedNode(setting, node);
for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
if (parentNode[childKey][i].tId == node.tId) {
parentNode[childKey].splice(i, 1);
break;
}
}
var tmp_ulObj,tmp_switchObj,tmp_icoObj;
//repair nodes old parent
if (!setting.data.keep.parent && parentNode[childKey].length < 1) {
//old parentNode has no child nodes
parentNode.isParent = false;
parentNode.open = false;
tmp_ulObj = $("#" + parentNode.tId + consts.id.UL);
tmp_switchObj = $("#" + parentNode.tId + consts.id.SWITCH);
tmp_icoObj = $("#" + parentNode.tId + consts.id.ICON);
view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
tmp_ulObj.css("display", "none");
} else if (setting.view.showLine && parentNode[childKey].length > 0) {
//old parentNode has child nodes
var newLast = parentNode[childKey][parentNode[childKey].length - 1];
newLast.isLastNode = true;
newLast.isFirstNode = (parentNode[childKey].length == 1);
tmp_ulObj = $("#" + newLast.tId + consts.id.UL);
tmp_switchObj = $("#" + newLast.tId + consts.id.SWITCH);
tmp_icoObj = $("#" + newLast.tId + consts.id.ICON);
if (parentNode == root) {
if (parentNode[childKey].length == 1) {
//node was root, and ztree has only one root after move node
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
} else {
var tmp_first_switchObj = $("#" + parentNode[childKey][0].tId + consts.id.SWITCH);
view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
}
} else {
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
}
tmp_ulObj.removeClass(consts.line.LINE);
}
},
replaceIcoClass: function(node, obj, newName) {
if (!obj || node.isAjaxing) return;
var tmpName = obj.attr("class");
if (tmpName == undefined) return;
var tmpList = tmpName.split("_");
switch (newName) {
case consts.folder.OPEN:
case consts.folder.CLOSE:
case consts.folder.DOCU:
tmpList[tmpList.length-1] = newName;
break;
}
obj.attr("class", tmpList.join("_"));
},
replaceSwitchClass: function(node, obj, newName) {
if (!obj) return;
var tmpName = obj.attr("class");
if (tmpName == undefined) return;
var tmpList = tmpName.split("_");
switch (newName) {
case consts.line.ROOT:
case consts.line.ROOTS:
case consts.line.CENTER:
case consts.line.BOTTOM:
case consts.line.NOLINE:
tmpList[0] = view.makeNodeLineClassEx(node) + newName;
break;
case consts.folder.OPEN:
case consts.folder.CLOSE:
case consts.folder.DOCU:
tmpList[1] = newName;
break;
}
obj.attr("class", tmpList.join("_"));
if (newName !== consts.folder.DOCU) {
obj.removeAttr("disabled");
} else {
obj.attr("disabled", "disabled");
}
},
selectNode: function(setting, node, addFlag) {
if (!addFlag) {
view.cancelPreSelectedNode(setting);
}
$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED);
data.addSelectedNode(setting, node);
},
setNodeFontCss: function(setting, treeNode) {
var aObj = $("#" + treeNode.tId + consts.id.A),
fontCss = view.makeNodeFontCss(setting, treeNode);
if (fontCss) {
aObj.css(fontCss);
}
},
setNodeLineIcos: function(setting, node) {
if (!node) return;
var switchObj = $("#" + node.tId + consts.id.SWITCH),
ulObj = $("#" + node.tId + consts.id.UL),
icoObj = $("#" + node.tId + consts.id.ICON),
ulLine = view.makeUlLineClass(setting, node);
if (ulLine.length==0) {
ulObj.removeClass(consts.line.LINE);
} else {
ulObj.addClass(ulLine);
}
switchObj.attr("class", view.makeNodeLineClass(setting, node));
if (node.isParent) {
switchObj.removeAttr("disabled");
} else {
switchObj.attr("disabled", "disabled");
}
icoObj.removeAttr("style");
icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
icoObj.attr("class", view.makeNodeIcoClass(setting, node));
},
setNodeName: function(setting, node) {
var nameKey = setting.data.key.name,
titleKey = data.getTitleKey(setting),
nObj = $("#" + node.tId + consts.id.SPAN);
nObj.empty();
if (setting.view.nameIsHTML) {
nObj.html(node[nameKey]);
} else {
nObj.text(node[nameKey]);
}
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && node[titleKey]) {
var aObj = $("#" + node.tId + consts.id.A);
aObj.attr("title", node[titleKey]);
}
},
setNodeTarget: function(node) {
var aObj = $("#" + node.tId + consts.id.A);
aObj.attr("target", view.makeNodeTarget(node));
},
setNodeUrl: function(setting, node) {
var aObj = $("#" + node.tId + consts.id.A),
url = view.makeNodeUrl(setting, node);
if (url == null || url.length == 0) {
aObj.removeAttr("href");
} else {
aObj.attr("href", url);
}
},
switchNode: function(setting, node) {
if (node.open || !tools.canAsync(setting, node)) {
view.expandCollapseNode(setting, node, !node.open);
} else if (setting.async.enable) {
if (!view.asyncNode(setting, node)) {
view.expandCollapseNode(setting, node, !node.open);
return;
}
} else if (node) {
view.expandCollapseNode(setting, node, !node.open);
}
}
};
// zTree defind
$.fn.zTree = {
consts : _consts,
_z : {
tools: tools,
view: view,
event: event,
data: data
},
getZTreeObj: function(treeId) {
var o = data.getZTreeTools(treeId);
return o ? o : null;
},
init: function(obj, zSetting, zNodes) {
var setting = tools.clone(_setting);
$.extend(true, setting, zSetting);
setting.treeId = obj.attr("id");
setting.treeObj = obj;
setting.treeObj.empty();
settings[setting.treeId] = setting;
if ($.browser.msie && parseInt($.browser.version)<7) {
setting.view.expandSpeed = "";
}
data.initRoot(setting);
var root = data.getRoot(setting),
childKey = setting.data.key.children;
zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
if (setting.data.simpleData.enable) {
root[childKey] = data.transformTozTreeFormat(setting, zNodes);
} else {
root[childKey] = zNodes;
}
data.initCache(setting);
event.bindTree(setting);
event.bindEvent(setting);
var zTreeTools = {
setting : setting,
addNodes : function(parentNode, newNodes, isSilent) {
if (!newNodes) return null;
if (!parentNode) parentNode = null;
if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
function addCallback() {
view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
}
if (tools.canAsync(setting, parentNode)) {
view.asyncNode(setting, parentNode, isSilent, addCallback);
} else {
addCallback();
}
return xNewNodes;
},
cancelSelectedNode : function(node) {
view.cancelPreSelectedNode(this.setting, node);
},
expandAll : function(expandFlag) {
expandFlag = !!expandFlag;
view.expandCollapseSonNode(this.setting, null, expandFlag, true);
return expandFlag;
},
expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
if (!node || !node.isParent) return null;
if (expandFlag !== true && expandFlag !== false) {
expandFlag = !node.open;
}
callbackFlag = !!callbackFlag;
if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
return null;
} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
return null;
}
if (expandFlag && node.parentTId) {
view.expandCollapseParentNode(this.setting, node.getParentNode(), expandFlag, false);
}
if (expandFlag === node.open && !sonSign) {
return null;
}
data.getRoot(setting).expandTriggerFlag = callbackFlag;
if (sonSign) {
view.expandCollapseSonNode(this.setting, node, expandFlag, true, function() {
if (focus !== false) {$("#" + node.tId).focus().blur();}
});
} else {
node.open = !expandFlag;
view.switchNode(this.setting, node);
if (focus !== false) {$("#" + node.tId).focus().blur();}
}
return expandFlag;
},
getNodes : function() {
return data.getNodes(this.setting);
},
getNodeByParam : function(key, value, parentNode) {
if (!key) return null;
return data.getNodeByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodeByTId : function(tId) {
return data.getNodeCache(this.setting, tId);
},
getNodesByParam : function(key, value, parentNode) {
if (!key) return null;
return data.getNodesByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodesByParamFuzzy : function(key, value, parentNode) {
if (!key) return null;
return data.getNodesByParamFuzzy(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodesByFilter: function(filter, isSingle, parentNode) {
isSingle = !!isSingle;
if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
return data.getNodesByFilter(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), filter, isSingle);
},
getNodeIndex : function(node) {
if (!node) return null;
var childKey = setting.data.key.children,
parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(this.setting);
for (var i=0, l = parentNode[childKey].length; i < l; i++) {
if (parentNode[childKey][i] == node) return i;
}
return -1;
},
getSelectedNodes : function() {
var r = [], list = data.getRoot(this.setting).curSelectedList;
for (var i=0, l=list.length; i<l; i++) {
r.push(list[i]);
}
return r;
},
isSelectedNode : function(node) {
return data.isSelectedNode(this.setting, node);
},
reAsyncChildNodes : function(parentNode, reloadType, isSilent) {
if (!this.setting.async.enable) return;
var isRoot = !parentNode;
if (isRoot) {
parentNode = data.getRoot(this.setting);
}
if (reloadType=="refresh") {
parentNode[this.setting.data.key.children] = [];
if (isRoot) {
this.setting.treeObj.empty();
} else {
var ulObj = $("#" + parentNode.tId + consts.id.UL);
ulObj.empty();
}
}
view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);
},
refresh : function() {
this.setting.treeObj.empty();
var root = data.getRoot(this.setting),
nodes = root[this.setting.data.key.children]
data.initRoot(this.setting);
root[this.setting.data.key.children] = nodes
data.initCache(this.setting);
view.createNodes(this.setting, 0, root[this.setting.data.key.children]);
},
removeChildNodes : function(node) {
if (!node) return null;
var childKey = setting.data.key.children,
nodes = node[childKey];
view.removeChildNodes(setting, node);
return nodes ? nodes : null;
},
removeNode : function(node, callbackFlag) {
if (!node) return;
callbackFlag = !!callbackFlag;
if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;
view.removeNode(setting, node);
if (callbackFlag) {
this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
}
},
selectNode : function(node, addFlag) {
if (!node) return;
if (tools.uCanDo(this.setting)) {
addFlag = setting.view.selectedMulti && addFlag;
if (node.parentTId) {
view.expandCollapseParentNode(this.setting, node.getParentNode(), true, false, function() {
$("#" + node.tId).focus().blur();
});
} else {
$("#" + node.tId).focus().blur();
}
view.selectNode(this.setting, node, addFlag);
}
},
transformTozTreeNodes : function(simpleNodes) {
return data.transformTozTreeFormat(this.setting, simpleNodes);
},
transformToArray : function(nodes) {
return data.transformToArrayFormat(this.setting, nodes);
},
updateNode : function(node, checkTypeFlag) {
if (!node) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
view.setNodeName(this.setting, node);
view.setNodeTarget(node);
view.setNodeUrl(this.setting, node);
view.setNodeLineIcos(this.setting, node);
view.setNodeFontCss(this.setting, node);
}
}
}
root.treeTools = zTreeTools;
data.setZTreeTools(setting, zTreeTools);
if (root[childKey] && root[childKey].length > 0) {
view.createNodes(setting, 0, root[childKey]);
} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
view.asyncNode(setting);
}
return zTreeTools;
}
};
var zt = $.fn.zTree,
consts = zt.consts;
})(jQuery);
/*
* JQuery zTree excheck 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of excheck
var _consts = {
event: {
CHECK: "ztree_check"
},
id: {
CHECK: "_check"
},
checkbox: {
STYLE: "checkbox",
DEFAULT: "chk",
DISABLED: "disable",
FALSE: "false",
TRUE: "true",
FULL: "full",
PART: "part",
FOCUS: "focus"
},
radio: {
STYLE: "radio",
TYPE_ALL: "all",
TYPE_LEVEL: "level"
}
},
//default setting of excheck
_setting = {
check: {
enable: false,
autoCheckTrigger: false,
chkStyle: _consts.checkbox.STYLE,
nocheckInherit: false,
radioType: _consts.radio.TYPE_LEVEL,
chkboxType: {
"Y": "ps",
"N": "ps"
}
},
data: {
key: {
checked: "checked"
}
},
callback: {
beforeCheck:null,
onCheck:null
}
},
//default root of excheck
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.radioCheckedList = [];
},
//default cache of excheck
_initCache = function(treeId) {},
//default bind event of excheck
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.CHECK);
o.bind(c.CHECK, function (event, treeId, node) {
tools.apply(setting.callback.onCheck, [event, treeId, node]);
});
},
//default event proxy of excheck
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null;
if (tools.eqs(e.type, "mouseover")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoverCheck";
}
} else if (tools.eqs(e.type, "mouseout")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoutCheck";
}
} else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "checkNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "checkNode" :
nodeEventCallback = _handler.onCheckNode;
break;
case "mouseoverCheck" :
nodeEventCallback = _handler.onMouseoverCheck;
break;
case "mouseoutCheck" :
nodeEventCallback = _handler.onMouseoutCheck;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checkedKey = setting.data.key.checked;
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
n[checkedKey] = !!n[checkedKey];
n.checkedOld = n[checkedKey];
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
n.chkDisabled = !!n.chkDisabled || (parentNode && !!parentNode.chkDisabled);
if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
n.halfCheck = !!n.halfCheck;
n.check_Child_State = -1;
n.check_Focus = false;
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
if (isLastNode) {
data.makeChkFlag(setting, parentNode);
}
},
//add dom for check
_beforeA = function(setting, node, html) {
var checkedKey = setting.data.key.checked;
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
var r = data.getRoot(setting);
r.radioCheckedList.push(node);
}
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
}
},
//update zTreeObj, add method of check
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
var checkedKey = this.setting.data.key.checked;
if (node.chkDisabled === true) return;
if (checked !== true && checked !== false) {
checked = !node[checkedKey];
}
callbackFlag = !!callbackFlag;
if (node[checkedKey] === checked && !checkTypeFlag) {
return;
} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
return;
}
if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
node[checkedKey] = checked;
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
if (callbackFlag) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
zTreeTools.checkAllNodes = function(checked) {
view.repairAllChk(this.setting, !!checked);
}
zTreeTools.getCheckedNodes = function(checked) {
var childKey = this.setting.data.key.children;
checked = (checked !== false);
return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
}
zTreeTools.getChangeCheckedNodes = function() {
var childKey = this.setting.data.key.children;
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
}
zTreeTools.setChkDisabled = function(node, disabled) {
disabled = !!disabled;
view.repairSonChkDisabled(this.setting, node, disabled);
if (!disabled) view.repairParentChkDisabled(this.setting, node, disabled);
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
if (!node || !this.setting.check.enable) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
}
}
},
//method of operate data
_data = {
getRadioCheckedList: function(setting) {
var checkedList = data.getRoot(setting).radioCheckedList;
for (var i=0, j=checkedList.length; i<j; i++) {
if(!data.getNodeCache(setting, checkedList[i].tId)) {
checkedList.splice(i, 1);
i--; j--;
}
}
return checkedList;
},
getCheckStatus: function(setting, node) {
if (!setting.check.enable || node.nocheck) return null;
var checkedKey = setting.data.key.checked,
r = {
checked: node[checkedKey],
half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
};
return r;
},
getTreeCheckedNodes: function(setting, nodes, checked, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] == checked) {
results.push(nodes[i]);
}
data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
}
return results;
},
getTreeChangeCheckedNodes: function(setting, nodes, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
results.push(nodes[i]);
}
data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
}
return results;
},
makeChkFlag: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
chkFlag = -1;
if (node[childKey]) {
var start = false;
for (var i = 0, l = node[childKey].length; i < l; i++) {
var cNode = node[childKey][i];
var tmp = -1;
if (setting.check.chkStyle == consts.radio.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 2;
} else if (cNode.nocheck !== true && cNode[checkedKey]) {
tmp = 2;
} else {
tmp = cNode.check_Child_State > 0 ? 2:0;
}
if (tmp == 2) {
chkFlag = 2; break;
} else if (tmp == 0){
chkFlag = 0;
}
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 1;
} else if (cNode.nocheck !== true && cNode[checkedKey] ) {
tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
} else {
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
}
if (tmp === 1) {
chkFlag = 1; break;
} else if (tmp === 2 && start && tmp !== chkFlag) {
chkFlag = 1; break;
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
chkFlag = 1; break;
} else if (tmp > -1) {
chkFlag = tmp;
}
if (!start) start = (cNode.nocheck !== true);
}
}
}
node.check_Child_State = chkFlag;
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onCheckNode: function (event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkedKey = setting.data.key.checked;
if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
node[checkedKey] = !node[checkedKey];
view.checkNodeRelation(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
view.repairParentChkClassWithSelf(setting, node);
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
return true;
},
onMouseoverCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = true;
view.setChkClass(setting, checkObj, node);
return true;
},
onMouseoutCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = false;
view.setChkClass(setting, checkObj, node);
return true;
}
},
//method of tools for zTree
_tools = {
},
//method of operate ztree dom
_view = {
checkNodeRelation: function(setting, node) {
var pNode, i, l,
childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
r = consts.radio;
if (setting.check.chkStyle == r.STYLE) {
var checkedList = data.getRadioCheckedList(setting);
if (node[checkedKey]) {
if (setting.check.radioType == r.TYPE_ALL) {
for (i = checkedList.length-1; i >= 0; i--) {
pNode = checkedList[i];
pNode[checkedKey] = false;
checkedList.splice(i, 1);
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
if (pNode.parentTId != node.parentTId) {
view.repairParentChkClassWithSelf(setting, pNode);
}
}
checkedList.push(node);
} else {
var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
for (i = 0, l = parentNode[childKey].length; i < l; i++) {
pNode = parentNode[childKey][i];
if (pNode[checkedKey] && pNode != node) {
pNode[checkedKey] = false;
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
}
}
}
} else if (setting.check.radioType == r.TYPE_ALL) {
for (i = 0, l = checkedList.length; i < l; i++) {
if (node == checkedList[i]) {
checkedList.splice(i, 1);
break;
}
}
}
} else {
if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, false);
}
if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, false);
}
}
},
makeChkClass: function(setting, node) {
var checkedKey = setting.data.key.checked,
c = consts.checkbox, r = consts.radio,
fullStyle = "";
if (node.chkDisabled === true) {
fullStyle = c.DISABLED;
} else if (node.halfCheck) {
fullStyle = c.PART;
} else if (setting.check.chkStyle == r.STYLE) {
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
} else {
fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
}
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
return "button " + c.DEFAULT + " " + chkName;
},
repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
var checkedKey = setting.data.key.checked,
childKey = setting.data.key.children,
root = data.getRoot(setting);
for (var i = 0, l = root[childKey].length; i<l ; i++) {
var node = root[childKey][i];
if (node.nocheck !== true) {
node[checkedKey] = checked;
}
view.setSonNodeCheckBox(setting, node, checked);
}
}
},
repairChkClass: function(setting, node) {
if (!node) return;
data.makeChkFlag(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
},
repairParentChkClass: function(setting, node) {
if (!node || !node.parentTId) return;
var pNode = node.getParentNode();
view.repairChkClass(setting, pNode);
view.repairParentChkClass(setting, pNode);
},
repairParentChkClassWithSelf: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children;
if (node[childKey] && node[childKey].length > 0) {
view.repairParentChkClass(setting, node[childKey][0]);
} else {
view.repairParentChkClass(setting, node);
}
},
repairSonChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
var childKey = setting.data.key.children;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l; i++) {
var sNode = node[childKey][i];
view.repairSonChkDisabled(setting, sNode, chkDisabled);
}
}
},
repairParentChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled);
},
setChkClass: function(setting, obj, node) {
if (!obj) return;
if (node.nocheck === true) {
obj.hide();
} else {
obj.show();
}
obj.removeClass();
obj.addClass(view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value, srcNode) {
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
data.makeChkFlag(setting, node);
if (node.nocheck !== true && node.chkDisabled !== true) {
node[checkedKey] = value;
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
if (node.parentTId) {
var pSign = true;
if (!value) {
var pNodes = node.getParentNode()[childKey];
for (var i = 0, l = pNodes.length; i < l; i++) {
if ((pNodes[i].nocheck !== true && pNodes[i][checkedKey])
|| (pNodes[i].nocheck === true && pNodes[i].check_Child_State > 0)) {
pSign = false;
break;
}
}
}
if (pSign) {
view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
}
}
},
setSonNodeCheckBox: function(setting, node, value, srcNode) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
var hasDisable = false;
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
var sNode = node[childKey][i];
view.setSonNodeCheckBox(setting, sNode, value, srcNode);
if (sNode.chkDisabled === true) hasDisable = true;
}
}
if (node != data.getRoot(setting) && node.chkDisabled !== true) {
if (hasDisable && node.nocheck !== true) {
data.makeChkFlag(setting, node);
}
if (node.nocheck !== true) {
node[checkedKey] = value;
if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
} else {
node.check_Child_State = -1;
}
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
},
_z = {
tools: _tools,
view: _view,
event: _event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addBeforeA(_beforeA);
data.addZTreeTools(_zTreeTools);
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var parentNode = node.getParentNode();
if (_removeNode) _removeNode.apply(view, arguments);
if (!node || !parentNode) return;
view.repairChkClass(setting, parentNode);
view.repairParentChkClass(setting, parentNode);
}
})(jQuery);
/*
* JQuery zTree exedit 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of exedit
var _consts = {
event: {
DRAG: "ztree_drag",
DROP: "ztree_drop",
REMOVE: "ztree_remove",
RENAME: "ztree_rename"
},
id: {
EDIT: "_edit",
INPUT: "_input",
REMOVE: "_remove"
},
move: {
TYPE_INNER: "inner",
TYPE_PREV: "prev",
TYPE_NEXT: "next"
},
node: {
CURSELECTED_EDIT: "curSelectedNode_Edit",
TMPTARGET_TREE: "tmpTargetzTree",
TMPTARGET_NODE: "tmpTargetNode"
}
},
//default setting of exedit
_setting = {
edit: {
enable: false,
editNameSelectAll: false,
showRemoveBtn: true,
showRenameBtn: true,
removeTitle: "remove",
renameTitle: "rename",
drag: {
autoExpandTrigger: false,
isCopy: true,
isMove: true,
prev: true,
next: true,
inner: true,
minMoveSize: 5,
borderMax: 10,
borderMin: -5,
maxShowNodeNum: 5,
autoOpenTime: 500
}
},
view: {
addHoverDom: null,
removeHoverDom: null
},
callback: {
beforeDrag:null,
beforeDragOpen:null,
beforeDrop:null,
beforeEditName:null,
beforeRename:null,
onDrag:null,
onDrop:null,
onRename:null
}
},
//default root of exedit
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.curEditNode = null;
r.curEditInput = null;
r.curHoverNode = null;
r.dragFlag = 0;
r.dragNodeShowBefore = [];
r.dragMaskList = new Array();
r.showHoverDom = true;
},
//default cache of exedit
_initCache = function(treeId) {},
//default bind event of exedit
_bindEvent = function(setting) {
var o = setting.treeObj;
var c = consts.event;
o.unbind(c.RENAME);
o.bind(c.RENAME, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRename, [event, treeId, treeNode]);
});
o.unbind(c.REMOVE);
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
o.unbind(c.DRAG);
o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
o.unbind(c.DROP);
o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
});
},
//default event proxy of exedit
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
relatedTarget = e.relatedTarget,
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null,
tmp = null;
if (tools.eqs(e.type, "mouseover")) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "hoverOverNode";
}
} else if (tools.eqs(e.type, "mouseout")) {
tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (!tmp) {
tId = "remove";
nodeEventType = "hoverOutNode";
}
} else if (tools.eqs(e.type, "mousedown")) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "mousedownNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "mousedownNode" :
nodeEventCallback = _handler.onMousedownNode;
break;
case "hoverOverNode" :
nodeEventCallback = _handler.onHoverOverNode;
break;
case "hoverOutNode" :
nodeEventCallback = _handler.onHoverOutNode;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of exedit
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
n.isHover = false;
n.editNameFlag = false;
},
//update zTreeObj, add method of edit
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.cancelEditName = function(newName) {
var root = data.getRoot(setting),
nameKey = setting.data.key.name,
node = root.curEditNode;
if (!root.curEditNode) return;
view.cancelCurEditNode(setting, newName?newName:node[nameKey]);
}
zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
if (!node) return null;
if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
var newNode = tools.clone(node);
if (!targetNode) {
targetNode = null;
moveType = consts.move.TYPE_INNER;
}
if (moveType == consts.move.TYPE_INNER) {
function copyCallback() {
view.addNodes(setting, targetNode, [newNode], isSilent);
}
if (tools.canAsync(setting, targetNode)) {
view.asyncNode(setting, targetNode, isSilent, copyCallback);
} else {
copyCallback();
}
} else {
view.addNodes(setting, targetNode.parentNode, [newNode], isSilent);
view.moveNode(setting, targetNode, newNode, moveType, false, isSilent);
}
return newNode;
}
zTreeTools.editName = function(node) {
if (!node || !node.tId || node !== data.getNodeCache(setting, node.tId)) return;
if (node.parentTId) view.expandCollapseParentNode(setting, node.getParentNode(), true);
view.editNode(setting, node)
}
zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
if (!node) return node;
if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
return null;
} else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $("#" + node.tId).find("#" + targetNode.tId).length > 0)) {
return null;
} else if (!targetNode) {
targetNode = null;
}
function moveCallback() {
view.moveNode(setting, targetNode, node, moveType, false, isSilent);
}
if (tools.canAsync(setting, targetNode)) {
view.asyncNode(setting, targetNode, isSilent, moveCallback);
} else {
moveCallback();
}
return node;
}
zTreeTools.setEditable = function(editable) {
setting.edit.enable = editable;
return this.refresh();
}
},
//method of operate data
_data = {
setSonNodeLevel: function(setting, parentNode, node) {
if (!node) return;
var childKey = setting.data.key.children;
node.level = (parentNode)? parentNode.level + 1 : 0;
if (!node[childKey]) return;
for (var i = 0, l = node[childKey].length; i < l; i++) {
if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
}
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onHoverOverNode: function(event, node) {
var setting = data.getSetting(event.data.treeId),
root = data.getRoot(setting);
if (root.curHoverNode != node) {
_handler.onHoverOutNode(event);
}
root.curHoverNode = node;
view.addHoverDom(setting, node);
},
onHoverOutNode: function(event, node) {
var setting = data.getSetting(event.data.treeId),
root = data.getRoot(setting);
if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
view.removeTreeDom(setting, root.curHoverNode);
root.curHoverNode = null;
}
},
onMousedownNode: function(eventMouseDown, _node) {
var i,l,
setting = data.getSetting(eventMouseDown.data.treeId),
root = data.getRoot(setting);
//right click can't drag & drop
if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
//input of edit node name can't drag & drop
var target = eventMouseDown.target,
_nodes = data.getRoot(setting).curSelectedList,
nodes = [];
if (!data.isSelectedNode(setting, _node)) {
nodes = [_node];
} else {
for (i=0, l=_nodes.length; i<l; i++) {
if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode"+consts.id.INPUT) !== null) {
return true;
}
nodes.push(_nodes[i]);
if (nodes[0].parentTId !== _nodes[i].parentTId) {
nodes = [_node];
break;
}
}
}
view.editNodeBlur = true;
view.cancelCurEditNode(setting, null, true);
var doc = $(document), curNode, tmpArrow, tmpTarget,
isOtherTree = false,
targetSetting = setting,
preNode, nextNode,
preTmpTargetNodeId = null,
preTmpMoveType = null,
tmpTargetNodeId = null,
moveType = consts.move.TYPE_INNER,
mouseDownX = eventMouseDown.clientX,
mouseDownY = eventMouseDown.clientY,
startTime = (new Date()).getTime();
if (tools.uCanDo(setting)) {
doc.bind("mousemove", _docMouseMove);
}
function _docMouseMove(event) {
//avoid start drag after click node
if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize
&& Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) {
return true;
}
var i, l, tmpNode, tmpDom, tmpNodes,
childKey = setting.data.key.children;
tools.noSel(setting);
$("body").css("cursor", "pointer");
if (root.dragFlag == 0) {
if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) {
_docMouseUp(event);
return true;
}
for (i=0, l=nodes.length; i<l; i++) {
if (i==0) {
root.dragNodeShowBefore = [];
}
tmpNode = nodes[i];
if (tmpNode.isParent && tmpNode.open) {
view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
root.dragNodeShowBefore[tmpNode.tId] = true;
} else {
root.dragNodeShowBefore[tmpNode.tId] = false;
}
}
root.dragFlag = 1;
root.showHoverDom = false;
tools.showIfameMask(setting, true);
//sort
var isOrder = true, lastIndex = -1;
if (nodes.length>1) {
var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
tmpNodes = [];
for (i=0, l=pNodes.length; i<l; i++) {
if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) {
if (isOrder && lastIndex > -1 && (lastIndex+1) !== i) {
isOrder = false;
}
tmpNodes.push(pNodes[i]);
lastIndex = i;
}
if (nodes.length === tmpNodes.length) {
nodes = tmpNodes;
break;
}
}
}
if (isOrder) {
preNode = nodes[0].getPreNode();
nextNode = nodes[nodes.length-1].getNextNode();
}
//set node in selected
curNode = $("<ul class='zTreeDragUL'></ul>");
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
tmpNode.editNameFlag = false;
view.selectNode(setting, tmpNode, i>0);
view.removeTreeDom(setting, tmpNode);
tmpDom = $("<li id='"+ tmpNode.tId +"_tmp'></li>");
tmpDom.append($("#" + tmpNode.tId + consts.id.A).clone());
tmpDom.css("padding", "0");
tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
curNode.append(tmpDom);
if (i == setting.edit.drag.maxShowNodeNum-1) {
tmpDom = $("<li id='"+ tmpNode.tId +"_moretmp'><a> ... </a></li>");
curNode.append(tmpDom);
break;
}
}
curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
curNode.addClass(setting.treeObj.attr("class"));
curNode.appendTo("body");
tmpArrow = $("<span class='tmpzTreeMove_arrow'></span>");
tmpArrow.attr("id", "zTreeMove_arrow_tmp");
tmpArrow.appendTo("body");
setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
}
if (root.dragFlag == 1) {
if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
event.target = (xT.length > 0) ? xT.get(0) : event.target;
} else if (tmpTarget) {
tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
.removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
}
tmpTarget = null;
tmpTargetNodeId = null;
//judge drag & drop in multi ztree
isOtherTree = false;
targetSetting = setting;
var settings = data.getSettings();
for (var s in settings) {
if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
&& (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
isOtherTree = true;
targetSetting = settings[s];
}
}
var docScrollTop = doc.scrollTop(),
docScrollLeft = doc.scrollLeft(),
treeOffset = targetSetting.treeObj.offset(),
scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
dTop = (event.clientY + docScrollTop - treeOffset.top),
dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
dLeft = (event.clientX + docScrollLeft - treeOffset.left),
dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
if (event.target.id && targetSetting.treeObj.find("#" + event.target.id).length > 0) {
//get node <li> dom
var targetObj = event.target;
while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
targetObj = targetObj.parentNode;
}
var canMove = true;
//don't move to self or children of self
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
if (targetObj.id === tmpNode.tId) {
canMove = false;
break;
} else if ($("#" + tmpNode.tId).find("#" + targetObj.id).length > 0) {
canMove = false;
break;
}
}
if (canMove) {
if (event.target.id &&
(event.target.id == (targetObj.id + consts.id.A) || $(event.target).parents("#" + targetObj.id + consts.id.A).length > 0)) {
tmpTarget = $(targetObj);
tmpTargetNodeId = targetObj.id;
}
}
}
//the mouse must be in zTree
tmpNode = nodes[0];
if (isTreeInner && (event.target.id == targetSetting.treeId || $(event.target).parents("#" + targetSetting.treeId).length>0)) {
//judge mouse move in root of ztree
if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
tmpTarget = targetSetting.treeObj;
}
//auto scroll top
if (isTop) {
targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
} else if (isBottom) {
targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
}
if (isLeft) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
} else if (isRight) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
}
//auto scroll left
if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
}
}
curNode.css({
"top": (event.clientY + docScrollTop + 3) + "px",
"left": (event.clientX + docScrollLeft + 3) + "px"
});
var dX = 0;
var dY = 0;
if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
if (!canPrev && !canNext && !canInner) {
tmpTarget = null;
tmpTargetNodeId = "";
moveType = consts.move.TYPE_INNER;
tmpArrow.css({
"display":"none"
});
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null
}
} else {
var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
tmpTop = tmpTargetA.offset().top,
tmpLeft = tmpTargetA.offset().left,
prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
dX = 1 - tmpArrow.width();
dY = tmpTop - tmpArrow.height()/2;
moveType = consts.move.TYPE_PREV;
} else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
dX = 1 - tmpArrow.width();
dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
moveType = consts.move.TYPE_NEXT;
}else {
dX = 5 - tmpArrow.width();
dY = tmpTop;
moveType = consts.move.TYPE_INNER;
}
tmpArrow.css({
"display":"block",
"top": dY + "px",
"left": (tmpLeft + dX) + "px"
});
tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
startTime = (new Date()).getTime();
}
if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
var startTimer = true;
if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
} else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
startTimer = false;
}
if (startTimer) {
window.zTreeMoveTimer = setTimeout(function() {
if (moveType != consts.move.TYPE_INNER) return;
if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
&& tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
view.switchNode(targetSetting, tmpTargetNode);
if (targetSetting.edit.drag.autoExpandTrigger) {
targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
}
}
}, targetSetting.edit.drag.autoOpenTime+50);
window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
}
}
}
} else {
moveType = consts.move.TYPE_INNER;
if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
tmpTarget.addClass(consts.node.TMPTARGET_TREE);
} else {
tmpTarget = null;
}
tmpArrow.css({
"display":"none"
});
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
}
}
preTmpTargetNodeId = tmpTargetNodeId;
preTmpMoveType = moveType;
}
return false;
}
doc.bind("mouseup", _docMouseUp);
function _docMouseUp(event) {
if (window.zTreeMoveTimer) {
clearTimeout(window.zTreeMoveTimer);
window.zTreeMoveTargetNodeTId = null;
}
preTmpTargetNodeId = null;
preTmpMoveType = null;
doc.unbind("mousemove", _docMouseMove);
doc.unbind("mouseup", _docMouseUp);
doc.unbind("selectstart", _docSelect);
$("body").css("cursor", "auto");
if (tmpTarget) {
tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
.removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
}
tools.showIfameMask(setting, false);
root.showHoverDom = true;
if (root.dragFlag == 0) return;
root.dragFlag = 0;
var i, l, tmpNode;
for (i=0, l=nodes.length; i<l; i++) {
tmpNode = nodes[i];
if (tmpNode.isParent && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) {
view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
delete root.dragNodeShowBefore[tmpNode.tId];
}
}
if (curNode) curNode.remove();
if (tmpArrow) tmpArrow.remove();
var isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy);
if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId==nodes[0].parentTId && moveType == consts.move.TYPE_INNER) {
tmpTarget = null;
}
if (tmpTarget) {
var dragTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId);
if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) return;
var newNodes = isCopy ? tools.clone(nodes) : nodes;
function dropCallback() {
if (isOtherTree) {
if (!isCopy) {
for(var i=0, l=nodes.length; i<l; i++) {
view.removeNode(setting, nodes[i]);
}
}
if (moveType == consts.move.TYPE_INNER) {
view.addNodes(targetSetting, dragTargetNode, newNodes);
} else {
view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
if (moveType == consts.move.TYPE_PREV) {
for (i=0, l=newNodes.length; i<l; i++) {
view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
}
} else {
for (i=-1, l=newNodes.length-1; i<l; l--) {
view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
}
}
}
} else {
if (isCopy && moveType == consts.move.TYPE_INNER) {
view.addNodes(targetSetting, dragTargetNode, newNodes);
} else {
if (isCopy) {
view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
}
if (moveType == consts.move.TYPE_PREV) {
for (i=0, l=newNodes.length; i<l; i++) {
view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
}
} else {
for (i=-1, l=newNodes.length-1; i<l; l--) {
view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
}
}
}
}
for (i=0, l=newNodes.length; i<l; i++) {
view.selectNode(targetSetting, newNodes[i], i>0);
}
$("#" + newNodes[0].tId).focus().blur();
}
if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
} else {
dropCallback();
}
setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
} else {
for (i=0, l=nodes.length; i<l; i++) {
view.selectNode(targetSetting, nodes[i], i>0);
}
setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
}
}
doc.bind("selectstart", _docSelect);
function _docSelect() {
return false;
}
//Avoid FireFox's Bug
//If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
if(eventMouseDown.preventDefault) {
eventMouseDown.preventDefault();
}
return true;
}
},
//method of tools for zTree
_tools = {
getAbs: function (obj) {
var oRect = obj.getBoundingClientRect();
return [oRect.left,oRect.top]
},
inputFocus: function(inputObj) {
if (inputObj.get(0)) {
inputObj.focus();
tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
}
},
inputSelect: function(inputObj) {
if (inputObj.get(0)) {
inputObj.focus();
inputObj.select();
}
},
setCursorPosition: function(obj, pos){
if(obj.setSelectionRange) {
obj.focus();
obj.setSelectionRange(pos,pos);
} else if (obj.createTextRange) {
var range = obj.createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStart('character', pos);
range.select();
}
},
showIfameMask: function(setting, showSign) {
var root = data.getRoot(setting);
//clear full mask
while (root.dragMaskList.length > 0) {
root.dragMaskList[0].remove();
root.dragMaskList.shift();
}
if (showSign) {
//show mask
var iframeList = $("iframe");
for (var i = 0, l = iframeList.length; i < l; i++) {
var obj = iframeList.get(i),
r = tools.getAbs(obj),
dragMask = $("<div id='zTreeMask_" + i + "' class='zTreeMask' style='background-color:yellow;opacity: 0.3;filter: alpha(opacity=30); top:" + r[1] + "px; left:" + r[0] + "px; width:" + obj.offsetWidth + "px; height:" + obj.offsetHeight + "px;'></div>");
dragMask.appendTo("body");
root.dragMaskList.push(dragMask);
}
}
}
},
//method of operate ztree dom
_view = {
addEditBtn: function(setting, node) {
if (node.editNameFlag || $("#" + node.tId + consts.id.EDIT).length > 0) {
return;
}
if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
return;
}
var aObj = $("#" + node.tId + consts.id.A),
editStr = "<span class='button edit' id='" + node.tId + consts.id.EDIT + "' title='"+tools.apply(setting.edit.renameTitle, [setting.treeId, node], setting.edit.renameTitle)+"' treeNode"+consts.id.EDIT+" style='display:none;'></span>";
aObj.append(editStr);
$("#" + node.tId + consts.id.EDIT).bind('click',
function() {
if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
view.editNode(setting, node);
return false;
}
).show();
},
addRemoveBtn: function(setting, node) {
if (node.editNameFlag || $("#" + node.tId + consts.id.REMOVE).length > 0) {
return;
}
if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
return;
}
var aObj = $("#" + node.tId + consts.id.A),
removeStr = "<span class='button remove' id='" + node.tId + consts.id.REMOVE + "' title='"+tools.apply(setting.edit.removeTitle, [setting.treeId, node], setting.edit.removeTitle)+"' treeNode"+consts.id.REMOVE+" style='display:none;'></span>";
aObj.append(removeStr);
$("#" + node.tId + consts.id.REMOVE).bind('click',
function() {
if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
view.removeNode(setting, node);
setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
return false;
}
).bind('mousedown',
function(eventMouseDown) {
return true;
}
).show();
},
addHoverDom: function(setting, node) {
if (data.getRoot(setting).showHoverDom) {
node.isHover = true;
if (setting.edit.enable) {
view.addEditBtn(setting, node);
view.addRemoveBtn(setting, node);
}
tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
}
},
cancelCurEditNode: function (setting, forceName) {
var root = data.getRoot(setting),
nameKey = setting.data.key.name,
node = root.curEditNode;
if (node) {
var inputObj = root.curEditInput;
var newName = forceName ? forceName:inputObj.val();
if (!forceName && tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName], true) === false) {
node.editNameFlag = true;
return false;
} else {
node[nameKey] = newName ? newName:inputObj.val();
if (!forceName) {
setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node]);
}
}
var aObj = $("#" + node.tId + consts.id.A);
aObj.removeClass(consts.node.CURSELECTED_EDIT);
inputObj.unbind();
view.setNodeName(setting, node);
node.editNameFlag = false;
root.curEditNode = null;
root.curEditInput = null;
view.selectNode(setting, node, false);
}
root.noSelection = true;
return true;
},
editNode: function(setting, node) {
var root = data.getRoot(setting);
view.editNodeBlur = false;
if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
return;
}
var nameKey = setting.data.key.name;
node.editNameFlag = true;
view.removeTreeDom(setting, node);
view.cancelCurEditNode(setting);
view.selectNode(setting, node, false);
$("#" + node.tId + consts.id.SPAN).html("<input type=text class='rename' id='" + node.tId + consts.id.INPUT + "' treeNode" + consts.id.INPUT + " >");
var inputObj = $("#" + node.tId + consts.id.INPUT);
inputObj.attr("value", node[nameKey]);
if (setting.edit.editNameSelectAll) {
tools.inputSelect(inputObj);
} else {
tools.inputFocus(inputObj);
}
inputObj.bind('blur', function(event) {
if (!view.editNodeBlur) {
view.cancelCurEditNode(setting);
}
}).bind('keydown', function(event) {
if (event.keyCode=="13") {
view.editNodeBlur = true;
view.cancelCurEditNode(setting, null, true);
} else if (event.keyCode=="27") {
view.cancelCurEditNode(setting, node[nameKey]);
}
}).bind('click', function(event) {
return false;
}).bind('dblclick', function(event) {
return false;
});
$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED_EDIT);
root.curEditInput = inputObj;
root.noSelection = false;
root.curEditNode = node;
},
moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
var root = data.getRoot(setting),
childKey = setting.data.key.children;
if (targetNode == node) return;
if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
var oldParentNode = (node.parentTId ? node.getParentNode(): root),
targetNodeIsRoot = (targetNode === null || targetNode == root);
if (targetNodeIsRoot && targetNode === null) targetNode = root;
if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
moveType = consts.move.TYPE_INNER;
}
if (moveType == consts.move.TYPE_INNER) {
if (targetNodeIsRoot) {
//parentTId of root node is null
node.parentTId = null;
} else {
if (!targetNode.isParent) {
targetNode.isParent = true;
targetNode.open = !!targetNode.open;
view.setNodeLineIcos(setting, targetNode);
}
node.parentTId = targetNode.tId;
}
}
//move node Dom
var targetObj, target_ulObj;
if (targetNodeIsRoot) {
targetObj = setting.treeObj;
target_ulObj = targetObj;
} else {
if (!isSilent && moveType == consts.move.TYPE_INNER) {
view.expandCollapseNode(setting, targetNode, true, false);
} else if (!isSilent) {
view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
}
targetObj = $("#" + targetNode.tId);
target_ulObj = $("#" + targetNode.tId + consts.id.UL);
if (!target_ulObj.get(0)) {
var ulstr = [];
view.makeUlHtml(setting, targetNode, ulstr, '');
targetObj.append(ulstr.join(''));
}
target_ulObj = $("#" + targetNode.tId + consts.id.UL);
}
var nodeDom = $("#" + node.tId);
if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
target_ulObj.append(nodeDom);
} else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
targetObj.before(nodeDom);
} else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
targetObj.after(nodeDom);
}
//repair the data after move
var i,l,
tmpSrcIndex = -1,
tmpTargetIndex = 0,
oldNeighbor = null,
newNeighbor = null,
oldLevel = node.level;
if (node.isFirstNode) {
tmpSrcIndex = 0;
if (oldParentNode[childKey].length > 1 ) {
oldNeighbor = oldParentNode[childKey][1];
oldNeighbor.isFirstNode = true;
}
} else if (node.isLastNode) {
tmpSrcIndex = oldParentNode[childKey].length -1;
oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
oldNeighbor.isLastNode = true;
} else {
for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
if (oldParentNode[childKey][i].tId == node.tId) {
tmpSrcIndex = i;
break;
}
}
}
if (tmpSrcIndex >= 0) {
oldParentNode[childKey].splice(tmpSrcIndex, 1);
}
if (moveType != consts.move.TYPE_INNER) {
for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
}
}
if (moveType == consts.move.TYPE_INNER) {
if (!targetNode[childKey]) targetNode[childKey] = new Array();
if (targetNode[childKey].length > 0) {
newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
newNeighbor.isLastNode = false;
}
targetNode[childKey].splice(targetNode[childKey].length, 0, node);
node.isLastNode = true;
node.isFirstNode = (targetNode[childKey].length == 1);
} else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
newNeighbor = targetNode;
newNeighbor.isFirstNode = false;
node.parentTId = targetNode.parentTId;
node.isFirstNode = true;
node.isLastNode = false;
} else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
newNeighbor = targetNode;
newNeighbor.isLastNode = false;
node.parentTId = targetNode.parentTId;
node.isFirstNode = false;
node.isLastNode = true;
} else {
if (moveType == consts.move.TYPE_PREV) {
targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
} else {
targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
}
node.parentTId = targetNode.parentTId;
node.isFirstNode = false;
node.isLastNode = false;
}
data.fixPIdKeyValue(setting, node);
data.setSonNodeLevel(setting, node.getParentNode(), node);
//repair node what been moved
view.setNodeLineIcos(setting, node);
view.repairNodeLevelClass(setting, node, oldLevel)
//repair node's old parentNode dom
if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
//old parentNode has no child nodes
oldParentNode.isParent = false;
oldParentNode.open = false;
var tmp_ulObj = $("#" + oldParentNode.tId + consts.id.UL),
tmp_switchObj = $("#" + oldParentNode.tId + consts.id.SWITCH),
tmp_icoObj = $("#" + oldParentNode.tId + consts.id.ICON);
view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
tmp_ulObj.css("display", "none");
} else if (oldNeighbor) {
//old neigbor node
view.setNodeLineIcos(setting, oldNeighbor);
}
//new neigbor node
if (newNeighbor) {
view.setNodeLineIcos(setting, newNeighbor);
}
//repair checkbox / radio
if (!!setting.check && setting.check.enable && view.repairChkClass) {
view.repairChkClass(setting, oldParentNode);
view.repairParentChkClassWithSelf(setting, oldParentNode);
if (oldParentNode != node.parent)
view.repairParentChkClassWithSelf(setting, node);
}
//expand parents after move
if (!isSilent) {
view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
}
},
removeEditBtn: function(node) {
$("#" + node.tId + consts.id.EDIT).unbind().remove();
},
removeRemoveBtn: function(node) {
$("#" + node.tId + consts.id.REMOVE).unbind().remove();
},
removeTreeDom: function(setting, node) {
node.isHover = false;
view.removeEditBtn(node);
view.removeRemoveBtn(node);
tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
},
repairNodeLevelClass: function(setting, node, oldLevel) {
if (oldLevel === node.level) return;
var liObj = $("#" + node.tId),
aObj = $("#" + node.tId + consts.id.A),
ulObj = $("#" + node.tId + consts.id.UL),
oldClass = "level" + oldLevel,
newClass = "level" + node.level;
liObj.removeClass(oldClass);
liObj.addClass(newClass);
aObj.removeClass(oldClass);
aObj.addClass(newClass);
ulObj.removeClass(oldClass);
ulObj.addClass(newClass);
}
},
_z = {
tools: _tools,
view: _view,
event: event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addZTreeTools(_zTreeTools);
var _cancelPreSelectedNode = view.cancelPreSelectedNode;
view.cancelPreSelectedNode = function (setting, node) {
var list = data.getRoot(setting).curSelectedList;
for (var i=0, j=list.length; i<j; i++) {
if (!node || node === list[i]) {
view.removeTreeDom(setting, list[i]);
if (node) break;
}
}
if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments);
}
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) {
_createNodes.apply(view, arguments);
}
if (!nodes) return;
if (view.repairParentChkClassWithSelf) {
view.repairParentChkClassWithSelf(setting, parentNode);
}
}
view.makeNodeUrl = function(setting, node) {
return (node.url && !setting.edit.enable) ? node.url : null;
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var root = data.getRoot(setting);
if (root.curEditNode === node) root.curEditNode = null;
if (_removeNode) {
_removeNode.apply(view, arguments);
}
}
var _selectNode = view.selectNode;
view.selectNode = function(setting, node, addFlag) {
var root = data.getRoot(setting);
if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
return false;
}
if (_selectNode) _selectNode.apply(view, arguments);
view.addHoverDom(setting, node);
return true;
}
var _uCanDo = tools.uCanDo;
tools.uCanDo = function(setting, e) {
var root = data.getRoot(setting);
if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) {
return true;
}
return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true);
}
})(jQuery);
|
zzfls-pj
|
trunk/WebRoot/include/js/zTree/js/jquery.ztree.all-3.2.js
|
JavaScript
|
asf20
| 118,121
|
/*
* JQuery zTree core 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
var settings = {}, roots = {}, caches = {}, zId = 0,
//default consts of core
_consts = {
event: {
NODECREATED: "ztree_nodeCreated",
CLICK: "ztree_click",
EXPAND: "ztree_expand",
COLLAPSE: "ztree_collapse",
ASYNC_SUCCESS: "ztree_async_success",
ASYNC_ERROR: "ztree_async_error"
},
id: {
A: "_a",
ICON: "_ico",
SPAN: "_span",
SWITCH: "_switch",
UL: "_ul"
},
line: {
ROOT: "root",
ROOTS: "roots",
CENTER: "center",
BOTTOM: "bottom",
NOLINE: "noline",
LINE: "line"
},
folder: {
OPEN: "open",
CLOSE: "close",
DOCU: "docu"
},
node: {
CURSELECTED: "curSelectedNode"
}
},
//default setting of core
_setting = {
treeId: "",
treeObj: null,
view: {
addDiyDom: null,
autoCancelSelected: true,
dblClickExpand: true,
expandSpeed: "fast",
fontCss: {},
nameIsHTML: false,
selectedMulti: true,
showIcon: true,
showLine: true,
showTitle: true
},
data: {
key: {
children: "children",
name: "name",
title: "",
url: "url"
},
simpleData: {
enable: false,
idKey: "id",
pIdKey: "pId",
rootPId: null
},
keep: {
parent: false,
leaf: false
}
},
async: {
enable: false,
contentType: "application/x-www-form-urlencoded",
type: "post",
dataType: "text",
url: "",
autoParam: [],
otherParam: [],
dataFilter: null
},
callback: {
beforeAsync:null,
beforeClick:null,
beforeRightClick:null,
beforeMouseDown:null,
beforeMouseUp:null,
beforeExpand:null,
beforeCollapse:null,
beforeRemove:null,
onAsyncError:null,
onAsyncSuccess:null,
onNodeCreated:null,
onClick:null,
onRightClick:null,
onMouseDown:null,
onMouseUp:null,
onExpand:null,
onCollapse:null,
onRemove:null
}
},
//default root of core
//zTree use root to save full data
_initRoot = function (setting) {
var r = data.getRoot(setting);
if (!r) {
r = {};
data.setRoot(setting, r);
}
r.children = [];
r.expandTriggerFlag = false;
r.curSelectedList = [];
r.noSelection = true;
r.createdNodes = [];
},
//default cache of core
_initCache = function(setting) {
var c = data.getCache(setting);
if (!c) {
c = {};
data.setCache(setting, c);
}
c.nodes = [];
c.doms = [];
},
//default bindEvent of core
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.NODECREATED);
o.bind(c.NODECREATED, function (event, treeId, node) {
tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
});
o.unbind(c.CLICK);
o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
});
o.unbind(c.EXPAND);
o.bind(c.EXPAND, function (event, treeId, node) {
tools.apply(setting.callback.onExpand, [event, treeId, node]);
});
o.unbind(c.COLLAPSE);
o.bind(c.COLLAPSE, function (event, treeId, node) {
tools.apply(setting.callback.onCollapse, [event, treeId, node]);
});
o.unbind(c.ASYNC_SUCCESS);
o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
});
o.unbind(c.ASYNC_ERROR);
o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
});
},
//default event proxy of core
_eventProxy = function(event) {
var target = event.target,
setting = settings[event.data.treeId],
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null,
tmp = null;
if (tools.eqs(event.type, "mousedown")) {
treeEventType = "mousedown";
} else if (tools.eqs(event.type, "mouseup")) {
treeEventType = "mouseup";
} else if (tools.eqs(event.type, "contextmenu")) {
treeEventType = "contextmenu";
} else if (tools.eqs(event.type, "click")) {
if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
tId = target.parentNode.id;
nodeEventType = "switchNode";
} else {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "clickNode";
}
}
} else if (tools.eqs(event.type, "dblclick")) {
treeEventType = "dblclick";
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {
tId = tmp.parentNode.id;
nodeEventType = "switchNode";
}
}
if (treeEventType.length > 0 && tId.length == 0) {
tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
if (tmp) {tId = tmp.parentNode.id;}
}
// event to node
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "switchNode" :
if (!node.isParent) {
nodeEventType = "";
} else if (tools.eqs(event.type, "click")
|| (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
nodeEventCallback = handler.onSwitchNode;
} else {
nodeEventType = "";
}
break;
case "clickNode" :
nodeEventCallback = handler.onClickNode;
break;
}
}
// event to zTree
switch (treeEventType) {
case "mousedown" :
treeEventCallback = handler.onZTreeMousedown;
break;
case "mouseup" :
treeEventCallback = handler.onZTreeMouseup;
break;
case "dblclick" :
treeEventCallback = handler.onZTreeDblclick;
break;
case "contextmenu" :
treeEventCallback = handler.onZTreeContextmenu;
break;
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of core
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var childKey = setting.data.key.children;
n.level = level;
n.tId = setting.treeId + "_" + (++zId);
n.parentTId = parentNode ? parentNode.tId : null;
if (n[childKey] && n[childKey].length > 0) {
if (typeof n.open == "string") n.open = tools.eqs(n.open, "true");
n.open = !!n.open;
n.isParent = true;
n.zAsync = true;
} else {
n.open = false;
if (typeof n.isParent == "string") n.isParent = tools.eqs(n.isParent, "true");
n.isParent = !!n.isParent;
n.zAsync = !n.isParent;
}
n.isFirstNode = isFirstNode;
n.isLastNode = isLastNode;
n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
n.getPreNode = function() {return data.getPreNode(setting, n);};
n.getNextNode = function() {return data.getNextNode(setting, n);};
n.isAjaxing = false;
data.fixPIdKeyValue(setting, n);
},
_init = {
bind: [_bindEvent],
caches: [_initCache],
nodes: [_initNode],
proxys: [_eventProxy],
roots: [_initRoot],
beforeA: [],
afterA: [],
innerBeforeA: [],
innerAfterA: [],
zTreeTools: []
},
//method of operate data
data = {
addNodeCache: function(setting, node) {
data.getCache(setting).nodes[node.tId] = node;
},
addAfterA: function(afterA) {
_init.afterA.push(afterA);
},
addBeforeA: function(beforeA) {
_init.beforeA.push(beforeA);
},
addInnerAfterA: function(innerAfterA) {
_init.innerAfterA.push(innerAfterA);
},
addInnerBeforeA: function(innerBeforeA) {
_init.innerBeforeA.push(innerBeforeA);
},
addInitBind: function(bindEvent) {
_init.bind.push(bindEvent);
},
addInitCache: function(initCache) {
_init.caches.push(initCache);
},
addInitNode: function(initNode) {
_init.nodes.push(initNode);
},
addInitProxy: function(initProxy) {
_init.proxys.push(initProxy);
},
addInitRoot: function(initRoot) {
_init.roots.push(initRoot);
},
addNodesData: function(setting, parentNode, nodes) {
var childKey = setting.data.key.children;
if (!parentNode[childKey]) parentNode[childKey] = [];
if (parentNode[childKey].length > 0) {
parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
}
parentNode.isParent = true;
parentNode[childKey] = parentNode[childKey].concat(nodes);
},
addSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
if (!data.isSelectedNode(setting, node)) {
root.curSelectedList.push(node);
}
},
addCreatedNode: function(setting, node) {
if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
var root = data.getRoot(setting);
root.createdNodes.push(node);
}
},
addZTreeTools: function(zTreeTools) {
_init.zTreeTools.push(zTreeTools);
},
exSetting: function(s) {
$.extend(true, _setting, s);
},
fixPIdKeyValue: function(setting, node) {
if (setting.data.simpleData.enable) {
node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
}
},
getAfterA: function(setting, node, array) {
for (var i=0, j=_init.afterA.length; i<j; i++) {
_init.afterA[i].apply(this, arguments);
}
},
getBeforeA: function(setting, node, array) {
for (var i=0, j=_init.beforeA.length; i<j; i++) {
_init.beforeA[i].apply(this, arguments);
}
},
getInnerAfterA: function(setting, node, array) {
for (var i=0, j=_init.innerAfterA.length; i<j; i++) {
_init.innerAfterA[i].apply(this, arguments);
}
},
getInnerBeforeA: function(setting, node, array) {
for (var i=0, j=_init.innerBeforeA.length; i<j; i++) {
_init.innerBeforeA[i].apply(this, arguments);
}
},
getCache: function(setting) {
return caches[setting.treeId];
},
getNextNode: function(setting, node) {
if (!node) return null;
var childKey = setting.data.key.children,
p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
if (node.isLastNode) {
return null;
} else if (node.isFirstNode) {
return p[childKey][1];
} else {
for (var i=1, l=p[childKey].length-1; i<l; i++) {
if (p[childKey][i] === node) {
return p[childKey][i+1];
}
}
}
return null;
},
getNodeByParam: function(setting, nodes, key, value) {
if (!nodes || !key) return null;
var childKey = setting.data.key.children;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i][key] == value) {
return nodes[i];
}
var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);
if (tmp) return tmp;
}
return null;
},
getNodeCache: function(setting, tId) {
if (!tId) return null;
var n = caches[setting.treeId].nodes[tId];
return n ? n : null;
},
getNodes: function(setting) {
return data.getRoot(setting)[setting.data.key.children];
},
getNodesByParam: function(setting, nodes, key, value) {
if (!nodes || !key) return [];
var childKey = setting.data.key.children,
result = [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i][key] == value) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));
}
return result;
},
getNodesByParamFuzzy: function(setting, nodes, key, value) {
if (!nodes || !key) return [];
var childKey = setting.data.key.children,
result = [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (typeof nodes[i][key] == "string" && nodes[i][key].indexOf(value)>-1) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
}
return result;
},
getNodesByFilter: function(setting, nodes, filter, isSingle) {
if (!nodes) return (isSingle ? null : []);
var childKey = setting.data.key.children,
result = isSingle ? null : [];
for (var i = 0, l = nodes.length; i < l; i++) {
if (tools.apply(filter, [nodes[i]], false)) {
if (isSingle) {return nodes[i];}
result.push(nodes[i]);
}
var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle);
if (isSingle && !!tmpResult) {return tmpResult;}
result = isSingle ? tmpResult : result.concat(tmpResult);
}
return result;
},
getPreNode: function(setting, node) {
if (!node) return null;
var childKey = setting.data.key.children,
p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
if (node.isFirstNode) {
return null;
} else if (node.isLastNode) {
return p[childKey][p[childKey].length-2];
} else {
for (var i=1, l=p[childKey].length-1; i<l; i++) {
if (p[childKey][i] === node) {
return p[childKey][i-1];
}
}
}
return null;
},
getRoot: function(setting) {
return setting ? roots[setting.treeId] : null;
},
getSetting: function(treeId) {
return settings[treeId];
},
getSettings: function() {
return settings;
},
getTitleKey: function(setting) {
return setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title;
},
getZTreeTools: function(treeId) {
var r = this.getRoot(this.getSetting(treeId));
return r ? r.treeTools : null;
},
initCache: function(setting) {
for (var i=0, j=_init.caches.length; i<j; i++) {
_init.caches[i].apply(this, arguments);
}
},
initNode: function(setting, level, node, parentNode, preNode, nextNode) {
for (var i=0, j=_init.nodes.length; i<j; i++) {
_init.nodes[i].apply(this, arguments);
}
},
initRoot: function(setting) {
for (var i=0, j=_init.roots.length; i<j; i++) {
_init.roots[i].apply(this, arguments);
}
},
isSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
for (var i=0, j=root.curSelectedList.length; i<j; i++) {
if(node === root.curSelectedList[i]) return true;
}
return false;
},
removeNodeCache: function(setting, node) {
var childKey = setting.data.key.children;
if (node[childKey]) {
for (var i=0, l=node[childKey].length; i<l; i++) {
arguments.callee(setting, node[childKey][i]);
}
}
delete data.getCache(setting).nodes[node.tId];
},
removeSelectedNode: function(setting, node) {
var root = data.getRoot(setting);
for (var i=0, j=root.curSelectedList.length; i<j; i++) {
if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {
root.curSelectedList.splice(i, 1);
i--;j--;
}
}
},
setCache: function(setting, cache) {
caches[setting.treeId] = cache;
},
setRoot: function(setting, root) {
roots[setting.treeId] = root;
},
setZTreeTools: function(setting, zTreeTools) {
for (var i=0, j=_init.zTreeTools.length; i<j; i++) {
_init.zTreeTools[i].apply(this, arguments);
}
},
transformToArrayFormat: function (setting, nodes) {
if (!nodes) return [];
var childKey = setting.data.key.children,
r = [];
if (tools.isArray(nodes)) {
for (var i=0, l=nodes.length; i<l; i++) {
r.push(nodes[i]);
if (nodes[i][childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
}
} else {
r.push(nodes);
if (nodes[childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
}
return r;
},
transformTozTreeFormat: function(setting, sNodes) {
var i,l,
key = setting.data.simpleData.idKey,
parentKey = setting.data.simpleData.pIdKey,
childKey = setting.data.key.children;
if (!key || key=="" || !sNodes) return [];
if (tools.isArray(sNodes)) {
var r = [];
var tmpMap = [];
for (i=0, l=sNodes.length; i<l; i++) {
tmpMap[sNodes[i][key]] = sNodes[i];
}
for (i=0, l=sNodes.length; i<l; i++) {
if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
if (!tmpMap[sNodes[i][parentKey]][childKey])
tmpMap[sNodes[i][parentKey]][childKey] = [];
tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
} else {
r.push(sNodes[i]);
}
}
return r;
}else {
return [sNodes];
}
}
},
//method of event proxy
event = {
bindEvent: function(setting) {
for (var i=0, j=_init.bind.length; i<j; i++) {
_init.bind[i].apply(this, arguments);
}
},
bindTree: function(setting) {
var eventParam = {
treeId: setting.treeId
},
o = setting.treeObj;
o.unbind('click', event.proxy);
o.bind('click', eventParam, event.proxy);
o.unbind('dblclick', event.proxy);
o.bind('dblclick', eventParam, event.proxy);
o.unbind('mouseover', event.proxy);
o.bind('mouseover', eventParam, event.proxy);
o.unbind('mouseout', event.proxy);
o.bind('mouseout', eventParam, event.proxy);
o.unbind('mousedown', event.proxy);
o.bind('mousedown', eventParam, event.proxy);
o.unbind('mouseup', event.proxy);
o.bind('mouseup', eventParam, event.proxy);
o.unbind('contextmenu', event.proxy);
o.bind('contextmenu', eventParam, event.proxy);
},
doProxy: function(e) {
var results = [];
for (var i=0, j=_init.proxys.length; i<j; i++) {
var proxyResult = _init.proxys[i].apply(this, arguments);
results.push(proxyResult);
if (proxyResult.stop) {
break;
}
}
return results;
},
proxy: function(e) {
var setting = data.getSetting(e.data.treeId);
if (!tools.uCanDo(setting, e)) return true;
var results = event.doProxy(e),
r = true, x = false;
for (var i=0, l=results.length; i<l; i++) {
var proxyResult = results[i];
if (proxyResult.nodeEventCallback) {
x = true;
r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
if (proxyResult.treeEventCallback) {
x = true;
r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
}
try{
if (x && $("input:focus").length == 0) {
tools.noSel(setting);
}
} catch(e) {}
return r;
}
},
//method of event handler
handler = {
onSwitchNode: function (event, node) {
var setting = settings[event.data.treeId];
if (node.open) {
if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;
data.getRoot(setting).expandTriggerFlag = true;
view.switchNode(setting, node);
} else {
if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;
data.getRoot(setting).expandTriggerFlag = true;
view.switchNode(setting, node);
}
return true;
},
onClickNode: function (event, node) {
var setting = settings[event.data.treeId],
clickFlag = ( (setting.view.autoCancelSelected && event.ctrlKey) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && event.ctrlKey && setting.view.selectedMulti) ? 2 : 1;
if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
if (clickFlag === 0) {
view.cancelPreSelectedNode(setting, node);
} else {
view.selectNode(setting, node, clickFlag === 2);
}
setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);
return true;
},
onZTreeMousedown: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {
tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);
}
return true;
},
onZTreeMouseup: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {
tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);
}
return true;
},
onZTreeDblclick: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);
}
return true;
},
onZTreeContextmenu: function(event, node) {
var setting = settings[event.data.treeId];
if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
}
return (typeof setting.callback.onRightClick) != "function";
}
},
//method of tools for zTree
tools = {
apply: function(fun, param, defaultValue) {
if ((typeof fun) == "function") {
return fun.apply(zt, param?param:[]);
}
return defaultValue;
},
canAsync: function(setting, node) {
var childKey = setting.data.key.children;
return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));
},
clone: function (jsonObj) {
var buf;
if (jsonObj instanceof Array) {
buf = [];
var i = jsonObj.length;
while (i--) {
buf[i] = arguments.callee(jsonObj[i]);
}
return buf;
}else if (typeof jsonObj == "function"){
return jsonObj;
}else if (jsonObj instanceof Object){
buf = {};
for (var k in jsonObj) {
buf[k] = arguments.callee(jsonObj[k]);
}
return buf;
}else{
return jsonObj;
}
},
eqs: function(str1, str2) {
return str1.toLowerCase() === str2.toLowerCase();
},
isArray: function(arr) {
return Object.prototype.toString.apply(arr) === "[object Array]";
},
getMDom: function (setting, curDom, targetExpr) {
if (!curDom) return null;
while (curDom && curDom.id !== setting.treeId) {
for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {
if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {
return curDom;
}
}
curDom = curDom.parentNode;
}
return null;
},
noSel: function(setting) {
var r = data.getRoot(setting);
if (r.noSelection) {
try {
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
} catch(e){}
}
},
uCanDo: function(setting, e) {
return true;
}
},
//method of operate ztree dom
view = {
addNodes: function(setting, parentNode, newNodes, isSilent) {
if (setting.data.keep.leaf && parentNode && !parentNode.isParent) {
return;
}
if (!tools.isArray(newNodes)) {
newNodes = [newNodes];
}
if (setting.data.simpleData.enable) {
newNodes = data.transformTozTreeFormat(setting, newNodes);
}
if (parentNode) {
var target_switchObj = $("#" + parentNode.tId + consts.id.SWITCH),
target_icoObj = $("#" + parentNode.tId + consts.id.ICON),
target_ulObj = $("#" + parentNode.tId + consts.id.UL);
if (!parentNode.open) {
view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);
view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
parentNode.open = false;
target_ulObj.css({
"display": "none"
});
}
data.addNodesData(setting, parentNode, newNodes);
view.createNodes(setting, parentNode.level + 1, newNodes, parentNode);
if (!isSilent) {
view.expandCollapseParentNode(setting, parentNode, true);
}
} else {
data.addNodesData(setting, data.getRoot(setting), newNodes);
view.createNodes(setting, 0, newNodes, null);
}
},
appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {
if (!nodes) return [];
var html = [],
childKey = setting.data.key.children,
nameKey = setting.data.key.name,
titleKey = data.getTitleKey(setting);
for (var i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i],
tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
tmpPChild = tmpPNode[childKey],
isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),
isLastNode = (i == (nodes.length - 1));
if (initFlag) {
data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);
data.addNodeCache(setting, node);
}
var childHtml = [];
if (node[childKey] && node[childKey].length > 0) {
//make child html first, because checkType
childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
}
if (openFlag) {
var url = view.makeNodeUrl(setting, node),
fontcss = view.makeNodeFontCss(setting, node),
fontStyle = [];
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}
html.push("<li id='", node.tId, "' class='level", node.level,"' tabindex='0' hidefocus='true' treenode>",
"<span id='", node.tId, consts.id.SWITCH,
"' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>");
data.getBeforeA(setting, node, html);
html.push("<a id='", node.tId, consts.id.A, "' class='level", node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
"'");
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && node[titleKey]) {html.push("title='", node[titleKey].replace(/'/g,"'").replace(/</g,'<').replace(/>/g,'>'),"'");}
html.push(">");
data.getInnerBeforeA(setting, node, html);
var name = setting.view.nameIsHTML ? node[nameKey] : node[nameKey].replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
html.push("<span id='", node.tId, consts.id.ICON,
"' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node), "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
"'>",name,"</span>");
data.getInnerAfterA(setting, node, html);
html.push("</a>");
data.getAfterA(setting, node, html);
if (node.isParent && node.open) {
view.makeUlHtml(setting, node, html, childHtml.join(''));
}
html.push("</li>");
data.addCreatedNode(setting, node);
}
}
return html;
},
appendParentULDom: function(setting, node) {
var html = [],
nObj = $("#" + node.tId),
ulObj = $("#" + node.tId + consts.id.UL),
childKey = setting.data.key.children,
childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
view.makeUlHtml(setting, node, html, childHtml.join(''));
if (!nObj.get(0) && !!node.parentTId) {
view.appendParentULDom(setting, node.getParentNode());
nObj = $("#" + node.tId);
}
if (ulObj.get(0)) {
ulObj.remove();
}
nObj.append(html.join(''));
view.createNodeCallback(setting);
},
asyncNode: function(setting, node, isSilent, callback) {
var i, l;
if (node && !node.isParent) {
tools.apply(callback);
return false;
} else if (node && node.isAjaxing) {
return false;
} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
tools.apply(callback);
return false;
}
if (node) {
node.isAjaxing = true;
var icoObj = $("#" + node.tId + consts.id.ICON);
icoObj.attr({"style":"", "class":"button ico_loading"});
}
var isJson = (setting.async.contentType == "application/json"), tmpParam = isJson ? "{" : "", jTemp="";
for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
if (pKey.length>1) {
spKey = pKey[1];
pKey = pKey[0];
}
if (isJson) {
jTemp = (typeof node[pKey] == "string") ? '"' : '';
tmpParam += '"' + spKey + ('":' + jTemp + node[pKey]).replace(/'/g,'\\\'') + jTemp + ',';
} else {
tmpParam += spKey + ("=" + node[pKey]).replace(/&/g,'%26') + "&";
}
}
if (tools.isArray(setting.async.otherParam)) {
for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
if (isJson) {
jTemp = (typeof setting.async.otherParam[i + 1] == "string") ? '"' : '';
tmpParam += '"' + setting.async.otherParam[i] + ('":' + jTemp + setting.async.otherParam[i + 1]).replace(/'/g,'\\\'') + jTemp + ",";
} else {
tmpParam += setting.async.otherParam[i] + ("=" + setting.async.otherParam[i + 1]).replace(/&/g,'%26') + "&";
}
}
} else {
for (var p in setting.async.otherParam) {
if (isJson) {
jTemp = (typeof setting.async.otherParam[p] == "string") ? '"' : '';
tmpParam += '"' + p + ('":' + jTemp + setting.async.otherParam[p]).replace(/'/g,'\\\'') + jTemp + ",";
} else {
tmpParam += p + ("=" + setting.async.otherParam[p]).replace(/&/g,'%26') + "&";
}
}
}
if (tmpParam.length > 1) tmpParam = tmpParam.substring(0, tmpParam.length-1);
if (isJson) tmpParam += "}";
$.ajax({
contentType: setting.async.contentType,
type: setting.async.type,
url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
data: tmpParam,
dataType: setting.async.dataType,
success: function(msg) {
var newNodes = [];
try {
if (!msg || msg.length == 0) {
newNodes = [];
} else if (typeof msg == "string") {
newNodes = eval("(" + msg + ")");
} else {
newNodes = msg;
}
} catch(err) {}
if (node) {
node.isAjaxing = null;
node.zAsync = true;
}
view.setNodeLineIcos(setting, node);
if (newNodes && newNodes != "") {
newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
} else {
view.addNodes(setting, node, [], !!isSilent);
}
setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
tools.apply(callback);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (node) node.isAjaxing = null;
view.setNodeLineIcos(setting, node);
setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
}
});
return true;
},
cancelPreSelectedNode: function (setting, node) {
var list = data.getRoot(setting).curSelectedList;
for (var i=0, j=list.length-1; j>=i; j--) {
if (!node || node === list[j]) {
$("#" + list[j].tId + consts.id.A).removeClass(consts.node.CURSELECTED);
view.setNodeName(setting, list[j]);
if (node) {
data.removeSelectedNode(setting, node);
break;
}
}
}
if (!node) data.getRoot(setting).curSelectedList = [];
},
createNodeCallback: function(setting) {
if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
var root = data.getRoot(setting);
while (root.createdNodes.length>0) {
var node = root.createdNodes.shift();
tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
if (!!setting.callback.onNodeCreated) {
setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
}
}
}
},
createNodes: function(setting, level, nodes, parentNode) {
if (!nodes || nodes.length == 0) return;
var root = data.getRoot(setting),
childKey = setting.data.key.children,
openFlag = !parentNode || parentNode.open || !!$("#" + parentNode[childKey][0].tId).get(0);
root.createdNodes = [];
var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
if (!parentNode) {
setting.treeObj.append(zTreeHtml.join(''));
} else {
var ulObj = $("#" + parentNode.tId + consts.id.UL);
if (ulObj.get(0)) {
ulObj.append(zTreeHtml.join(''));
}
}
view.createNodeCallback(setting);
},
expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
var root = data.getRoot(setting),
childKey = setting.data.key.children;
if (!node) {
tools.apply(callback, []);
return;
}
if (root.expandTriggerFlag) {
var _callback = callback;
callback = function(){
if (_callback) _callback();
if (node.open) {
setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
} else {
setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
}
};
root.expandTriggerFlag = false;
}
if (node.open == expandFlag) {
tools.apply(callback, []);
return;
}
if (!node.open && node.isParent && ((!$("#" + node.tId + consts.id.UL).get(0)) || (node[childKey] && node[childKey].length>0 && !$("#" + node[childKey][0].tId).get(0)))) {
view.appendParentULDom(setting, node);
}
var ulObj = $("#" + node.tId + consts.id.UL),
switchObj = $("#" + node.tId + consts.id.SWITCH),
icoObj = $("#" + node.tId + consts.id.ICON);
if (node.isParent) {
node.open = !node.open;
if (node.iconOpen && node.iconClose) {
icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
}
if (node.open) {
view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
if (animateFlag == false || setting.view.expandSpeed == "") {
ulObj.show();
tools.apply(callback, []);
} else {
if (node[childKey] && node[childKey].length > 0) {
ulObj.slideDown(setting.view.expandSpeed, callback);
} else {
ulObj.show();
tools.apply(callback, []);
}
}
} else {
view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
ulObj.hide();
tools.apply(callback, []);
} else {
ulObj.slideUp(setting.view.expandSpeed, callback);
}
}
} else {
tools.apply(callback, []);
}
},
expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
if (!node) return;
if (!node.parentTId) {
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
return;
} else {
view.expandCollapseNode(setting, node, expandFlag, animateFlag);
}
if (node.parentTId) {
view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
}
},
expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
var root = data.getRoot(setting),
childKey = setting.data.key.children,
treeNodes = (node) ? node[childKey]: root[childKey],
selfAnimateSign = (node) ? false : animateFlag,
expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
data.getRoot(setting).expandTriggerFlag = false;
if (treeNodes) {
for (var i = 0, l = treeNodes.length; i < l; i++) {
if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
}
}
data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
},
makeNodeFontCss: function(setting, node) {
var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
},
makeNodeIcoClass: function(setting, node) {
var icoCss = ["ico"];
if (!node.isAjaxing) {
icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
if (node.isParent) {
icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
} else {
icoCss.push(consts.folder.DOCU);
}
}
return "button " + icoCss.join('_');
},
makeNodeIcoStyle: function(setting, node) {
var icoStyle = [];
if (!node.isAjaxing) {
var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
icoStyle.push("width:0px;height:0px;");
}
}
return icoStyle.join('');
},
makeNodeLineClass: function(setting, node) {
var lineClass = [];
if (setting.view.showLine) {
if (node.level == 0 && node.isFirstNode && node.isLastNode) {
lineClass.push(consts.line.ROOT);
} else if (node.level == 0 && node.isFirstNode) {
lineClass.push(consts.line.ROOTS);
} else if (node.isLastNode) {
lineClass.push(consts.line.BOTTOM);
} else {
lineClass.push(consts.line.CENTER);
}
} else {
lineClass.push(consts.line.NOLINE);
}
if (node.isParent) {
lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
} else {
lineClass.push(consts.folder.DOCU);
}
return view.makeNodeLineClassEx(node) + lineClass.join('_');
},
makeNodeLineClassEx: function(node) {
return "button level" + node.level + " switch ";
},
makeNodeTarget: function(node) {
return (node.target || "_blank");
},
makeNodeUrl: function(setting, node) {
var urlKey = setting.data.key.url;
return node[urlKey] ? node[urlKey] : null;
},
makeUlHtml: function(setting, node, html, content) {
html.push("<ul id='", node.tId, consts.id.UL, "' class='level", node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>");
html.push(content);
html.push("</ul>");
},
makeUlLineClass: function(setting, node) {
return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
},
removeChildNodes: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
nodes = node[childKey];
if (!nodes) return;
for (var i = 0, l = nodes.length; i < l; i++) {
data.removeNodeCache(setting, nodes[i]);
}
data.removeSelectedNode(setting);
delete node[childKey];
if (!setting.data.keep.parent) {
node.isParent = false;
node.open = false;
var tmp_switchObj = $("#" + node.tId + consts.id.SWITCH),
tmp_icoObj = $("#" + node.tId + consts.id.ICON);
view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
$("#" + node.tId + consts.id.UL).remove();
} else {
$("#" + node.tId + consts.id.UL).empty();
}
},
removeNode: function(setting, node) {
var root = data.getRoot(setting),
childKey = setting.data.key.children,
parentNode = (node.parentTId) ? node.getParentNode() : root;
node.isFirstNode = false;
node.isLastNode = false;
node.getPreNode = function() {return null;};
node.getNextNode = function() {return null;};
$("#" + node.tId).remove();
data.removeNodeCache(setting, node);
data.removeSelectedNode(setting, node);
for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
if (parentNode[childKey][i].tId == node.tId) {
parentNode[childKey].splice(i, 1);
break;
}
}
var tmp_ulObj,tmp_switchObj,tmp_icoObj;
//repair nodes old parent
if (!setting.data.keep.parent && parentNode[childKey].length < 1) {
//old parentNode has no child nodes
parentNode.isParent = false;
parentNode.open = false;
tmp_ulObj = $("#" + parentNode.tId + consts.id.UL);
tmp_switchObj = $("#" + parentNode.tId + consts.id.SWITCH);
tmp_icoObj = $("#" + parentNode.tId + consts.id.ICON);
view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
tmp_ulObj.css("display", "none");
} else if (setting.view.showLine && parentNode[childKey].length > 0) {
//old parentNode has child nodes
var newLast = parentNode[childKey][parentNode[childKey].length - 1];
newLast.isLastNode = true;
newLast.isFirstNode = (parentNode[childKey].length == 1);
tmp_ulObj = $("#" + newLast.tId + consts.id.UL);
tmp_switchObj = $("#" + newLast.tId + consts.id.SWITCH);
tmp_icoObj = $("#" + newLast.tId + consts.id.ICON);
if (parentNode == root) {
if (parentNode[childKey].length == 1) {
//node was root, and ztree has only one root after move node
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
} else {
var tmp_first_switchObj = $("#" + parentNode[childKey][0].tId + consts.id.SWITCH);
view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
}
} else {
view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
}
tmp_ulObj.removeClass(consts.line.LINE);
}
},
replaceIcoClass: function(node, obj, newName) {
if (!obj || node.isAjaxing) return;
var tmpName = obj.attr("class");
if (tmpName == undefined) return;
var tmpList = tmpName.split("_");
switch (newName) {
case consts.folder.OPEN:
case consts.folder.CLOSE:
case consts.folder.DOCU:
tmpList[tmpList.length-1] = newName;
break;
}
obj.attr("class", tmpList.join("_"));
},
replaceSwitchClass: function(node, obj, newName) {
if (!obj) return;
var tmpName = obj.attr("class");
if (tmpName == undefined) return;
var tmpList = tmpName.split("_");
switch (newName) {
case consts.line.ROOT:
case consts.line.ROOTS:
case consts.line.CENTER:
case consts.line.BOTTOM:
case consts.line.NOLINE:
tmpList[0] = view.makeNodeLineClassEx(node) + newName;
break;
case consts.folder.OPEN:
case consts.folder.CLOSE:
case consts.folder.DOCU:
tmpList[1] = newName;
break;
}
obj.attr("class", tmpList.join("_"));
if (newName !== consts.folder.DOCU) {
obj.removeAttr("disabled");
} else {
obj.attr("disabled", "disabled");
}
},
selectNode: function(setting, node, addFlag) {
if (!addFlag) {
view.cancelPreSelectedNode(setting);
}
$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED);
data.addSelectedNode(setting, node);
},
setNodeFontCss: function(setting, treeNode) {
var aObj = $("#" + treeNode.tId + consts.id.A),
fontCss = view.makeNodeFontCss(setting, treeNode);
if (fontCss) {
aObj.css(fontCss);
}
},
setNodeLineIcos: function(setting, node) {
if (!node) return;
var switchObj = $("#" + node.tId + consts.id.SWITCH),
ulObj = $("#" + node.tId + consts.id.UL),
icoObj = $("#" + node.tId + consts.id.ICON),
ulLine = view.makeUlLineClass(setting, node);
if (ulLine.length==0) {
ulObj.removeClass(consts.line.LINE);
} else {
ulObj.addClass(ulLine);
}
switchObj.attr("class", view.makeNodeLineClass(setting, node));
if (node.isParent) {
switchObj.removeAttr("disabled");
} else {
switchObj.attr("disabled", "disabled");
}
icoObj.removeAttr("style");
icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
icoObj.attr("class", view.makeNodeIcoClass(setting, node));
},
setNodeName: function(setting, node) {
var nameKey = setting.data.key.name,
titleKey = data.getTitleKey(setting),
nObj = $("#" + node.tId + consts.id.SPAN);
nObj.empty();
if (setting.view.nameIsHTML) {
nObj.html(node[nameKey]);
} else {
nObj.text(node[nameKey]);
}
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && node[titleKey]) {
var aObj = $("#" + node.tId + consts.id.A);
aObj.attr("title", node[titleKey]);
}
},
setNodeTarget: function(node) {
var aObj = $("#" + node.tId + consts.id.A);
aObj.attr("target", view.makeNodeTarget(node));
},
setNodeUrl: function(setting, node) {
var aObj = $("#" + node.tId + consts.id.A),
url = view.makeNodeUrl(setting, node);
if (url == null || url.length == 0) {
aObj.removeAttr("href");
} else {
aObj.attr("href", url);
}
},
switchNode: function(setting, node) {
if (node.open || !tools.canAsync(setting, node)) {
view.expandCollapseNode(setting, node, !node.open);
} else if (setting.async.enable) {
if (!view.asyncNode(setting, node)) {
view.expandCollapseNode(setting, node, !node.open);
return;
}
} else if (node) {
view.expandCollapseNode(setting, node, !node.open);
}
}
};
// zTree defind
$.fn.zTree = {
consts : _consts,
_z : {
tools: tools,
view: view,
event: event,
data: data
},
getZTreeObj: function(treeId) {
var o = data.getZTreeTools(treeId);
return o ? o : null;
},
init: function(obj, zSetting, zNodes) {
var setting = tools.clone(_setting);
$.extend(true, setting, zSetting);
setting.treeId = obj.attr("id");
setting.treeObj = obj;
setting.treeObj.empty();
settings[setting.treeId] = setting;
if ($.browser.msie && parseInt($.browser.version)<7) {
setting.view.expandSpeed = "";
}
data.initRoot(setting);
var root = data.getRoot(setting),
childKey = setting.data.key.children;
zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
if (setting.data.simpleData.enable) {
root[childKey] = data.transformTozTreeFormat(setting, zNodes);
} else {
root[childKey] = zNodes;
}
data.initCache(setting);
event.bindTree(setting);
event.bindEvent(setting);
var zTreeTools = {
setting : setting,
addNodes : function(parentNode, newNodes, isSilent) {
if (!newNodes) return null;
if (!parentNode) parentNode = null;
if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
function addCallback() {
view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
}
if (tools.canAsync(setting, parentNode)) {
view.asyncNode(setting, parentNode, isSilent, addCallback);
} else {
addCallback();
}
return xNewNodes;
},
cancelSelectedNode : function(node) {
view.cancelPreSelectedNode(this.setting, node);
},
expandAll : function(expandFlag) {
expandFlag = !!expandFlag;
view.expandCollapseSonNode(this.setting, null, expandFlag, true);
return expandFlag;
},
expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
if (!node || !node.isParent) return null;
if (expandFlag !== true && expandFlag !== false) {
expandFlag = !node.open;
}
callbackFlag = !!callbackFlag;
if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
return null;
} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
return null;
}
if (expandFlag && node.parentTId) {
view.expandCollapseParentNode(this.setting, node.getParentNode(), expandFlag, false);
}
if (expandFlag === node.open && !sonSign) {
return null;
}
data.getRoot(setting).expandTriggerFlag = callbackFlag;
if (sonSign) {
view.expandCollapseSonNode(this.setting, node, expandFlag, true, function() {
if (focus !== false) {$("#" + node.tId).focus().blur();}
});
} else {
node.open = !expandFlag;
view.switchNode(this.setting, node);
if (focus !== false) {$("#" + node.tId).focus().blur();}
}
return expandFlag;
},
getNodes : function() {
return data.getNodes(this.setting);
},
getNodeByParam : function(key, value, parentNode) {
if (!key) return null;
return data.getNodeByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodeByTId : function(tId) {
return data.getNodeCache(this.setting, tId);
},
getNodesByParam : function(key, value, parentNode) {
if (!key) return null;
return data.getNodesByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodesByParamFuzzy : function(key, value, parentNode) {
if (!key) return null;
return data.getNodesByParamFuzzy(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
},
getNodesByFilter: function(filter, isSingle, parentNode) {
isSingle = !!isSingle;
if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
return data.getNodesByFilter(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), filter, isSingle);
},
getNodeIndex : function(node) {
if (!node) return null;
var childKey = setting.data.key.children,
parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(this.setting);
for (var i=0, l = parentNode[childKey].length; i < l; i++) {
if (parentNode[childKey][i] == node) return i;
}
return -1;
},
getSelectedNodes : function() {
var r = [], list = data.getRoot(this.setting).curSelectedList;
for (var i=0, l=list.length; i<l; i++) {
r.push(list[i]);
}
return r;
},
isSelectedNode : function(node) {
return data.isSelectedNode(this.setting, node);
},
reAsyncChildNodes : function(parentNode, reloadType, isSilent) {
if (!this.setting.async.enable) return;
var isRoot = !parentNode;
if (isRoot) {
parentNode = data.getRoot(this.setting);
}
if (reloadType=="refresh") {
parentNode[this.setting.data.key.children] = [];
if (isRoot) {
this.setting.treeObj.empty();
} else {
var ulObj = $("#" + parentNode.tId + consts.id.UL);
ulObj.empty();
}
}
view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);
},
refresh : function() {
this.setting.treeObj.empty();
var root = data.getRoot(this.setting),
nodes = root[this.setting.data.key.children]
data.initRoot(this.setting);
root[this.setting.data.key.children] = nodes
data.initCache(this.setting);
view.createNodes(this.setting, 0, root[this.setting.data.key.children]);
},
removeChildNodes : function(node) {
if (!node) return null;
var childKey = setting.data.key.children,
nodes = node[childKey];
view.removeChildNodes(setting, node);
return nodes ? nodes : null;
},
removeNode : function(node, callbackFlag) {
if (!node) return;
callbackFlag = !!callbackFlag;
if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;
view.removeNode(setting, node);
if (callbackFlag) {
this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
}
},
selectNode : function(node, addFlag) {
if (!node) return;
if (tools.uCanDo(this.setting)) {
addFlag = setting.view.selectedMulti && addFlag;
if (node.parentTId) {
view.expandCollapseParentNode(this.setting, node.getParentNode(), true, false, function() {
$("#" + node.tId).focus().blur();
});
} else {
$("#" + node.tId).focus().blur();
}
view.selectNode(this.setting, node, addFlag);
}
},
transformTozTreeNodes : function(simpleNodes) {
return data.transformTozTreeFormat(this.setting, simpleNodes);
},
transformToArray : function(nodes) {
return data.transformToArrayFormat(this.setting, nodes);
},
updateNode : function(node, checkTypeFlag) {
if (!node) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
view.setNodeName(this.setting, node);
view.setNodeTarget(node);
view.setNodeUrl(this.setting, node);
view.setNodeLineIcos(this.setting, node);
view.setNodeFontCss(this.setting, node);
}
}
}
root.treeTools = zTreeTools;
data.setZTreeTools(setting, zTreeTools);
if (root[childKey] && root[childKey].length > 0) {
view.createNodes(setting, 0, root[childKey]);
} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
view.asyncNode(setting);
}
return zTreeTools;
}
};
var zt = $.fn.zTree,
consts = zt.consts;
})(jQuery);
|
zzfls-pj
|
trunk/WebRoot/include/js/zTree/js/jquery.ztree.core-3.2.js
|
JavaScript
|
asf20
| 54,376
|
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
h1 {font-size: 24px;line-height: 34px;text-align: center;}
h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;}
a {color:#3C6E31;text-decoration: underline;}
a:hover {background-color:#3C6E31;color:white;}
input.radio {margin: 0 2px 0 8px;}
input.radio.first {margin-left:0;}
input.empty {color: lightgray;}
code {color: #2f332a;}
.highlight_red {color:#A60000;}
.highlight_green {color:#A7F43D;}
li {list-style: circle;font-size: 12px;}
li.title {list-style: none;}
ul.list {margin-left: 17px;}
div.content_wrap {width: 600px;height:380px;}
div.content_wrap div.left{float: left;width: 250px;}
div.content_wrap div.right{float: right;width: 340px;}
div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
ul.log.small {height:45px;}
ul.log li {color: #666666;list-style: none;padding-left: 10px;}
ul.log li.dark {background-color: #E3E3E3;}
/* ruler */
div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}
|
zzfls-pj
|
trunk/WebRoot/include/js/zTree/css/demo.css
|
CSS
|
asf20
| 2,197
|
/*-------------------------------------
zTree Style
version: 3.2
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
.ztree {margin:0; padding:5px; color:#333}
.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
.ztree li ul{ margin:0; padding:0 0 0 18px}
.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent;
text-decoration:none; vertical-align:top; display: inline-block}
.ztree li a:hover {text-decoration:underline}
.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
opacity:0.8; filter:alpha(opacity=80)}
.ztree li a.tmpTargetNode_prev {}
.ztree li a.tmpTargetNode_next {}
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
font-size:12px; border:1px #7EC4CC solid; *border:0px}
.ztree li span {line-height:16px; margin-right:2px}
.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
border:0 none; cursor: pointer;outline:none;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
.ztree li span.button.switch {width:18px; height:18px}
.ztree li span.button.root_open{background-position:-92px -54px}
.ztree li span.button.root_close{background-position:-74px -54px}
.ztree li span.button.roots_open{background-position:-92px 0}
.ztree li span.button.roots_close{background-position:-74px 0}
.ztree li span.button.center_open{background-position:-92px -18px}
.ztree li span.button.center_close{background-position:-74px -18px}
.ztree li span.button.bottom_open{background-position:-92px -36px}
.ztree li span.button.bottom_close{background-position:-74px -36px}
.ztree li span.button.noline_open{background-position:-92px -72px}
.ztree li span.button.noline_close{background-position:-74px -72px}
.ztree li span.button.root_docu{ background:none;}
.ztree li span.button.roots_docu{background-position:-56px 0}
.ztree li span.button.center_docu{background-position:-56px -18px}
.ztree li span.button.bottom_docu{background-position:-56px -36px}
.ztree li span.button.noline_docu{ background:none;}
.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
|
zzfls-pj
|
trunk/WebRoot/include/js/zTree/css/zTreeStyle/zTreeStyle.css
|
CSS
|
asf20
| 6,316
|
var messageBox_stop;
var messageBox_flag = 1;
function show(title, message)
{
var messageBox = document.createElement("DIV");
var str = "<div id='messageBox' style='position:absolute;word-wrap:break-word;z-index:3;width:400;height:300;background-color:Azure;display:block;top:100px;left:300px;overflow-y:hidden;'>";
str = str + "<div id='messageBox_title' style='width:400px;height:20px;float:left;background-image:url(/web/include/images/messagebox/title_bg.gif);background-repeat:repeat-x;' onmousedown='messageBox_MouseDown();' onmouseup='messageBox_MouseUp();' onMouseMove='messageBox_MouseMove();'>";
str = str + " <img title='关闭' src='/web/include/images/messagebox/close.gif' align='right' onclick='closes()' onmouseover='messageBox_SetHand(this);'/>";
str = str + " <img id='messageBox_img' title='折叠' align='right' onmouseover='messageBox_SetHand(this);' onclick='messageBox_toggle();' src='/web/include/images/messagebox/shang.gif'/>";
str = str + title + "</div>";
str = str + " <div id='messageBox_content'>" + message + "</div>";
str = str + "</div>";
str = str + "<div id='messageBox_zzc' style='position:absolute;top:0px;filter:alpha(opacity=60);background-color:#777;z-index:2;left:0px;display:block;'></div>";
messageBox.innerHTML = str;
document.body.appendChild(messageBox);
document.all.messageBox_zzc.style.width = window.screen.availWidth;
document.all.messageBox_zzc.style.height = window.screen.availHeight;
}
function closes()
{
if (window.confirm("关闭?"))
{
document.getElementById("messageBox").removeNode(true);
document.getElementById("messageBox_zzc").removeNode(true);
clearInterval(messageBox_stop);
messageBox_flag = 1;
}
}
function closeMessageBox() {
document.getElementById("messageBox").removeNode(true);
document.getElementById("messageBox_zzc").removeNode(true);
clearInterval(messageBox_stop);
messageBox_flag = 1;
}
function messageBox_SetHand(obj) {
obj.style.cursor = "hand";
}
/*********************************************************************************************
*折叠
*********************************************************************************************/
function messageBox_toggle() {
clearInterval(messageBox_stop);
if (messageBox_flag == 0) {
messageBox_flag = 1;
document.getElementById("messageBox_img").src = "/web/include/images/messagebox/shang.gif";
document.getElementById("messageBox_img").title = "折叠";
} else {
messageBox_flag = 0;
document.getElementById("messageBox_img").src = "/web/include/images/messagebox/xia.gif";
document.getElementById("messageBox_img").title = "展开";
}
messageBox_stop = setInterval("messageBox_SetHeight()", 1);
}
function messageBox_SetHeight() {
var height = document.getElementById("messageBox").style.height;
height = height.substring(0, height.indexOf('px'));
if ((messageBox_flag == 0 && height <= 20) || (messageBox_flag == 1 && height > 300)) {
clearInterval(messageBox_stop);
return;
}
if (messageBox_flag == 0) {
document.getElementById("messageBox").style.height = height - 1;
} else {
document.getElementById("messageBox").style.height = parseInt(height) + 1;
}
}
/*********************************************************************************************
*拖动
*********************************************************************************************/
var messageBox_px = 0;
var messageBox_py = 0;
var begin = false;
function messageBox_MouseDown()
{
begin = true;
document.getElementById("messageBox").style.cursor = "hand";
event.srcElement.setCapture();
messageBox_px = document.getElementById("messageBox").style.pixelLeft - event.x;
messageBox_py = document.getElementById("messageBox").style.pixelTop - event.y;
}
function messageBox_MouseUp()
{
begin = false;
document.getElementById("messageBox").style.cursor = "default";
event.srcElement.releaseCapture();
}
function messageBox_MouseMove() {
if (begin)
{
document.getElementById("messageBox").style.pixelLeft = messageBox_px + event.x;
document.getElementById("messageBox").style.pixelTop = messageBox_py + event.y;
}
}
//*********************************************************************************************
function showWindow() {
}
|
zzfls-pj
|
trunk/WebRoot/include/js/messageBox.js
|
JavaScript
|
asf20
| 4,556
|
var dhxWins = null;
function myWindow() {
}
myWindow.createWindow = function(winId, title, winUrl, width, height) {
this.showMask(winId);
dhxWins = new dhtmlXWindows();
var x = (document.body.clientWidth - parseInt(width)) / 2;
var y = (document.body.clientHeight - parseInt(height)) / 2;
var wd = dhxWins.createWindow(winId, x, y, parseInt(width), parseInt(height));
wd.setText(title);
wd.attachURL(winUrl);
wd.button("close").attachEvent("onClick", function() {
myWindow.closeWindow(winId);
});
}
myWindow.closeWindow = function(winId) {
this.hideMask(winId);
dhxWins.window(winId).close();
}
//显示蒙层
myWindow.showMask = function(id) {
//蒙层
var div = document.getElementById("JXW__loading_div" + id);
if (div == null) {
div = document.createElement("DIV");
document.body.appendChild(div);
div.id = "JXW__loading_div" + id;
div.style.position = "absolute";
div.style.top = "0px";
div.style.filter = "alpha(opacity=30)";
div.style.background = "#777";
div.style.zindex = "2";
div.style.left = "0px";
}
div.style.width = document.body.clientWidth;
div.style.height = document.body.clientHeight;
div.style.display = "";
}
//隐藏蒙层
myWindow.hideMask = function(id) {
var div = document.getElementById("JXW__loading_div" + id);
if (div != null)
div.style.display = "none";
//document.remove("JXW__loading_div" + id);
}
|
zzfls-pj
|
trunk/WebRoot/include/js/window.js
|
JavaScript
|
asf20
| 1,558
|
/**
*grid
*/
/*
var a = {
priKey:"MODULE_DM",
header:["模块代码","模块名称","模块地址"],
column:["MODULE_DM","MODULE_NAME","MODULE_URL"],
aligns:["center","left","left"],
data:json.data
};
myGrid.grid(a);
*/
function myGrid() {
}
/**
*创建grid
*/
myGrid.grid = function(json) {
var strTb = "";
strTb = "<table class='datagrid2'>";
//显示表头
strTb += "<tr>";
strTb += "<th width='30'><a href='javascript:myGrid.checkAll()'>全选</a></th>";
for (var n = 0; n < json.header.length; n++) {
if (json.width)
strTb += "<th width='" + json.width[n] + "'>";
else
strTb += "<th>";
strTb += json.header[n];
strTb += "</th>";
}
strTb += "</tr>";
//显示数据
for (var i = 0; i < json.data.data.length; i++) {
var list = json.data.data[i];
strTb += "<tr>";
var isSelected = "";
if(list.isSelected&&list.isSelected != "0"){
isSelected = "checked";
}
strTb += "<td align='center'><input type='checkbox' name='options' value='" + list[json.priKey] + "' " + isSelected + "></td>";
var col = json.column;
for (var n = 0; n < col.length; n++) {
var colName = col[n];
var value = list[colName];
value = value==null?"":value;
var align = json.aligns[n] ? json.aligns[n] : "";
strTb += "<td align='" + align + "'>";
strTb += value;
strTb += "</td>";
}
strTb += "</tr>";
}
strTb += "</table>";
if (json.data.pages) {
var page = json.data.pages;
strTb += "<div style='width:98%;text-align:right;'>";
strTb += "<a href='javascript:" + json.pageFun + "(\"" + 0 + "\")'>首页</a> ";
strTb += "<a href='javascript:" + json.pageFun + "(\"" + this.getPage(parseInt(page.CURPAGE) - 1, page.TOTALPAGE) + "\")'>上一页</a> ";
strTb += "<a href='javascript:" + json.pageFun + "(\"" + this.getPage(parseInt(page.CURPAGE) + 1, page.TOTALPAGE) + "\")'>下一页</a> ";
strTb += "<a href='javascript:" + json.pageFun + "(\"" + (parseInt(page.TOTALPAGE) - 1) + "\")'>尾页</a>";
strTb += " 共" + page.TOTALCOUNT + "条记录";
strTb += " 每页显示" + page.PAGESIZE + "条";
strTb += " 页次" + (page.CURPAGE * 1 + 1) + "/" + page.TOTALPAGE;
strTb += "</div>";
}
document.getElementById("editAreaDiv").innerHTML = strTb;
setTableCss();
//样式
};
/**
*单选 取得选中的记录的id
*/
myGrid.getSelectedID = function() {
var options = document.getElementsByName("options");
var flg = false;
var id = "";
for (var i = 0; i < options.length; i++) {
if (options[i].checked) {
if (flg) {
alert("不能多选!");
return false;
}
id = options[i].value;
flg = true;
}
}
if (flg) {
return id;
} else {
alert("请选择操作对象!");
return false;
}
};
/**
*取得选中的记录的id 允许多选, 以逗号分隔返回
*/
myGrid.getSelectedIDS = function() {
var options = document.getElementsByName("options");
var flg = false;
var id = "";
for (var i = 0; i < options.length; i++) {
if (options[i].checked) {
var val = options[i].value;
id = id.length > 0 ? (id + "," + val) : val;
flg = true;
}
}
if (flg) {
return id;
} else {
alert("请选择操作对象!");
return false;
}
};
/**
*grid 全选
*/
myGrid.checkAll = function() {
var options = document.getElementsByName("options");
var flag = false;
for (var i = 0; i < options.length; i++) {
if (options[i].checked) {
flag = true;
break;
}
}
if (flag) {
for (var i = 0; i < options.length; i++) {
options[i].checked = false;
}
} else {
for (var i = 0; i < options.length; i++) {
options[i].checked = true;
}
}
};
myGrid.getPage = function(curPage, totalPage) {
if (curPage <= 0) {
return 0;
} else if (parseInt(curPage) >= parseInt(totalPage)) {
return parseInt(totalPage) - 1;
} else {
return curPage;
}
};
function add_event(tr) {
tr.onmouseover = function() {
tr.className += ' hover';
};
tr.onmouseout = function() {
tr.className = tr.className.replace(' hover', '');
};
}
function stripe(table) {
var trs = table.getElementsByTagName("tr");
for (var i = 1; i < trs.length; i++) {
var tr = trs[i];
tr.className = i % 2 != 0 ? 'odd' : 'even';
add_event(tr);
}
}
function setTableCss() {
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++) {
var table = tables[i];
if (table.className == 'datagrid1' || table.className == 'datagrid2'
|| table.className == 'datagrid3' || table.className == 'datagrid4') {
stripe(tables[i]);
}
}
}
|
zzfls-pj
|
trunk/WebRoot/include/js/grid.js
|
JavaScript
|
asf20
| 5,419
|
/**
*ajax通讯,
author:jiangxiangwei
code:UTF-8
*调用示例:
var json={
url:"select.do", //请求地址
method:"post", //请求方式post get
async:"true", //true 异步 false 同步
showMsg:true, //是否要进度提示
form:"form1", //需提交的表单id
params:{ //form表单外需提交的参数
"name":"11", //参数名 : 值
"SQLID":"selectModule",
},
callback:[callFun1,callFun2] //回调函数
}
new Ajax().sendData(json);
*/
function Ajax() {
var XMLHttpReq;
this.sendData = sendData;
//创建 XMLHttpRequest请求
function createHttpRequest() {
if (window.XMLHttpRequest) {
XMLHttpReq = new XMLHttpRequest();
} else {
if (window.ActiveXObject) { //
try {
XMLHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
XMLHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
}
}
}
}
}
//核心函数,发送请求
function sendData(json) {
var args = getArgs(json);
if (args.showMsg)
showLoadingMessage(args.msg);
//显示蒙层
createHttpRequest();
var content = getParmValue(args.form, args.params);
var url = "";
if (args.method != null && args.method == "get" || args.method == "GET") {
url = args.url + "?" + content;
} else {
url = args.url;
}
XMLHttpReq.open(args.method, url, args.async);
XMLHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
XMLHttpReq.onreadystatechange = function() {
if (XMLHttpReq.readyState == 4 && XMLHttpReq.status == 200) {
var res = XMLHttpReq.responseText;
var rtn = null;
try {
rtn = eval("(" + res + ")");
//转为json对象
} catch(exception) {
alert("返回结果不能实例化为json!");
}
//执行回调函数
if (args.callback != null)
for (var i = 0; i < args.callback.length; i++)
args.callback[i](rtn);
if (args.showMsg)
hideLoadingMessage();
//取消蒙层
}
};
XMLHttpReq.send(content);
}
//组装请求参数
function getParmValue(form, params) {
var str = "";
//从指定form表单取值
if (form) {
str = getContent(document.getElementById(form));
}
//组装额外指定的参数
if (params) {
for (var key in params) {
if (str.length > 0)
str += "&";
str += key + "=" + params[key];
}
}
return str;
}
//获取参数ajax对象参数
function getArgs(json) {
var async = true;
if (json.async != null)
async = json.async;
var showMsg = true;
if (json.showMsg != null)
showMsg = json.showMsg;
var o = {
url:json.url,
method:json.method ? json.method : "POST",
async:async,
showMsg:showMsg,
msg :json.msg ? json.msg : "",
form:json.form ? json.form : null,
params:json.params ? json.params : null,
callback:json.callback ? json.callback : []
};
return o;
}
//获取form表单数据
function getContent(theform) {
var els = theform.elements;
var len = els.length;
var queryString = "";
this.addField = function (name, value) {
if (queryString.length > 0) {
queryString += "&";
}
queryString += name + "=" + value;
};
for (var i = 0; i < len; i++) {
var el = els[i];
if (!el.disabled) {
switch (el.type) {
case "text":
case "password":
case "hidden":
case "textarea":
this.addField(el.name, el.value);
break;
case "select-one":
if (el.selectedIndex >= 0) {
this.addField(el.name, el.options[el.selectedIndex].value);
}
break;
case "select-multiple":
for (var j = 0; j < el.options.length; j++) {
if (el.options[j].selected) {
this.addField(el.name, el.options[j].value);
}
}
break;
case "checkbox":
case "radio":
if (el.checked) {
this.addField(el.name, el.value);
}
break;
}
}
}
return queryString.substring(0, queryString.length);
}
//显示蒙层
function showLoadingMessage(msg) {
//蒙层
var div = document.getElementById("JXW__loading_div");
if (div == null) {
div = document.createElement("DIV");
document.body.appendChild(div);
div.id = "JXW__loading_div";
div.style.position = "absolute";
div.style.top = "0px";
div.style.filter = "alpha(opacity=20)";
div.style.background = "#777";
div.style.zindex = "2";
div.style.left = "0px";
}
div.style.width = "100%";
div.style.height = "100%";
div.style.display = "";
//进度提示
var divImg = document.getElementById("JXW__loading_div_IMG");
if (divImg == null) {
divImg = document.createElement("DIV");
document.body.appendChild(divImg);
divImg.id = "JXW__loading_div_IMG";
divImg.style.position = "absolute";
divImg.innerHTML = "<img src='../../include/images/ajax.gif'><br><center><font color='red'>" + msg + "</font></center>";
}
divImg.style.top = document.body.clientHeight / 3;
divImg.style.left = document.body.clientWidth / 3;
divImg.style.display = "";
}
//隐藏蒙层
function hideLoadingMessage() {
var div = document.getElementById("JXW__loading_div");
if (div != null)
div.style.display = "none";
var divImg = document.getElementById("JXW__loading_div_IMG");
if (divImg != null)
divImg.style.display = "none";
}
}
|
zzfls-pj
|
trunk/WebRoot/include/js/ajax.js
|
JavaScript
|
asf20
| 7,154
|
<SCRIPT LANGUAGE="JavaScript">
<!--
var tool =
{
restyle : function(e)
{
e.style.cssText = 'margin:0;padding:0;background-image:none;background-color:transparent;border:0;';
},
ststyle : function(e, dict)
{
var style = e.style;
for (var n in dict) style[n] = dict[n];
},
stclass : function(e, dict)
{
var cls = e.style;
for (var n in dict) style[n] = dict[n];
},
getestyle : function(e, p)
{
if (binfo.ie)
return e.currentStyle[p];
else
return e.ownerDocument.defaultView.getComputedStyle(e, '').getPropertyValue(p);
},
stopac : function(e, opac)
{
if (binfo.ie)
{
opac = Math.round(opac * 100);
e.style.filter = ( opac > 100 ? '' : 'alpha(opacity=' + opac + ')' );
}
else
e.style.opacity = opac;
},
getvoid : function()
{
if (binfo.ie)
return ( binfo.i7 ? '' : 'javascript:\'\'' );
return 'javascript:void(0)';
},
//����¼�
addevt : function(o, e, l)
{
if (binfo.ie)
o.attachEvent('on' + e, l);
else
o.addEventListener(e, l, false);
},
//ȥ���¼�
remevt : function(o, e, l)
{
if (binfo.ie)
o.detachEvent('on' + e, l);
else
o.removeEventListener(e, l, false);
},
isdtd : function(doc)
{
return ( 'CSS1Compat' == ( doc.compatMode || 'CSS1Compat' ) );
},
getclsize : function(w)
{
if (binfo.ie)
{
var oSize, doc = w.document.documentElement;
oSize = ( doc && doc.clientWidth ) ? doc : w.document.body;
if (oSize)
return { w : oSize.clientWidth, h : oSize.clientHeight };
else
return { w : 0, h : 0 };
}
else
return { w : w.innerWidth, h : w.innerHeight };
},
getev : function()
{
if (binfo.ie) return window.event;
var func = tool.getev.caller;
while (func != null)
{
var arg = func.arguments[0];
if (arg && (arg + '').indexOf('Event') >= 0) return arg;
func = func.caller;
}
return null;
},
getepos : function(o)
{
var l, t;
if (o.getBoundingClientRect)
{
var el = o.getBoundingClientRect();
l = el.left;
t = el.top;
}
else
{
l = o.offsetLeft - Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
t = o.offsetTop - Math.max(document.documentElement.scrollTop, document.body.scrollTop);
}
return { x : l, y : t };
},
getspos : function(w)
{
if (binfo.ie)
{
var doc = w.document;
var oPos = { X : doc.documentElement.scrollLeft, Y : doc.documentElement.scrollTop };
if (oPos.X > 0 || oPos.Y > 0) return oPos;
return { X : doc.body.scrollLeft, Y : doc.body.scrollTop };
}
else
return { X : w.pageXOffset, Y : w.pageYOffset };
},
getlink : function(c)
{
if (c.length == 0) return;
return '<' + 'link href="' + c + '" type="text/css" rel="stylesheet"/>';
},
regdoll : function(w)
{
if (binfo.ie)
w.$ = w.document.getElementById;
else
w.$ = function(id) {
return w.document.getElementById(id);
};
},
getedoc : function(e)
{
return e.ownerDocument || e.document;
},
disctmenu : function(doc)
{
doc.oncontextmenu = function(e)
{
e = e || event || this.parentWindow.event;
var o = e.srcElement || e.target;
if (!( o.type == 'password' || o.type == 'text' || o.type == 'textarea' ))
{
if (binfo.ie) e.returnValue = false; else e.preventDefault();
}
};
},
getpath : function()
{
var bp, len, sc = document.getElementsByTagName('script');
for (var i = 0; i < sc.length; i++)
{
bp = sc[i].src.substring(0, sc[i].src.toLowerCase().indexOf('lhgdialog.js'));
len = bp.lastIndexOf('/');
if (len > 0) bp = bp.substring(0, len + 1);
if (bp) break;
}
if (binfo.ie && bp.indexOf('../') != -1)
{
var fp = window.location.href;
fp = fp.substring(0, fp.lastIndexOf('/'));
while (bp.indexOf('../') >= 0)
{
bp = bp.substring(3);
fp = fp.substring(0, fp.lastIndexOf('/'));
}
return fp + '/' + bp;
} else return bp;
},
//ɾ��ڵ�
remnode : function(n) {
return n.parentNode.removeChild(n);
}
};
vtools = {
$:function(id){
return document.getElementById(id);
},
addclass:function(e,c){
var ocn = this.$(e).className;
var cn = ocn.split(" ");
if(this.classFilter(cn,c)==c){
ocn = ocn;
}else{
ocn =ocn+" "+c;
}
this.$(e).className = ocn;
},
removeclass:function(e,c){
var ocn = this.$(e).className;
var cn = ocn.split(" ");
var nocn = this.classFilter(cn,c,true);
var temp="";
var len=nocn.length*1;
for (i = 0; i < len; i++)
{
if (i==0)
{
temp=temp+nocn[i];
}else
{
temp=temp+" "+nocn[i];
}
}
this.$(e).className = temp;
},
classFilter: function(r,m,not){
m = " " + m + " ";
var tmp = [];
for ( var i = 0; r[i]; i++ ) {
var pass = (" " + r[i] + " ").indexOf( m ) >= 0;
if ( !not && pass || not && !pass )
tmp.push( r[i] );
}
return tmp;
},
comptagName:function(e,t){
return this.$(e).parentNode.tagName.toUpperCase() == t.toUpperCase();
},
getattr:function(e,t){
return this.$(e).getAttribute(t);
},
creatqtip:function(){
},
getattr:function(e,t){
if (t=='value'){
var temp=this.$(e).value;
}else{
var temp=this.$(e).getAttribute(t);
}
if (temp != null && "" != temp) {
return temp.replace(/(^\s*)|(\s*$)/g,"");
}
else
return '';
}
};
function test(){
alert(vtools.getattr("viewEdit_pmkbh",'value'));
}
//-->
</SCRIPT>
<body>
<div>
<input type="text" class="input_text" id="viewEdit_pmkbh" name="model.pmkbh" abc="" style="width: 130px;" validatorRules="Require,pmkbh" maxlength="25" dataType="Custom" msg="长度不超过25个字">
</input>
<INPUT TYPE="button" VALUE="" ONCLICK="test();"></body>
|
zzfls-pj
|
trunk/WebRoot/include/js/validator3/Noname1.html
|
HTML
|
asf20
| 6,876
|
<html>
<head>
<title>表单验证类 Validator v1.05</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<SCRIPT LANGUAGE="JavaScript">
function validateEndDate(startDate, endDate, days){
var s = startDate.split("-");
var e = endDate.split("-");
var sM = parseInt(s[1]);
var eM = parseInt(e[1]);
if ((eM - sM) > 3) {
return true;
}
return false;
}
function hi(obj){
alert(obj);
return true;
}
</SCRIPT>
<script language="JavaScript" src="jquery.js">
</script>
<script language="JavaScript" src="jquery-qtip.js">
</script>
<script language="JavaScript" src="validator.js">
</script>
<script language="JavaScript" src="exvalidator.js">
</script>
</head>
<style>
body, td {
font: normal 12px Verdana;
color: #333333
}
input, textarea, select, td {
font: normal 12px Verdana;
color: #333333;
border: 1px solid #999999;
background: #ffffff
}
table {
border-collapse: collapse;
}
td {
padding: 3px
}
input {
height: 20px;
}
textarea {
width: 80%;
height: 50px;
overflow: auto;
}
form {
display: inline
} .tiperror {
background: #FFFF99 url(invalid_line.gif) repeat-x bottom;
border: 1px solid #dd7870;
} .requideerror {
background: #FFFF99;
border: 1px solid #999999;
}
</style>
<input type="text" id="jq" value="hi"/>
<form name="theForm" id="demo" method="get" onSubmit="return Validator.validate(this,2)">
<table align="center">
<!-- ============== -->
<tr>
<td>
开始日期:
</td>
<td>
<input id="startDate" name="startDate" fieldName="开始日期" validatorRules="Require" format="ymd" msg1="必须是英文字母">
</td>
</tr>
<tr>
<td>
结束日期:
</td>
<td>
<input id="endDate" name="endDate" validatorRules="Require,Date,CFunction" funcList="validateEndDate(startDate,endDate,100)&hi(100)" msg1="结束日期格式不对" msg2="结束日期要大于开始日期3个月。" msg2="ssss" onblur="Validator.immediateValidate(this);">
</td>
</tr><!-- ============== -->
<tr>
<td>
身份证号:
</td>
<td>
<input id="Card" name="Card" validatorRules="IdCard" msg0="身份证号错误">
</td>
</tr>
<tr>
<td>
真实姓名:
</td>
<td>
<input id="Name" name="Name" validatorRules="Chinese" msg0="真实姓名只允许中文">
</td>
</tr>
<tr>
<td>
ID:
</td>
<td>
<input id="username" name="username" validatorRules="Date,CFunction" funcName="isNotNumber" funcParams="Name,Card" msg0="日期不存在" msg1="ID名不符合规定">
</td>
</tr>
<tr>
<td>
英文名:
</td>
<td>
<input id="Nick" name="Nick" validatorRules="English" require="false" onblur="Validator.immediateValidate(this);">
</td>
</tr>
<tr>
<td>
主页:
</td>
<td>
<input id="Homepage" name="Homepage" require="false" validatorRules="Url" msg0="非法的Url">
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<input id="Password" name="Password" validatorRules="SafeString" msg0="密码不符合安全规则" type="password">
</td>
</tr>
<tr>
<td>
重复:
</td>
<td>
<input id="Repeat" name="Repeat" validatorRules="Repeat" to="Password" msg0="两次输入的密码不一致" type="password">
</td>
</tr>
<tr>
<td>
信箱:
</td>
<td>
<input id="Email1" name="Email" validatorRules="Email" msg0="信箱格式不正确">
</td>
</tr>
<tr>
<td>
信箱:
</td>
<td>
<input id="Email2" name="Email" validatorRules="Repeat" to="Email" msg0="两次输入的信箱不一致">
</td>
</tr>
<tr>
<td>
QQ:
</td>
<td>
<input id="QQ" name="QQ" require="false" validatorRules="QQ" msg0="QQ号码不存在">
</td>
</tr>
<tr>
<td>
身份证:
</td>
<td>
<input id="Card1" name="Card" validatorRules="IdCard" msg0="身份证号码不正确">
</td>
</tr>
<tr>
<td>
年龄:
</td>
<td>
<input id="Year" name="Year" validatorRules="Range" msg0="年龄必须在18~28之间" min="18" max="28">
</td>
</tr>
<tr>
<td>
年龄1:
</td>
<td>
<input id="Year1" name="Year1" require="false" validatorRules="Compare" msg0="年龄必须在18以上" to="18" operator="GreaterThanEqual">
</td>
</tr>
<tr>
<td>
电话:
</td>
<td>
<input id="Phone" name="Phone" require="false" validatorRules="Phone" msg0="电话号码不正确">
</td>
</tr>
<tr>
<td>
手机:
</td>
<td>
<input id="Mobile" name="Mobile" require="false" validatorRules="Mobile" msg0="手机号码不正确">
</td>
</tr>
<tr>
<td>
生日:
</td>
<td>
<input id="Birthday" name="Birthday" validatorRules="Date" format="ymd" msg0="生日日期不存在">
</td>
</tr>
<tr>
<td>
邮政编码:
</td>
<td>
<input id="Zip" name="Zip" validatorRules="Custom" regexp="^[1-9]\d{5}$" msg0="邮政编码不存在">
</td>
</tr>
<tr>
<td>
邮政编码:
</td>
<td>
<input id="Zip1" name="Zip1" validatorRules="Zip" msg0="邮政编码不存在">
</td>
</tr>
<tr>
<td>
操作系统:
</td>
<td>
<select id="Operation" name="Operation" validatorRules="Require" msg0="未选择所用操作系统">
<option value="">选择您所用的操作系统</option>
<option value="Win98">Win98</option>
<option value="Win2k">Win2k</option>
<option value="WinXP">WinXP</option>
</select>
</td>
</tr>
<tr>
<td>
所在省份:
</td>
<td>
广东<input id="Province1" name="Province" value="1" type="radio">陕西<input id="Province2" name="Province" value="2" type="radio">浙江<input id="Province3" name="Province" value="3" type="radio">江西<input id="Province4" name="Province" value="4" type="radio" validatorRules="Group" msg0="必须选定一个省份">
</td>
</tr>
<tr>
<td>
爱好:
</td>
<td>
运动<input id="Favorite1" name="Favorite" value="1" type="checkbox">上网<input id="Favorite2" name="Favorite" value="2" type="checkbox">听音乐<input id="Favorite3" name="Favorite" value="3" type="checkbox">看书<input id="Favorite4" name="Favorite" value="4" type="checkbox"" validatorRules="Group" min="2" max="3" msg0="必须选择2~3种爱好">
</td>
</tr>
<tr>
<td>
自我介绍:
</td>
<td>
<textarea id="Description" name="Description" validatorRules="Limit" max="10" msg0="自我介绍内容必须在10个字之内">
中文是一个字
</textarea>
</td>
</tr>
<tr>
<td>
自传:
</td>
<td>
<textarea id="History" name="History" validatorRules="LimitB" min="3" max="10" msg0="自传内容必须在[3,10]个字节之内">
中文是两个字节t
</textarea>
</td>
</tr>
<tr>
<td>
相片上传:
</td>
<td>
<input id="up" name="up" validatorRules="Filter" msg0="非法的文件格式" type="file" accept="jpg, gif, png">
</td>
</tr>
<tr>
<td colspan="2">
<input name="Submit" type="submit" value="确定提交"><input onClick="Validator.validate(document.getElementById('demo'))" value="检验模式1" type="button"><input onClick="Validator.validate(document.getElementById('demo'),2)" value="检验模式2" type="button"><input onClick="Validator.validate(document.getElementById('demo'),3)" value="检验模式3" type="button"><input onClick="Validator.validate(document.getElementById('demo'),4)" value="检验模式4" type="button"><input onClick="Validator.ignoreRules(theForm.startDate)" value=" 忽略 " type="button"><input onClick="Validator.activeRules(theForm.startDate)" value=" 激活 " type="button">
</td>
</tr>
</table>
</form>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/js/validator3/samples.html
|
HTML
|
asf20
| 11,577
|
/*******************************************************************************
* Validator v1.05 code by 我佛山人 wfsr@msn.com
*
* Validator v3.0 refactoring by chenfuzhong yuyu_xn@yahoo.com.cn
******************************************************************************/
vtools = {
$ : function(id) {
return document.getElementById(id);
},
addEvent : function(obj, type, fn) {
if (obj.attachEvent) {
obj['e' + type + fn] = fn;
obj[type + fn] = function() {
obj['e' + type + fn](window.event);
};
obj.attachEvent('on' + type, obj[type + fn]);
} else
obj.addEventListener(type, fn, false);
},
removeEvent : function(obj, type, fn) {
if (obj.detachEvent) {
obj.detachEvent('on' + type, obj[type + fn]);
obj[type + fn] = null;
} else
obj.removeEventListener(type, fn, false);
},
addclass : function(e, c) {
var ocn = this.$(e).className;
var cn = ocn.split(" ");
if (this.classFilter(cn, c) == c) {
ocn = ocn;
} else {
ocn = ocn + " " + c;
}
this.$(e).className = ocn;
},
addparentclass : function(e, c) {
var ocn = e.className;
var cn = ocn.split(" ");
if (this.classFilter(cn, c) == c) {
ocn = ocn;
} else {
ocn = ocn + " " + c;
}
e.className = ocn;
},
removeclass : function(e, c) {
var ocn = this.$(e).className;
var cn = ocn.split(" ");
var nocn = this.classFilter(cn, c, true);
var temp = "";
var len = nocn.length * 1;
for (i = 0; i < len; i++) {
if (i == 0) {
temp = temp + nocn[i];
} else {
temp = temp + " " + nocn[i];
}
}
this.$(e).className = temp;
},
removeparentclass : function(e, c) {
var ocn = e.className;
var cn = ocn.split(" ");
var nocn = this.classFilter(cn, c, true);
var temp = "";
var len = nocn.length * 1;
for (i = 0; i < len; i++) {
if (i == 0) {
temp = temp + nocn[i];
} else {
temp = temp + " " + nocn[i];
}
}
e.className = temp;
},
classFilter : function(r, m, not) {
m = " " + m + " ";
var tmp = [];
for ( var i = 0; r[i]; i++) {
var pass = (" " + r[i] + " ").indexOf(m) >= 0;
if (!not && pass || not && !pass)
tmp.push(r[i]);
}
return tmp;
},
comptagName : function(e, t) {
return this.$(e).parentNode.tagName.toUpperCase() == t.toUpperCase();
},
getattr : function(e, t) {
if (t == 'value') {
var temp = this.$(e).value;
} else {
var temp = this.$(e).getAttribute(t);
}
if (temp != null && "" != temp) {
return temp.replace(/(^\s*)|(\s*$)/g, "");
} else
return '';
},
setattr : function(e, t, v) {
this.$(e).setAttribute(t, v);
}
};
var Validator = {
/**
* Validator3 默认具有这个校验规则,作为 示范,强烈建议定义规则同时定义它的默认提示信息! 格式:msg + 规则名 如下:
*/
Require : /.+/,
msgRequire : "必输项",
// add by chenfuzhong 2007-9-9 begin
/***************************************************************************
* 功能:提供一个框架扩展接口,为特殊业务规则预留 funcList 此属性要求程序员指定要调用的自定义js函数名称,如果多个用&隔开 例如:
* <input type=text name="startDate" /> <input type=text name="endDate"
* validatorRules="CFunction"
* funcList="validateEndDate(startDate,endDate,3)" msg0="不能大于3个月"/>
* 其中,声明了endDate字段需要CFunction规则校验,CFunction执行的是
* 用户自定义的js函数compareDate,其中的参数用startDate和endDate本身的值传入,和 常量3传入。
**************************************************************************/
CFunction : "this.exeFunctionList(getAttribute('funcList'))",
ErrorItem : [ document.forms[0] ],
ErrorMessage : [ "以下原因导致提交失败:\t\t\t\t" ],
tiperror : "tiperror",
requideerror : "requideerror",
wdatetiperror : "wdatetiperror",
wdaterequideerror : "wdaterequideerror",
tipmode : 3,
settiperror : function(Classname) {
this.tiperror = Classname;
},
setrequideerror : function(Classname) {
this.requideerror = Classname;
},
settipmode : function(tipmodenum) {
this.tipmode = tipmodenum;
},
highlight : function(element, cssa) {
vtools.addclass(element, cssa);
if (vtools.comptagName(element, 'DIV')) {
vtools.addparentclass(vtools.$(element).parentNode, cssa);
}
if (vtools.getattr(element, 'widtype') == 'date') {
vtools.removeclass(element, 'Wdate');
if (cssa == 'requideerror') {
vtools.addclass(element, 'wdaterequideerror');
} else {
vtools.addclass(element, 'wdatetiperror');
}
}
},
unhighlight : function(element, cssa) {
vtools.removeclass(element, cssa);
if (vtools.comptagName(element, 'DIV')) {
vtools.removeparentclass(vtools.$(element).parentNode, cssa);
}
if (vtools.getattr(element, 'widtype') == 'date') {
if (cssa == 'requideerror') {
vtools.removeclass(element, 'wdaterequideerror');
} else {
vtools.removeclass(element, 'wdatetiperror');
}
vtools.addclass(element, 'Wdate');
}
},
showerrtip : function(element, conns) {
// $('#'+element+"val").qtip("api").updateContent("My new content");
},
hidetip : function(element) {
// $('#'+element+"val").qtip("api").updateContent("My new content");
},
/**
* 框架主函数
*/
validate : function(theForm, mode) {
// 设置提示模式
this.settipmode(mode);
var obj = theForm || event.srcElement;
var count = obj.elements.length;
this.ErrorMessage.length = 1;
this.ErrorItem.length = 1;
this.ErrorItem[0] = obj;
for ( var i = 0; i < count; i++) {
if (obj.elements[i].id != null && "" != obj.elements[i].id) {
if (vtools.getattr(obj.elements[i].id, 'validatorRules') != null
&& "" != vtools.getattr(obj.elements[i].id,
'validatorRules')) {
// 事件绑定 失去焦点时校验
vtools.addEvent(vtools.$(obj.elements[i].id), 'blur',
function() {
Validator.immediateValidate4(this);
});
//键盘输入后校验
vtools.addEvent(vtools.$(obj.elements[i].id), 'keyup',
function() {
Validator.immediateValidate4(this);
});
this.clearState(obj.elements[i]);
var iMsgCode = this.validateElement(obj.elements[i]);
/**
* 返回-1 表示校验通过, 返回-2 表示规则未定义或Validator3找不到规则
*/
if (iMsgCode != -1) {
this.addError(i, iMsgCode);
}
}
}
}
if (this.ErrorMessage.length > 1) {
this.showAllErrorMsg(mode);
return false;
}
return true;
},
/**
* 显示所有错误信息
*/
showAllErrorMsg : function(mode) {
mode = mode || 1;
var errCount = this.ErrorItem.length;
switch (mode) {
case 2:
for ( var i = 1; i < errCount; i++)
this.ErrorItem[i].style.color = "red";
case 1:
for ( var i = 1; i < errCount; i++) {
var iMsgCode = parseInt(this.ErrorMessage[i]);
/**
* 如果定义了 字段的本地名称,则取出来提示用户
*/
var name = this.ErrorItem[i].getAttribute("fieldName");
if (null == name) {
name = "";
}
this.ErrorMessage[i] = name + " "
+ this.getErrorMsg(this.ErrorItem[i], iMsgCode);
}
alert(this.ErrorMessage.join("\n"));
this.ErrorItem[1].focus();
break;
case 3:
for ( var i = 1; i < errCount; i++) {
var iMsgCode = parseInt(this.ErrorMessage[i]);
this.showErrorMsg(this.ErrorItem[i], iMsgCode, false);
}
this.ErrorItem[1].focus();
break;
case 4:
for ( var i = 1; i < errCount; i++) {
var iMsgCode = parseInt(this.ErrorMessage[i]);
this.showErrorMsg(this.ErrorItem[i], iMsgCode, false);
}
this.ErrorItem[1].focus();
break;
default:
alert(this.ErrorMessage.join("\n"));
break;
}
},
/**
* 校验一个表单元素
*/
validateElement : function(obj) {
if (vtools.getattr(obj.id, 'require') == 'false') {
// 不需要验证
// 判断值是不是空
if (vtools.getattr(obj.id, 'value') != '') {
with (obj) {
var validatorRules = getAttribute("validatorRules");
var _rules = null;
if (validatorRules != null && "" != validatorRules) {
_rules = validatorRules.split(",");
for ( var j = 0; j < _rules.length; j++) {
var key = _rules[j];
if (key in this) {
// js函数 回调
if (typeof (this[key]) == "string"
&& key == "CFunction") {
var rs = eval(this[key]);
if (rs != -1) {
return j + rs;
}
}
if (typeof (this[key]) == "string"
&& !eval(this[key])) {
return j;
}
// 正则表达式
if (typeof (this[key]) == "object"
&& !this[key].test(value)) {
return j;
}
} else {
/**
* Validator3 找不到规则
*/
return -2;
}
}
}
}
return -1;
} else {
return -1;
}
} else {
with (obj) {
var validatorRules = getAttribute("validatorRules");
var _rules = null;
if (validatorRules != null && "" != validatorRules) {
_rules = validatorRules.split(",");
for ( var j = 0; j < _rules.length; j++) {
var key = _rules[j];
if (key in this) {
// js函数 回调
if (typeof (this[key]) == "string"
&& key == "CFunction") {
var rs = eval(this[key]);
if (rs != -1) {
return j + rs;
}
}
if (typeof (this[key]) == "string"
&& !eval(this[key])) {
return j;
}
// 正则表达式
if (typeof (this[key]) == "object"
&& !this[key].test(value)) {
return j;
}
} else {
/**
* Validator3 找不到规则
*/
return -2;
}
}
}
}
return -1;
}
},
/**
* 执行用户自定义校验函数
*/
exeFunctionList : function(custFunListStr) {
var sFuncs = custFunListStr.split("&");
for ( var i = 0; i < sFuncs.length; i++) {
var j = sFuncs[i].indexOf("(") + 1;
var k = sFuncs[i].indexOf(")");
var paras = sFuncs[i].substring(j, k);
var sParaNames = paras.split(",");
var fname = sFuncs[i].substring(0, j - 1);
var exeJs = fname + "(";
for ( var ii = 0; paras != "" && ii < sParaNames.length; ii++) {
try {
var vTemp = document.getElementById(sParaNames[ii]).value;
if (typeof (vTemp) != "string") {
vTemp = sParaNames[ii];
}
} catch (e) {
vTemp = sParaNames[ii];
}
exeJs += "'" + vTemp + "'";
if (ii < sParaNames.length - 1) {
exeJs += ",";
}
}
exeJs += ")";
try {
if (!eval(exeJs)) {
return i;
}
} catch (e) {
alert("Validator3找不到自定义函数:" + exeJs);
return -500;
}
}
return -1;
},
/**
* 获取表单元素的校验规则
*/
getValidateRule : function(obj, index) {
var validatorRules = obj.getAttribute("validatorRules");
var _rules = null;
if (validatorRules != null && "" != validatorRules) {
_rules = validatorRules.split(",");
return _rules[index];
}
},
/**
* 显示错误消息
*/
showErrorMsg : function(obj, j, imgflag) {
try {
if (imgflag) {
if (vtools.getattr(obj.id, 'require') == 'false') {
// 不需要验证
// 判断值是不是空
if (vtools.getattr(obj.id, 'value') != null
&& "" != vtools.getattr(obj.id, 'value')) {
if (typeof (obj.id) != 'undefined') {
// 显示红色底纹提示
this.highlight(obj.id, this.tiperror);
// 将错误提示信息
vtools.setattr(obj.id, 'title', this.getErrorMsg(
obj, j));
}
}
} else {
if (typeof (obj.id) != 'undefined') {
// 显示红色底纹提示
this.highlight(obj.id, this.tiperror);
// 将错误提示信息
vtools.setattr(obj.id, 'title', this
.getErrorMsg(obj, j));
}
}
} else {
if (vtools.getattr(obj.id, 'require') == 'false') {
// 不需要验证
// 判断值是不是空
if (vtools.getattr(obj.id, 'value') != null
&& "" != vtools.getattr(obj.id, 'value')) {
if (this.tipmode == 3) {
// 显示黄色底纹提示
this.highlight(obj.id, this.requideerror);
// 将错误提示信息
vtools.setattr(obj.id, 'title', this.getErrorMsg(
obj, j));
}
if (this.tipmode == 4 && typeof (obj.id) != 'undefined') {
// 显示红色底纹提示
this.highlight(obj.id, this.tiperror);
// 将错误提示信息
vtools.setattr(obj.id, 'title', this.getErrorMsg(
obj, j));
}
}
} else {
if (this.tipmode == 3) {
// 显示黄色底纹提示
this.highlight(obj.id, this.requideerror);
// 将错误提示信息
vtools.setattr(obj.id, 'title', this
.getErrorMsg(obj, j));
}
if (this.tipmode == 4 && typeof (obj.id) != 'undefined') {
// 显示红色底纹提示
this.highlight(obj.id, this.tiperror);
// 将错误提示信息
vtools.setattr(obj.id, 'title', this
.getErrorMsg(obj, j));
}
}
}
} catch (e) {
alert(e.description);
}
},
/**
* 添加一个错误消息
*/
addError : function(index, iMsgCode) {
this.ErrorItem[this.ErrorItem.length] = this.ErrorItem[0].elements[index];
this.ErrorMessage[this.ErrorMessage.length] = iMsgCode;
},
/**
* 获取表单元素的校验提示 @ obj 表单元素 @ index 错误提示的下标
*/
getErrorMsg : function(obj, index) {
var msg = "";
if (-2 == index) {
msg = "规则未定义";
return msg;
}
if (-100 > index) {
msg = "Validator3找不到自定义函数";
return msg;
}
try {
msg = obj.getAttribute("msg" + index);
} catch (e) {
msg = "Validator3 : 找不到提示信息 msg" + index + " .";
} finally {
if (null == msg || "" == msg) {
/**
* 获取规则的名称
*/
var m = this.getValidateRule(obj, index);
// 根据名称从框架默认提示信息中找
msg = this["msg" + m];
// new
if ("" == msg || typeof (msg) == "undefined") {
msg = "Validator3 : 找不到提示信息 msg" + index + " .";
}
// end new
}
}
return msg;
},
/**
* 清除提示信息 @ obj 表单元素
*/
clearState : function(obj) {
// if (vtools.getattr(obj.elements[i].id,'validatorRules')!= null && ""
// != vtools.getattr(obj.elements[i].id,'validatorRules') ){
with (obj) {
// if(style.color == "red")
// style.color = "";
// var lastNode =
// parentNode.childNodes[parentNode.childNodes.length-1];
this.unhighlight(obj.id, this.tiperror);
this.unhighlight(obj.id, this.requideerror);
// 清空abc值
vtools.setattr(obj.id, 'title', '');
// if(lastNode.id == "__ErrorMessagePanel")
// parentNode.removeChild(lastNode);
}
},
/**
* 立即校验表单元素 @ obj 表单元素
*/
immediateValidate : function(obj) {
this.clearState(obj);
var rs = this.validateElement(obj);
if (-1 != rs) {
this.showErrorMsg(obj, rs, false);
}
},
/**
* 立即校验表单元素(4模式校验) @ obj 表单元素
*/
immediateValidate4 : function(obj) {
this.clearState(obj);
var rs = this.validateElement(obj);
if (-1 != rs) {
this.showErrorMsg(obj, rs, true);
}
},
/**
* 忽略表单元素的校验 @ obj 表单元素
*/
ignoreRules : function(obj) {
this.clearState(obj);
var validatorRules = obj.getAttribute("validatorRules");
if ("" != validatorRules) {
// obj.validatorRules = "";
obj.setAttribute("validatorRules", "");
obj.setAttribute("tempRules", validatorRules);
}
},
/**
* 激活表单元素的校验规则 @ obj 表单元素
*/
activeRules : function(obj) {
this.clearState(obj);
if (obj.validatorRules == "") {
var validatorRules = obj.getAttribute("tempRules");
obj.validatorRules = validatorRules;
}
},
/**
* 替换规则
*/
replaceRules : function(obj, rules) {
obj.validatorRules = rules;
}
}
|
zzfls-pj
|
trunk/WebRoot/include/js/validator3/validator.js
|
JavaScript
|
asf20
| 16,568
|
/*************************************************
Validator v1.05
code by 我佛山人
wfsr@msn.com
modify by 我是乐东人
yuyu_xn@yahoo.com.cn
2007-9-9
*************************************************/
/**************************************************************
【修改说明】原框架存在以下缺点:
1、文档化不高,注释太少,不方便扩展。
2、校验的对象只能是类型等少量的规则。
3、当被校验的对象有多个规则时,提示只能有一个,不够精细。
4、不能对一个对象提供多个校验规则,并且它们之间有依赖关系。
*************************************************************/
Validator.English = /^[A-Za-z]+$/;
Validator.msgEnglish = "英文名只允许英文字母";
Validator.Email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
Validator.Phone = /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/;
Validator.Mobile = /^((\(\d{2,3}\))|(\d{3}\-))?13\d{9}$/;
Validator.Url = /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/;
Validator.IdCard ="this.IsIdCard(value)";
Validator.Currency = /^\d+(\.\d+)?$/;
Validator.Number = /^\d+$/;
Validator.Zip = /^[1-9]\d{5}$/;
Validator.QQ = /^[1-9]\d{4,8}$/;
Validator.Integer = /^[-\+]?\d+$/;
Validator.Double = /^[-\+]?\d+(\.\d+)?$/;
Validator.Chinese = /^[\u0391-\uFFE5]+$/;
Validator.Username = /^[a-z]\w{3,}$/i;
Validator.UnSafe =/^(([A-Z]*|[a-z]*|\d*|[-_\~!@#\$%\^&\*\.\(\)\[\]\{\}<>\?\\\/\'\"]*)|.{0,5})$|\s/;
Validator.fphm = /^((\d){8})$/;
Validator.fpdm =/^((\d){12})$/;
Validator.nsrsbh = /^(([A-Za-z0-9|-]{15})|([A-Za-z0-9|-]{18})|([A-Za-z0-9|-]{20}))+$/; //纳税人识别号
Validator.fkg = /\S/; //非空字符
Validator.zzs = /^[1-9]*[1-9][0-9]*$/; //正整数
Validator.zfds = /^(([1-9]+[0-9]*.{1}[0-9]+)|(0\.[1-9]+[0-9]*)|([1-9][0-9]*)|(0\.[0-9]*[1-9]+))$/;
Validator.dh = /(^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-?)?[1-9]\d{6,7}(\-\d{1,4})?$)|(^((\(\d{2,3}\))|(\d{3}\-))?(13|15|18)\d{9}$)/; //电话包括固话和手机 Validator.IsSafe = function(str){return !this.UnSafe.test(str);};
Validator.SafeString = "this.IsSafe(value)";
Validator.Filter = "this.DoFilter(value, getAttribute('accept'))";
Validator.Limit = "this.limit(value.length,getAttribute('min'), getAttribute('max'))";
Validator.LimitB = "this.limit(this.LenB(value), getAttribute('min'), getAttribute('max'))";
Validator.Date = "this.IsDate(value, getAttribute('min'), getAttribute('format'))";
Validator.Repeat = "value == document.getElementsByName(getAttribute('to'))[0].value";
Validator.msgtszf = "不允许输入特殊字符";
Validator.tszf = /^[^<>]+$/;
Validator.htCurrency=/^[-]?[\d]{1,9}(\.[\d]{1,2})?$/;//货币验证
Validator.ZDouble = /^[+]?\d+(\.\d+)?$/;//非负数
Validator.ZFloat = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/;//正数
/**
* 是否输入的值属于指定的范围中
* @ min 最小值
* @ max 最大值
*/
Validator.Range = "getAttribute('min') < (value|0) && (value|0) < getAttribute('max')";
/**
* 比较两个输入值是否符合给定的操作
* @ value 当前值
* @ operator 操作【NotEqual、GreaterThan、GreaterThanEqual、LessThan、LessThanEqual】
* @ to 被比较的属性
*/
Validator.Compare = "this.compare(value,getAttribute('operator'),getAttribute('to'))";
Validator.Custom = "this.Exec(value, getAttribute('regexp'))";
Validator.Group = "this.MustChecked(getAttribute('name'), getAttribute('min'), getAttribute('max'))";
/*********************************************************************************************
* 功能:提供一个比较两个日期是否在用户指定的范围内
* @diff 此属性要求程序员指定日期范围,比如7天, diff="7"
* @to 此属性指定要比较的域
********************************************************************************************/
Validator.CompareDate = "this.compareDate(value,getAttribute('diff'),document.getElementsByName(getAttribute('to'))[0].value)";
Validator.compareDate = function(endDate,diff,startDate){
var e = endDate.split("-");
var s = startDate.split("-");
var sDate = new Date(s[0],s[1],s[2]);
var eDate = new Date(e[0],e[1],e[2]);
var diffs = eDate.getTime() - sDate.getTime();
var date = diffs/(1000 * 24 * 60 * 60);
if(date > diff) {
return false;
}
else {
return true;
}
};
//add by chenfuzhong 2007-9-9 end
/**************************************************************************************************
* 扩展未有的业务规则,步骤1:
* 增加规则名称及其回调代码,如下:
* CompareDate : "this.compareDate(value,getAttribute('diff'),document.getElementsByName(getAttribute('to'))[0].value)",
*
* 注:可以自定义属性,如diff,当compareDate被调用的时候,传入的参数是diff的value,
**************************************************************************************************/
Validator.limit = function(len,min, max){
min = min || 0;
max = max || Number.MAX_VALUE;
return min <= len && len <= max;
};
Validator.LenB = function(str){
return str.replace(/[^\x00-\xff]/g,"**").length;
};
Validator.ClearState = function(elem){
with(elem){
if(style.color == "red")
style.color = "";
var lastNode = parentNode.childNodes[parentNode.childNodes.length-1];
if(lastNode.id == "__ErrorMessagePanel")
parentNode.removeChild(lastNode);
}
};
Validator.AddError = function(index, str){
this.ErrorItem[this.ErrorItem.length] = this.ErrorItem[0].elements[index];
this.ErrorMessage[this.ErrorMessage.length] = this.ErrorMessage.length + ":" + str;
};
Validator.Exec = function(op, reg){
return new RegExp(reg,"g").test(op);
};
Validator.compare = function(op1,operator,op2){
switch (operator) {
case "NotEqual":
return (op1 != op2);
case "GreaterThan":
return (op1 > op2);
case "GreaterThanEqual":
return (op1 >= op2);
case "LessThan":
return (op1 < op2);
case "LessThanEqual":
return (op1 <= op2);
default:
return (op1 == op2);
}
};
// add by chenfuzhong 2007-9-9 begin
/**************************************************
* 增加自定义函数校验类型
*
* @fname 自定义的函数名称
* @funcParams 自定义函数的参数名称数组
*************************************************/
Validator.customFunction = function(fname,funcParams){
var sParaNames = funcParams.split(",");
var sParaValues = new Array();
var exeJs = fname + "(";
for(var i = 0 ; i < sParaNames.length; i++ ) {
exeJs += "'" + document.getElementsByName(sParaNames[i])[0].value + "'";
if(i < sParaNames.length - 1) {
exeJs += ",";
}
}
exeJs += ")";
//据说使用eval函数进行回调 不安全
if(!eval(exeJs)) {
return false;
}
return true;
};
//add by chenfuzhong 2007-9-9 end
/********************************************************************************
* 扩展未有的业务规则,步骤3:
* 增加未有业务的回调函数,如下:
* 比较给定的两个日期之间的天数不能大于diff
*
* compareDate : function(endDate,diff,startDate){
var e = endDate.split("-");
var s = startDate.split("-");
var sDate = new Date(s[0],s[1],s[2]);
var eDate = new Date(e[0],e[1],e[2]);
var diffs = eDate.getTime() - sDate.getTime();
var date = diffs/(1000 * 24 * 60 * 60);
if(date > diff) {
return false;
}
else {
return true;
}
},
********************************************************************************/
Validator.MustChecked = function(name, min, max){
var groups = document.getElementsByName(name);
var hasChecked = 0;
min = min || 1;
max = max || groups.length;
for(var i=groups.length-1;i>=0;i--)
if(groups[i].checked) hasChecked++;
return min <= hasChecked && hasChecked <= max;
};
Validator.DoFilter = function(input, filter){
return new RegExp("^.+\.(?=EXT)(EXT)$".replace(/EXT/g, filter.split(/\s*,\s*/).join("|")), "gi").test(input);
};
// Validator.IsIdCard = function(number){
// var date, Ai;
// var verify = "10x98765432";
// var Wi = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
// var area = ['','','','','','','','','','','','北京','天津','河北','山西','内蒙古','','','','','','辽宁','吉林','黑龙江','','','','','','','','上海','江苏','浙江','安微','福建','江西','山东','','','','河南','湖北','湖南','广东','广西','海南','','','','重庆','四川','贵州','云南','西藏','','','','','','','陕西','甘肃','青海','宁夏','新疆','','','','','','台湾','','','','','','','','','','香港','澳门','','','','','','','','','国外'];
// var re = number.match(/^(\d{2})\d{4}(((\d{2})(\d{2})(\d{2})(\d{3}))|((\d{4})(\d{2})(\d{2})(\d{3}[x\d])))$/i);
// if(re == null) return false;
// if(re[1] >= area.length || area[re[1]] == "") return false;
// if(re[2].length == 12){
// Ai = number.substr(0, 17);
// date = [re[9], re[10], re[11]].join("-");
// }
// else{
// Ai = number.substr(0, 6) + "19" + number.substr(6);
// date = ["19" + re[4], re[5], re[6]].join("-");
// }
// if(!this.IsDate(date, "ymd")) return false;
// var sum = 0;
// for(var i = 0;i<=16;i++){
// sum += Ai.charAt(i) * Wi[i];
// }
// Ai += verify.charAt(sum%11);
// return (number.length ==15 || number.length == 18 && number == Ai);
// };
/**
*身份证验证,
*idcard: 身份证号
*xb: 检测之后,对性别赋值的文本框或者下拉菜单id,不赋值传空值
*jg:对籍贯赋值的文本框id不赋值传空值
*csrq:对出生日期赋值的文本框点,不赋值传空值
*/
Validator.IsIdCard= function(idcard, xb, jg, csrq, sfzh) {
var Errors = new Array(
"验证通过!",
"身份证号码位数不对!",
"身份证号码出生日期超出范围或含有非法字符!",
"身份证号码校验错误!",
"身份证号码校验错误!"
);
var area = {11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"}
var Y,JYM;
var S,M;
var idcard_array = new Array();
idcard_array = idcard.split("");
//地区检验
if (area[parseInt(idcard.substr(0, 2))] == null) {
//alert(Errors[4]);
return false;
}
//身份号码位数及格式检验
switch (idcard.length) {
case 15:
if ((parseInt(idcard.substr(6, 2)) + 1900) % 4 == 0 || ((parseInt(idcard.substr(6, 2)) + 1900) % 100 == 0 && (parseInt(idcard.substr(6, 2)) + 1900) % 4 == 0 )) {
ereg = /^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/;
//测试出生日期的合法性
} else {
ereg = /^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/;
//测试出生日期的合法性
}
if (ereg.test(idcard)) {
var csrq_o = document.getElementById(csrq);
var xb_o = document.getElementById(xb);
var jg_o = document.getElementById(jg);
var sfzhv = idcard.substr(0, 6) + "19" + idcard.substr(6);
sfzhv = sfzhv + getYZM(sfzhv);
if (sfzh != undefined && sfzh.length > 0) {
var sfzh_o = document.getElementById(sfzh);
sfzh_o.value = sfzhv;
}
//设置籍贯
if (jg_o != undefined) {
jg_o.value = area[parseInt(idcard.substr(0, 2))];
}
//出生日期
if (csrq_o != undefined) {
csrq_o.value = "19" + idcard.substr(6, 2) + "-" + idcard.substr(8, 2) + "-" + idcard.substr(10, 2);
}
//性别
if (xb_o != undefined) {
if (parseInt(idcard.substr(14, 1)) % 2 == 0) {
if (xb_o.tagName.toLowerCase() == "select") {
xb_o.selectedIndex = 2;
} else {
xb_o.value = "女"
}
//女
} else {
if (xb_o.tagName.toLowerCase() == "select") {
xb_o.selectedIndex = 1;
} else {
xb_o.value = "男"
}
//男
}
}
return true;
}
else {
//alert(Errors[2]);
return false;
}
break;
case 18:
//18位身份号码检测
//出生日期的合法性检查
//闰年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))
//平年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))
if (parseInt(idcard.substr(6, 4)) % 4 == 0 || (parseInt(idcard.substr(6, 4)) % 100 == 0 && parseInt(idcard.substr(6, 4)) % 4 == 0 )) {
ereg = /^[1-9][0-9]{5}[1-9][0-9]{3}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/;
//闰年出生日期的合法性正则表达式
} else {
ereg = /^[1-9][0-9]{5}[1-9][0-9]{3}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/;
//平年出生日期的合法性正则表达式
}
if (ereg.test(idcard)) {//测试出生日期的合法性
M = getYZM(idcard)
if (M == idcard_array[17]) {
var csrq_o = document.getElementById(csrq);
var xb_o = document.getElementById(xb);
var jg_o = document.getElementById(jg)
//设置籍贯
if (jg_o != undefined) {
jg_o.value = area[parseInt(idcard.substr(0, 2))];
}
//出生日期
if (csrq_o != undefined) {
csrq_o.value = idcard.substr(6, 4) + "-" + idcard.substr(10, 2) + "-" + idcard.substr(12, 2);
}
//性别
if (xb_o != undefined) {
if (parseInt(idcard.substr(16, 1)) % 2 == 0) {
if (xb_o.tagName.toLowerCase() == "select") {
xb_o.selectedIndex = 2;
} else {
xb_o.value = "女"
}
//女
} else {
if (xb_o.tagName.toLowerCase() == "select") {
xb_o.selectedIndex = 1;
} else {
xb_o.value = "男"
}
//男
}
}
return true;
//检测ID的校验位
}
else {
//alert(Errors[3]);
return false;
}
}
else {
//alert(Errors[2]);
return false
}
break;
default:
//alert(Errors[1]);
return false;
}
function getYZM(sfzh) {
//计算校验位
var sfzh_array = new Array();
sfzh_array = sfzh.split("");
S = (parseInt(sfzh_array[0]) + parseInt(sfzh_array[10])) * 7
+ (parseInt(sfzh_array[1]) + parseInt(sfzh_array[11])) * 9
+ (parseInt(sfzh_array[2]) + parseInt(sfzh_array[12])) * 10
+ (parseInt(sfzh_array[3]) + parseInt(sfzh_array[13])) * 5
+ (parseInt(sfzh_array[4]) + parseInt(sfzh_array[14])) * 8
+ (parseInt(sfzh_array[5]) + parseInt(sfzh_array[15])) * 4
+ (parseInt(sfzh_array[6]) + parseInt(sfzh_array[16])) * 2
+ parseInt(sfzh_array[7]) * 1
+ parseInt(sfzh_array[8]) * 6
+ parseInt(sfzh_array[9]) * 3;
Y = S % 11;
M = "F";
JYM = "10X98765432";
M = JYM.substr(Y, 1);
return M;
//判断校验位
}
};
Validator.IsDate = function(op, formatString){
formatString = formatString || "ymd";
var m, year, month, day;
switch(formatString){
case "ymd" :
m = op.match(new RegExp("^((\\d{4})|(\\d{2}))([-./])(\\d{1,2})\\4(\\d{1,2})$"));
if(m == null ) return false;
day = m[6];
month = m[5]*1;
year = (m[2].length == 4) ? m[2] : GetFullYear(parseInt(m[3], 10));
break;
case "dmy" :
m = op.match(new RegExp("^(\\d{1,2})([-./])(\\d{1,2})\\2((\\d{4})|(\\d{2}))$"));
if(m == null ) return false;
day = m[1];
month = m[3]*1;
year = (m[5].length == 4) ? m[5] : GetFullYear(parseInt(m[6], 10));
break;
default :
break;
}
if(!parseInt(month)) return false;
month = month==0 ?12:month;
var date = new Date(year, month-1, day);
return (typeof(date) == "object" && year == date.getFullYear() && month == (date.getMonth()+1) && day == date.getDate());
function GetFullYear(y){return ((y<30 ? "20" : "19") + y)|0;}
};
|
zzfls-pj
|
trunk/WebRoot/include/js/validator3/exvalidator.js
|
JavaScript
|
asf20
| 19,892
|
/**
* 封装jquery的ajax请求
*
*/
/*******************************************************************************
AjaxTools.ajax({
url:"select.do", //请求地址
method:"post", //请求方式post get [可选]默认post
async:true, //true 异步 false 同步 [可选]默认true
showMsg:true, //是否要进度提示 [可选]默认true
msg : "正在加载中....", //提示信息 [可选]
form:"form1", //需提交的表单id
params:{ //form表单外需提交的参数
"name":"11", //参数名 : 值
"SQLID":"selectModule"
},
callback:[callFun1,callFun2] //回调函数
});
******************************************************************************/
var AjaxTools = (function() {
var getParmValue = function(form, params) {
var str = "";
// 从指定form表单取值
if (form) {
str = getContent(document.getElementById(form));
}
// 组装额外指定的参数
if (params) {
for ( var key in params) {
if (str.length > 0)
str += "&";
str += key + "=" + params[key];
}
}
return str;
};
// 获取参数ajax对象参数
var getArgs = function(json) {
var async = true;
if (json.async != null)
async = json.async;
var showMsg = true;
if (json.showMsg != null)
showMsg = json.showMsg;
var o = {
url : json.url,
method : json.method ? json.method : "POST",
async : async,
showMsg : showMsg,
msg : json.msg ? json.msg : "数据处理中...",
form : json.form ? json.form : null,
params : json.params ? json.params : null,
callback : json.callback ? json.callback : []
};
return o;
};
// 获取form表单数据
var getContent = function(theform) {
var els = theform.elements;
var len = els.length;
var queryString = "";
this.addField = function(name, value) {
if (queryString.length > 0) {
queryString += "&";
}
queryString += name + "=" + value;
};
for ( var i = 0; i < len; i++) {
var el = els[i];
if (!el.disabled) {
switch (el.type) {
case "text":
case "password":
case "hidden":
case "textarea":
this.addField(el.name, el.value);
break;
case "select-one":
if (el.selectedIndex >= 0) {
this.addField(el.name,
el.options[el.selectedIndex].value);
}
break;
case "select-multiple":
for ( var j = 0; j < el.options.length; j++) {
if (el.options[j].selected) {
this.addField(el.name, el.options[j].value);
}
}
break;
case "checkbox":
case "radio":
if (el.checked) {
this.addField(el.name, el.value);
}
break;
}
}
}
return queryString.substring(0, queryString.length);
};
// 显示蒙层
var showLoadingMessage = function(msg) {
// 蒙层
var div = document.getElementById("JXW__loading_div");
if (div == null) {
div = document.createElement("DIV");
document.body.appendChild(div);
div.id = "JXW__loading_div";
div.style.position = "absolute";
div.style.top = "0px";
div.style.filter = "alpha(opacity=20)";
div.style.background = "#777";
div.style.zindex = "2";
div.style.left = "0px";
}
var width = document.body.clientWidth > document.body.scrollWidth?document.body.clientWidth:document.body.scrollWidth;
var height = document.body.clientHeight > document.body.scrollHeight?document.body.clientHeight:document.body.scrollHeight;
div.style.width = width;
div.style.height = height;
div.style.display = "";
// 进度提示
var divImg = document.getElementById("JXW__loading_div_IMG");
if (divImg == null) {
divImg = document.createElement("DIV");
document.body.appendChild(divImg);
divImg.id = "JXW__loading_div_IMG";
divImg.className = "ajaxLoading";
divImg.style.position = "absolute";
divImg.innerHTML = "<table border='0' cellpadding='0' cellspacing='0' style='width: 100%;'><tr><td style='height: 66px;'> </td></tr><tr><td style='color:red;text-align: center;'>"+msg+"</td></tr></table>";
}
divImg.style.top = document.body.clientHeight / 3;
divImg.style.left = document.body.clientWidth / 3;
divImg.style.display = "";
};
// 隐藏蒙层
var hideLoadingMessage = function() {
var div = document.getElementById("JXW__loading_div");
if (div != null)
div.style.display = "none";
var divImg = document.getElementById("JXW__loading_div_IMG");
if (divImg != null)
divImg.style.display = "none";
};
return {
/**
* 发送ajax请求
*
* @param xhrArgs
*/
ajax : function(xhrArgs) {
var args = getArgs(xhrArgs);
if (args.showMsg)
showLoadingMessage(args.msg);// 显示蒙层
var params = getParmValue(args.form, args.params);
var url = "";
if (args.method != null && args.method == "get"
|| args.method == "GET") {
url = args.url + "?" + params;
} else {
url = args.url;
}
$.ajax({
url : url,
async : args.async,
type : args.method,
dataType : "text",
context : args,// ajax请求的上下文
data : params,
error : function(XMLHttpRequest, textStatus, errorThrown) {// 当请求失败时调用的函数
// 调用本次AJAX请求时传递的options参数
alert('操作提示\n操作失败原因:' + textStatus + "\n" + errorThrown);
if (args.showMsg)
hideLoadingMessage();
},
success : function(data, textStatus) {// 当请求成功时调用的函数
// this指向Ajax相关回调函数的上下文context
if (this.callback) {
var rtnData = eval("(" + data + ")");
for ( var i = 0; i < this.callback.length; i++)
this.callback[i](rtnData);
}
if (this.showMsg)
hideLoadingMessage();
},
// 当请求完成时调用的函数
complete : function() {
}
});
}
};
})();
|
zzfls-pj
|
trunk/WebRoot/include/js/newAjax.js
|
JavaScript
|
asf20
| 5,944
|
/*
创建人:shaliheng
*/
var array_tab = new Array();
// 添加数组项
function Array_AddItem(item) {
for ( var i = 0; i < array_tab.length; i++) {
if (array_tab[i] == item)
return;
}
array_tab.push(item);
}
// 删除数组项
function Array_RemoveItem(item) {
var tmpArray = new Array();
for ( var i = 0; i < array_tab.length; i++) {
if (array_tab[i] != item) {
tmpArray.push(array_tab[i]);
}
}
array_tab = tmpArray;
}
// 判断是否在数组中存在
function indexOfArray(value, arr) {
if (!(typeof (value) == "string" || typeof (value) == "number"))
return false;
for ( var i in arr) {
if (arr[i] == value)
return true;
}
return false;
}
// 在框架右侧打开标签页
function openTabInRightFrame(url, label, tabid) {
for ( var i = 0; i < top.frames.length; i++) {
if (eval("top.frames[" + i + "].tabbar")) {
var obj = eval("top.frames[" + i + "].tabbar");
}
}
var countAll = obj.getTabCount();
if (label.length > 4) {
label = label.substring(0, 4) + "...";
}
if (countAll > 7) {
if (indexOfArray(tabid, array_tab)) {
obj.setTabActive(tabid);
} else {
alert('最多可打开七个窗口,请关闭其它窗口...');
}
} else {
if (indexOfArray(tabid, array_tab)) {
obj.setTabActive(tabid);
obj.setContentHref(tabid, url);
} else {
obj.addTab(tabid, label, "100px", "", 0);
obj.setTabActive(tabid);
obj.setContentHref(tabid, url);
}
}
Array_AddItem(tabid);
}
|
zzfls-pj
|
trunk/WebRoot/include/js/tabUtil.js
|
JavaScript
|
asf20
| 1,527
|
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2010-12-24
Time: 10:05:16
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:useBean id="excelUtil" class="net.tools.ExcelUtil">
</jsp:useBean>
<html>
<head><title></title></head>
<body>
<%
excelUtil.exportExcel(request,response);
out.clear();
out = pageContext.pushBody();
%>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/jsp/exportExcel.jsp
|
Java Server Pages
|
asf20
| 540
|
<%--
Created by IntelliJ IDEA.
User: jxw
Date: 12-2-24
Time: 下午4:18
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title></title>
</head>
<BODY text="#000000" vLink="#5493b4" link="#003fb7">
<table class="tableclass" cellspacing="1" border="0" width="100%" align="center">
<tr height="30">
<td class="tdclass" nowrap="nowrap"><font color="#FF0000"><b>错误提示</b></font></td>
</tr>
</table>
<br>
<table width="70%" border="0" align="center" cellpadding="2" cellspacing="1" class="bgDarker">
<tr height="25">
<td class="tdclass" disabled="false">・错误原因:页面超时</td>
</tr>
<tr height="25">
<td class="tdclass" disabled="false"> ・可能情况或解决办法:</td>
</tr>
<tr height="25">
<td class="tdclass" disabled="false">
1、长时间没有进行操作,出于安全考虑,需要您重新登录系统。<br>
2、没有登录系统,请返回首页登录。</td>
</tr>
</table>
</body>
</html>
|
zzfls-pj
|
trunk/WebRoot/include/jsp/overtime.jsp
|
Java Server Pages
|
asf20
| 1,185
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<fmt:requestEncoding value="utf-8" />
|
zzfls-pj
|
trunk/WebRoot/include/jsp/taglib.jsp
|
Java Server Pages
|
asf20
| 242
|
<%@include file="taglib.jsp"%>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link id="theme" type="text/css" rel="stylesheet" href="<c:url value="/include/css/default.css"/>"/>
<script type="text/javascript" >var contextPath="<%=request.getContextPath()%>";</script>
<script type="text/javascript" src="<c:url value="/include/js/commons.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/jquery-1.6.1.js" />"></script>
<script type="text/javascript" src="<c:url value="/include/js/newAjax.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/validator3/validator.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/validator3/exvalidator.js"/>"></script>
<script type="text/javascript" src="<c:url value="/include/js/My97DatePicker/WdatePicker.js"/>"></script>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
|
zzfls-pj
|
trunk/WebRoot/include/jsp/include.jsp
|
Java Server Pages
|
asf20
| 1,022
|
/*
* 创建人:shaliheng
* public 类
* 公用样式
*==================================
*/
body {
scrollbar-face-color: #d8e5ff;
scrollbar-shadow-color: #a6c1f7;
scrollbar-highlight-color: #d8e5ff;
scrollbar-3dlight-color: #a6c1f7;
scrollbar-darkshadow-color: #ffffff;
scrollbar-track-color: #f3f6ff;
scrollbar-arrow-color: #000000;
font-family: '宋体';
font-size: 12px;
margin:0px;
padding:0px;
height:100%;
}
a:link {
color: #000000;
text-decoration: none
}
a:visited {
color: #333;
text-decoration: none
}
a:hover {
color: #ff0000;
text-decoration: none
}
a:active {
color: #990000;
text-decoration: none
}
html {
overflow: hidden;
}
BODY, TH {
font-size: 12px;
line-height: 16px;
background: #fff;
}
TD {
font-size: 12px;
line-height: 18px;
}
li {
list-style-type: none;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
font-size: 12px;
font-weight: normal;
}
.hidden {
display: none;
}
/*
* BUTTON 按钮样式
*/
button {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:transparent url(../images/button/button_icon_sprite.png) no-repeat scroll -106px -90px;
border:0 none;
color:#003377;
cursor:pointer;
font-size:12px;
font-weight:bold;
height:26px;
line-height:16px;
margin:0 5px 0 0;
width:86px;
}
button.disable{
color: #999999;
cursor: default;
}
/*表单样式定义*/
FORM {
margin: 0px;
padding: 0px;
}
/*div块样式定义*/
DIV {
PADDING-RIGHT: 0px;
PADDING-LEFT: 0px;
PADDING-BOTTOM: 0px;
MARGIN: 0px auto;
PADDING-TOP: 0px;
}
/*图片样式定义*/
IMG {
BORDER-TOP-WIDTH: 0px;
BORDER-LEFT-WIDTH: 0px;
BORDER-BOTTOM-WIDTH: 0px;
BORDER-RIGHT-WIDTH: 0px
}
/**************************table 类**************************/
TABLE {
border-collapse: collapse;
}
/*定义表格的添加、查询、列表的显示样式*/
.table_add, .table_list, .table_search {
border-collapse: collapse;
width: 100%;
padding: 0;
margin: 0;
}
/*定义添加类型表格的单元显示样式*/
.table_add td {
border: #ccc 1px solid;
font-size: 12px;
padding: 2px 4px 2px 4px;
}
/*定义添加类型表格TD样式*/
.table_add .tdclass_view {
background: #f4f4f4;
}
.table_add .tdclass_edit {
background: #fff;
}
/*表头说明样式*/
.table_add caption {
background: #fff url( ../images/table/table_add.jpg );
background-repeat: no-repeat;
text-align: left;
padding-top: 6px;
padding-left: 17px;
}
/*表头说明样式*/
.table_list caption {
background: #fff url( ../images/table/table_list.jpg );
background-repeat: no-repeat;
text-align: left;
padding-top: 6px;
padding-left: 17px;
}
/*表头说明样式*/
.table_search caption {
background: #fff url( ../images/table/table_search.gif );
background-repeat: no-repeat;
text-align: left;
padding-top: 6px;
padding-left: 17px;
}
/*查询表格单元格样式*/
.table_search td {
border: 1px solid #ccc;
font-size: 12px;
padding: 0px 4px 0px 4px;
}
/*列表表格单元格样式*/
.table_list td {
border: 1px solid #ccc;
font-size: 12px;
padding: 0 4px 0px 4px;
margin: 0;
white-space: nowrap;
}
/*表格头或尾样式定义*/
.table_head, .table_bottom {
color: #000;
}
/*表格头部定义*/
.table_head td {
background: #e4e4e4 url( ../images/table/table_head.gif );
font-weight: 800;
text-align: center;
}
/*表格尾部定义*/
.table_bottom td {
background: #e4e4e4 url( ../images/table/table_bottom.gif );
text-align: right;
}
.pagination {
width: 100%;
text-align: right;
}
.even {
background-color: #E6E6FA;
}
.uneven {
background-color: #F0F8FF;
}
/**************************layout 类**************************/
#AddTitle, #EditTitle, #AddEditTitle, #SearchTitle, #ImportTitle {
background-repeat: no-repeat;
text-align: left;
height: 24px;
margin-left: 2px;
margin-top: 2px;
}
#AddTitle {
background: #fff url( ../images/table/table_add.jpg );
background-repeat: no-repeat;
}
#AddEditTitle {
background: #fff url( ../images/table/table_addedit.jpg );
background-repeat: no-repeat;
}
#EditTitle {
background: #fff url( ../images/table/table_edit.jpg );
background-repeat: no-repeat;
}
#SearchTitle {
background: #fff url( ../images/table/table_search.jpg );
background-repeat: no-repeat;
}
#ImportTitle {
background: #fff url( ../images/table/import_title.jpg );
background-repeat: no-repeat;
}
#ListTitle {
background: #fff url( ../images/table/table_list.jpg );
background-repeat: no-repeat;
text-align: left;
height: 24px;
margin-left: 2px;
margin-top: 2px;
}
.AddAreaDiv {
overflow: hidden;
width: 100%;
word-wrap: break-word;
border: #f00 0 solid;
padding-top: 0px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
}
.EditAreaDiv {
overflow: hidden;
width: 100%;
word-wrap: break-word;
border: #f00 0 solid;
padding-top: 0px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
}
.AddEditAreaDiv {
overflow: hidden;
width: 100%;
word-wrap: break-word;
border: #f00 0 solid;
padding-top: 0px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
}
.SearchAreaDiv {
width: 100%;
word-wrap: break-word;
border: #f00 0 solid;
padding-top: 0px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
}
.ListAreaDiv, .ListAreaDiv_scroll {
overflow: hidden;
width: 100%;
height: 100%;
word-wrap: break-word;
border: #f00 0 solid;
/*padding-top: 0px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;*/
}
.ListAreaDiv_scroll {
overflow-y: auto;
overflow-x: auto;
}
#gridbox {
width: 100%;
height: 100%;
background-color: white;
overflow: hidden;
}
.securityAdd {
padding-top: 0px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
text-align: center;
margin-left: 2px;
margin-top: 2px;
background: #f4f4f4 url( ../images/button/security_bg.jpg );
}
.securityList,.SecurityAreaDiv {
+ padding-top : 0 px;
+ padding-right : 2 px;
+ padding-left : 2 px;
+ padding-bottom : 2 px;
text-align: center;
+ margin-left : 2 px;
+ margin-top : 2 px; /* background: #f4f4f4 url( ../images/button/security_bg.jpg );*/
height: 27px;
}
/**************************forme 类**************************/
.input_button {
/*font-size: 12px;*/
/*height: 22px;*/
/*width: 48px;*/
/*background: url( ../images/button/input_bg.gif ) 0 0 no-repeat;*/
/*border: 0; +*/
/*padding: 3 px 0 px 0 px 0 px;*/
height: 22px;
margin: 0px 1px 0px 1px;
BORDER: #BACEEB 1px solid;
PADDING: 3px 4px 2px 4px;
CURSOR: pointer;
COLOR: black;
background: url( ../images/button/input_bg.gif );
}
.input_btn_2,.input_btn_4,.input_btn_6{
height:24px;
text-align:center;
font-weight: normal;
letter-spacing:3px;
}
.input_btn_2 {
width:60px;
background: url( ../images/button/input_bg_2.jpg);
}
.input_btn_4 {
width:82px;
background: url( ../images/button/input_bg_4.jpg);
}
.input_btn_6 {
width:95px;
background: url( ../images/button/input_bg_6.jpg);
}
.input_text, .input_text_auto {
font-family: tahoma, arial, helvetica, sans-serif;
border: #e1e1e1 1px solid;
padding: 2px 2px 0px 2px;
margin-bottom: 2px;
font-size-adjust: none;
font-stretch: normal;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: normal;
height: 22px;
background: url( ../images/button/input_text_bg.gif);
font-size: 12px;
vertical-align: middle;
}
.input_text_auto {
width: 100%;
}
.input_select {
font-size: 12px;
border: #e1e1e1 1px solid;
height: 23px;
background: url( ../images/button/input_text_bg.gif);
}
.input_select_out {
float: left;
border: 1px solid #ccc;
width: 100px;
height: 22px;
background: #f4f4f4;
clip: rect( 0px, 179px, 16px, 0px );
overflow: hidden;
}
.input_select {
position: relative;
left: -2px;
top: -2px;
color: #000;
font-size: 12px;
background: #f4f4f4; /*控制select的背景颜色*/
width: 100; /*控制option的显示长度*/
line-height: 14px;
}
/**************************下拉树所用样式****************************/
#swjg_tree,.swjg_tree table {
padding: 0px;
margin: 0px;
border: 0px;
font-size: 12px;
}
#swjg_tree,.swjg_tree table tr {
padding: 0px;
margin: 0px;
font-size: 12px;
}
#swjg_tree,.swjg_tree table td {
padding: 0px;
margin: 0px;
font-size: 12px;
line-height: 18px;
border: 0px;
}
#show_swjgtree,.show_swjgtree table {
padding: 0px;
margin: 0px;
border: 0px;
font-size: 12px;
}
#show_swjgtree,.show_swjgtree table td {
font-size: 12px;
border: 0px;
padding: 0px;
line-height: 18px;
border: 0px;
}
.tiperror {
background: #FDF7D2 url(../js/validator/invalid_line.gif) repeat-x bottom;
border: 1px solid #dd7870;
}
.requideerror {
background: #FDF7D2;
border: 1px solid #999999;
}
.wdatetiperror{
border:#dd7870 1px solid;
height:22px;
background:#FDF7D2 url(../js/validator/datePickervalid.gif) no-repeat right;
}
.wdaterequideerror{
border:#999 1px solid;
height:22px;
background:#FDF7D2 url(../js/datepicker/skin/datePicker.gif) no-repeat right;
}
|
zzfls-pj
|
trunk/WebRoot/include/css/default2.css
|
CSS
|
asf20
| 10,128
|
/*=====公用样式====*/
body {
scrollbar-face-color: #e4e4e4;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #f4f4f4;
scrollbar-3dlight-color: #e4e4e4;
scrollbar-arrow-color: #666666;
scrollbar-track-color: #f4f4f4;
scrollbar-darkshadow-color: #f4f4f4;
MARGIN-RIGHT: auto;
MARGIN-LEFT: auto;
margin: 0px;
padding: 0px;
font-family: '宋体', 'lucida grande', 'lucida sans unicode', '新宋体', arial, verdana, sans-serif;
font-size: 12px; /*FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType='0',startColorstr='#ffffff',endColorstr='#f9f9f9');*/
}
body, th {
font-size: 12px;
line-height: 16px;
}
td {
font-size: 12px;
line-height: 18px;
}
form {
margin: 0px;
padding: 0px;
}
a:link {
color: #000000;
text-decoration: none
}
a:visited {
color: #333;
text-decoration: none
}
a:hover {
color: #ff0000; /*background:#ccc;*/
text-decoration: none /*text-decoration: underline*/
}
a:active {
color: #990000;
text-decoration: none
}
DIV {
PADDING-RIGHT: 0px;
PADDING-LEFT: 0px;
PADDING-BOTTOM: 0px;
MARGIN: 0px auto;
PADDING-TOP: 0px;
}
IMG {
BORDER-TOP-WIDTH: 0px;
BORDER-LEFT-WIDTH: 0px;
BORDER-BOTTOM-WIDTH: 0px;
BORDER-RIGHT-WIDTH: 0px
}
/*=========表格样式=================*/
.table_add, .table_list, .table_search {
border-collapse: collapse;
width: 100%;
border: 1px #ccc solid;
border-bottom-style: none;
border-right-style: none;
font: 12px / 160% '宋体';
padding: 0;
margin: 0;
}
/*.table_add,.table_list,.table_search {*/
/*border-collapse: collapse;*/
/*width: 100%;*/
/*border: 1px #ccc solid;*/
/*border-bottom-style: none;*/
/*border-right-style: none;*/
/*font: 12px/ 160% '宋体';*/
/*padding: 0;*/
/*margin: 0;*/
/*}*/
.table_list caption {
background: #fff url( ../../include/images/datelist.jpg );
background-repeat: no-repeat;
text-align: left;
padding-top: 6px;
padding-left: 17px;
}
;
.table_add caption {
background: #fff url( ../../include/images/adddel.jpg );
background-repeat: no-repeat;
text-align: left;
padding-top: 6px;
padding-left: 17px;
}
;
.table_search caption {
background: #fff url( ../../include/images/query.jpg );
background-repeat: no-repeat;
text-align: left;
padding-top: 6px;
padding-left: 17px;
}
;
.table_add td {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
font-size: 12px;
line-height: 200%;
padding: 0px 4px 0px 4px;
margin: 0;
/*text-align: expression(( this . cellIndex% 2 = = 0 ) ? "right": "left" );*/
/*background-color: expression(( this . cellIndex% 2 = = 0 ) ? "#f4f4f4": "#ffffff" )*/
}
.table_search td {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
font-size: 12px;
line-height: 200%;
padding: 0px 4px 0px 4px;
margin: 0;
/*text-align: expression(( this . cellIndex% 2 = = 0 ) ? "right": "left" );*/
/*background-color: expression(( this . cellIndex% 2 = = 0 ) ? "#f4f4f4": "#ffffff" )*/
}
.table_search div td {
border-style: none;
text-align: left;
background-color: #fff;
padding: 0px 0px 0px 0px;
line-height: 100%
}
.table_list tr {
/*background-color: expression((this.sectionRowIndex%2==0)?"#ff000":"#ffffff"); */
background-color: expression( '#ffffff,#EFEFEF' . split( ',' ) [ rowIndex% 2 ] );
}
.table_list td {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
font-size: 12px;
line-height: 200%;
padding: 0px 4px 0px 4px;
margin: 0;
white-space: nowrap;
}
.table_result_header {
cursor: hand;
}
/*
.table_list tr{star:expression(onmouseover=function(){this.tmpClass=(this.style.backgroundColor);this.style.backgroundColor ="#f3f3f3";},onmouseout=function(){this.style.backgroundColor=this.tmpClass;})}
*/
.table_title, .table_bottom {
color: #000;
}
.table_title td {
background-color: #e4e4e4;
font-weight: 800;
line-height: 200%;
text-align: center;
FILTER: progid: DXImageTransform . Microsoft . Gradient( GradientType = 0, StartColorStr = #ffffff, EndColorStr = #e4e4e4 );
}
.table_bottom td {
background-color: #e4e4e4;
font-weight: 800;
line-height: 200%;
text-align: right;
FILTER: progid: DXImageTransform . Microsoft . Gradient( GradientType = 0, StartColorStr = #ffffff, EndColorStr = #e4e4e4 );
}
/*==========表单样式================*/
.input {
FONT-FAMILY: "Arial", "Helvetica", "sans-serif";
height: 20px;
FONT-SIZE: 12px;
border: 1px #e4e4e4 solid; /*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})*/
}
/*必填文本框*/
.input_bt {
FONT-FAMILY: "Arial", "Helvetica", "sans-serif";
height: 20px;
FONT-SIZE: 12px;
border: #FDEFC6 1px solid;
color: #0000FF;
background: #FFFFEE; /*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})*/
}
.button {
margin: 0px 1px 0px 1px;
BORDER-RIGHT: #666 1px solid;
PADDING-RIGHT: 2px;
BORDER-TOP: #666 1px solid;
PADDING-LEFT: 2px;
FONT-SIZE: 12px;
BORDER-LEFT: #666 1px solid;
CURSOR: hand;
COLOR: black;
PADDING-TOP: 2px;
BORDER-BOTTOM: #666 1px solid;
FILTER: progid: DXImageTransform . Microsoft . Gradient( GradientType = 0, StartColorStr = #ffffff, EndColorStr = #D9D9D9 );
}
.pagination input {
display: inline-block;
text-align: left;
width: 30px;
height: 19px;
border: 1px solid #ccc;
/*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})
*/
}
.input_mln82 {
display: inline-block;
text-align: left;
width: 100%;
height: 19px;
border: 0px solid #ccc;
background: #F8F8F8;
/*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})
*/
}
.tdinput01 {
width: 100%;
border: 0px;
height: 20px;
text-align: right; /*background: #c7d8fa;*/
}
.tdinput011 {
width: 100%;
border: 0px;
height: 20px;
text-align: right;
background: #ffffff;
}
.input09 {
display: inline-block;
text-align: left;
width: 50%;
height: 19px;
border-top-style: none;
border-left-style: none;
border-right-style: none;
border-bottom: #ccc 1px solid;
/*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})
*/
}
.input10 {
display: inline-block;
text-align: left;
height: 19px;
border-top-style: none;
border-left-style: none;
border-right-style: none;
border-bottom: #ccc 1px solid;
/*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})
*/
}
.input_mln01 {
display: inline-block;
text-align: left;
width: 100%;
height: 19px;
border: 0px solid #ccc;
background: #EFEFEF;
/*star:expression(onmouseover=function(){this.style.backgroundColor="#f4f4f4"},onmouseout=function(){this.style.backgroundColor="#FFFFFF"})
*/
}
.pagination table {
border-collapse: collapse;
width: 100%;
border: 1px #ccc solid;
border-bottom-style: none;
border-right-style: none;
font: 12px / 160% '宋体';
padding: 0;
margin: 0;
}
.pagination tr {
table-layout: fixed;
}
.pagination td {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
font-size: 12px;
line-height: 200%;
padding: 0px 4px 0px 4px;
margin: 0;
word-break: break-all;
}
.conditionAreaDiv {
overflow: no;
height: 25px;
word-wrap: break-word;
border: #ccc 0px solid;
padding: 0px;
margin-top: 3px;
}
.editAreaDiv {
width: 100%; /*height: 400px;*/
overflow-y: auto;
overflow-x: auto;
word-wrap: break-word;
border: #f00 0px solid;
margin-top: 3px;
}
.editAreaDiv2 {
width: 100%;
height: 85%;
overflow-y: auto;
overflow-x: auto;
word-wrap: break-word;
border: #f00 0px solid;
margin-top: 3px;
}
.editAreaDiv3 {
width: 100%;
height: 75%;
overflow-y: auto;
overflow-x: auto;
word-wrap: break-word;
border: #f00 0px solid;
margin-top: 3px;
}
.helpeditAreaDiv {
width: 100%;
height: 90%;
overflow-y: auto;
overflow-x: auto;
word-wrap: break-word;
border: #f00 0px solid;
margin-top: 3px;
}
.security {
width: 100%;
height: 25px;
text-align: center;
padding: 1px;
border-bottom: #e4e4e4 1px solid;
background: #f4f4f4;
}
/*日期输入*/
.dateTimePicker {
BEHAVIOR: url( ../../include/css/Calendar.htc );
width: 80px;
display: inline-block;
text-align: left;
height: 19px;
border-top-style: none;
border-left-style: none;
border-right-style: none;
border-bottom: #ccc 1px solid;
}
.security span {
float: left;
}
.security #securityDiv {
float: right;
vertical-align: middle;
padding-top: 3px;
padding-right: 5px;
font-weight: 800;
}
.dragAble {
position: relative;
cursor: move;
}
/*table列表样式*/
table {
width: 100%;
}
tr.odd {
background: #fff;
}
tr.even {
background: #eee;
}
/*****************grid样式2*******************/
table.datagrid2 {
border-collapse: collapse;
}
table.datagrid2 th {
text-align: center;
background: #9cf;
padding: 3px;
border: 1px #1baae6 solid;
}
.TableCellIndex{
text-align: center;
background: #9cf;
padding: 3px;
border: 1px #1baae6 solid;
}
table.datagrid2 td {
padding: 3px;
border: none;
border: 1px #1baae6 solid;
}
tr.tableRow {
background: #fff;
}
tr.tableRowOver {
background: #9cf;
}
tr.tableRowSelected {
background: #c6f8ff;
}
tr:hover,
tr.hover {
background: #9cf;
}
/*==============验证组件样式======================= */
.tiperror {
background: #FDF7D2 url(../js/validator3/invalid_line.gif) repeat-x bottom;
border: 1px solid #dd7870;
}
.requideerror {
background: #FDF7D2;
border: 1px solid #999999;
}
.pt {
color:#FF3300;
font-size:12px;
margin-right:5px
}
/*===================================================*/
.ajaxLoading {
position:absolute;
background: url(../images/ajax3.gif) no-repeat;
width:110px;
}
|
zzfls-pj
|
trunk/WebRoot/include/css/default.css
|
CSS
|
asf20
| 11,133
|
#-------------------------------------------------
#
# Project created by QtCreator 2014-04-12T15:02:53
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = zzl-qt
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
|
zzl-qt-version
|
trunk/zzl-qt/zzl-qt.pro
|
QMake
|
gpl3
| 379
|
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
|
zzl-qt-version
|
trunk/zzl-qt/main.cpp
|
C++
|
gpl3
| 183
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPushButton>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
QPushButton button;
};
#endif // MAINWINDOW_H
|
zzl-qt-version
|
trunk/zzl-qt/mainwindow.h
|
C++
|
gpl3
| 362
|
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
|
zzl-qt-version
|
trunk/zzl-qt/mainwindow.cpp
|
C++
|
gpl3
| 233
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor:
* Ruediger Jungbeck <ruediger.jungbeck@rsj.de>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <comdef.h>
#include "ffactivex.h"
#include "scriptable.h"
#include "axhost.h"
#ifdef NO_REGISTRY_AUTHORIZE
static const char *WellKnownProgIds[] = {
NULL
};
static const char *WellKnownClsIds[] = {
NULL
};
#endif
static const bool AcceptOnlyWellKnown = false;
static const bool TrustWellKnown = true;
static bool
isWellKnownProgId(const char *progid)
{
#ifdef NO_REGISTRY_AUTHORIZE
unsigned int i = 0;
if (!progid) {
return false;
}
while (WellKnownProgIds[i]) {
if (!strnicmp(WellKnownProgIds[i], progid, strlen(WellKnownProgIds[i])))
return true;
++i;
}
return false;
#else
return true;
#endif
}
static bool
isWellKnownClsId(const char *clsid)
{
#ifdef NO_REGISTRY_AUTHORIZE
unsigned int i = 0;
if (!clsid) {
return false;
}
while (WellKnownClsIds[i]) {
if (!strnicmp(WellKnownClsIds[i], clsid, strlen(WellKnownClsIds[i])))
return true;
++i;
}
return false;
#else
return true;
#endif
}
static LRESULT CALLBACK AxHostWinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
LRESULT result;
CAxHost *host = (CAxHost *)GetWindowLong(hWnd, GWL_USERDATA);
if (!host) {
return DefWindowProc(hWnd, msg, wParam, lParam);
}
switch (msg)
{
case WM_SETFOCUS:
case WM_KILLFOCUS:
case WM_SIZE:
if (host->Site) {
host->Site->OnDefWindowMessage(msg, wParam, lParam, &result);
return result;
}
else {
return DefWindowProc(hWnd, msg, wParam, lParam);
}
// Window being destroyed
case WM_DESTROY:
break;
default:
return DefWindowProc(hWnd, msg, wParam, lParam);
}
return true;
}
CAxHost::~CAxHost()
{
log(instance, 0, "AxHost.~AXHost: destroying the control...");
if (Window){
if (OldProc)
::SetWindowLong(Window, GWL_WNDPROC, (LONG)OldProc);
::SetWindowLong(Window, GWL_USERDATA, (LONG)NULL);
}
if (Sink) {
Sink->UnsubscribeFromEvents();
Sink->Release();
}
if (Site) {
Site->Detach();
Site->Release();
}
CoFreeUnusedLibraries();
}
CAxHost::CAxHost(NPP inst):
instance(inst),
ClsID(CLSID_NULL),
isValidClsID(false),
Sink(NULL),
Site(NULL),
Window(NULL),
OldProc(NULL),
Props(),
isKnown(false),
CodeBaseUrl(NULL)
{
}
void
CAxHost::setWindow(HWND win)
{
if (win != Window) {
if (win) {
// subclass window so we can intercept window messages and
// do our drawing to it
OldProc = (WNDPROC)::SetWindowLong(win, GWL_WNDPROC, (LONG)AxHostWinProc);
// associate window with our CAxHost object so we can access
// it in the window procedure
::SetWindowLong(win, GWL_USERDATA, (LONG)this);
}
else {
if (OldProc)
::SetWindowLong(Window, GWL_WNDPROC, (LONG)OldProc);
::SetWindowLong(Window, GWL_USERDATA, (LONG)NULL);
}
Window = win;
}
}
HWND
CAxHost::getWinfow()
{
return Window;
}
void
CAxHost::UpdateRect(RECT rcPos)
{
HRESULT hr = -1;
if (Site && Window) {
if (Site->GetParentWindow() == NULL) {
hr = Site->Attach(Window, rcPos, NULL);
if (FAILED(hr)) {
log(instance, 0, "AxHost.UpdateRect: failed to attach control");
}
}
else {
Site->SetPosition(rcPos);
}
// Ensure clipping on parent to keep child controls happy
::SetWindowLong(Window, GWL_STYLE, ::GetWindowLong(Window, GWL_STYLE) | WS_CLIPCHILDREN);
}
}
bool
CAxHost::verifyClsID(LPOLESTR oleClsID)
{
CRegKey keyExplorer;
if (ERROR_SUCCESS == keyExplorer.Open(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Internet Explorer\\ActiveX Compatibility"),
KEY_READ)) {
CRegKey keyCLSID;
if (ERROR_SUCCESS == keyCLSID.Open(keyExplorer, W2T(oleClsID), KEY_READ)) {
DWORD dwType = REG_DWORD;
DWORD dwFlags = 0;
DWORD dwBufSize = sizeof(dwFlags);
if (ERROR_SUCCESS == ::RegQueryValueEx(keyCLSID,
_T("Compatibility Flags"),
NULL,
&dwType,
(LPBYTE)
&dwFlags,
&dwBufSize)) {
// Flags for this reg key
const DWORD kKillBit = 0x00000400;
if (dwFlags & kKillBit) {
log(instance, 0, "AxHost.verifyClsID: the control is marked as unsafe by IE kill bits");
return false;
}
}
}
}
log(instance, 1, "AxHost.verifyClsID: verified successfully");
return true;
}
bool
CAxHost::setClsID(const char *clsid)
{
HRESULT hr = -1;
USES_CONVERSION;
LPOLESTR oleClsID = A2OLE(clsid);
if (isWellKnownClsId(clsid)) {
isKnown = true;
}
else if (AcceptOnlyWellKnown) {
log(instance, 0, "AxHost.setClsID: the requested CLSID is not on the Well Known list");
return false;
}
// Check the Internet Explorer list of vulnerable controls
if (oleClsID && verifyClsID(oleClsID)) {
hr = CLSIDFromString(oleClsID, &ClsID);
if (SUCCEEDED(hr) && !::IsEqualCLSID(ClsID, CLSID_NULL)) {
isValidClsID = true;
log(instance, 1, "AxHost.setClsID: CLSID %s set", clsid);
return true;
}
}
log(instance, 0, "AxHost.setClsID: failed to set the requested clsid");
return false;
}
void CAxHost::setCodeBaseUrl(LPCWSTR codeBaseUrl)
{
CodeBaseUrl = codeBaseUrl;
}
bool
CAxHost::setClsIDFromProgID(const char *progid)
{
HRESULT hr = -1;
CLSID clsid = CLSID_NULL;
USES_CONVERSION;
LPOLESTR oleClsID = NULL;
LPOLESTR oleProgID = A2OLE(progid);
if (AcceptOnlyWellKnown) {
if (isWellKnownProgId(progid)) {
isKnown = true;
}
else {
log(instance, 0, "AxHost.setClsIDFromProgID: the requested PROGID is not on the Well Known list");
return false;
}
}
hr = CLSIDFromProgID(oleProgID, &clsid);
if (FAILED(hr)) {
log(instance, 0, "AxHost.setClsIDFromProgID: could not resolve PROGID");
return false;
}
hr = StringFromCLSID(clsid, &oleClsID);
// Check the Internet Explorer list of vulnerable controls
if ( SUCCEEDED(hr)
&& oleClsID
&& verifyClsID(oleClsID)) {
ClsID = clsid;
if (!::IsEqualCLSID(ClsID, CLSID_NULL)) {
isValidClsID = true;
log(instance, 1, "AxHost.setClsIDFromProgID: PROGID %s resolved and set", progid);
return true;
}
}
log(instance, 0, "AxHost.setClsIDFromProgID: failed to set the resolved CLSID");
return false;
}
bool
CAxHost::hasValidClsID()
{
return isValidClsID;
}
bool
CAxHost::CreateControl(bool subscribeToEvents)
{
if (!isValidClsID) {
log(instance, 0, "AxHost.CreateControl: current location is not trusted");
return false;
}
// Create the control site
CControlSiteInstance::CreateInstance(&Site);
if (Site == NULL) {
log(instance, 0, "AxHost.CreateControl: CreateInstance failed");
return false;
}
Site->m_bSupportWindowlessActivation = false;
if (TrustWellKnown && isKnown) {
Site->SetSecurityPolicy(NULL);
Site->m_bSafeForScriptingObjectsOnly = false;
}
else {
Site->m_bSafeForScriptingObjectsOnly = true;
}
Site->AddRef();
// Create the object
HRESULT hr;
hr = Site->Create(ClsID, Props, CodeBaseUrl);
if (FAILED(hr)) {
LPSTR lpMsgBuf;
DWORD dw = GetLastError();
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR) &lpMsgBuf,
0,
NULL );
log(instance, 0, lpMsgBuf);
log(instance, 0, "AxHost.CreateControl: failed to create site");
return false;
}
IUnknown *control = NULL;
Site->GetControlUnknown(&control);
if (!control) {
log(instance, 0, "AxHost.CreateControl: failed to create control (was it just downloaded?)");
return false;
}
// Create the event sink
CControlEventSinkInstance::CreateInstance(&Sink);
Sink->AddRef();
Sink->instance = instance;
hr = Sink->SubscribeToEvents(control);
control->Release();
if (FAILED(hr) && subscribeToEvents) {
LPSTR lpMsgBuf;
DWORD dw = GetLastError();
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR) &lpMsgBuf,
0,
NULL );
log(instance, 0, lpMsgBuf);
log(instance, 0, "AxHost.CreateControl: SubscribeToEvents failed");
return false;
}
log(instance, 1, "AxHost.CreateControl: control created successfully");
return true;
}
bool
CAxHost::AddEventHandler(wchar_t *name, wchar_t *handler)
{
HRESULT hr;
DISPID id = 0;
USES_CONVERSION;
LPOLESTR oleName = name;
if (!Sink) {
log(instance, 0, "AxHost.AddEventHandler: no valid sink");
return false;
}
hr = Sink->m_spEventSinkTypeInfo->GetIDsOfNames(&oleName, 1, &id);
if (FAILED(hr)) {
log(instance, 0, "AxHost.AddEventHandler: GetIDsOfNames failed to resolve event name");
return false;
}
Sink->events[id] = handler;
log(instance, 1, "AxHost.AddEventHandler: handler %S set for event %S", handler, name);
return true;
}
int16
CAxHost::HandleEvent(void *event)
{
NPEvent *npEvent = (NPEvent *)event;
LRESULT result = 0;
if (!npEvent) {
return 0;
}
// forward all events to the hosted control
return (int16)Site->OnDefWindowMessage(npEvent->event, npEvent->wParam, npEvent->lParam, &result);
}
NPObject *
CAxHost::GetScriptableObject()
{
IUnknown *unk;
NPObject *obj = NPNFuncs.createobject(instance, &ScriptableNPClass);
Site->GetControlUnknown(&unk);
((Scriptable *)obj)->setControl(unk);
((Scriptable *)obj)->setInstance(instance);
return obj;
}
|
zzhongster-activex
|
ff-activex-host/ffactivex/axhost.cpp
|
C++
|
lgpl
| 11,705
|
// stdafx.cpp : source file that includes just the standard includes
// ffactivex.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
zzhongster-activex
|
ff-activex-host/ffactivex/stdafx.cpp
|
C++
|
lgpl
| 296
|
#pragma once
// The following macros define the minimum required platform. The minimum required platform
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
// your application. The macros work by enabling all features available on platform versions up to and
// including the version specified.
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif
|
zzhongster-activex
|
ff-activex-host/ffactivex/targetver.h
|
C
|
lgpl
| 1,428
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#pragma once
#include <atlbase.h>
#include <comdef.h>
#include <npapi.h>
#include <npfunctions.h>
#include <npruntime.h>
#include "variants.h"
extern NPNetscapeFuncs NPNFuncs;
extern NPClass ScriptableNPClass;
class Scriptable: public NPObject
{
private:
Scriptable(const Scriptable &);
// This method iterates all members of the current interface, looking for the member with the
// id of member_id. If not found within this interface, it will iterate all base interfaces
// recursively, until a match is found, or all the hierarchy was searched.
bool find_member(ITypeInfoPtr info, TYPEATTR *attr, DISPID member_id, unsigned int invKind) {
bool found = false;
unsigned int i = 0;
FUNCDESC *fDesc;
for (i = 0;
(i < attr->cFuncs)
&& !found;
++i) {
HRESULT hr = info->GetFuncDesc(i, &fDesc);
if ( SUCCEEDED(hr)
&& fDesc
&& (fDesc->memid == member_id)) {
if (invKind & fDesc->invkind)
found = true;
}
info->ReleaseFuncDesc(fDesc);
}
if (!found && (invKind & ~INVOKE_FUNC)) {
VARDESC *vDesc;
for (i = 0;
(i < attr->cVars)
&& !found;
++i) {
HRESULT hr = info->GetVarDesc(i, &vDesc);
if ( SUCCEEDED(hr)
&& vDesc
&& (vDesc->memid == member_id)) {
found = true;
}
info->ReleaseVarDesc(vDesc);
}
}
if (!found) {
// iterate inherited interfaces
HREFTYPE refType = NULL;
for (i = 0; (i < attr->cImplTypes) && !found; ++i) {
ITypeInfoPtr baseInfo;
TYPEATTR *baseAttr;
if (FAILED(info->GetRefTypeOfImplType(0, &refType))) {
continue;
}
if (FAILED(info->GetRefTypeInfo(refType, &baseInfo))) {
continue;
}
if (FAILED(baseInfo->GetTypeAttr(&baseAttr))) {
continue;
}
found = find_member(baseInfo, baseAttr, member_id, invKind);
baseInfo->ReleaseTypeAttr(baseAttr);
}
}
return found;
}
DISPID ResolveName(NPIdentifier name, unsigned int invKind) {
bool found = false;
DISPID dID = -1;
USES_CONVERSION;
if (!name || !invKind) {
return -1;
}
if (!NPNFuncs.identifierisstring(name)) {
return -1;
}
NPUTF8 *npname = NPNFuncs.utf8fromidentifier(name);
LPOLESTR oleName = A2W(npname);
IDispatchPtr disp = control.GetInterfacePtr();
if (!disp) {
return -1;
}
disp->GetIDsOfNames(IID_NULL, &oleName, 1, LOCALE_SYSTEM_DEFAULT, &dID);
if (dID != -1) {
ITypeInfoPtr info;
disp->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &info);
if (!info) {
return -1;
}
TYPEATTR *attr;
if (FAILED(info->GetTypeAttr(&attr))) {
return -1;
}
found = find_member(info, attr, dID, invKind);
info->ReleaseTypeAttr(attr);
}
return found ? dID : -1;
}
bool InvokeControl(DISPID id, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult) {
IDispatchPtr disp = control.GetInterfacePtr();
if (!disp) {
return false;
}
HRESULT hr = disp->Invoke(id, IID_NULL, LOCALE_SYSTEM_DEFAULT, wFlags, pDispParams, pVarResult, NULL, NULL);
return (SUCCEEDED(hr)) ? true : false;
}
IUnknownPtr control;
NPP instance;
bool invalid;
public:
Scriptable():
invalid(false),
control(NULL),
instance(NULL) {
}
~Scriptable() {control->Release();}
void setControl(IUnknown *unk) {control = unk;}
void setControl(IDispatch *disp) {disp->QueryInterface(IID_IUnknown, (void **)&control);}
void setInstance(NPP inst) {instance = inst;}
void Invalidate() {invalid = true;}
static bool _HasMethod(NPObject *npobj, NPIdentifier name) {
return ((Scriptable *)npobj)->HasMethod(name);
}
static bool _Invoke(NPObject *npobj, NPIdentifier name,
const NPVariant *args, uint32_t argCount,
NPVariant *result) {
return ((Scriptable *)npobj)->Invoke(name, args, argCount, result);
}
static bool _HasProperty(NPObject *npobj, NPIdentifier name) {
return ((Scriptable *)npobj)->HasProperty(name);
}
static bool _GetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result) {
return ((Scriptable *)npobj)->GetProperty(name, result);
}
static bool _SetProperty(NPObject *npobj, NPIdentifier name, const NPVariant *value) {
return ((Scriptable *)npobj)->SetProperty(name, value);
}
bool HasMethod(NPIdentifier name) {
if (invalid) return false;
DISPID id = ResolveName(name, INVOKE_FUNC);
return (id != -1) ? true : false;
}
bool Invoke(NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) {
if (invalid) return false;
DISPID id = ResolveName(name, INVOKE_FUNC);
if (-1 == id) {
return false;
}
VARIANT *vArgs = NULL;
if (argCount) {
vArgs = new VARIANT[argCount];
if (!vArgs) {
return false;
}
for (unsigned int i = 0; i < argCount; ++i) {
// copy the arguments in reverse order
NPVar2Variant(&args[i], &vArgs[argCount - i - 1], instance);
}
}
DISPPARAMS params = {NULL, NULL, 0, 0};
params.cArgs = argCount;
params.cNamedArgs = 0;
params.rgdispidNamedArgs = NULL;
params.rgvarg = vArgs;
VARIANT vResult;
bool rc = InvokeControl(id, DISPATCH_METHOD, ¶ms, &vResult);
if (vArgs) delete[] vArgs;
if (!rc) {
return false;
}
Variant2NPVar(&vResult, result, instance);
return true;
}
bool HasProperty(NPIdentifier name) {
if (invalid) return false;
DISPID id = ResolveName(name, INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT);
return (id != -1) ? true : false;
}
bool GetProperty(NPIdentifier name, NPVariant *result) {
if (invalid) return false;
DISPID id = ResolveName(name, INVOKE_PROPERTYGET);
if (-1 == id) {
return false;
}
DISPPARAMS params;
params.cArgs = 0;
params.cNamedArgs = 0;
params.rgdispidNamedArgs = NULL;
params.rgvarg = NULL;
VARIANT vResult;
if (!InvokeControl(id, DISPATCH_PROPERTYGET, ¶ms, &vResult)) {
return false;
}
Variant2NPVar(&vResult, result, instance);
return true;
}
bool SetProperty(NPIdentifier name, const NPVariant *value) {
if (invalid) return false;
DISPID id = ResolveName(name, INVOKE_PROPERTYPUT);
if (-1 == id) {
return false;
}
VARIANT val;
NPVar2Variant(value, &val, instance);
DISPPARAMS params;
// Special initialization needed when using propery put.
DISPID dispidNamed = DISPID_PROPERTYPUT;
params.cNamedArgs = 1;
params.rgdispidNamedArgs = &dispidNamed;
params.cArgs = 1;
params.rgvarg = &val;
VARIANT vResult;
if (!InvokeControl(id, DISPATCH_PROPERTYPUT, ¶ms, &vResult)) {
return false;
}
return true;
}
};
|
zzhongster-activex
|
ff-activex-host/ffactivex/scriptable.h
|
C++
|
lgpl
| 8,523
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor:
* Ruediger Jungbeck <ruediger.jungbeck@rsj.de>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include "npapi.h"
#include <npfunctions.h>
#include <prtypes.h>
#include "targetver.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#include <atlbase.h>
#include <atlstr.h>
#include <atlcom.h>
#include <atlctl.h>
#include <varargs.h>
#include "variants.h"
#include "common/PropertyList.h"
#include "common/PropertyBag.h"
#include "common/ItemContainer.h"
#include "common/ControlSite.h"
#include "common/ControlSiteIPFrame.h"
#include "common/ControlEventSink.h"
extern NPNetscapeFuncs NPNFuncs;
//#define NO_REGISTRY_AUTHORIZE
static const char PARAM_CLSID[] = "clsid";
static const char PARAM_PROGID[] = "progid";
static const char PARAM_DEBUG[] = "debugLevel";
static const char PARAM_LOGGER[] = "logger";
static const char PARAM_CODEBASEURL [] = "codeBaseUrl";
static const char PARAM_ONEVENT[] = "Event_";
static const char PARAM_PARAM[] = "PARAM_";
void *ffax_calloc(unsigned int size);
void ffax_free(void *ptr);
void log(NPP instance, unsigned int level, char *message, ...);
NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *saved);
NPError NPP_Destroy(NPP instance, NPSavedData **save);
NPError NPP_SetWindow(NPP instance, NPWindow *window);
|
zzhongster-activex
|
ff-activex-host/ffactivex/ffactivex.h
|
C
|
lgpl
| 3,257
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor:
* Ruediger Jungbeck <ruediger.jungbeck@rsj.de>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// dllmain.cpp : Defines the entry point for the DLL application.
#include "ffactivex.h"
#include "axhost.h"
CComModule _Module;
NPNetscapeFuncs NPNFuncs;
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
// ==============================
// ! Scriptability related code !
// ==============================
//
// here the plugin is asked by Mozilla to tell if it is scriptable
// we should return a valid interface id and a pointer to
// nsScriptablePeer interface which we should have implemented
// and which should be defined in the corressponding *.xpt file
// in the bin/components folder
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
NPError rv = NPERR_NO_ERROR;
if(instance == NULL)
return NPERR_GENERIC_ERROR;
CAxHost *host = (CAxHost *)instance->pdata;
if(host == NULL)
return NPERR_GENERIC_ERROR;
switch (variable) {
case NPPVpluginNameString:
*((char **)value) = "ITSTActiveX";
break;
case NPPVpluginDescriptionString:
*((char **)value) = "IT Structures ActiveX for Firefox";
break;
case NPPVpluginScriptableNPObject:
*(NPObject **)value = host->GetScriptableObject();
break;
default:
rv = NPERR_GENERIC_ERROR;
}
return rv;
}
NPError NPP_NewStream(NPP instance,
NPMIMEType type,
NPStream* stream,
NPBool seekable,
uint16* stype)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
NPError rv = NPERR_NO_ERROR;
return rv;
}
int32_t NPP_WriteReady (NPP instance, NPStream *stream)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
int32 rv = 0x0fffffff;
return rv;
}
int32_t NPP_Write (NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
int32 rv = len;
return rv;
}
NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
NPError rv = NPERR_NO_ERROR;
return rv;
}
void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname)
{
if(instance == NULL)
return;
}
void NPP_Print (NPP instance, NPPrint* printInfo)
{
if(instance == NULL)
return;
}
void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
{
if(instance == NULL)
return;
}
NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
NPError rv = NPERR_NO_ERROR;
return rv;
}
int16 NPP_HandleEvent(NPP instance, void* event)
{
if(instance == NULL)
return 0;
int16 rv = 0;
CAxHost *host = (CAxHost *)instance->pdata;
if (host)
rv = host->HandleEvent(event);
return rv;
}
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs)
{
if(pFuncs == NULL)
return NPERR_INVALID_FUNCTABLE_ERROR;
if(pFuncs->size < sizeof(NPPluginFuncs))
return NPERR_INVALID_FUNCTABLE_ERROR;
pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
pFuncs->newp = NPP_New;
pFuncs->destroy = NPP_Destroy;
pFuncs->setwindow = NPP_SetWindow;
pFuncs->newstream = NPP_NewStream;
pFuncs->destroystream = NPP_DestroyStream;
pFuncs->asfile = NPP_StreamAsFile;
pFuncs->writeready = NPP_WriteReady;
pFuncs->write = NPP_Write;
pFuncs->print = NPP_Print;
pFuncs->event = NPP_HandleEvent;
pFuncs->urlnotify = NPP_URLNotify;
pFuncs->getvalue = NPP_GetValue;
pFuncs->setvalue = NPP_SetValue;
pFuncs->javaClass = NULL;
return NPERR_NO_ERROR;
}
#define MIN(x, y) ((x) < (y)) ? (x) : (y)
/*
* Initialize the plugin. Called the first time the browser comes across a
* MIME Type this plugin is registered to handle.
*/
NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs)
{
// _asm {int 3};
if(pFuncs == NULL)
return NPERR_INVALID_FUNCTABLE_ERROR;
#ifdef NDEF
// The following statements prevented usage of newer Mozilla sources than installed browser at runtime
if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
return NPERR_INCOMPATIBLE_VERSION_ERROR;
if(pFuncs->size < sizeof(NPNetscapeFuncs))
return NPERR_INVALID_FUNCTABLE_ERROR;
#endif
if (!AtlAxWinInit()) {
return NPERR_GENERIC_ERROR;
}
CoInitialize(NULL);
_pAtlModule = &_Module;
memset(&NPNFuncs, 0, sizeof(NPNetscapeFuncs));
memcpy(&NPNFuncs, pFuncs, MIN(pFuncs->size, sizeof(NPNetscapeFuncs)));
return NPERR_NO_ERROR;
}
/*
* Shutdown the plugin. Called when no more instanced of this plugin exist and
* the browser wants to unload it.
*/
NPError OSCALL NP_Shutdown(void)
{
AtlAxWinTerm();
return NPERR_NO_ERROR;
}
|
zzhongster-activex
|
ff-activex-host/ffactivex/dllmain.cpp
|
C++
|
lgpl
| 6,973
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#pragma once
void Variant2NPVar(const VARIANT *var, NPVariant *npvar, NPP instance);
void NPVar2Variant(const NPVariant *npvar, VARIANT *var, NPP instance);
BSTR Utf8StringToBstr(LPCSTR szStr, int iSize);
|
zzhongster-activex
|
ff-activex-host/ffactivex/variants.h
|
C
|
lgpl
| 1,904
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor:
* Ruediger Jungbeck <ruediger.jungbeck@rsj.de>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "scriptable.h"
static NPObject*
AllocateScriptable(NPP npp, NPClass *aClass)
{
return new Scriptable();
}
static void
DeallocateScriptable(NPObject *obj)
{
if (!obj) {
return;
}
Scriptable *s = (Scriptable *)obj;
delete s;
}
static void
InvalidateScriptable(NPObject *obj)
{
if (!obj) {
return;
}
((Scriptable *)obj)->Invalidate();
}
NPClass ScriptableNPClass = {
/* version */ NP_CLASS_STRUCT_VERSION,
/* allocate */ AllocateScriptable,
/* deallocate */ DeallocateScriptable,
/* invalidate */ InvalidateScriptable,
/* hasMethod */ Scriptable::_HasMethod,
/* invoke */ Scriptable::_Invoke,
/* invokeDefault */ NULL,
/* hasProperty */ Scriptable::_HasProperty,
/* getProperty */ Scriptable::_GetProperty,
/* setProperty */ Scriptable::_SetProperty,
/* removeProperty */ NULL,
/* enumerate */ NULL,
/* construct */ NULL
};
|
zzhongster-activex
|
ff-activex-host/ffactivex/scriptable.cpp
|
C++
|
lgpl
| 2,691
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is itstructures.com code.
*
* The Initial Developer of the Original Code is IT Structures.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#pragma once
#include <map>
#include <vector>
#include <atlbase.h>
#include <comdef.h>
#include <npapi.h>
#include <npfunctions.h>
#include <npruntime.h>
#include "variants.h"
extern NPNetscapeFuncs NPNFuncs;
extern NPClass GenericNPObjectClass;
typedef bool (*DefaultInvoker)(void *object, const NPVariant *args, uint32_t argCount, NPVariant *result);
struct ltnum
{
bool operator()(long n1, long n2) const
{
return n1 < n2;
}
};
struct ltstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) < 0;
}
};
bool toString(void *object, const NPVariant *args, uint32_t argCount, NPVariant *result);
class GenericNPObject: public NPObject
{
private:
GenericNPObject(const GenericNPObject &);
bool invalid;
DefaultInvoker defInvoker;
void *defInvokerObject;
std::vector<NPVariant> numeric_mapper;
// the members of alpha mapper can be reassigned to anything the user wishes
std::map<const char *, NPVariant, ltstr> alpha_mapper;
// these cannot accept other types than they are initially defined with
std::map<const char *, NPVariant, ltstr> immutables;
public:
friend bool toString(void *, const NPVariant *, uint32_t, NPVariant *);
GenericNPObject(NPP instance);
GenericNPObject(NPP instance, bool isMethodObj);
~GenericNPObject();
void Invalidate() {invalid = true;}
void SetDefaultInvoker(DefaultInvoker di, void *context) {
defInvoker = di;
defInvokerObject = context;
}
static bool _HasMethod(NPObject *npobj, NPIdentifier name) {
return ((GenericNPObject *)npobj)->HasMethod(name);
}
static bool _Invoke(NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result) {
return ((GenericNPObject *)npobj)->Invoke(methodName, args, argCount, result);
}
static bool _InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) {
if (((GenericNPObject *)npobj)->defInvoker) {
return (((GenericNPObject *)npobj)->InvokeDefault)(args, argCount, result);
}
else {
return false;
}
}
static bool _HasProperty(NPObject *npobj, NPIdentifier name) {
return ((GenericNPObject *)npobj)->HasProperty(name);
}
static bool _GetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result) {
return ((GenericNPObject *)npobj)->GetProperty(name, result);
}
static bool _SetProperty(NPObject *npobj, NPIdentifier name, const NPVariant *value) {
return ((GenericNPObject *)npobj)->SetProperty(name, value);
}
static bool _RemoveProperty(NPObject *npobj, NPIdentifier name) {
return ((GenericNPObject *)npobj)->RemoveProperty(name);
}
static bool _Enumerate(NPObject *npobj, NPIdentifier **identifiers, uint32_t *identifierCount) {
return ((GenericNPObject *)npobj)->Enumerate(identifiers, identifierCount);
}
bool HasMethod(NPIdentifier name);
bool Invoke(NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result);
bool InvokeDefault(const NPVariant *args, uint32_t argCount, NPVariant *result);
bool HasProperty(NPIdentifier name);
bool GetProperty(NPIdentifier name, NPVariant *result);
bool SetProperty(NPIdentifier name, const NPVariant *value);
bool RemoveProperty(NPIdentifier name);
bool Enumerate(NPIdentifier **identifiers, uint32_t *identifierCount);
};
|
zzhongster-activex
|
ff-activex-host/ffactivex/GenericNPObject.h
|
C++
|
lgpl
| 5,100
|