|
@@ -143,66 +143,55 @@ $("#btn4type").click(function () { |
|
@@ -143,66 +143,55 @@ $("#btn4type").click(function () { |
143
|
*/
|
143
|
*/
|
144
|
function searchType(ip){
|
144
|
function searchType(ip){
|
145
|
$("#detailTable").hide();
|
145
|
$("#detailTable").hide();
|
146
|
- $.ajax({
|
|
|
147
|
- url: contextPath + "/zkTree/getRoot",
|
|
|
148
|
- type: "post",
|
|
|
149
|
- dataType: "json",
|
|
|
150
|
- data: {
|
|
|
151
|
- ip: ip
|
|
|
152
|
- },
|
|
|
153
|
- success: function (data) {
|
|
|
154
|
- $(function () {
|
|
|
155
|
- $("#rootTable").table({
|
|
|
156
|
- url: contextPath + "/zkTree/getRoot",
|
|
|
157
|
- striped: true,
|
|
|
158
|
- panelClass: "panel-success",
|
|
|
159
|
- pagination: false,
|
|
|
160
|
- loadFilter: function (data) {
|
|
|
161
|
- return defaultLoadFilter(data);
|
|
|
162
|
- },
|
|
|
163
|
- columns: [{
|
|
|
164
|
- title: "名称",
|
|
|
165
|
- field: "name",
|
|
|
166
|
- formatter: function (value, rowData, rowIndex) {
|
|
|
167
|
- var div = $("<div>");
|
|
|
168
|
- var input = $("<input type=\"button\">").addClass("form-control").attr({
|
|
|
169
|
- id :"name",
|
|
|
170
|
- name : "name",
|
|
|
171
|
- style : "border: none;",
|
|
|
172
|
- value : value
|
|
|
173
|
- }).appendTo(div);
|
|
|
174
|
- input.click(function () {
|
|
|
175
|
- toDetail(rowData,ip);
|
|
|
176
|
- });
|
|
|
177
|
- return div;
|
|
|
178
|
- }
|
|
|
179
|
- }, {
|
|
|
180
|
- title: "路径",
|
|
|
181
|
- field: "root"
|
|
|
182
|
- }, {
|
|
|
183
|
- title: "操作",
|
|
|
184
|
- formatter: function (value, rowData, rowIndex) {
|
|
|
185
|
- var div = $("<div>");
|
146
|
+ $("#rootTable").table("load",{ip:ip});
|
|
|
147
|
+ $(function () {
|
|
|
148
|
+ $("#rootTable").table({
|
|
|
149
|
+ url: contextPath + "/zkTree/getRoot",
|
|
|
150
|
+ striped: true,
|
|
|
151
|
+ panelClass: "panel-success",
|
|
|
152
|
+ pagination: false,
|
|
|
153
|
+ loadFilter: function (data) {
|
|
|
154
|
+ return defaultLoadFilter(data);
|
|
|
155
|
+ },
|
|
|
156
|
+ columns: [{
|
|
|
157
|
+ title: "名称",
|
|
|
158
|
+ field: "name",
|
|
|
159
|
+ formatter: function (value, rowData, rowIndex) {
|
|
|
160
|
+ var div = $("<div>");
|
|
|
161
|
+ var input = $("<input type=\"button\">").addClass("form-control").attr({
|
|
|
162
|
+ id :"name",
|
|
|
163
|
+ name : "name",
|
|
|
164
|
+ style : "border: none;",
|
|
|
165
|
+ value : value
|
|
|
166
|
+ }).appendTo(div);
|
|
|
167
|
+ input.click(function () {
|
|
|
168
|
+ toDetail(rowData,ip);
|
|
|
169
|
+ });
|
|
|
170
|
+ return div;
|
|
|
171
|
+ }
|
|
|
172
|
+ }, {
|
|
|
173
|
+ title: "路径",
|
|
|
174
|
+ field: "root"
|
|
|
175
|
+ }, {
|
|
|
176
|
+ title: "操作",
|
|
|
177
|
+ formatter: function (value, rowData, rowIndex) {
|
|
|
178
|
+ var div = $("<div>");
|
186
|
|
179
|
|
187
|
- //修改
|
|
|
188
|
- var editBtn = $("<button data-target='#updateModal' data-toggle='modal'>").addClass("btn btn-xs btn-success").html("修改").appendTo(div);
|
|
|
189
|
- editBtn.click(function () {
|
|
|
190
|
- updateRoot(rowData,ip);
|
|
|
191
|
- });
|
|
|
192
|
- return div;
|
|
|
193
|
- }
|
|
|
194
|
- }],
|
|
|
195
|
- });
|
180
|
+ //修改
|
|
|
181
|
+ var editBtn = $("<button data-target='#updateModal' data-toggle='modal'>").addClass("btn btn-xs btn-success").html("修改").appendTo(div);
|
|
|
182
|
+ editBtn.click(function () {
|
|
|
183
|
+ updateRoot(rowData,ip);
|
|
|
184
|
+ });
|
|
|
185
|
+ return div;
|
|
|
186
|
+ }
|
|
|
187
|
+ }],
|
|
|
188
|
+ });
|
196
|
|
189
|
|
197
|
- });
|
|
|
198
|
- },
|
|
|
199
|
- error: function (e) {
|
|
|
200
|
-
|
|
|
201
|
- }
|
|
|
202
|
- });
|
|
|
203
|
-
|
190
|
+ });
|
204
|
}
|
191
|
}
|
205
|
|
192
|
|
|
|
193
|
+
|
|
|
194
|
+
|
206
|
function updateRoot(rowData,ip){
|
195
|
function updateRoot(rowData,ip){
|
207
|
paramObj.name = rowData.name;
|
196
|
paramObj.name = rowData.name;
|
208
|
paramObj.root = rowData.root;
|
197
|
paramObj.root = rowData.root;
|