<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header(#{system.dict.tree.title})" />
	<th:block th:include="include :: ztree-css" />
</head>
<style>
	body{height:auto;font-family: "Microsoft YaHei";}
	button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="columnId" type="hidden" th:value="${columnId}"/>
<input id="treeId"   type="hidden" th:value="${dict?.dictId}"/>
<input id="dictType" type="hidden" th:value="${dict?.dictType}"/>
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
	<label id="btnShow" th:title="#{system.dict.tree.btn.showSearch}" style="display:none;">︾</label>
	<label id="btnHide" th:title="#{system.dict.tree.btn.hideSearch}">︽</label>
</div>
	<div class="treeSearchInput" id="search">
		<label for="keyword" th:text="#{system.dict.tree.keyword}"></label><input type="text" class="empty" id="keyword" maxlength="50">
		<button class="btn" id="btn" onclick="$.tree.searchNode()" th:text="#{system.dict.tree.btn.search}"></button>
	</div>
	<div id="tree" class="ztree treeselect"></div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
	$(function() {
		var url = ctx + "system/dict/treeData";
		var options = {
			url: url,
			onClick : zOnClick
		};
		$.tree.init(options);
	});

	function zOnClick(event, treeId, treeNode) {
		$("#dictType").val(treeNode.title);
	}
</script>
</body>
</html>