├── .idea ├── .name ├── BigYong.iml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── README.md ├── app.py ├── static ├── css │ ├── awesomeStyle │ │ ├── awesome.css │ │ ├── awesome.less │ │ ├── fa.less │ │ └── img │ │ │ └── loading.gif │ ├── demo.css │ ├── metroStyle │ │ ├── img │ │ │ ├── line_conn.png │ │ │ ├── loading.gif │ │ │ ├── metro.gif │ │ │ └── metro.png │ │ └── metroStyle.css │ └── zTreeStyle │ │ ├── img │ │ ├── diy │ │ │ ├── 1_close.png │ │ │ ├── 1_open.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ ├── line_conn.gif │ │ ├── loading.gif │ │ ├── zTreeStandard.gif │ │ └── zTreeStandard.png │ │ └── zTreeStyle.css └── js │ ├── jquery-1.4.4.min.js │ ├── jquery.ztree.all-3.5.js │ ├── jquery.ztree.all-3.5.min.js │ ├── jquery.ztree.core-3.5.js │ ├── jquery.ztree.core-3.5.min.js │ ├── jquery.ztree.excheck-3.5.js │ ├── jquery.ztree.excheck-3.5.min.js │ ├── jquery.ztree.exedit-3.5.js │ ├── jquery.ztree.exedit-3.5.min.js │ ├── jquery.ztree.exedit.js │ ├── jquery.ztree.exhide-3.5.js │ └── jquery.ztree.exhide-3.5.min.js └── templates ├── index.html └── log_frame.html /.idea/.name: -------------------------------------------------------------------------------- 1 | BigYong -------------------------------------------------------------------------------- /.idea/BigYong.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 | 81 | 82 | 83 | 84 | true 85 | 86 | 87 | 88 | 89 | 90 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 127 | 128 | 129 | 130 | 133 | 134 | 137 | 138 | 139 | 140 | 143 | 144 | 147 | 148 | 151 | 152 | 153 | 154 | 157 | 158 | 161 | 162 | 165 | 166 | 169 | 170 | 171 | 172 | 175 | 176 | 179 | 180 | 183 | 184 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 225 | 226 | 227 | 228 | 229 | 242 | 243 | 256 | 257 | 274 | 275 | 276 | 277 | 278 | 297 | 298 | 317 | 318 | 339 | 340 | 362 | 363 | 387 | 388 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 1440234083621 414 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FileView 2 | ## 使用Flask + Python编写的一个简单的查看日志的web页面 3 | 截图: 4 | ![截图](https://github.com/ibuler/static/blob/master/other/FileView.png) 5 | 6 | 使用方法: 7 | 安装 pip install Flask 8 | 9 | 使用 python app.py 运行 10 | 11 | 可以通过修改 app.py中的def index()来指定不同的目录 12 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | # coding: utf8 2 | 3 | from flask import render_template, Flask, request 4 | import json, os 5 | 6 | app = Flask(__name__) 7 | 8 | 9 | @app.route('/') 10 | def index(): 11 | dirs = ['/tmp', '/etc', '/opt'] 12 | return render_template('index.html', dirs=dirs) 13 | 14 | 15 | @app.route('/log/') 16 | def log(): 17 | filename = request.args.get('file', '') 18 | with open(filename) as f: 19 | content = f.read() 20 | return render_template('log_frame.html', log_path=filename, log_content=content) 21 | 22 | 23 | @app.route('/get_json/') 24 | def get_json(): 25 | dir_path = request.args.get('dir', '/tmp') 26 | a = [] 27 | b = 1 28 | for i in os.listdir(dir_path): 29 | file_path = os.path.join(dir_path, i) 30 | if os.path.isdir(file_path): 31 | a.append({'id': b, 'name': i, 'file': file_path, 'isParent': True}) 32 | else: 33 | a.append({'id': b, 'name': i, 'file': file_path, 'isParent': False}) 34 | 35 | return json.dumps(a, indent=4) 36 | 37 | if __name__ == '__main__': 38 | app.run(host='0.0.0.0', port=80) 39 | 40 | -------------------------------------------------------------------------------- /static/css/awesomeStyle/awesome.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style using fontawesome instead of images 3 | 4 | version: 1.1 5 | author: Mike King 6 | email: mikkelking @ hotmail . com 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | /* Definitions ----------------------*/ 11 | /* End of Definitions ---------------*/ 12 | /* Imports -------------------------*/ 13 | /* End of Imports ------------------*/ 14 | .ztree * { 15 | padding: 0; 16 | margin: 0; 17 | font-size: 12px; 18 | font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; 19 | background-color: #af0000; 20 | } 21 | .ztree { 22 | margin: 0; 23 | padding: 5px; 24 | color: #ffffff; 25 | background-color: #af0000; 26 | } 27 | .ztree li { 28 | padding: 0; 29 | margin: 0; 30 | list-style: none; 31 | line-height: 17px; 32 | text-align: left; 33 | white-space: nowrap; 34 | outline: 0; 35 | } 36 | .ztree li ul { 37 | margin: 0px; 38 | padding: 0 0 0 18px; 39 | } 40 | .ztree li a { 41 | padding-right: 3px; 42 | margin: 0; 43 | cursor: pointer; 44 | height: 17px; 45 | color: #ffffff; 46 | background-color: transparent; 47 | text-decoration: none; 48 | vertical-align: top; 49 | display: inline-block; 50 | } 51 | .ztree li a input.rename { 52 | height: 14px; 53 | width: 80px; 54 | padding: 0; 55 | margin: 0; 56 | color: #af0000; 57 | background-color: #ffffff; 58 | font-size: 12px; 59 | border: 1px #585956 solid; 60 | *border: 0px; 61 | } 62 | .ztree li a:hover { 63 | text-decoration: underline; 64 | } 65 | .ztree li a.curSelectedNode { 66 | padding-top: 0px; 67 | background-color: #af4040; 68 | color: #ffff00; 69 | height: 17px; 70 | opacity: 0.8; 71 | } 72 | .ztree li a.curSelectedNode_Edit { 73 | padding-top: 0px; 74 | background-color: transparent; 75 | color: #ffff00; 76 | height: 17px; 77 | border: 1px #666 solid; 78 | opacity: 0.8; 79 | } 80 | .ztree li a.tmpTargetNode_inner { 81 | padding-top: 0px; 82 | background-color: #aaa; 83 | color: #ffff00; 84 | height: 17px; 85 | border: 1px #666 solid; 86 | opacity: 0.8; 87 | filter: alpha(opacity=80); 88 | } 89 | .ztree li span { 90 | line-height: 17px; 91 | margin-right: 2px; 92 | background-color: transparent; 93 | } 94 | .ztree li span.button { 95 | line-height: 0; 96 | margin: 0; 97 | padding: 0; 98 | width: 15px; 99 | height: 17px; 100 | display: inline-block; 101 | vertical-align: top; 102 | border: 0px solid; 103 | cursor: pointer; 104 | outline: none; 105 | background-color: transparent; 106 | background-repeat: no-repeat; 107 | background-attachment: scroll; 108 | } 109 | .ztree li span.button::before { 110 | color: #ffffff; 111 | font-family: FontAwesome; 112 | padding-top: 10px; 113 | } 114 | .ztree li span.button.chk { 115 | margin: 0px; 116 | cursor: auto; 117 | width: 12px; 118 | display: inline-block; 119 | padding-top: 10px; 120 | padding-left: 2px; 121 | } 122 | .ztree li span.button.chk.checkbox_false_full::before { 123 | content: "\f096"; 124 | } 125 | .ztree li span.button.chk.checkbox_false_full_focus::before { 126 | content: "\f096"; 127 | color: #ffff00; 128 | } 129 | .ztree li span.button.chk.checkbox_false_part::before { 130 | content: "\f096"; 131 | color: #aaaaaa; 132 | } 133 | .ztree li span.button.chk.checkbox_false_part_focus::before { 134 | content: "\f096"; 135 | color: #cad96c; 136 | } 137 | .ztree li span.button.chk.checkbox_false_disable::before { 138 | content: "\f096"; 139 | color: #808080; 140 | } 141 | .ztree li span.button.chk.checkbox_true_full::before { 142 | content: "\f046"; 143 | } 144 | .ztree li span.button.chk.checkbox_true_full_focus::before { 145 | content: "\f046"; 146 | } 147 | .ztree li span.button.chk.checkbox_true_part::before { 148 | content: "\f14a"; 149 | } 150 | .ztree li span.button.chk.checkbox_true_part_focus::before { 151 | content: "\f14a"; 152 | color: #ffff00; 153 | } 154 | .ztree li span.button.chk.checkbox_true_full_focus::before { 155 | content: "\f046"; 156 | color: #ffff00; 157 | } 158 | .ztree li span.button.chk.checkbox_true_part::before { 159 | content: "\f046"; 160 | color: #aaaaaa; 161 | } 162 | .ztree li span.button.chk.checkbox_true_part_focus::before { 163 | content: "\f046"; 164 | color: #cad96c; 165 | } 166 | .ztree li span.button.chk.checkbox_true_disable::before { 167 | content: "\f046"; 168 | color: #808080; 169 | } 170 | .ztree li span.button.chk.radio_false_full::before { 171 | content: "\f10c"; 172 | } 173 | .ztree li span.button.chk.radio_false_full_focus::before { 174 | content: "\f10c"; 175 | color: #ffff00; 176 | } 177 | .ztree li span.button.chk.radio_false_part::before { 178 | content: "\f10c"; 179 | color: #aaaaaa; 180 | } 181 | .ztree li span.button.chk.radio_false_part_focus::before { 182 | content: "\f10c"; 183 | color: #ffff00; 184 | } 185 | .ztree li span.button.chk.radio_false_disable::before { 186 | content: "\f1db"; 187 | color: #808080; 188 | } 189 | .ztree li span.button.chk.radio_true_full::before { 190 | content: "\f192"; 191 | } 192 | .ztree li span.button.chk.radio_true_full_focus::before { 193 | content: "\f192"; 194 | color: #ffff00; 195 | } 196 | .ztree li span.button.chk.radio_true_part::before { 197 | content: "\f192"; 198 | color: #aaaaaa; 199 | } 200 | .ztree li span.button.chk.radio_true_part_focus::before { 201 | content: "\f192"; 202 | color: #aaaaaa; 203 | } 204 | .ztree li span.button.chk.radio_true_disable::before { 205 | content: "\f1db"; 206 | color: #808080; 207 | } 208 | .ztree li span.button.switch { 209 | width: 15px; 210 | height: 17px; 211 | } 212 | .ztree li span.button.root_open::before { 213 | content: "\f078"; 214 | padding-top: 10px; 215 | padding-left: 2px; 216 | display: inline-block; 217 | } 218 | .ztree li span.button.root_close::before { 219 | content: "\f115"; 220 | padding-top: 10px; 221 | padding-left: 2px; 222 | display: inline-block; 223 | } 224 | .ztree li span.button.roots_open::before { 225 | content: "\f078"; 226 | padding-top: 10px; 227 | padding-left: 2px; 228 | display: inline-block; 229 | } 230 | .ztree li span.button.roots_close::before { 231 | content: "\f054"; 232 | padding-top: 10px; 233 | padding-left: 2px; 234 | display: inline-block; 235 | } 236 | .ztree li span.button.center_open::before { 237 | content: "\f078"; 238 | padding-top: 10px; 239 | padding-left: 2px; 240 | display: inline-block; 241 | } 242 | .ztree li span.button.center_close::before { 243 | content: "\f054"; 244 | padding-top: 10px; 245 | padding-left: 2px; 246 | display: inline-block; 247 | } 248 | .ztree li span.button.bottom_open::before { 249 | content: "\f078"; 250 | padding-top: 10px; 251 | padding-left: 2px; 252 | display: inline-block; 253 | } 254 | .ztree li span.button.bottom_close::before { 255 | content: "\f054"; 256 | padding-top: 10px; 257 | padding-left: 2px; 258 | display: inline-block; 259 | } 260 | .ztree li span.button.root_docu { 261 | background: none; 262 | } 263 | .ztree li span.button.roots_docu::before { 264 | content: "\f022"; 265 | padding-left: 2px; 266 | display: inline-block; 267 | color: #ffffff; 268 | } 269 | .ztree li span.button.center_docu::before { 270 | padding-top: 10px; 271 | padding-left: 2px; 272 | display: inline-block; 273 | color: #ffffff; 274 | } 275 | .ztree li span.button.bottom_docu::before { 276 | padding-top: 10px; 277 | padding-left: 2px; 278 | display: inline-block; 279 | color: #ffffff; 280 | } 281 | .ztree li span.button.noline_docu { 282 | background: none; 283 | } 284 | .ztree li span.button.ico_open::before { 285 | content: "\f115"; 286 | font-family: FontAwesome; 287 | padding-top: 10px; 288 | padding-left: 2px; 289 | display: inline-block; 290 | color: #ffffff; 291 | } 292 | .ztree li span.button.ico_close::before { 293 | content: "\f114"; 294 | font-family: FontAwesome; 295 | padding-top: 10px; 296 | padding-left: 2px; 297 | display: inline-block; 298 | color: #ffffff; 299 | } 300 | .ztree li span.button.ico_docu::before { 301 | content: "\f022"; 302 | font-family: FontAwesome; 303 | padding-top: 10px; 304 | padding-left: 2px; 305 | display: inline-block; 306 | color: #ffffff; 307 | } 308 | .ztree li span.button.edit { 309 | margin-left: 4px; 310 | margin-right: -1px; 311 | vertical-align: top; 312 | *vertical-align: middle; 313 | padding-top: 10px; 314 | } 315 | .ztree li span.button.edit::before { 316 | content: "\f044"; 317 | font-family: FontAwesome; 318 | } 319 | .ztree li span.button.remove { 320 | margin-left: 4px; 321 | margin-right: -1px; 322 | vertical-align: top; 323 | *vertical-align: middle; 324 | padding-top: 10px; 325 | } 326 | .ztree li span.button.remove::before { 327 | content: "\f1f8"; 328 | font-family: FontAwesome; 329 | } 330 | .ztree li span.button.add { 331 | margin-left: 4px; 332 | margin-right: -1px; 333 | vertical-align: top; 334 | *vertical-align: middle; 335 | padding-top: 10px; 336 | } 337 | .ztree li span.button.add::before { 338 | content: "\f067"; 339 | font-family: FontAwesome; 340 | } 341 | .ztree li span.button.ico_loading { 342 | margin-right: 2px; 343 | background: url(./img/loading.gif) no-repeat scroll 0 0 transparent; 344 | vertical-align: top; 345 | *vertical-align: middle; 346 | } 347 | ul.tmpTargetzTree { 348 | background-color: #FFE6B0; 349 | opacity: 0.8; 350 | filter: alpha(opacity=80); 351 | } 352 | span.tmpzTreeMove_arrow { 353 | width: 16px; 354 | height: 17px; 355 | display: inline-block; 356 | padding: 0; 357 | margin: 2px 0 0 1px; 358 | border: 0 none; 359 | position: absolute; 360 | background-color: transparent; 361 | background-attachment: scroll; 362 | } 363 | span.tmpzTreeMove_arrow::before { 364 | content: "\f04b"; 365 | font-family: FontAwesome; 366 | color: #ffff00; 367 | } 368 | ul.ztree.zTreeDragUL { 369 | margin: 0; 370 | padding: 0; 371 | position: absolute; 372 | width: auto; 373 | height: auto; 374 | overflow: hidden; 375 | background-color: #cfcfcf; 376 | border: 1px #ffff00 dotted; 377 | opacity: 0.8; 378 | filter: alpha(opacity=80); 379 | } 380 | .ztreeMask { 381 | z-index: 10000; 382 | background-color: #cfcfcf; 383 | opacity: 0.0; 384 | filter: alpha(opacity=0); 385 | position: absolute; 386 | } 387 | -------------------------------------------------------------------------------- /static/css/awesomeStyle/awesome.less: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style using fontawesome instead of images 3 | 4 | version: 1.1 5 | author: Mike King 6 | email: mikkelking @ hotmail . com 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | /* Definitions ----------------------*/ 12 | @font-size: 12px; 13 | // Regular icon and text color is white, which suits any medium -> dark background 14 | @color-normal: white; 15 | // Background color 16 | @color-bg: #af0000; 17 | // Highlight color 18 | @color-highlight: yellow; 19 | // Partially selected (checkboxes, radio buttons) 20 | @color-partial: #aaaaaa; 21 | // Partially selected and focused (checkboxes, radio buttons) 22 | @color-partfocus: #cad96c; 23 | // Disabled altogether 24 | @color-disabled: #808080; 25 | // Editing color 26 | @color-edit: yellow; 27 | @w: 15px; 28 | @h: 17px; 29 | @pad-left: 2px; 30 | @pad-top: 10px; 31 | /* End of Definitions ---------------*/ 32 | 33 | /* Imports -------------------------*/ 34 | @import "fa.less"; 35 | /* End of Imports ------------------*/ 36 | 37 | .ztree * {padding:0; margin:0; font-size:@font-size; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; background-color: @color-bg;} 38 | .ztree { 39 | margin:0; padding:5px; color:@color-normal; background-color: @color-bg; 40 | li { 41 | padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0; 42 | ul { 43 | margin: 0px; padding:0 0 0 18px; 44 | } 45 | ul.line { } 46 | a {padding-right:3px; margin:0; cursor:pointer; height:@h; color:@color-normal; background-color: transparent; 47 | text-decoration:none; vertical-align:top; display: inline-block; 48 | input.rename {height:14px; width:80px; padding:0; margin:0; 49 | color: @color-bg; background-color: @color-normal; 50 | font-size:@font-size; border:1px #585956 solid; *border:0px} 51 | } 52 | a:hover {text-decoration:underline} 53 | a.curSelectedNode {padding-top:0px; background-color:#af4040; color:@color-highlight; height:@h; opacity:0.8;} 54 | a.curSelectedNode_Edit {padding-top:0px; background-color:transparent; color:@color-highlight; height:@h; border:1px #666 solid; opacity:0.8;} 55 | a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:@color-highlight; height:@h; border:1px #666 solid; 56 | opacity:0.8; filter:alpha(opacity=80)} 57 | a.tmpTargetNode_prev {} 58 | a.tmpTargetNode_next {} 59 | span {line-height:@h; margin-right:2px; background-color:transparent;} 60 | span.button {line-height:0; margin:0; padding: 0; width:@w; height:@h; display: inline-block; vertical-align:top; 61 | border:0px solid; cursor: pointer;outline:none; 62 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 63 | 64 | &::before{color: @color-normal; font-family: FontAwesome; padding-top:@pad-top;} 65 | &.chk { margin:0px; cursor: auto; width: 12px; 66 | display: inline-block;padding-top:@pad-top;padding-left:@pad-left; 67 | 68 | &.checkbox_false_full::before {content: @fa-square-o;} 69 | &.checkbox_false_full_focus::before {content: @fa-square-o; color:@color-highlight;} 70 | &.checkbox_false_part::before {content: @fa-square-o;color: @color-partial;} 71 | &.checkbox_false_part_focus::before {content: @fa-square-o; color:@color-partfocus;} 72 | &.checkbox_false_disable::before {content: @fa-square-o; color:@color-disabled;} 73 | &.checkbox_true_full::before {content: @fa-check-square-o;} 74 | &.checkbox_true_full_focus::before {content: @fa-check-square-o;} 75 | &.checkbox_true_part::before {content: @fa-check-square;} 76 | &.checkbox_true_part_focus::before {content: @fa-check-square; color: @color-highlight} 77 | &.checkbox_true_full_focus::before {content: @fa-check-square-o; color: @color-highlight} 78 | &.checkbox_true_part::before {content: @fa-check-square-o;color: @color-partial} 79 | &.checkbox_true_part_focus::before {content: @fa-check-square-o;color: @color-partfocus;} 80 | &.checkbox_true_disable::before {content: @fa-check-square-o;color: @color-disabled} 81 | 82 | &.radio_false_full::before {content: @fa-circle-o;} 83 | &.radio_false_full_focus::before {content: @fa-circle-o;color: @color-highlight} 84 | &.radio_false_part::before {content: @fa-circle-o;color: @color-partial} 85 | &.radio_false_part_focus::before {content: @fa-circle-o;color: @color-highlight} 86 | &.radio_false_disable::before {content: @fa-circle-thin;color: @color-disabled} 87 | &.radio_true_full::before {content: @fa-dot-circle-o;} 88 | &.radio_true_full_focus::before {content: @fa-dot-circle-o;color: @color-highlight} 89 | &.radio_true_part::before {content: @fa-dot-circle-o;color: @color-partial} 90 | &.radio_true_part_focus::before {content: @fa-dot-circle-o;color: @color-partial;} 91 | &.radio_true_disable::before {content: @fa-circle-thin;color: @color-disabled} 92 | 93 | } 94 | &.switch {width:@w; height:@h} 95 | &.root_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 96 | &.root_close::before{content: @fa-folder-open-o;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 97 | &.roots_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 98 | &.roots_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 99 | &.center_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 100 | &.center_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 101 | &.bottom_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 102 | &.bottom_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;} 103 | &.noline_open{} 104 | &.noline_close{} 105 | &.root_docu{ background:none;} 106 | &.roots_docu::before{content: @fa-list-alt;padding-left:@pad-left;display: inline-block;color:@color-normal;} 107 | &.center_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 108 | &.bottom_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 109 | &.noline_docu{ background:none;} 110 | 111 | &.ico_open::before {content: @fa-folder-open-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 112 | &.ico_close::before {content: @fa-folder-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 113 | &.ico_docu::before{content: @fa-list-alt;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;} 114 | 115 | &.edit {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 116 | &.edit::before{content: @fa-pencil-square-o;font-family: FontAwesome;} 117 | 118 | &.remove {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 119 | &.remove::before{content: @fa-trash;font-family: FontAwesome;} 120 | 121 | 122 | &.add {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;} 123 | &.add::before{content: @fa-plus;font-family: FontAwesome;} 124 | 125 | &.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 126 | } 127 | 128 | } 129 | } 130 | 131 | 132 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 133 | 134 | // this is the arrow that moves 135 | span.tmpzTreeMove_arrow{width:16px; height:@h; display: inline-block; 136 | padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 137 | background-color:transparent; background-attachment: scroll; 138 | } 139 | span.tmpzTreeMove_arrow::before{content: @fa-play;font-family: FontAwesome;color: @color-highlight; 140 | } 141 | // outline 142 | 143 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; 144 | background-color:#cfcfcf; border:1px @color-highlight dotted; opacity:0.8; filter:alpha(opacity=80)} 145 | .ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 146 | 147 | -------------------------------------------------------------------------------- /static/css/awesomeStyle/fa.less: -------------------------------------------------------------------------------- 1 | @fa-glass: "\f000"; 2 | @fa-music: "\f001"; 3 | @fa-search: "\f002"; 4 | @fa-envelope-o: "\f003"; 5 | @fa-heart: "\f004"; 6 | @fa-star: "\f005"; 7 | @fa-star-o: "\f006"; 8 | @fa-user: "\f007"; 9 | @fa-film: "\f008"; 10 | @fa-th-large: "\f009"; 11 | @fa-th: "\f00a"; 12 | @fa-th-list: "\f00b"; 13 | @fa-check: "\f00c"; 14 | @fa-times: "\f00d"; 15 | @fa-search-plus: "\f00e"; 16 | @fa-search-minus: "\f010"; 17 | @fa-power-off: "\f011"; 18 | @fa-signal: "\f012"; 19 | @fa-cog: "\f013"; 20 | @fa-trash-o: "\f014"; 21 | @fa-home: "\f015"; 22 | @fa-file-o: "\f016"; 23 | @fa-clock-o: "\f017"; 24 | @fa-road: "\f018"; 25 | @fa-download: "\f019"; 26 | @fa-arrow-circle-o-down: "\f01a"; 27 | @fa-arrow-circle-o-up: "\f01b"; 28 | @fa-inbox: "\f01c"; 29 | @fa-play-circle-o: "\f01d"; 30 | @fa-repeat: "\f01e"; 31 | @fa-refresh: "\f021"; 32 | @fa-list-alt: "\f022"; 33 | @fa-lock: "\f023"; 34 | @fa-flag: "\f024"; 35 | @fa-headphones: "\f025"; 36 | @fa-volume-off: "\f026"; 37 | @fa-volume-down: "\f027"; 38 | @fa-volume-up: "\f028"; 39 | @fa-qrcode: "\f029"; 40 | @fa-barcode: "\f02a"; 41 | @fa-tag: "\f02b"; 42 | @fa-tags: "\f02c"; 43 | @fa-book: "\f02d"; 44 | @fa-bookmark: "\f02e"; 45 | @fa-print: "\f02f"; 46 | @fa-camera: "\f030"; 47 | @fa-font: "\f031"; 48 | @fa-bold: "\f032"; 49 | @fa-italic: "\f033"; 50 | @fa-text-height: "\f034"; 51 | @fa-text-width: "\f035"; 52 | @fa-align-left: "\f036"; 53 | @fa-align-center: "\f037"; 54 | @fa-align-right: "\f038"; 55 | @fa-align-justify: "\f039"; 56 | @fa-list: "\f03a"; 57 | @fa-outdent: "\f03b"; 58 | @fa-indent: "\f03c"; 59 | @fa-video-camera: "\f03d"; 60 | @fa-picture-o: "\f03e"; 61 | @fa-pencil: "\f040"; 62 | @fa-map-marker: "\f041"; 63 | @fa-adjust: "\f042"; 64 | @fa-tint: "\f043"; 65 | @fa-pencil-square-o: "\f044"; 66 | @fa-share-square-o: "\f045"; 67 | @fa-check-square-o: "\f046"; 68 | @fa-arrows: "\f047"; 69 | @fa-step-backward: "\f048"; 70 | @fa-fast-backward: "\f049"; 71 | @fa-backward: "\f04a"; 72 | @fa-play: "\f04b"; 73 | @fa-pause: "\f04c"; 74 | @fa-stop: "\f04d"; 75 | @fa-forward: "\f04e"; 76 | @fa-fast-forward: "\f050"; 77 | @fa-step-forward: "\f051"; 78 | @fa-eject: "\f052"; 79 | @fa-chevron-left: "\f053"; 80 | @fa-chevron-right: "\f054"; 81 | @fa-plus-circle: "\f055"; 82 | @fa-minus-circle: "\f056"; 83 | @fa-times-circle: "\f057"; 84 | @fa-check-circle: "\f058"; 85 | @fa-question-circle: "\f059"; 86 | @fa-info-circle: "\f05a"; 87 | @fa-crosshairs: "\f05b"; 88 | @fa-times-circle-o: "\f05c"; 89 | @fa-check-circle-o: "\f05d"; 90 | @fa-ban: "\f05e"; 91 | @fa-arrow-left: "\f060"; 92 | @fa-arrow-right: "\f061"; 93 | @fa-arrow-up: "\f062"; 94 | @fa-arrow-down: "\f063"; 95 | @fa-share: "\f064"; 96 | @fa-expand: "\f065"; 97 | @fa-compress: "\f066"; 98 | @fa-plus: "\f067"; 99 | @fa-minus: "\f068"; 100 | @fa-asterisk: "\f069"; 101 | @fa-exclamation-circle: "\f06a"; 102 | @fa-gift: "\f06b"; 103 | @fa-leaf: "\f06c"; 104 | @fa-fire: "\f06d"; 105 | @fa-eye: "\f06e"; 106 | @fa-eye-slash: "\f070"; 107 | @fa-exclamation-triangle: "\f071"; 108 | @fa-plane: "\f072"; 109 | @fa-calendar: "\f073"; 110 | @fa-random: "\f074"; 111 | @fa-comment: "\f075"; 112 | @fa-magnet: "\f076"; 113 | @fa-chevron-up: "\f077"; 114 | @fa-chevron-down: "\f078"; 115 | @fa-retweet: "\f079"; 116 | @fa-shopping-cart: "\f07a"; 117 | @fa-folder: "\f07b"; 118 | @fa-folder-open: "\f07c"; 119 | @fa-arrows-v: "\f07d"; 120 | @fa-arrows-h: "\f07e"; 121 | @fa-bar-chart: "\f080"; 122 | @fa-twitter-square: "\f081"; 123 | @fa-facebook-square: "\f082"; 124 | @fa-camera-retro: "\f083"; 125 | @fa-key: "\f084"; 126 | @fa-cogs: "\f085"; 127 | @fa-comments: "\f086"; 128 | @fa-thumbs-o-up: "\f087"; 129 | @fa-thumbs-o-down: "\f088"; 130 | @fa-star-half: "\f089"; 131 | @fa-heart-o: "\f08a"; 132 | @fa-sign-out: "\f08b"; 133 | @fa-linkedin-square: "\f08c"; 134 | @fa-thumb-tack: "\f08d"; 135 | @fa-external-link: "\f08e"; 136 | @fa-sign-in: "\f090"; 137 | @fa-trophy: "\f091"; 138 | @fa-github-square: "\f092"; 139 | @fa-upload: "\f093"; 140 | @fa-lemon-o: "\f094"; 141 | @fa-phone: "\f095"; 142 | @fa-square-o: "\f096"; 143 | @fa-bookmark-o: "\f097"; 144 | @fa-phone-square: "\f098"; 145 | @fa-twitter: "\f099"; 146 | @fa-facebook: "\f09a"; 147 | @fa-github: "\f09b"; 148 | @fa-unlock: "\f09c"; 149 | @fa-credit-card: "\f09d"; 150 | @fa-rss: "\f09e"; 151 | @fa-hdd-o: "\f0a0"; 152 | @fa-bullhorn: "\f0a1"; 153 | @fa-bell: "\f0f3"; 154 | @fa-certificate: "\f0a3"; 155 | @fa-hand-o-right: "\f0a4"; 156 | @fa-hand-o-left: "\f0a5"; 157 | @fa-hand-o-up: "\f0a6"; 158 | @fa-hand-o-down: "\f0a7"; 159 | @fa-arrow-circle-left: "\f0a8"; 160 | @fa-arrow-circle-right: "\f0a9"; 161 | @fa-arrow-circle-up: "\f0aa"; 162 | @fa-arrow-circle-down: "\f0ab"; 163 | @fa-globe: "\f0ac"; 164 | @fa-wrench: "\f0ad"; 165 | @fa-tasks: "\f0ae"; 166 | @fa-filter: "\f0b0"; 167 | @fa-briefcase: "\f0b1"; 168 | @fa-arrows-alt: "\f0b2"; 169 | @fa-users: "\f0c0"; 170 | @fa-link: "\f0c1"; 171 | @fa-cloud: "\f0c2"; 172 | @fa-flask: "\f0c3"; 173 | @fa-scissors: "\f0c4"; 174 | @fa-files-o: "\f0c5"; 175 | @fa-paperclip: "\f0c6"; 176 | @fa-floppy-o: "\f0c7"; 177 | @fa-square: "\f0c8"; 178 | @fa-bars: "\f0c9"; 179 | @fa-list-ul: "\f0ca"; 180 | @fa-list-ol: "\f0cb"; 181 | @fa-strikethrough: "\f0cc"; 182 | @fa-underline: "\f0cd"; 183 | @fa-table: "\f0ce"; 184 | @fa-magic: "\f0d0"; 185 | @fa-truck: "\f0d1"; 186 | @fa-pinterest: "\f0d2"; 187 | @fa-pinterest-square: "\f0d3"; 188 | @fa-google-plus-square: "\f0d4"; 189 | @fa-google-plus: "\f0d5"; 190 | @fa-money: "\f0d6"; 191 | @fa-caret-down: "\f0d7"; 192 | @fa-caret-up: "\f0d8"; 193 | @fa-caret-left: "\f0d9"; 194 | @fa-caret-right: "\f0da"; 195 | @fa-columns: "\f0db"; 196 | @fa-sort: "\f0dc"; 197 | @fa-sort-desc: "\f0dd"; 198 | @fa-sort-asc: "\f0de"; 199 | @fa-envelope: "\f0e0"; 200 | @fa-linkedin: "\f0e1"; 201 | @fa-undo: "\f0e2"; 202 | @fa-gavel: "\f0e3"; 203 | @fa-tachometer: "\f0e4"; 204 | @fa-comment-o: "\f0e5"; 205 | @fa-comments-o: "\f0e6"; 206 | @fa-bolt: "\f0e7"; 207 | @fa-sitemap: "\f0e8"; 208 | @fa-umbrella: "\f0e9"; 209 | @fa-clipboard: "\f0ea"; 210 | @fa-lightbulb-o: "\f0eb"; 211 | @fa-exchange: "\f0ec"; 212 | @fa-cloud-download: "\f0ed"; 213 | @fa-cloud-upload: "\f0ee"; 214 | @fa-user-md: "\f0f0"; 215 | @fa-stethoscope: "\f0f1"; 216 | @fa-suitcase: "\f0f2"; 217 | @fa-bell-o: "\f0a2"; 218 | @fa-coffee: "\f0f4"; 219 | @fa-cutlery: "\f0f5"; 220 | @fa-file-text-o: "\f0f6"; 221 | @fa-building-o: "\f0f7"; 222 | @fa-hospital-o: "\f0f8"; 223 | @fa-ambulance: "\f0f9"; 224 | @fa-medkit: "\f0fa"; 225 | @fa-fighter-jet: "\f0fb"; 226 | @fa-beer: "\f0fc"; 227 | @fa-h-square: "\f0fd"; 228 | @fa-plus-square: "\f0fe"; 229 | @fa-angle-double-left: "\f100"; 230 | @fa-angle-double-right: "\f101"; 231 | @fa-angle-double-up: "\f102"; 232 | @fa-angle-double-down: "\f103"; 233 | @fa-angle-left: "\f104"; 234 | @fa-angle-right: "\f105"; 235 | @fa-angle-up: "\f106"; 236 | @fa-angle-down: "\f107"; 237 | @fa-desktop: "\f108"; 238 | @fa-laptop: "\f109"; 239 | @fa-tablet: "\f10a"; 240 | @fa-mobile: "\f10b"; 241 | @fa-circle-o: "\f10c"; 242 | @fa-quote-left: "\f10d"; 243 | @fa-quote-right: "\f10e"; 244 | @fa-spinner: "\f110"; 245 | @fa-circle: "\f111"; 246 | @fa-reply: "\f112"; 247 | @fa-github-alt: "\f113"; 248 | @fa-folder-o: "\f114"; 249 | @fa-folder-open-o: "\f115"; 250 | @fa-smile-o: "\f118"; 251 | @fa-frown-o: "\f119"; 252 | @fa-meh-o: "\f11a"; 253 | @fa-gamepad: "\f11b"; 254 | @fa-keyboard-o: "\f11c"; 255 | @fa-flag-o: "\f11d"; 256 | @fa-flag-checkered: "\f11e"; 257 | @fa-terminal: "\f120"; 258 | @fa-code: "\f121"; 259 | @fa-reply-all: "\f122"; 260 | @fa-star-half-o: "\f123"; 261 | @fa-location-arrow: "\f124"; 262 | @fa-crop: "\f125"; 263 | @fa-code-fork: "\f126"; 264 | @fa-chain-broken: "\f127"; 265 | @fa-question: "\f128"; 266 | @fa-info: "\f129"; 267 | @fa-exclamation: "\f12a"; 268 | @fa-superscript: "\f12b"; 269 | @fa-subscript: "\f12c"; 270 | @fa-eraser: "\f12d"; 271 | @fa-puzzle-piece: "\f12e"; 272 | @fa-microphone: "\f130"; 273 | @fa-microphone-slash: "\f131"; 274 | @fa-shield: "\f132"; 275 | @fa-calendar-o: "\f133"; 276 | @fa-fire-extinguisher: "\f134"; 277 | @fa-rocket: "\f135"; 278 | @fa-maxcdn: "\f136"; 279 | @fa-chevron-circle-left: "\f137"; 280 | @fa-chevron-circle-right: "\f138"; 281 | @fa-chevron-circle-up: "\f139"; 282 | @fa-chevron-circle-down: "\f13a"; 283 | @fa-html5: "\f13b"; 284 | @fa-css3: "\f13c"; 285 | @fa-anchor: "\f13d"; 286 | @fa-unlock-alt: "\f13e"; 287 | @fa-bullseye: "\f140"; 288 | @fa-ellipsis-h: "\f141"; 289 | @fa-ellipsis-v: "\f142"; 290 | @fa-rss-square: "\f143"; 291 | @fa-play-circle: "\f144"; 292 | @fa-ticket: "\f145"; 293 | @fa-minus-square: "\f146"; 294 | @fa-minus-square-o: "\f147"; 295 | @fa-level-up: "\f148"; 296 | @fa-level-down: "\f149"; 297 | @fa-check-square: "\f14a"; 298 | @fa-pencil-square: "\f14b"; 299 | @fa-external-link-square: "\f14c"; 300 | @fa-share-square: "\f14d"; 301 | @fa-compass: "\f14e"; 302 | @fa-caret-square-o-down: "\f150"; 303 | @fa-caret-square-o-up: "\f151"; 304 | @fa-caret-square-o-right: "\f152"; 305 | @fa-eur: "\f153"; 306 | @fa-gbp: "\f154"; 307 | @fa-usd: "\f155"; 308 | @fa-inr: "\f156"; 309 | @fa-jpy: "\f157"; 310 | @fa-rub: "\f158"; 311 | @fa-krw: "\f159"; 312 | @fa-btc: "\f15a"; 313 | @fa-file: "\f15b"; 314 | @fa-file-text: "\f15c"; 315 | @fa-sort-alpha-asc: "\f15d"; 316 | @fa-sort-alpha-desc: "\f15e"; 317 | @fa-sort-amount-asc: "\f160"; 318 | @fa-sort-amount-desc: "\f161"; 319 | @fa-sort-numeric-asc: "\f162"; 320 | @fa-sort-numeric-desc: "\f163"; 321 | @fa-thumbs-up: "\f164"; 322 | @fa-thumbs-down: "\f165"; 323 | @fa-youtube-square: "\f166"; 324 | @fa-youtube: "\f167"; 325 | @fa-xing: "\f168"; 326 | @fa-xing-square: "\f169"; 327 | @fa-youtube-play: "\f16a"; 328 | @fa-dropbox: "\f16b"; 329 | @fa-stack-overflow: "\f16c"; 330 | @fa-instagram: "\f16d"; 331 | @fa-flickr: "\f16e"; 332 | @fa-adn: "\f170"; 333 | @fa-bitbucket: "\f171"; 334 | @fa-bitbucket-square: "\f172"; 335 | @fa-tumblr: "\f173"; 336 | @fa-tumblr-square: "\f174"; 337 | @fa-long-arrow-down: "\f175"; 338 | @fa-long-arrow-up: "\f176"; 339 | @fa-long-arrow-left: "\f177"; 340 | @fa-long-arrow-right: "\f178"; 341 | @fa-apple: "\f179"; 342 | @fa-windows: "\f17a"; 343 | @fa-android: "\f17b"; 344 | @fa-linux: "\f17c"; 345 | @fa-dribbble: "\f17d"; 346 | @fa-skype: "\f17e"; 347 | @fa-foursquare: "\f180"; 348 | @fa-trello: "\f181"; 349 | @fa-female: "\f182"; 350 | @fa-male: "\f183"; 351 | @fa-gittip: "\f184"; 352 | @fa-sun-o: "\f185"; 353 | @fa-moon-o: "\f186"; 354 | @fa-archive: "\f187"; 355 | @fa-bug: "\f188"; 356 | @fa-vk: "\f189"; 357 | @fa-weibo: "\f18a"; 358 | @fa-renren: "\f18b"; 359 | @fa-pagelines: "\f18c"; 360 | @fa-stack-exchange: "\f18d"; 361 | @fa-arrow-circle-o-right: "\f18e"; 362 | @fa-arrow-circle-o-left: "\f190"; 363 | @fa-caret-square-o-left: "\f191"; 364 | @fa-dot-circle-o: "\f192"; 365 | @fa-wheelchair: "\f193"; 366 | @fa-vimeo-square: "\f194"; 367 | @fa-try: "\f195"; 368 | @fa-plus-square-o: "\f196"; 369 | @fa-space-shuttle: "\f197"; 370 | @fa-slack: "\f198"; 371 | @fa-envelope-square: "\f199"; 372 | @fa-wordpress: "\f19a"; 373 | @fa-openid: "\f19b"; 374 | @fa-university: "\f19c"; 375 | @fa-graduation-cap: "\f19d"; 376 | @fa-yahoo: "\f19e"; 377 | @fa-google: "\f1a0"; 378 | @fa-reddit: "\f1a1"; 379 | @fa-reddit-square: "\f1a2"; 380 | @fa-stumbleupon-circle: "\f1a3"; 381 | @fa-stumbleupon: "\f1a4"; 382 | @fa-delicious: "\f1a5"; 383 | @fa-digg: "\f1a6"; 384 | @fa-pied-piper: "\f1a7"; 385 | @fa-pied-piper-alt: "\f1a8"; 386 | @fa-drupal: "\f1a9"; 387 | @fa-joomla: "\f1aa"; 388 | @fa-language: "\f1ab"; 389 | @fa-fax: "\f1ac"; 390 | @fa-building: "\f1ad"; 391 | @fa-child: "\f1ae"; 392 | @fa-paw: "\f1b0"; 393 | @fa-spoon: "\f1b1"; 394 | @fa-cube: "\f1b2"; 395 | @fa-cubes: "\f1b3"; 396 | @fa-behance: "\f1b4"; 397 | @fa-behance-square: "\f1b5"; 398 | @fa-steam: "\f1b6"; 399 | @fa-steam-square: "\f1b7"; 400 | @fa-recycle: "\f1b8"; 401 | @fa-car: "\f1b9"; 402 | @fa-taxi: "\f1ba"; 403 | @fa-tree: "\f1bb"; 404 | @fa-spotify: "\f1bc"; 405 | @fa-deviantart: "\f1bd"; 406 | @fa-soundcloud: "\f1be"; 407 | @fa-database: "\f1c0"; 408 | @fa-file-pdf-o: "\f1c1"; 409 | @fa-file-word-o: "\f1c2"; 410 | @fa-file-excel-o: "\f1c3"; 411 | @fa-file-powerpoint-o: "\f1c4"; 412 | @fa-file-image-o: "\f1c5"; 413 | @fa-file-archive-o: "\f1c6"; 414 | @fa-file-audio-o: "\f1c7"; 415 | @fa-file-video-o: "\f1c8"; 416 | @fa-file-code-o: "\f1c9"; 417 | @fa-vine: "\f1ca"; 418 | @fa-codepen: "\f1cb"; 419 | @fa-jsfiddle: "\f1cc"; 420 | @fa-life-ring: "\f1cd"; 421 | @fa-circle-o-notch: "\f1ce"; 422 | @fa-rebel: "\f1d0"; 423 | @fa-empire: "\f1d1"; 424 | @fa-git-square: "\f1d2"; 425 | @fa-git: "\f1d3"; 426 | @fa-hacker-news: "\f1d4"; 427 | @fa-tencent-weibo: "\f1d5"; 428 | @fa-qq: "\f1d6"; 429 | @fa-weixin: "\f1d7"; 430 | @fa-paper-plane: "\f1d8"; 431 | @fa-paper-plane-o: "\f1d9"; 432 | @fa-history: "\f1da"; 433 | @fa-circle-thin: "\f1db"; 434 | @fa-header: "\f1dc"; 435 | @fa-paragraph: "\f1dd"; 436 | @fa-sliders: "\f1de"; 437 | @fa-share-alt: "\f1e0"; 438 | @fa-share-alt-square: "\f1e1"; 439 | @fa-bomb: "\f1e2"; 440 | @fa-futbol-o: "\f1e3"; 441 | @fa-tty: "\f1e4"; 442 | @fa-binoculars: "\f1e5"; 443 | @fa-plug: "\f1e6"; 444 | @fa-slideshare: "\f1e7"; 445 | @fa-twitch: "\f1e8"; 446 | @fa-yelp: "\f1e9"; 447 | @fa-newspaper-o: "\f1ea"; 448 | @fa-wifi: "\f1eb"; 449 | @fa-calculator: "\f1ec"; 450 | @fa-paypal: "\f1ed"; 451 | @fa-google-wallet: "\f1ee"; 452 | @fa-cc-visa: "\f1f0"; 453 | @fa-cc-mastercard: "\f1f1"; 454 | @fa-cc-discover: "\f1f2"; 455 | @fa-cc-amex: "\f1f3"; 456 | @fa-cc-paypal: "\f1f4"; 457 | @fa-cc-stripe: "\f1f5"; 458 | @fa-bell-slash: "\f1f6"; 459 | @fa-bell-slash-o: "\f1f7"; 460 | @fa-trash: "\f1f8"; 461 | @fa-copyright: "\f1f9"; 462 | @fa-at: "\f1fa"; 463 | @fa-eyedropper: "\f1fb"; 464 | @fa-paint-brush: "\f1fc"; 465 | @fa-birthday-cake: "\f1fd"; 466 | @fa-area-chart: "\f1fe"; 467 | @fa-pie-chart: "\f200"; 468 | @fa-line-chart: "\f201"; 469 | @fa-lastfm: "\f202"; 470 | @fa-lastfm-square: "\f203"; 471 | @fa-toggle-off: "\f204"; 472 | @fa-toggle-on: "\f205"; 473 | @fa-bicycle: "\f206"; 474 | @fa-bus: "\f207"; 475 | @fa-ioxhost: "\f208"; 476 | @fa-angellist: "\f209"; 477 | @fa-cc: "\f20a"; 478 | @fa-ils: "\f20b"; 479 | @fa-meanpath: "\f20c"; 480 | 481 | -------------------------------------------------------------------------------- /static/css/awesomeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/awesomeStyle/img/loading.gif -------------------------------------------------------------------------------- /static/css/demo.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 2 | margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;} 3 | body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;} 4 | h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;} 5 | h1 {font-size: 24px;line-height: 34px;text-align: center;} 6 | h2 {font-size: 14px;line-height: 24px;padding-top: 5px;} 7 | h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;} 8 | a {color:#3C6E31;text-decoration: underline;} 9 | a:hover {background-color:#3C6E31;color:white;} 10 | input.radio {margin: 0 2px 0 8px;} 11 | input.radio.first {margin-left:0;} 12 | input.empty {color: lightgray;} 13 | code {color: #2f332a;} 14 | .highlight_red {color:#A60000;} 15 | .highlight_green {color:#A7F43D;} 16 | li {list-style: circle;font-size: 12px;} 17 | li.title {list-style: none;} 18 | ul.list {margin-left: 17px;} 19 | 20 | div.content_wrap {width: 600px;height:380px;} 21 | div.content_wrap div.left{float: left;width: 250px;} 22 | div.content_wrap div.right{float: right;width: 340px;} 23 | div.zTreeDemoBackground {width:250px;height:362px;text-align:left;} 24 | 25 | ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;} 26 | ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;} 27 | ul.log.small {height:45px;} 28 | ul.log li {color: #666666;list-style: none;padding-left: 10px;} 29 | ul.log li.dark {background-color: #E3E3E3;} 30 | 31 | /* ruler */ 32 | div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer} 33 | div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer} -------------------------------------------------------------------------------- /static/css/metroStyle/img/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/metroStyle/img/line_conn.png -------------------------------------------------------------------------------- /static/css/metroStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/metroStyle/img/loading.gif -------------------------------------------------------------------------------- /static/css/metroStyle/img/metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/metroStyle/img/metro.gif -------------------------------------------------------------------------------- /static/css/metroStyle/img/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/metroStyle/img/metro.png -------------------------------------------------------------------------------- /static/css/metroStyle/metroStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.4 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} 12 | .ztree {margin:0; padding:5px; color:#333} 13 | .ztree li{padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0} 14 | .ztree li ul{ margin:0; padding:0 0 0 18px} 15 | .ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;} 16 | 17 | .ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block} 18 | .ztree li a:hover {text-decoration:underline} 19 | .ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;} 20 | .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;} 21 | .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid; 22 | opacity:0.8; filter:alpha(opacity=80)} 23 | .ztree li a.tmpTargetNode_prev {} 24 | .ztree li a.tmpTargetNode_next {} 25 | .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; 26 | font-size:12px; border:1px #585956 solid; *border:0px} 27 | .ztree li span {line-height:21px; margin-right:2px} 28 | .ztree li span.button {line-height:0; margin:0; padding: 0; width:21px; height:21px; display: inline-block; vertical-align:middle; 29 | border:0 none; cursor: pointer;outline:none; 30 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 31 | background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} 32 | 33 | .ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto} 34 | .ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;} 35 | .ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;} 36 | .ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;} 37 | .ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;} 38 | .ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;} 39 | .ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;} 40 | .ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;} 41 | .ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;} 42 | .ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;} 43 | .ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;} 44 | .ztree li span.button.chk.radio_false_full {background-position: -47px -5px;} 45 | .ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;} 46 | .ztree li span.button.chk.radio_false_part {background-position: -47px -47px;} 47 | .ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;} 48 | .ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;} 49 | .ztree li span.button.chk.radio_true_full {background-position: -68px -5px;} 50 | .ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;} 51 | .ztree li span.button.chk.radio_true_part {background-position: -68px -47px;} 52 | .ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;} 53 | .ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;} 54 | 55 | .ztree li span.button.switch {width:21px; height:21px} 56 | .ztree li span.button.root_open{background-position:-105px -63px} 57 | .ztree li span.button.root_close{background-position:-126px -63px} 58 | .ztree li span.button.roots_open{background-position: -105px 0;} 59 | .ztree li span.button.roots_close{background-position: -126px 0;} 60 | .ztree li span.button.center_open{background-position: -105px -21px;} 61 | .ztree li span.button.center_close{background-position: -126px -21px;} 62 | .ztree li span.button.bottom_open{background-position: -105px -42px;} 63 | .ztree li span.button.bottom_close{background-position: -126px -42px;} 64 | .ztree li span.button.noline_open{background-position: -105px -84px;} 65 | .ztree li span.button.noline_close{background-position: -126px -84px;} 66 | .ztree li span.button.root_docu{ background:none;} 67 | .ztree li span.button.roots_docu{background-position: -84px 0;} 68 | .ztree li span.button.center_docu{background-position: -84px -21px;} 69 | .ztree li span.button.bottom_docu{background-position: -84px -42px;} 70 | .ztree li span.button.noline_docu{ background:none;} 71 | 72 | .ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle} 73 | .ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle} 74 | .ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle} 75 | .ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle} 76 | .ztree li span.button.edit:hover { 77 | background-position: -168px -21px; 78 | } 79 | .ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle} 80 | .ztree li span.button.remove:hover { 81 | background-position: -168px -42px; 82 | } 83 | .ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle} 84 | .ztree li span.button.add:hover { 85 | background-position: -168px 0; 86 | } 87 | .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 88 | 89 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 90 | 91 | span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 92 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 93 | background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} 94 | 95 | ul.ztreeul.ztreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 96 | .ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 97 | -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /static/css/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibuler/WebFileView/388f5b6237c6db9e8fcdd32b681a060ff4fc413f/static/css/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /static/css/zTreeStyle/zTreeStyle.css: -------------------------------------------------------------------------------- 1 | /*------------------------------------- 2 | zTree Style 3 | 4 | version: 3.5.18 5 | author: Hunter.z 6 | email: hunter.z@263.net 7 | website: http://code.google.com/p/jquerytree/ 8 | 9 | -------------------------------------*/ 10 | 11 | .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} 12 | .ztree {margin:0; padding:5px; color:#333} 13 | .ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0} 14 | .ztree li ul{ margin:0; padding:0 0 0 18px} 15 | .ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;} 16 | 17 | .ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent; 18 | text-decoration:none; vertical-align:top; display: inline-block} 19 | .ztree li a:hover {text-decoration:underline} 20 | .ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} 21 | .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} 22 | .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; 23 | opacity:0.8; filter:alpha(opacity=80)} 24 | .ztree li a.tmpTargetNode_prev {} 25 | .ztree li a.tmpTargetNode_next {} 26 | .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; 27 | font-size:12px; border:1px #7EC4CC solid; *border:0px} 28 | .ztree li span {line-height:16px; margin-right:2px} 29 | .ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle; 30 | border:0 none; cursor: pointer;outline:none; 31 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 32 | background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 33 | 34 | .ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto} 35 | .ztree li span.button.chk.checkbox_false_full {background-position:0 0} 36 | .ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px} 37 | .ztree li span.button.chk.checkbox_false_part {background-position:0 -28px} 38 | .ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px} 39 | .ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px} 40 | .ztree li span.button.chk.checkbox_true_full {background-position:-14px 0} 41 | .ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px} 42 | .ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px} 43 | .ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px} 44 | .ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px} 45 | .ztree li span.button.chk.radio_false_full {background-position:-28px 0} 46 | .ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px} 47 | .ztree li span.button.chk.radio_false_part {background-position:-28px -28px} 48 | .ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px} 49 | .ztree li span.button.chk.radio_false_disable {background-position:-28px -56px} 50 | .ztree li span.button.chk.radio_true_full {background-position:-42px 0} 51 | .ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px} 52 | .ztree li span.button.chk.radio_true_part {background-position:-42px -28px} 53 | .ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px} 54 | .ztree li span.button.chk.radio_true_disable {background-position:-42px -56px} 55 | 56 | .ztree li span.button.switch {width:18px; height:18px} 57 | .ztree li span.button.root_open{background-position:-92px -54px} 58 | .ztree li span.button.root_close{background-position:-74px -54px} 59 | .ztree li span.button.roots_open{background-position:-92px 0} 60 | .ztree li span.button.roots_close{background-position:-74px 0} 61 | .ztree li span.button.center_open{background-position:-92px -18px} 62 | .ztree li span.button.center_close{background-position:-74px -18px} 63 | .ztree li span.button.bottom_open{background-position:-92px -36px} 64 | .ztree li span.button.bottom_close{background-position:-74px -36px} 65 | .ztree li span.button.noline_open{background-position:-92px -72px} 66 | .ztree li span.button.noline_close{background-position:-74px -72px} 67 | .ztree li span.button.root_docu{ background:none;} 68 | .ztree li span.button.roots_docu{background-position:-56px 0} 69 | .ztree li span.button.center_docu{background-position:-56px -18px} 70 | .ztree li span.button.bottom_docu{background-position:-56px -36px} 71 | .ztree li span.button.noline_docu{ background:none;} 72 | 73 | .ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle} 74 | .ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle} 75 | .ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle} 76 | .ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle} 77 | .ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle} 78 | 79 | .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} 80 | 81 | ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} 82 | 83 | span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; 84 | background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; 85 | background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} 86 | 87 | ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} 88 | .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} 89 | 90 | /* level style*/ 91 | /*.ztree li span.button.level0 { 92 | display:none; 93 | } 94 | .ztree li ul.level0 { 95 | padding:0; 96 | background:none; 97 | }*/ -------------------------------------------------------------------------------- /static/js/jquery.ztree.core-3.5.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree core v3.5.18 3 | * http://zTree.me/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2015-08-13 12 | */ 13 | (function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url",icon:"icon"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text", 14 | url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated, 15 | [a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])});a.bind(c.SELECTED, 16 | function(a,c,g,l){j.apply(b.callback.onSelected,[c,g,l])});a.bind(c.UNSELECTED,function(a,c,g,l){j.apply(b.callback.onUnSelected,[c,g,l])})}],x=[function(b){var a=e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE).unbind(a.SELECTED).unbind(a.UNSELECTED)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children; 17 | c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b, 18 | c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,o=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id, 19 | g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i= 20 | H}switch(l){case "mousedown":o=I;break;case "mouseup":o=J;break;case "dblclick":o=K;break;case "contextmenu":o=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:o}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]= 21 | a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children; 22 | a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]= 23 | a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,e=d?null:[],i=0,o=a.length;i0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument: 37 | null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf|| 38 | !a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e= 39 | [],j=b.data.key.children,k=0,m=c.length;k0&&(t=i.appendNodes(b,a+1,n[j],n,f,g&&n.open));g&&(i.makeDOMNodeMainBefore(e,b,n),i.makeDOMNodeLine(e,b,n),h.getBeforeA(b,n,e),i.makeDOMNodeNameBefore(e,b,n),h.getInnerBeforeA(b,n,e),i.makeDOMNodeIcon(e,b,n),h.getInnerAfterA(b,n,e),i.makeDOMNodeNameAfter(e,b,n),h.getAfterA(b,n,e),n.isParent&&n.open&&i.makeUlHtml(b, 40 | n,e,t.join("")),i.makeDOMNodeMainAfter(e,b,n),h.addCreatedNode(b,n))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync, 41 | [b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&f1&&(o=q[1],q=q[0]);l[o]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f=0;f--)if(g=d[f],a===g||!a&&(!c||c!==g))if(k(g,e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);b.treeObj.trigger(e.event.UNSELECTED,[m,b.treeId,g]);break}else d.splice(f,1),b.treeObj.trigger(e.event.UNSELECTED, 44 | [m,b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))): 45 | b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length> 46 | 0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),o=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&o.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,o,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a, 47 | g,e.folder.CLOSE),i.replaceIcoClass(a,o,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1: 48 | d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");b.push("",d,"")},makeDOMNodeLine:function(b,a,c){b.push("")},makeDOMNodeMainAfter:function(b){b.push("")},makeDOMNodeMainBefore:function(b,a,c){b.push("
  • ")}, 50 | makeDOMNodeNameAfter:function(b){b.push("")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g, 51 | "'").replace(//g,">"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&& 52 | a.iconClose?a.open?a.iconOpen:a.iconClose:a[b.data.key.icon];d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN: 53 | e.folder.CLOSE):c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("
      ");c.push(d); 54 | c.push("
    ")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g0){var o=f[d][g-1],g=k(o,e.id.UL,b),l=k(o,e.id.SWITCH,b);j=k(o,e.id.ICON,b);f==c?f[d].length==1?i.replaceSwitchClass(o,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0], 57 | c,e.line.ROOTS),i.replaceSwitchClass(o,l,e.line.BOTTOM)):i.replaceSwitchClass(o,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]= 58 | i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a);b.treeObj.trigger(e.event.SELECTED,[m,b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c= 59 | k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle, 60 | [b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button", 61 | LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close", 62 | DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)? 63 | c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a= 64 | !!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;if(!j.canAsync(d,a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!== 65 | !1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(p){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a? 66 | null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e0?i.createNodes(d,0,b[a]):d.async.enable&& 70 | d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery); 71 | -------------------------------------------------------------------------------- /static/js/jquery.ztree.excheck-3.5.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree excheck v3.5.18 3 | * http://zTree.me/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2015-08-13 12 | */ 13 | (function($){ 14 | //default consts of excheck 15 | var _consts = { 16 | event: { 17 | CHECK: "ztree_check" 18 | }, 19 | id: { 20 | CHECK: "_check" 21 | }, 22 | checkbox: { 23 | STYLE: "checkbox", 24 | DEFAULT: "chk", 25 | DISABLED: "disable", 26 | FALSE: "false", 27 | TRUE: "true", 28 | FULL: "full", 29 | PART: "part", 30 | FOCUS: "focus" 31 | }, 32 | radio: { 33 | STYLE: "radio", 34 | TYPE_ALL: "all", 35 | TYPE_LEVEL: "level" 36 | } 37 | }, 38 | //default setting of excheck 39 | _setting = { 40 | check: { 41 | enable: false, 42 | autoCheckTrigger: false, 43 | chkStyle: _consts.checkbox.STYLE, 44 | nocheckInherit: false, 45 | chkDisabledInherit: false, 46 | radioType: _consts.radio.TYPE_LEVEL, 47 | chkboxType: { 48 | "Y": "ps", 49 | "N": "ps" 50 | } 51 | }, 52 | data: { 53 | key: { 54 | checked: "checked" 55 | } 56 | }, 57 | callback: { 58 | beforeCheck:null, 59 | onCheck:null 60 | } 61 | }, 62 | //default root of excheck 63 | _initRoot = function (setting) { 64 | var r = data.getRoot(setting); 65 | r.radioCheckedList = []; 66 | }, 67 | //default cache of excheck 68 | _initCache = function(treeId) {}, 69 | //default bind event of excheck 70 | _bindEvent = function(setting) { 71 | var o = setting.treeObj, 72 | c = consts.event; 73 | o.bind(c.CHECK, function (event, srcEvent, treeId, node) { 74 | event.srcEvent = srcEvent; 75 | tools.apply(setting.callback.onCheck, [event, treeId, node]); 76 | }); 77 | }, 78 | _unbindEvent = function(setting) { 79 | var o = setting.treeObj, 80 | c = consts.event; 81 | o.unbind(c.CHECK); 82 | }, 83 | //default event proxy of excheck 84 | _eventProxy = function(e) { 85 | var target = e.target, 86 | setting = data.getSetting(e.data.treeId), 87 | tId = "", node = null, 88 | nodeEventType = "", treeEventType = "", 89 | nodeEventCallback = null, treeEventCallback = null; 90 | 91 | if (tools.eqs(e.type, "mouseover")) { 92 | if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { 93 | tId = tools.getNodeMainDom(target).id; 94 | nodeEventType = "mouseoverCheck"; 95 | } 96 | } else if (tools.eqs(e.type, "mouseout")) { 97 | if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { 98 | tId = tools.getNodeMainDom(target).id; 99 | nodeEventType = "mouseoutCheck"; 100 | } 101 | } else if (tools.eqs(e.type, "click")) { 102 | if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) { 103 | tId = tools.getNodeMainDom(target).id; 104 | nodeEventType = "checkNode"; 105 | } 106 | } 107 | if (tId.length>0) { 108 | node = data.getNodeCache(setting, tId); 109 | switch (nodeEventType) { 110 | case "checkNode" : 111 | nodeEventCallback = _handler.onCheckNode; 112 | break; 113 | case "mouseoverCheck" : 114 | nodeEventCallback = _handler.onMouseoverCheck; 115 | break; 116 | case "mouseoutCheck" : 117 | nodeEventCallback = _handler.onMouseoutCheck; 118 | break; 119 | } 120 | } 121 | var proxyResult = { 122 | stop: nodeEventType === "checkNode", 123 | node: node, 124 | nodeEventType: nodeEventType, 125 | nodeEventCallback: nodeEventCallback, 126 | treeEventType: treeEventType, 127 | treeEventCallback: treeEventCallback 128 | }; 129 | return proxyResult 130 | }, 131 | //default init node of excheck 132 | _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { 133 | if (!n) return; 134 | var checkedKey = setting.data.key.checked; 135 | if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true"); 136 | n[checkedKey] = !!n[checkedKey]; 137 | n.checkedOld = n[checkedKey]; 138 | if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); 139 | n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); 140 | if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); 141 | n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); 142 | if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); 143 | n.halfCheck = !!n.halfCheck; 144 | n.check_Child_State = -1; 145 | n.check_Focus = false; 146 | n.getCheckStatus = function() {return data.getCheckStatus(setting, n);}; 147 | 148 | if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) { 149 | var r = data.getRoot(setting); 150 | r.radioCheckedList.push(n); 151 | } 152 | }, 153 | //add dom for check 154 | _beforeA = function(setting, node, html) { 155 | var checkedKey = setting.data.key.checked; 156 | if (setting.check.enable) { 157 | data.makeChkFlag(setting, node); 158 | html.push(""); 159 | } 160 | }, 161 | //update zTreeObj, add method of check 162 | _zTreeTools = function(setting, zTreeTools) { 163 | zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) { 164 | var checkedKey = this.setting.data.key.checked; 165 | if (node.chkDisabled === true) return; 166 | if (checked !== true && checked !== false) { 167 | checked = !node[checkedKey]; 168 | } 169 | callbackFlag = !!callbackFlag; 170 | 171 | if (node[checkedKey] === checked && !checkTypeFlag) { 172 | return; 173 | } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { 174 | return; 175 | } 176 | if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { 177 | node[checkedKey] = checked; 178 | var checkObj = $$(node, consts.id.CHECK, this.setting); 179 | if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); 180 | view.setChkClass(this.setting, checkObj, node); 181 | view.repairParentChkClassWithSelf(this.setting, node); 182 | if (callbackFlag) { 183 | this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); 184 | } 185 | } 186 | } 187 | 188 | zTreeTools.checkAllNodes = function(checked) { 189 | view.repairAllChk(this.setting, !!checked); 190 | } 191 | 192 | zTreeTools.getCheckedNodes = function(checked) { 193 | var childKey = this.setting.data.key.children; 194 | checked = (checked !== false); 195 | return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked); 196 | } 197 | 198 | zTreeTools.getChangeCheckedNodes = function() { 199 | var childKey = this.setting.data.key.children; 200 | return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]); 201 | } 202 | 203 | zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) { 204 | disabled = !!disabled; 205 | inheritParent = !!inheritParent; 206 | inheritChildren = !!inheritChildren; 207 | view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); 208 | view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); 209 | } 210 | 211 | var _updateNode = zTreeTools.updateNode; 212 | zTreeTools.updateNode = function(node, checkTypeFlag) { 213 | if (_updateNode) _updateNode.apply(zTreeTools, arguments); 214 | if (!node || !this.setting.check.enable) return; 215 | var nObj = $$(node, this.setting); 216 | if (nObj.get(0) && tools.uCanDo(this.setting)) { 217 | var checkObj = $$(node, consts.id.CHECK, this.setting); 218 | if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); 219 | view.setChkClass(this.setting, checkObj, node); 220 | view.repairParentChkClassWithSelf(this.setting, node); 221 | } 222 | } 223 | }, 224 | //method of operate data 225 | _data = { 226 | getRadioCheckedList: function(setting) { 227 | var checkedList = data.getRoot(setting).radioCheckedList; 228 | for (var i=0, j=checkedList.length; i -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) 242 | }; 243 | return r; 244 | }, 245 | getTreeCheckedNodes: function(setting, nodes, checked, results) { 246 | if (!nodes) return []; 247 | var childKey = setting.data.key.children, 248 | checkedKey = setting.data.key.checked, 249 | onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); 250 | results = !results ? [] : results; 251 | for (var i = 0, l = nodes.length; i < l; i++) { 252 | if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) { 253 | results.push(nodes[i]); 254 | if(onlyOne) { 255 | break; 256 | } 257 | } 258 | data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results); 259 | if(onlyOne && results.length > 0) { 260 | break; 261 | } 262 | } 263 | return results; 264 | }, 265 | getTreeChangeCheckedNodes: function(setting, nodes, results) { 266 | if (!nodes) return []; 267 | var childKey = setting.data.key.children, 268 | checkedKey = setting.data.key.checked; 269 | results = !results ? [] : results; 270 | for (var i = 0, l = nodes.length; i < l; i++) { 271 | if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) { 272 | results.push(nodes[i]); 273 | } 274 | data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results); 275 | } 276 | return results; 277 | }, 278 | makeChkFlag: function(setting, node) { 279 | if (!node) return; 280 | var childKey = setting.data.key.children, 281 | checkedKey = setting.data.key.checked, 282 | chkFlag = -1; 283 | if (node[childKey]) { 284 | for (var i = 0, l = node[childKey].length; i < l; i++) { 285 | var cNode = node[childKey][i]; 286 | var tmp = -1; 287 | if (setting.check.chkStyle == consts.radio.STYLE) { 288 | if (cNode.nocheck === true || cNode.chkDisabled === true) { 289 | tmp = cNode.check_Child_State; 290 | } else if (cNode.halfCheck === true) { 291 | tmp = 2; 292 | } else if (cNode[checkedKey]) { 293 | tmp = 2; 294 | } else { 295 | tmp = cNode.check_Child_State > 0 ? 2:0; 296 | } 297 | if (tmp == 2) { 298 | chkFlag = 2; break; 299 | } else if (tmp == 0){ 300 | chkFlag = 0; 301 | } 302 | } else if (setting.check.chkStyle == consts.checkbox.STYLE) { 303 | if (cNode.nocheck === true || cNode.chkDisabled === true) { 304 | tmp = cNode.check_Child_State; 305 | } else if (cNode.halfCheck === true) { 306 | tmp = 1; 307 | } else if (cNode[checkedKey] ) { 308 | tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; 309 | } else { 310 | tmp = (cNode.check_Child_State > 0) ? 1 : 0; 311 | } 312 | if (tmp === 1) { 313 | chkFlag = 1; break; 314 | } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { 315 | chkFlag = 1; break; 316 | } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { 317 | chkFlag = 1; break; 318 | } else if (tmp > -1) { 319 | chkFlag = tmp; 320 | } 321 | } 322 | } 323 | } 324 | node.check_Child_State = chkFlag; 325 | } 326 | }, 327 | //method of event proxy 328 | _event = { 329 | 330 | }, 331 | //method of event handler 332 | _handler = { 333 | onCheckNode: function (event, node) { 334 | if (node.chkDisabled === true) return false; 335 | var setting = data.getSetting(event.data.treeId), 336 | checkedKey = setting.data.key.checked; 337 | if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; 338 | node[checkedKey] = !node[checkedKey]; 339 | view.checkNodeRelation(setting, node); 340 | var checkObj = $$(node, consts.id.CHECK, setting); 341 | view.setChkClass(setting, checkObj, node); 342 | view.repairParentChkClassWithSelf(setting, node); 343 | setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); 344 | return true; 345 | }, 346 | onMouseoverCheck: function(event, node) { 347 | if (node.chkDisabled === true) return false; 348 | var setting = data.getSetting(event.data.treeId), 349 | checkObj = $$(node, consts.id.CHECK, setting); 350 | node.check_Focus = true; 351 | view.setChkClass(setting, checkObj, node); 352 | return true; 353 | }, 354 | onMouseoutCheck: function(event, node) { 355 | if (node.chkDisabled === true) return false; 356 | var setting = data.getSetting(event.data.treeId), 357 | checkObj = $$(node, consts.id.CHECK, setting); 358 | node.check_Focus = false; 359 | view.setChkClass(setting, checkObj, node); 360 | return true; 361 | } 362 | }, 363 | //method of tools for zTree 364 | _tools = { 365 | 366 | }, 367 | //method of operate ztree dom 368 | _view = { 369 | checkNodeRelation: function(setting, node) { 370 | var pNode, i, l, 371 | childKey = setting.data.key.children, 372 | checkedKey = setting.data.key.checked, 373 | r = consts.radio; 374 | if (setting.check.chkStyle == r.STYLE) { 375 | var checkedList = data.getRadioCheckedList(setting); 376 | if (node[checkedKey]) { 377 | if (setting.check.radioType == r.TYPE_ALL) { 378 | for (i = checkedList.length-1; i >= 0; i--) { 379 | pNode = checkedList[i]; 380 | if (pNode[checkedKey] && pNode != node) { 381 | pNode[checkedKey] = false; 382 | checkedList.splice(i, 1); 383 | 384 | view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); 385 | if (pNode.parentTId != node.parentTId) { 386 | view.repairParentChkClassWithSelf(setting, pNode); 387 | } 388 | } 389 | } 390 | checkedList.push(node); 391 | } else { 392 | var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); 393 | for (i = 0, l = parentNode[childKey].length; i < l; i++) { 394 | pNode = parentNode[childKey][i]; 395 | if (pNode[checkedKey] && pNode != node) { 396 | pNode[checkedKey] = false; 397 | view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); 398 | } 399 | } 400 | } 401 | } else if (setting.check.radioType == r.TYPE_ALL) { 402 | for (i = 0, l = checkedList.length; i < l; i++) { 403 | if (node == checkedList[i]) { 404 | checkedList.splice(i, 1); 405 | break; 406 | } 407 | } 408 | } 409 | 410 | } else { 411 | if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { 412 | view.setSonNodeCheckBox(setting, node, true); 413 | } 414 | if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) { 415 | view.setSonNodeCheckBox(setting, node, false); 416 | } 417 | if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) { 418 | view.setParentNodeCheckBox(setting, node, true); 419 | } 420 | if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) { 421 | view.setParentNodeCheckBox(setting, node, false); 422 | } 423 | } 424 | }, 425 | makeChkClass: function(setting, node) { 426 | var checkedKey = setting.data.key.checked, 427 | c = consts.checkbox, r = consts.radio, 428 | fullStyle = ""; 429 | if (node.chkDisabled === true) { 430 | fullStyle = c.DISABLED; 431 | } else if (node.halfCheck) { 432 | fullStyle = c.PART; 433 | } else if (setting.check.chkStyle == r.STYLE) { 434 | fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART; 435 | } else { 436 | fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART); 437 | } 438 | var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; 439 | chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; 440 | return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; 441 | }, 442 | repairAllChk: function(setting, checked) { 443 | if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { 444 | var checkedKey = setting.data.key.checked, 445 | childKey = setting.data.key.children, 446 | root = data.getRoot(setting); 447 | for (var i = 0, l = root[childKey].length; i 0) { 474 | view.repairParentChkClass(setting, node[childKey][0]); 475 | } else { 476 | view.repairParentChkClass(setting, node); 477 | } 478 | }, 479 | repairSonChkDisabled: function(setting, node, chkDisabled, inherit) { 480 | if (!node) return; 481 | var childKey = setting.data.key.children; 482 | if (node.chkDisabled != chkDisabled) { 483 | node.chkDisabled = chkDisabled; 484 | } 485 | view.repairChkClass(setting, node); 486 | if (node[childKey] && inherit) { 487 | for (var i = 0, l = node[childKey].length; i < l; i++) { 488 | var sNode = node[childKey][i]; 489 | view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); 490 | } 491 | } 492 | }, 493 | repairParentChkDisabled: function(setting, node, chkDisabled, inherit) { 494 | if (!node) return; 495 | if (node.chkDisabled != chkDisabled && inherit) { 496 | node.chkDisabled = chkDisabled; 497 | } 498 | view.repairChkClass(setting, node); 499 | view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); 500 | }, 501 | setChkClass: function(setting, obj, node) { 502 | if (!obj) return; 503 | if (node.nocheck === true) { 504 | obj.hide(); 505 | } else { 506 | obj.show(); 507 | } 508 | obj.attr('class', view.makeChkClass(setting, node)); 509 | }, 510 | setParentNodeCheckBox: function(setting, node, value, srcNode) { 511 | var childKey = setting.data.key.children, 512 | checkedKey = setting.data.key.checked, 513 | checkObj = $$(node, consts.id.CHECK, setting); 514 | if (!srcNode) srcNode = node; 515 | data.makeChkFlag(setting, node); 516 | if (node.nocheck !== true && node.chkDisabled !== true) { 517 | node[checkedKey] = value; 518 | view.setChkClass(setting, checkObj, node); 519 | if (setting.check.autoCheckTrigger && node != srcNode) { 520 | setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); 521 | } 522 | } 523 | if (node.parentTId) { 524 | var pSign = true; 525 | if (!value) { 526 | var pNodes = node.getParentNode()[childKey]; 527 | for (var i = 0, l = pNodes.length; i < l; i++) { 528 | if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey]) 529 | || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) { 530 | pSign = false; 531 | break; 532 | } 533 | } 534 | } 535 | if (pSign) { 536 | view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); 537 | } 538 | } 539 | }, 540 | setSonNodeCheckBox: function(setting, node, value, srcNode) { 541 | if (!node) return; 542 | var childKey = setting.data.key.children, 543 | checkedKey = setting.data.key.checked, 544 | checkObj = $$(node, consts.id.CHECK, setting); 545 | if (!srcNode) srcNode = node; 546 | 547 | var hasDisable = false; 548 | if (node[childKey]) { 549 | for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) { 550 | var sNode = node[childKey][i]; 551 | view.setSonNodeCheckBox(setting, sNode, value, srcNode); 552 | if (sNode.chkDisabled === true) hasDisable = true; 553 | } 554 | } 555 | 556 | if (node != data.getRoot(setting) && node.chkDisabled !== true) { 557 | if (hasDisable && node.nocheck !== true) { 558 | data.makeChkFlag(setting, node); 559 | } 560 | if (node.nocheck !== true && node.chkDisabled !== true) { 561 | node[checkedKey] = value; 562 | if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1; 563 | } else { 564 | node.check_Child_State = -1; 565 | } 566 | view.setChkClass(setting, checkObj, node); 567 | if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { 568 | setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); 569 | } 570 | } 571 | 572 | } 573 | }, 574 | 575 | _z = { 576 | tools: _tools, 577 | view: _view, 578 | event: _event, 579 | data: _data 580 | }; 581 | $.extend(true, $.fn.zTree.consts, _consts); 582 | $.extend(true, $.fn.zTree._z, _z); 583 | 584 | var zt = $.fn.zTree, 585 | tools = zt._z.tools, 586 | consts = zt.consts, 587 | view = zt._z.view, 588 | data = zt._z.data, 589 | event = zt._z.event, 590 | $$ = tools.$; 591 | 592 | data.exSetting(_setting); 593 | data.addInitBind(_bindEvent); 594 | data.addInitUnBind(_unbindEvent); 595 | data.addInitCache(_initCache); 596 | data.addInitNode(_initNode); 597 | data.addInitProxy(_eventProxy, true); 598 | data.addInitRoot(_initRoot); 599 | data.addBeforeA(_beforeA); 600 | data.addZTreeTools(_zTreeTools); 601 | 602 | var _createNodes = view.createNodes; 603 | view.createNodes = function(setting, level, nodes, parentNode) { 604 | if (_createNodes) _createNodes.apply(view, arguments); 605 | if (!nodes) return; 606 | view.repairParentChkClassWithSelf(setting, parentNode); 607 | } 608 | var _removeNode = view.removeNode; 609 | view.removeNode = function(setting, node) { 610 | var parentNode = node.getParentNode(); 611 | if (_removeNode) _removeNode.apply(view, arguments); 612 | if (!node || !parentNode) return; 613 | view.repairChkClass(setting, parentNode); 614 | view.repairParentChkClass(setting, parentNode); 615 | } 616 | 617 | var _appendNodes = view.appendNodes; 618 | view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) { 619 | var html = ""; 620 | if (_appendNodes) { 621 | html = _appendNodes.apply(view, arguments); 622 | } 623 | if (parentNode) { 624 | data.makeChkFlag(setting, parentNode); 625 | } 626 | return html; 627 | } 628 | })(jQuery); -------------------------------------------------------------------------------- /static/js/jquery.ztree.excheck-3.5.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree excheck v3.5.18 3 | * http://zTree.me/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2015-08-13 12 | */ 13 | (function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c, 14 | a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled=== 15 | !0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,o);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,i=c.data.key.children,l=c.data.key.checked;b=j.radio;if(c.check.chkStyle==b.STYLE){var g=f.getRadioCheckedList(c);if(a[l])if(c.check.radioType==b.TYPE_ALL){for(d=g.length-1;d>=0;d--)b=g[d],b[l]&&b!=a&&(b[l]=!1,g.splice(d,1),e.setChkClass(c,n(b,j.id.CHECK,c),b),b.parentTId!= 16 | a.parentTId&&e.repairParentChkClassWithSelf(c,b));g.push(a)}else{g=a.parentTId?a.getParentNode():f.getRoot(c);for(d=0,h=g[i].length;d-1)&&e.setSonNodeCheckBox(c,a,!0),!a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c, 17 | a,!1),a[l]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[l]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=j.checkbox,h=j.radio,i="",i=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+ 18 | "_"+i,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return j.className.BUTTON+" "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===j.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=f.getRoot(c),i=0,l=h[d].length;i0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var i=0,l=a[h].length;i0){l=!1;break}l&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);var g=!1;if(a[h])for(var k=0,m=a[h].length;k0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,l,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(j.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=f.getRoot(c).radioCheckedList,b=0,d=a.length;b-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,i=c.data.key.checked,e=b&&c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL, 24 | d=!d?[]:d,g=0,k=a.length;g0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,i=0,e=a.length;i0?2:0,f==2){h=2;break}else f==0&&(h=0);else if(c.check.chkStyle==j.checkbox.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?1:g[d]?g.check_Child_State===-1||g.check_Child_State===2?2:1:g.check_Child_State>0?1:0,f===1){h=1;break}else if(f=== 26 | 2&&h>-1&&i>0&&f!==h){h=1;break}else if(h===2&&f>-1&&f<2){h=1;break}else f>-1&&(h=f)}a.check_Child_State=h}}}});var m=m.fn.zTree,k=m._z.tools,j=m.consts,e=m._z.view,f=m._z.data,n=k.$;f.exSetting(v);f.addInitBind(function(c){c.treeObj.bind(j.event.CHECK,function(a,b,d,h){a.srcEvent=b;k.apply(c.callback.onCheck,[a,d,h])})});f.addInitUnBind(function(c){c.treeObj.unbind(j.event.CHECK)});f.addInitCache(function(){});f.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]= 27 | k.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=k.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=k.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=k.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return f.getCheckStatus(c, 28 | b)};c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL&&b[a]&&f.getRoot(c).radioCheckedList.push(b)}});f.addInitProxy(function(c){var a=c.target,b=f.getSetting(c.data.treeId),d="",h=null,e="",l=null;if(k.eqs(c.type,"mouseover")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="mouseoverCheck"}else if(k.eqs(c.type,"mouseout")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d= 29 | k.getNodeMainDom(a).id,e="mouseoutCheck"}else if(k.eqs(c.type,"click")&&b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="checkNode";if(d.length>0)switch(h=f.getNodeCache(b,d),e){case "checkNode":l=p;break;case "mouseoverCheck":l=q;break;case "mouseoutCheck":l=r}return{stop:e==="checkNode",node:h,nodeEventType:e,nodeEventCallback:l,treeEventType:"",treeEventCallback:null}},!0);f.addInitRoot(function(c){f.getRoot(c).radioCheckedList=[]}); 30 | f.addBeforeA(function(c,a,b){c.check.enable&&(f.makeChkFlag(c,a),b.push(""))});f.addZTreeTools(function(c,a){a.checkNode=function(a,b,c,f){var g=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[g]),f=!!f,(a[g]!==b||c)&&!(f&&k.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&k.uCanDo(this.setting)&&this.setting.check.enable&& 31 | a.nocheck!==!0))a[g]=b,b=n(a,j.id.CHECK,this.setting),(c||this.setting.check.chkStyle===j.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),f&&this.setting.treeObj.trigger(j.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return f.getTreeCheckedNodes(this.setting,f.getRoot(this.setting)[b],a!==!1)}; 32 | a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return f.getTreeChangeCheckedNodes(this.setting,f.getRoot(this.setting)[a])};a.setChkDisabled=function(a,b,c,f){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!f);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&n(c,this.setting).get(0)&&k.uCanDo(this.setting)){var i=n(c,j.id.CHECK,this.setting);(f==!0||this.setting.check.chkStyle=== 33 | j.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,i,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i){var j="";u&&(j=u.apply(e,arguments));d&&f.makeChkFlag(c, 34 | d);return j}})(jQuery); 35 | -------------------------------------------------------------------------------- /static/js/jquery.ztree.exedit-3.5.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree exedit v3.5.18 3 | * http://zTree.me/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2015-08-13 12 | */ 13 | (function(w){var I={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},x={onHoverOverNode:function(b,a){var c=m.getSetting(b.data.treeId),d=m.getRoot(c);if(d.curHoverNode!=a)x.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b= 14 | m.getSetting(b.data.treeId),a=m.getRoot(b);if(a.curHoverNode&&!m.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(C.dragFlag==0&&Math.abs(N-b.clientX)1){var j=l[0].parentTId?l[0].getParentNode()[i]:m.getNodes(e);i=[];for(a=0,c=j.length;a-1&&k+1!==a&&(n=!1),i.push(j[a]),k=a),l.length===i.length){l=i;break}}n&&(H=l[0].getPreNode(),R=l[l.length-1].getNextNode());D=o("
      ", 16 | e);for(a=0,c=l.length;a0),f.removeTreeDom(e,n),a>e.edit.drag.maxShowNodeNum-1||(k=o("
    • ",e),k.append(o(n,d.id.A,e).clone()),k.css("padding","0"),k.children("#"+n.tId+d.id.A).removeClass(d.node.CURSELECTED),D.append(k),a==e.edit.drag.maxShowNodeNum-1&&(k=o("
    • ...
    • ",e),D.append(k)));D.attr("id",l[0].tId+d.id.UL+"_tmp");D.addClass(e.treeObj.attr("class"));D.appendTo(M);B=o("", 17 | e);B.attr("id","zTreeMove_arrow_tmp");B.appendTo(M);e.treeObj.trigger(d.event.DRAG,[b,e.treeId,l])}if(C.dragFlag==1){s&&B.attr("id")==b.target.id&&u&&b.clientX+F.scrollLeft()+2>w("#"+u+d.id.A,s).offset().left?(n=w("#"+u+d.id.A,s),b.target=n.length>0?n.get(0):b.target):s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER)); 18 | u=s=null;J=!1;h=e;n=m.getSettings();for(var y in n)if(n[y].treeId&&n[y].edit.enable&&n[y].treeId!=e.treeId&&(b.target.id==n[y].treeId||w(b.target).parents("#"+n[y].treeId).length>0))J=!0,h=n[y];y=F.scrollTop();k=F.scrollLeft();i=h.treeObj.offset();a=h.treeObj.get(0).scrollHeight;n=h.treeObj.get(0).scrollWidth;c=b.clientY+y-i.top;var p=h.treeObj.height()+i.top-b.clientY-y,q=b.clientX+k-i.left,x=h.treeObj.width()+i.left-b.clientX-k;i=ce.edit.drag.borderMin;var j=pe.edit.drag.borderMin,K=qe.edit.drag.borderMin,G=xe.edit.drag.borderMin,p=c>e.edit.drag.borderMin&&p>e.edit.drag.borderMin&&q>e.edit.drag.borderMin&&x>e.edit.drag.borderMin,q=i&&h.treeObj.scrollTop()<=0,x=j&&h.treeObj.scrollTop()+h.treeObj.height()+10>=a,P=K&&h.treeObj.scrollLeft()<=0,Q=G&&h.treeObj.scrollLeft()+h.treeObj.width()+10>=n;if(b.target&&g.isChildOrSelf(b.target,h.treeId)){for(var E=b.target;E&&E.tagName&&!g.eqs(E.tagName,"li")&&E.id!= 20 | h.treeId;)E=E.parentNode;var S=!0;for(a=0,c=l.length;a0){S=!1;break}if(S&&b.target&&g.isChildOrSelf(b.target,E.id+d.id.A))s=w(E),u=E.id}n=l[0];if(p&&g.isChildOrSelf(b.target,h.treeId)){if(!s&&(b.target.id==h.treeId||q||x||P||Q)&&(J||!J&&n.parentTId))s=h.treeObj;i?h.treeObj.scrollTop(h.treeObj.scrollTop()-10):j&&h.treeObj.scrollTop(h.treeObj.scrollTop()+10);K?h.treeObj.scrollLeft(h.treeObj.scrollLeft()-10):G&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+ 21 | 10);s&&s!=h.treeObj&&s.offset().left=-0.2)&&n?(a=1-B.width(),i=j-B.height()/2,v=d.move.TYPE_PREV):(G==0||y>=G&&y<=1.2)&&a?(a=1-B.width(),i=i==null||z.isParent&&z.open?j+c.height()-B.height()/2:i.offset().top-B.height()/2,v=d.move.TYPE_NEXT):(a=5-B.width(),i=j,v=d.move.TYPE_INNER);B.css({display:"block",top:i+"px",left:k+a+"px"});c.addClass(d.node.TMPTARGET_NODE+"_"+v);if(T!=u||U!=v)L=(new Date).getTime();if(z&&z.isParent&&v==d.move.TYPE_INNER&&(y=!0,window.zTreeMoveTimer&& 24 | window.zTreeMoveTargetNodeTId!==z.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===z.tId&&(y=!1),y))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&z&&z.isParent&&!z.open&&(new Date).getTime()-L>h.edit.drag.autoOpenTime&&g.apply(h.callback.beforeDragOpen,[h.treeId,z],!0)&&(f.switchNode(h,z),h.edit.drag.autoExpandTrigger&&h.treeObj.trigger(d.event.EXPAND,[h.treeId,z]))},h.edit.drag.autoOpenTime+50), 25 | window.zTreeMoveTargetNodeTId=z.tId}}else if(v=d.move.TYPE_INNER,s&&g.apply(h.edit.drag.inner,[h.treeId,l,null],!!h.edit.drag.inner)?s.addClass(d.node.TMPTARGET_TREE):s=null,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;T=u;U=v;e.treeObj.trigger(d.event.DRAGMOVE,[b,e.treeId,l])}return!1}function r(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;U=T=null;F.unbind("mousemove",c); 26 | F.unbind("mouseup",r);F.unbind("selectstart",k);M.css("cursor","auto");s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));g.showIfameMask(e,!1);t.showHoverDom=!0;if(C.dragFlag!=0){C.dragFlag=0;var a,i,j;for(a=0,i=l.length;a0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b, 33 | a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}}, 34 | addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b, 35 | a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;i[k]=a;o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT); 36 | j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1);b.treeObj.trigger(d.event.RENAME,[b.treeId,i,c])}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection= 38 | !1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p; 39 | t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l= 40 | 0,g[e].length>1)x=g[e][1],x.isFirstNode=!0}else if(c.isLastNode)l=g[e].length-1,x=g[e][l-1],x.isLastNode=!0;else for(p=0,q=g[e].length;p=0&&g[e].splice(l,1);if(r!=d.move.TYPE_INNER)for(p=0,q=j[e].length;p0)t=a[e][a[e].length-1],t.isLastNode=!1;a[e].splice(a[e].length,0,c);c.isLastNode=!0;c.isFirstNode=a[e].length==1}else a.isFirstNode&&r==d.move.TYPE_PREV?(j[e].splice(w, 41 | 0,c),t=a,t.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&r==d.move.TYPE_NEXT?(j[e].splice(w+1,0,c),t=a,t.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(r==d.move.TYPE_PREV?j[e].splice(w,0,c):j[e].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);m.fixPIdKeyValue(b,c);m.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,D);!b.data.keep.parent&&g[e].length<1?(g.isParent=!1, 42 | g.open=!1,a=o(g,d.id.UL,b),r=o(g,d.id.SWITCH,b),e=o(g,d.id.ICON,b),f.replaceSwitchClass(g,r,d.folder.DOCU),f.replaceIcoClass(g,e,d.folder.DOCU),a.css("display","none")):x&&f.setNodeLineIcos(b,x);t&&f.setNodeLineIcos(b,t);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,g),f.repairParentChkClassWithSelf(b,g),g!=c.parent&&f.repairParentChkClassWithSelf(b,c));i||f.expandCollapseParentNode(b,c.getParentNode(),!0,k)}},removeEditBtn:function(b,a){o(a,d.id.EDIT,b).unbind().remove()},removeRemoveBtn:function(b, 43 | a){o(a,d.id.REMOVE,b).unbind().remove()},removeTreeDom:function(b,a){a.isHover=!1;f.removeEditBtn(b,a);f.removeRemoveBtn(b,a);g.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var f=o(a,b),g=o(a,d.id.A,b),b=o(a,d.id.UL,b),c=d.className.LEVEL+c,a=d.className.LEVEL+a.level;f.removeClass(c);f.addClass(a);g.removeClass(c);g.addClass(a);b.removeClass(c);b.addClass(a)}},selectNodes:function(b,a){for(var c=0,d=a.length;c0)}},event:{}, 44 | data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,f=c[d].length;a0)switch(i=m.getNodeCache(c,k),j){case "mousedownNode":e=x.onMousedownNode;break;case "hoverOverNode":e=x.onHoverOverNode;break;case "hoverOutNode":e=x.onHoverOutNode}return{stop:!1, 48 | node:i,nodeEventType:j,nodeEventCallback:e,treeEventType:"",treeEventCallback:null}});m.addInitRoot(function(b){var b=m.getRoot(b),a=m.getRoots();b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=[];b.dragMaskList=[];a.showHoverDom=!0});m.addZTreeTools(function(b,a){a.cancelEditName=function(a){m.getRoot(this.setting).curEditNode&&f.cancelCurEditNode(this.setting,a?a:null,!0)};a.copyNode=function(a,b,k,i){if(!b)return null;if(a&&!a.isParent&&this.setting.data.keep.leaf&& 49 | k===d.move.TYPE_INNER)return null;var j=this,e=g.clone(b);if(!a)a=null,k=d.move.TYPE_INNER;k==d.move.TYPE_INNER?(b=function(){f.addNodes(j.setting,a,[e],i)},g.canAsync(this.setting,a)?f.asyncNode(this.setting,a,i,b):b()):(f.addNodes(this.setting,a.parentNode,[e],i),f.moveNode(this.setting,a,e,k,!1,i));return e};a.editName=function(a){a&&a.tId&&a===m.getNodeCache(this.setting,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(this.setting,a.getParentNode(),!0),f.editNode(this.setting,a))};a.moveNode= 50 | function(a,b,k,i){function j(){f.moveNode(e.setting,a,b,k,!1,i)}if(!b)return b;if(a&&!a.isParent&&this.setting.data.keep.leaf&&k===d.move.TYPE_INNER)return null;else if(a&&(b.parentTId==a.tId&&k==d.move.TYPE_INNER||o(b,this.setting).find("#"+a.tId).length>0))return null;else a||(a=null);var e=this;g.canAsync(this.setting,a)&&k===d.move.TYPE_INNER?f.asyncNode(this.setting,a,i,j):j();return b};a.setEditable=function(a){this.setting.edit.enable=a;return this.refresh()}});var N=f.cancelPreSelectedNode; 51 | f.cancelPreSelectedNode=function(b,a){for(var c=m.getRoot(b).curSelectedList,d=0,g=c.length;d"); 117 | }, 118 | showNode: function(setting, node, options) { 119 | node.isHidden = false; 120 | data.initShowForExCheck(setting, node); 121 | $$(node, setting).show(); 122 | }, 123 | showNodes: function(setting, nodes, options) { 124 | if (!nodes || nodes.length == 0) { 125 | return; 126 | } 127 | var pList = {}, i, j; 128 | for (i=0, j=nodes.length; i 0 && !parentNode[childKey][0].isHidden) { 172 | parentNode[childKey][0].isFirstNode = true; 173 | } else if (childLength > 0) { 174 | view.setFirstNodeForHide(setting, parentNode[childKey]); 175 | } 176 | }, 177 | setLastNode: function(setting, parentNode) { 178 | var childKey = setting.data.key.children, childLength = parentNode[childKey].length; 179 | if (childLength > 0 && !parentNode[childKey][0].isHidden) { 180 | parentNode[childKey][childLength - 1].isLastNode = true; 181 | } else if (childLength > 0) { 182 | view.setLastNodeForHide(setting, parentNode[childKey]); 183 | } 184 | }, 185 | setFirstNodeForHide: function(setting, nodes) { 186 | var n,i,j; 187 | for (i=0, j=nodes.length; i=0; i--) { 227 | n = nodes[i]; 228 | if (n.isLastNode) { 229 | break; 230 | } 231 | if (!n.isHidden && !n.isLastNode) { 232 | n.isLastNode = true; 233 | view.setNodeLineIcos(setting, n); 234 | break; 235 | } else { 236 | n = null; 237 | } 238 | } 239 | return n; 240 | }, 241 | setLastNodeForShow: function(setting, nodes) { 242 | var n,i,j, last, old; 243 | for (i=nodes.length-1; i>=0; i--) { 244 | n = nodes[i]; 245 | if (!last && !n.isHidden && n.isLastNode) { 246 | last = n; 247 | break; 248 | } else if (!last && !n.isHidden && !n.isLastNode) { 249 | n.isLastNode = true; 250 | last = n; 251 | view.setNodeLineIcos(setting, n); 252 | } else if (last && n.isLastNode) { 253 | n.isLastNode = false; 254 | old = n; 255 | view.setNodeLineIcos(setting, n); 256 | break; 257 | } else { 258 | n = null; 259 | } 260 | } 261 | return {"new":last, "old":old}; 262 | } 263 | }, 264 | 265 | _z = { 266 | view: _view, 267 | data: _data 268 | }; 269 | $.extend(true, $.fn.zTree._z, _z); 270 | 271 | var zt = $.fn.zTree, 272 | tools = zt._z.tools, 273 | consts = zt.consts, 274 | view = zt._z.view, 275 | data = zt._z.data, 276 | event = zt._z.event, 277 | $$ = tools.$; 278 | 279 | data.addInitNode(_initNode); 280 | data.addBeforeA(_beforeA); 281 | data.addZTreeTools(_zTreeTools); 282 | 283 | // Override method in core 284 | var _dInitNode = data.initNode; 285 | data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) { 286 | var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting), 287 | children = tmpPNode[setting.data.key.children]; 288 | data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children); 289 | data.tmpHideLastNode = view.setLastNodeForHide(setting, children); 290 | if (openFlag) { 291 | view.setNodeLineIcos(setting, data.tmpHideFirstNode); 292 | view.setNodeLineIcos(setting, data.tmpHideLastNode); 293 | } 294 | isFirstNode = (data.tmpHideFirstNode === node); 295 | isLastNode = (data.tmpHideLastNode === node); 296 | if (_dInitNode) _dInitNode.apply(data, arguments); 297 | if (openFlag && isLastNode) { 298 | view.clearOldLastNode(setting, node, openFlag); 299 | } 300 | }; 301 | 302 | var _makeChkFlag = data.makeChkFlag; 303 | if (!!_makeChkFlag) { 304 | data.makeChkFlag = function(setting, node) { 305 | if (!!node && !!node.isHidden) { 306 | return; 307 | } 308 | _makeChkFlag.apply(data, arguments); 309 | } 310 | } 311 | 312 | var _getTreeCheckedNodes = data.getTreeCheckedNodes; 313 | if (!!_getTreeCheckedNodes) { 314 | data.getTreeCheckedNodes = function(setting, nodes, checked, results) { 315 | if (!!nodes && nodes.length > 0) { 316 | var p = nodes[0].getParentNode(); 317 | if (!!p && !!p.isHidden) { 318 | return []; 319 | } 320 | } 321 | return _getTreeCheckedNodes.apply(data, arguments); 322 | } 323 | } 324 | 325 | var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes; 326 | if (!!_getTreeChangeCheckedNodes) { 327 | data.getTreeChangeCheckedNodes = function(setting, nodes, results) { 328 | if (!!nodes && nodes.length > 0) { 329 | var p = nodes[0].getParentNode(); 330 | if (!!p && !!p.isHidden) { 331 | return []; 332 | } 333 | } 334 | return _getTreeChangeCheckedNodes.apply(data, arguments); 335 | } 336 | } 337 | 338 | var _expandCollapseSonNode = view.expandCollapseSonNode; 339 | if (!!_expandCollapseSonNode) { 340 | view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) { 341 | if (!!node && !!node.isHidden) { 342 | return; 343 | } 344 | _expandCollapseSonNode.apply(view, arguments); 345 | } 346 | } 347 | 348 | var _setSonNodeCheckBox = view.setSonNodeCheckBox; 349 | if (!!_setSonNodeCheckBox) { 350 | view.setSonNodeCheckBox = function(setting, node, value, srcNode) { 351 | if (!!node && !!node.isHidden) { 352 | return; 353 | } 354 | _setSonNodeCheckBox.apply(view, arguments); 355 | } 356 | } 357 | 358 | var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf; 359 | if (!!_repairParentChkClassWithSelf) { 360 | view.repairParentChkClassWithSelf = function(setting, node) { 361 | if (!!node && !!node.isHidden) { 362 | return; 363 | } 364 | _repairParentChkClassWithSelf.apply(view, arguments); 365 | } 366 | } 367 | })(jQuery); -------------------------------------------------------------------------------- /static/js/jquery.ztree.exhide-3.5.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JQuery zTree exHideNodes v3.5.18 3 | * http://zTree.me/ 4 | * 5 | * Copyright (c) 2010 Hunter.z 6 | * 7 | * Licensed same as jquery - MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * email: hunter.z@263.net 11 | * Date: 2015-08-13 12 | */ 13 | (function(i){i.extend(!0,i.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;d.setNodeLineIcos(c,b);break}if(b.isLastNode)break;b=b.getNextNode()}},clearOldLastNode:function(c,a,b){for(a=a.getPreNode();a;){if(a.isLastNode){a.isLastNode=!1;b&&d.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){c.push("
    • ")},showNode:function(c,a){a.isHidden=!1;f.initShowForExCheck(c,a);j(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var e={},g,k;for(g=0,k=a.length;g0&&!a[b][0].isHidden? 16 | a[b][0].isFirstNode=!0:e>0&&d.setFirstNodeForHide(c,a[b])},setLastNode:function(c,a){var b=c.data.key.children,e=a[b].length;e>0&&!a[b][0].isHidden?a[b][e-1].isLastNode=!0:e>0&&d.setLastNodeForHide(c,a[b])},setFirstNodeForHide:function(c,a){var b,e,g;for(e=0,g=a.length;e=0;e--){b=a[e];if(b.isLastNode)break;if(!b.isHidden&&!b.isLastNode){b.isLastNode=!0;d.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c,a){var b,e,g,f;for(e=a.length-1;e>=0;e--)if(b=a[e],!g&&!b.isHidden&& 18 | b.isLastNode){g=b;break}else if(!g&&!b.isHidden&&!b.isLastNode)b.isLastNode=!0,g=b,d.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;f=b;d.setNodeLineIcos(c,b);break}return{"new":g,old:f}}},data:{initHideForExCheck:function(c,a){if(a.isHidden&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}},initShowForExCheck:function(c,a){if(!a.isHidden&&c.check&& 19 | c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(d.setChkClass){var b=j(a,l.id.CHECK,c);d.setChkClass(c,b,a)}d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}}}});var i=i.fn.zTree,m=i._z.tools,l=i.consts,d=i._z.view,f=i._z.data,j=m.$;f.addInitNode(function(c,a,b){if(typeof b.isHidden=="string")b.isHidden=m.eqs(b.isHidden,"true");b.isHidden=!!b.isHidden;f.initHideForExCheck(c,b)});f.addBeforeA(function(){});f.addZTreeTools(function(c,a){a.showNodes= 20 | function(a,b){d.showNodes(c,a,b)};a.showNode=function(a,b){a&&d.showNodes(c,[a],b)};a.hideNodes=function(a,b){d.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&d.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(c,d,f,h){(!c||!c.isHidden)&&b.apply(a,arguments)}});var n=f.initNode;f.initNode=function(c,a,b,e,g,i,h){var j=(e?e:f.getRoot(c))[c.data.key.children];f.tmpHideFirstNode=d.setFirstNodeForHide(c,j);f.tmpHideLastNode=d.setLastNodeForHide(c,j);h&&(d.setNodeLineIcos(c,f.tmpHideFirstNode), 21 | d.setNodeLineIcos(c,f.tmpHideLastNode));g=f.tmpHideFirstNode===b;i=f.tmpHideLastNode===b;n&&n.apply(f,arguments);h&&i&&d.clearOldLastNode(c,b,h)};var o=f.makeChkFlag;if(o)f.makeChkFlag=function(c,a){(!a||!a.isHidden)&&o.apply(f,arguments)};var p=f.getTreeCheckedNodes;if(p)f.getTreeCheckedNodes=function(c,a,b,e){if(a&&a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return p.apply(f,arguments)};var q=f.getTreeChangeCheckedNodes;if(q)f.getTreeChangeCheckedNodes=function(c,a,b){if(a&& 22 | a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return q.apply(f,arguments)};var r=d.expandCollapseSonNode;if(r)d.expandCollapseSonNode=function(c,a,b,e,f){(!a||!a.isHidden)&&r.apply(d,arguments)};var s=d.setSonNodeCheckBox;if(s)d.setSonNodeCheckBox=function(c,a,b,e){(!a||!a.isHidden)&&s.apply(d,arguments)};var t=d.repairParentChkClassWithSelf;if(t)d.repairParentChkClassWithSelf=function(c,a){(!a||!a.isHidden)&&t.apply(d,arguments)}})(jQuery); 23 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 日志查看系统 5 | 6 | 7 | 8 | 22 | 23 | 24 | 25 | 26 | 155 | 156 | 157 | 158 | 159 | 183 | 184 |
      185 | 186 | 187 | 190 | 196 | 197 |
      188 |
        189 |
        191 | 195 |
        198 |
        199 | 200 | {# #} 201 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /templates/log_frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | log view 5 | 6 | 7 | 8 | 9 |

        查看文件内容

        10 |
        [ 文件路径: {{ log_path }} ]
        11 |
        12 |
        13 |
          14 |
          15 |
          16 |
          17 |             {{ log_content }}
          18 |         
          19 |
          20 |
          21 | 22 | --------------------------------------------------------------------------------