From fbbf467696810b7ca2ddac6de0d076af424a2ef0 Mon Sep 17 00:00:00 2001 From: shentao Date: Wed, 19 Apr 2017 18:24:26 +0800 Subject: integrated monitor and performance functions Issue-id: CLIENT-175 Change-Id: I07adc77afd9f62f615790896c9241f8430583398 Signed-off-by: shentao --- .../zTree/api/cn/setting.view.addHoverDom.html | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html (limited to 'common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html') diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html new file mode 100755 index 00000000..f073e79c --- /dev/null +++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html @@ -0,0 +1,45 @@ +
+
+

Function(treeId, treeNode)setting.view.addHoverDom

+

概述[ 依赖 jquery.ztree.exedit 扩展 js ]

+
+

+
+

用于当鼠标移动到节点上时,显示用户自定义控件,显示隐藏状态同 zTree 内部的编辑、删除按钮

+

请务必与 setting.view.removeHoverDom 同时使用;属于高级应用,使用时请确保对 zTree 比较了解。

+

默认值:null

+
+
+

Function 参数说明

+
+

treeIdString

+

对应 zTree 的 treeId,便于用户操控

+

treeNodeJSON

+

需要显示自定义控件的节点 JSON 数据对象

+
+

setting & function 举例

+

1. 设置鼠标移到节点上,在后面显示一个按钮

+
var setting = {
+	view: {
+		addHoverDom: addHoverDom,
+		removeHoverDom: removeHoverDom,
+		......
+	}
+};
+function addHoverDom(treeId, treeNode) {
+	var aObj = $("#" + treeNode.tId + "_a");
+	if ($("#diyBtn_"+treeNode.id).length>0) return;
+	var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
+		+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+		+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
+	aObj.append(editStr);
+	var btn = $("#diyBtn_"+treeNode.id);
+	if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+function removeHoverDom(treeId, treeNode) {
+	$("#diyBtn_"+treeNode.id).unbind().remove();
+	$("#diyBtn_space_" +treeNode.id).unbind().remove();
+};
+......
+
+
\ No newline at end of file -- cgit 1.2.3-korg