Authored by FengRuwei

remove 增删按钮

@@ -22,14 +22,6 @@ @@ -22,14 +22,6 @@
22 <div class="widget-title"> 22 <div class="widget-title">
23 <h5>Tree Title</h5> 23 <h5>Tree Title</h5>
24 </div> 24 </div>
25 - <ul class="ui-widget ui-helper-clearfix" id="icons" style="float: left;margin-left: 165px;">  
26 - <li title=".ui-icon-plusthick" class="ui-state-default ui-corner-all" onclick="deletebtn()"><span  
27 - class="ui-icon ui-icon-plusthick"></span></li>  
28 - </ul>  
29 - <ul class="ui-widget ui-helper-clearfix" id="icons" style="margin-right: 12px;">  
30 - <li title=".ui-icon-minusthick" class="ui-state-default ui-corner-all" onclick="editbtn()"><span  
31 - class="ui-icon ui-icon-minusthick"></span></li>  
32 - </ul>  
33 <div id="jstree" class="jstree jstree-default jstree-default-small" role="tree" aria-multiselectable="true" 25 <div id="jstree" class="jstree jstree-default jstree-default-small" role="tree" aria-multiselectable="true"
34 tabindex="0" style="height: 400px"></div> 26 tabindex="0" style="height: 400px"></div>
35 </div> 27 </div>
@@ -105,18 +97,6 @@ @@ -105,18 +97,6 @@
105 97
106 }); 98 });
107 99
108 -  
109 - var dom = document.getElementById("icons");  
110 - var str = dom.getAttribute("style");  
111 - str = str.replace(/height\b\s*\:\s*\d+\px;?/ig, "");  
112 - dom.setAttribute("style", str);  
113 - function deletebtn() {  
114 - alert(1);  
115 - }  
116 -  
117 - function editbtn() {  
118 - alert(2);  
119 - }  
120 </script> 100 </script>
121 101
122 <script> 102 <script>
@@ -215,11 +195,11 @@ @@ -215,11 +195,11 @@
215 195
216 $(function () { 196 $(function () {
217 $.get("type/all", function (data, state) { 197 $.get("type/all", function (data, state) {
218 -// console.log(state)  
219 - console.log(data); 198 + console.log(state)
  199 +// console.log(data);
220 var jsonData = JSON.parse(data); 200 var jsonData = JSON.parse(data);
221 treeData = []; //重置 201 treeData = []; //重置
222 - $.each(jsonData, function (n, val) { 202 + $.each(jsonData.data, function (n, val) {
223 var treeNode = {}; 203 var treeNode = {};
224 treeNode.id = "" + val.typeId; 204 treeNode.id = "" + val.typeId;
225 treeNode.parent = "" + (val.typeParentId == 0 ? "#" : val.typeParentId); 205 treeNode.parent = "" + (val.typeParentId == 0 ? "#" : val.typeParentId);