/*--------------------------------------------------|
| 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,url) {
this.config = {
target : null,
folderLinks : true,
useSelection : true,
useCookies : true,
useLines : true,
useIcons : true,
useStatusText : false,
closeSameLevel : false,
inOrder : false
}
this.icon = {
root : url+"/modules/dtree/img/base.gif",
folder : url+"/modules/dtree/img/folder.gif",
folderOpen : url+"/modules/dtree/img/folderopen.gif",
node : url+"/modules/dtree/img/page.gif",
empty : url+"/modules/dtree/img/empty.gif",
line : url+"/modules/dtree/img/line.gif",
join : url+"/modules/dtree/img/join.gif",
joinBottom : url+"/modules/dtree/img/joinbottom.gif",
plus : url+"/modules/dtree/img/plus.gif",
plusBottom : url+"/modules/dtree/img/plusbottom.gif",
minus : url+"/modules/dtree/img/minus.gif",
minusBottom : url+"/modules/dtree/img/minusbottom.gif",
nlPlus : url+"/modules/dtree/img/nolines_plus.gif",
nlMinus : url+"/modules/dtree/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="' + 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 += '>';
}
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;
if (this.selectedNode != id) {
if (this.selectedNode || this.selectedNode==0) {
eOld = document.getElementById("s" + this.obj + this.selectedNode);
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.cl
没有合适的资源?快使用搜索试试~ 我知道了~
Asp.net企业网站管理系统 v2.0 (精美实用)
共387个文件
gif:266个
aspx:87个
dll:11个
2星 需积分: 0 37 下载量 49 浏览量
2008-12-29
10:01:30
上传
评论
收藏 1.71MB RAR 举报
温馨提示
Asp.net企业网站管理系统 v2.0 (精美实用),Asp.net企业网站管理系统 v2.0 (精美实用)Asp.net企业网站管理系统 v2.0 (精美实用)
资源详情
资源评论
资源推荐
收起资源包目录
Asp.net企业网站管理系统 v2.0 (精美实用) (387个子文件)
session.ascx 124B
session.ascx 121B
modify_password.aspx 10KB
information.aspx 10KB
manage_subclass.aspx 6KB
admin.aspx 6KB
manage_product_class1.aspx 6KB
manage_majorclass.aspx 6KB
joinin.aspx 6KB
register.aspx 5KB
manage_member.aspx 5KB
menu.aspx 5KB
modify_password.aspx 5KB
product2.aspx 5KB
manage_product2.aspx 4KB
manage_feedback.aspx 4KB
manage_product1.aspx 4KB
manage_guestbook.aspx 4KB
login.aspx 4KB
manage_project_case.aspx 4KB
manage_union.aspx 4KB
manage_order.aspx 4KB
manage_news1.aspx 4KB
feedback.aspx 4KB
default.aspx 4KB
order.aspx 4KB
manage_news.aspx 4KB
manage_job.aspx 4KB
member_detail.aspx 4KB
manage_site_info.aspx 4KB
ftb.inserttable.aspx 4KB
send_job.aspx 4KB
edit_job.aspx 4KB
product1.aspx 3KB
edit_product2.aspx 3KB
joinin_detail.aspx 3KB
add_product2.aspx 3KB
edit_product1.aspx 3KB
order_detail.aspx 3KB
add_product1.aspx 3KB
guestbook.aspx 3KB
project_case.aspx 3KB
edit_subclass.aspx 3KB
feedback_detail.aspx 3KB
edit_news1.aspx 3KB
add_news1.aspx 3KB
edit_project_case.aspx 3KB
edit_productclass.aspx 3KB
edit_majorclass.aspx 3KB
add_project_case.aspx 3KB
guestbook_detail.aspx 3KB
news1.aspx 2KB
add_site_info.aspx 2KB
edit_news.aspx 2KB
add_news.aspx 2KB
edit_site_info.aspx 2KB
panel.aspx 2KB
news.aspx 2KB
cart2view.aspx 2KB
cart1view.aspx 2KB
add_project_case_prs.aspx 1KB
add_product1_prs.aspx 1KB
add_product2_prs.aspx 1KB
send_job_prs.aspx 1KB
add_site_info_prs.aspx 1KB
add_news1_prs.aspx 1KB
add_news_prs.aspx 1KB
job_detail.aspx 1KB
UpLoad_img.aspx 1KB
manage_depart.aspx 1KB
manage_news_class1.aspx 1024B
manage_apply.aspx 1022B
welcome.aspx 883B
product2_detail.aspx 756B
product1_detail.aspx 754B
admin.aspx 687B
project_case_detail.aspx 573B
SiteInfo.aspx 487B
news1_detail.aspx 483B
news_detail.aspx 482B
joinin_prs.aspx 475B
feedback_prs.aspx 471B
Default.aspx 467B
register_prs.aspx 465B
order_prs.aspx 462B
login_out.aspx 454B
login_out.aspx 451B
guestbook_prs.aspx 438B
job.aspx 435B
App_Code.compiled 172B
Web.Config 2KB
PrecompiledApp.config 49B
office_bgs.css 9KB
office_base.css 2KB
admin.css 1KB
dtree.css 775B
FreeTextBox.dll 156KB
AspNetPager.dll 60KB
App_Code.dll 60KB
App_Web_7oouol2r.dll 52KB
共 387 条
- 1
- 2
- 3
- 4
yangpansofmit
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2