first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

View File

@ -0,0 +1,37 @@
/* =========================================================
* bootstrap-treeview.css v1.2.0
* =========================================================
* Copyright 2013 Jonathan Miles
* Project URL : http://www.jondmiles.com/bootstrap-treeview
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
.treeview .list-group-item {
cursor: pointer;
}
.treeview span.indent {
margin-left: 10px;
margin-right: 10px;
}
.treeview span.icon {
width: 12px;
margin-right: 5px;
}
.treeview .node-disabled {
color: silver;
cursor: not-allowed;
}

View File

@ -0,0 +1 @@
.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}

View File

@ -0,0 +1,231 @@
@font-face {
font-family: 'icomoon';
src:url('../fonts/icomoon.eot?rretjt');
src:url('../fonts/icomoon.eot?#iefixrretjt') format('embedded-opentype'),
url('../fonts/icomoon.woff?rretjt') format('woff'),
url('../fonts/icomoon.ttf?rretjt') format('truetype'),
url('../fonts/icomoon.svg?rretjt#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body, html { font-size: 100%; padding: 0; margin: 0;}
/* Reset */
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
body{
background: #f9f7f6;
color: #404d5b;
font-weight: 500;
font-size: 1.05em;
font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;
}
a{color: #2fa0ec;text-decoration: none;outline: none;}
a:hover,a:focus{color:#74777b;}
.htmleaf-container{
margin: 0 auto;
overflow: hidden;
}
.bgcolor-1 { background: #f0efee; }
.bgcolor-2 { background: #f9f9f9; }
.bgcolor-3 { background: #e8e8e8; }/*light grey*/
.bgcolor-4 { background: #2f3238; color: #fff; }/*Dark grey*/
.bgcolor-5 { background: #df6659; color: #521e18; }/*pink1*/
.bgcolor-6 { background: #2fa8ec; }/*sky blue*/
.bgcolor-7 { background: #d0d6d6; }/*White tea*/
.bgcolor-8 { background: #3d4444; color: #fff; }/*Dark grey2*/
.bgcolor-9 { background: #ef3f52; color: #fff;}/*pink2*/
.bgcolor-10{ background: #64448f; color: #fff;}/*Violet*/
.bgcolor-11{ background: #3755ad; color: #fff;}/*dark blue*/
.bgcolor-12{ background: #3498DB; color: #fff;}/*light blue*/
/* Header */
.htmleaf-header{
padding: 1em 190px 1em;
letter-spacing: -1px;
text-align: center;
}
.htmleaf-header h1 {
font-weight: 600;
font-size: 2em;
line-height: 1;
margin-bottom: 0;
font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;
}
.htmleaf-header h1 span {
font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;
display: block;
font-size: 60%;
font-weight: 400;
padding: 0.8em 0 0.5em 0;
color: #c3c8cd;
}
/*nav*/
.htmleaf-demo a{color: #1d7db1;text-decoration: none;}
.htmleaf-demo{width: 100%;padding-bottom: 1.2em;}
.htmleaf-demo a{display: inline-block;margin: 0.5em;padding: 0.6em 1em;border: 3px solid #1d7db1;font-weight: 700;}
.htmleaf-demo a:hover{opacity: 0.6;}
.htmleaf-demo a.current{background:#1d7db1;color: #fff; }
/* Top Navigation Style */
.htmleaf-links {
position: relative;
display: inline-block;
white-space: nowrap;
font-size: 1.5em;
text-align: center;
}
.htmleaf-links::after {
position: absolute;
top: 0;
left: 50%;
margin-left: -1px;
width: 2px;
height: 100%;
background: #dbdbdb;
content: '';
-webkit-transform: rotate3d(0,0,1,22.5deg);
transform: rotate3d(0,0,1,22.5deg);
}
.htmleaf-icon {
display: inline-block;
margin: 0.5em;
padding: 0em 0;
width: 1.5em;
text-decoration: none;
}
.htmleaf-icon span {
display: none;
}
.htmleaf-icon:before {
margin: 0 5px;
text-transform: none;
font-weight: normal;
font-style: normal;
font-variant: normal;
font-family: 'icomoon';
line-height: 1;
speak: none;
-webkit-font-smoothing: antialiased;
}
/* footer */
.htmleaf-footer{width: 100%;padding-top: 10px;}
.htmleaf-small{font-size: 0.8em;}
.center{text-align: center;}
/****/
.related {
color: #fff;
background: #333;
text-align: center;
font-size: 1.25em;
padding: 0.5em 0;
overflow: hidden;
}
.related > a {
vertical-align: top;
width: calc(100% - 20px);
max-width: 340px;
display: inline-block;
text-align: center;
margin: 20px 10px;
padding: 25px;
font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;
}
.related a {
display: inline-block;
text-align: left;
margin: 20px auto;
padding: 10px 20px;
opacity: 0.8;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
-webkit-backface-visibility: hidden;
}
.related a:hover,
.related a:active {
opacity: 1;
}
.related a img {
max-width: 100%;
opacity: 0.8;
border-radius: 4px;
}
.related a:hover img,
.related a:active img {
opacity: 1;
}
.related h3{font-family: "Microsoft YaHei", sans-serif;}
.related a h3 {
font-weight: 300;
margin-top: 0.15em;
color: #fff;
}
/* icomoon */
.icon-htmleaf-home-outline:before {
content: "\e5000";
}
.icon-htmleaf-arrow-forward-outline:before {
content: "\e5001";
}
@media screen and (max-width: 50em) {
.htmleaf-header {
padding: 3em 10% 4em;
}
.htmleaf-header h1 {
font-size:2em;
}
}
@media screen and (max-width: 40em) {
.htmleaf-header h1 {
font-size: 1.5em;
}
}
@media screen and (max-width: 30em) {
.htmleaf-header h1 {
font-size:1.2em;
}
}

View File

@ -0,0 +1 @@
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;}

View File

@ -0,0 +1 @@
.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Tree View</title>
<link href="http://libs.useso.com/js/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-treeview.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>Bootstrap Tree View - DOM Tree</h1>
<br/>
<div class="row">
<div class="col-sm-12">
<label for="treeview"></label>
<div id="treeview"/>
</div>
</div>
</div>
<script src="http://libs.useso.com/js/jquery/2.1.1/jquery.min.js"></script>
<script src="js/bootstrap-treeview.js"></script>
<script type="text/javascript">
function buildDomTree() {
var data = [];
function walk(nodes, data) {
if (!nodes) { return; }
$.each(nodes, function (id, node) {
var obj = {
id: id,
text: node.nodeName + " - " + (node.innerText ? node.innerText : ''),
tags: [node.childElementCount > 0 ? node.childElementCount + ' child elements' : '']
};
if (node.childElementCount > 0) {
obj.nodes = [];
walk(node.children, obj.nodes);
}
data.push(obj);
});
}
walk($('html')[0].children, data);
return data;
}
$(function() {
var options = {
bootstrap2: false,
showTags: true,
levels: 5,
data: buildDomTree()
};
$('#treeview').treeview(options);
});
</script>
</body>

Binary file not shown.

View File

@ -0,0 +1,12 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe5000;" d="M949.845 492.032c-144.64 121.771-407.296 348.629-409.899 350.933l-27.947 24.021-27.819-24.021c-2.645-2.261-265.429-229.035-412.16-351.915-18.688-16.811-29.355-40.32-29.355-64.384 0-47.104 38.229-85.333 85.333-85.333h42.667v-256c0-47.104 38.229-85.333 85.333-85.333h512c47.104 0 85.333 38.229 85.333 85.333v256h42.667c47.104 0 85.333 38.229 85.333 85.333 0 25.515-11.733 49.536-31.488 65.365zM597.333 85.334h-170.667v213.333h170.667v-213.333zM768 426.667l0.085-341.333c-0.085 0-128.085 0-128.085 0v256h-256v-256h-128v341.333h-128.043c117.973 98.645 312.107 265.685 384.043 327.68 71.936-61.995 265.984-228.992 384-327.723 0 0-128 0-128 0.043z" />
<glyph unicode="&#xe5001;" d="M170.667 85.376c-4.096 0-8.149 0.64-12.203 1.792-18.091 5.376-30.464 22.016-30.464 40.875v42.667c0 204.8 144.256 378.197 341.333 417.963v72.704c0 22.784 8.875 44.203 24.96 60.331 32.256 32.299 88.533 32.256 120.704 0.043l268.288-264.661c8.149-8.021 12.715-18.901 12.715-30.379s-4.565-22.357-12.715-30.379l-268.501-264.832c-31.829-31.829-88.192-32.043-120.448 0.213-16.128 16.128-25.003 37.547-25.003 60.331v61.312c-106.453-8.576-192.981-42.027-262.997-148.651-8.107-12.288-21.547-19.328-35.669-19.328zM512 340.907c11.179 0 42.667 0.427 42.667 0.427v-149.291l237.909 234.667-237.909 234.496v-149.205c0 0-16.384 0.171-38.016-2.219-145.749-16.128-261.333-122.197-294.059-259.413 90.496 73.728 194.176 88.149 289.408 90.539z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Binary file not shown.

BIN
WebRoot/node_modules/bootstrap-treeview-1.2.0/img/1.jpg generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
WebRoot/node_modules/bootstrap-treeview-1.2.0/img/2.jpg generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,792 @@
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>基于bootstrup的jQuery多级列表树插件|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库</title>
<link rel="stylesheet" type="text/css" href="css/default.css">
<link href="https://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.htmleaf-header{margin-bottom: 15px;font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;}
.htmleaf-icon{color: #fff;}
</style>
</head>
<body>
<div class="htmleaf-container">
<header class="htmleaf-header bgcolor-12">
<h1>基于bootstrup的jQuery多级列表树插件 <span>Bootstrap Tree View</span></h1>
<div class="htmleaf-links">
<a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.htmleaf.com/" title="jQuery之家" target="_blank"><span> jQuery之家</span></a>
<a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.htmleaf.com/jQuery/Menu-Navigation/201502141379.html" title="返回下载页" target="_blank"><span> 返回下载页</span></a>
</div>
</header>
<div class="container">
<h1>Bootstrap Tree View</h1>
<br>
<div class="row">
<div class="col-sm-4">
<h2>Default</h2>
<div id="treeview1" class=""></div>
</div>
<div class="col-sm-4">
<h2>Collapsed</h2>
<div id="treeview2" class=""></div>
</div>
<div class="col-sm-4">
<h2>Expanded</h2>
<div id="treeview3" class=""></div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<h2>Blue Theme</h2>
<div id="treeview4" class=""></div>
</div>
<div class="col-sm-4">
<h2>Custom Icons</h2>
<div id="treeview5" class=""></div>
</div>
<div class="col-sm-4">
<h2>Tags as Badges</h2>
<div id="treeview6" class=""></div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<h2>No Border</h2>
<div id="treeview7" class=""></div>
</div>
<div class="col-sm-4">
<h2>Colourful</h2>
<div id="treeview8" class=""></div>
</div>
<div class="col-sm-4">
<h2>Node Overrides</h2>
<div id="treeview9" class=""></div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<h2>Link enabled, or</h2>
<div id="treeview10" class=""></div>
</div>
<div class="col-sm-4">
</div>
<div class="col-sm-4">
</div>
</div>
<div class="row">
<hr>
<h2>Searchable Tree</h2>
<div class="col-sm-4">
<h2>Input</h2>
<!-- <form> -->
<div class="form-group">
<label for="input-search" class="sr-only">Search Tree:</label>
<input type="input" class="form-control" id="input-search" placeholder="Type to search..." value="">
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-ignore-case" value="false">
Ignore Case
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-exact-match" value="false">
Exact Match
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-reveal-results" value="false">
Reveal Results
</label>
</div>
<button type="button" class="btn btn-success" id="btn-search">Search</button>
<button type="button" class="btn btn-default" id="btn-clear-search">Clear</button>
<!-- </form> -->
</div>
<div class="col-sm-4">
<h2>Tree</h2>
<div id="treeview-searchable" class=""></div>
</div>
<div class="col-sm-4">
<h2>Results</h2>
<div id="search-output"></div>
</div>
</div>
<div class="row">
<hr>
<h2>Selectable Tree</h2>
<div class="col-sm-4">
<h2>Input</h2>
<div class="form-group">
<label for="input-select-node" class="sr-only">Search Tree:</label>
<input type="input" class="form-control" id="input-select-node" placeholder="Identify node..." value="Parent 1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-select-multi" value="false">
Multi Select
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-select-silent" value="false">
Silent (No events)
</label>
</div>
<div class="form-group">
<button type="button" class="btn btn-success select-node" id="btn-select-node">Select Node</button>
</div>
<div class="form-group">
<button type="button" class="btn btn-danger select-node" id="btn-unselect-node">Unselect Node</button>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary select-node" id="btn-toggle-selected">Toggle Node</button>
</div>
</div>
<div class="col-sm-4">
<h2>Tree</h2>
<div id="treeview-selectable" class=""></div>
</div>
<div class="col-sm-4">
<h2>Events</h2>
<div id="selectable-output"></div>
</div>
</div>
<div class="row">
<hr>
<h2>Expandible Tree</h2>
<div class="col-sm-4">
<h2>Input</h2>
<div class="form-group">
<label for="input-expand-node" class="sr-only">Search Tree:</label>
<input type="input" class="form-control" id="input-expand-node" placeholder="Identify node..." value="Parent 1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-expand-silent" value="false">
Silent (No events)
</label>
</div>
<div class="form-group row">
<div class="col-sm-6">
<button type="button" class="btn btn-success expand-node" id="btn-expand-node">Expand Node</button>
</div>
<div class="col-sm-6">
<select class="form-control" id="select-expand-node-levels">
<option>1</option>
<option>2</option>
</select>
</div>
</div>
<div class="form-group">
<button type="button" class="btn btn-danger expand-node" id="btn-collapse-node">Collapse Node</button>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary expand-node" id="btn-toggle-expanded">Toggle Node</button>
</div>
<hr>
<div class="form-group row">
<div class="col-sm-6">
<button type="button" class="btn btn-success" id="btn-expand-all">Expand All</button>
</div>
<div class="col-sm-6">
<select class="form-control" id="select-expand-all-levels">
<option>1</option>
<option>2</option>
</select>
</div>
</div>
<button type="button" class="btn btn-danger" id="btn-collapse-all">Collapse All</button>
</div>
<div class="col-sm-4">
<h2>Tree</h2>
<div id="treeview-expandible" class=""></div>
</div>
<div class="col-sm-4">
<h2>Events</h2>
<div id="expandible-output"></div>
</div>
</div>
<div class="row">
<hr>
<h2>Checkable Tree</h2>
<div class="col-sm-4">
<h2>Input</h2>
<div class="form-group">
<label for="input-check-node" class="sr-only">Search Tree:</label>
<input type="input" class="form-control" id="input-check-node" placeholder="Identify node..." value="Parent 1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-check-silent" value="false">
Silent (No events)
</label>
</div>
<div class="form-group row">
<div class="col-sm-6">
<button type="button" class="btn btn-success check-node" id="btn-check-node">Check Node</button>
</div>
</div>
<div class="form-group">
<button type="button" class="btn btn-danger check-node" id="btn-uncheck-node">Uncheck Node</button>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary check-node" id="btn-toggle-checked">Toggle Node</button>
</div>
<hr>
<div class="form-group row">
<div class="col-sm-6">
<button type="button" class="btn btn-success" id="btn-check-all">Check All</button>
</div>
</div>
<button type="button" class="btn btn-danger" id="btn-uncheck-all">Uncheck All</button>
</div>
<div class="col-sm-4">
<h2>Tree</h2>
<div id="treeview-checkable" class=""></div>
</div>
<div class="col-sm-4">
<h2>Events</h2>
<div id="checkable-output"></div>
</div>
</div>
<div class="row">
<hr>
<h2>Disabled Tree</h2>
<div class="col-sm-4">
<h2>Input</h2>
<div class="form-group">
<label for="input-disable-node" class="sr-only">Search Tree:</label>
<input type="input" class="form-control" id="input-disable-node" placeholder="Identify node..." value="Parent 1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox" id="chk-disable-silent" value="false">
Silent (No events)
</label>
</div>
<div class="form-group row">
<div class="col-sm-6">
<button type="button" class="btn btn-success disable-node" id="btn-disable-node">Disable Node</button>
</div>
</div>
<div class="form-group">
<button type="button" class="btn btn-danger disable-node" id="btn-enable-node">Enable Node</button>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary disable-node" id="btn-toggle-disabled">Toggle Node</button>
</div>
<hr>
<div class="form-group row">
<div class="col-sm-6">
<button type="button" class="btn btn-success" id="btn-disable-all">Disable All</button>
</div>
</div>
<button type="button" class="btn btn-danger" id="btn-enable-all">Enable All</button>
</div>
<div class="col-sm-4">
<h2>Tree</h2>
<div id="treeview-disabled" class=""></div>
</div>
<div class="col-sm-4">
<h2>Events</h2>
<div id="disabled-output"></div>
</div>
</div>
<div class="row">
<hr>
<h2>Data</h2>
<div class="col-sm-4">
<h2>JSON Data</h2>
<div id="treeview12" class=""></div>
</div>
<div class="col-sm-4">
<h2></h2>
<div id="treeview13" class=""></div>
</div>
<div class="col-sm-4">
<h2></h2>
<div id="treeview14"></div>
</div>
</div>
<br/>
<br/>
<br/>
<br/>
</div>
<div class="related">
<h3>如果你喜欢这个插件,那么你可能也喜欢:</h3>
<a href="http://www.htmleaf.com/jQuery/Slideshow-Scroller/201502011311.html">
<img src="img/1.jpg" width="300" alt="jQuery超实用文字和图片列表滚动插件"/>
<h3>jQuery超实用文字和图片列表滚动插件</h3>
</a>
<a href="http://www.htmleaf.com/jQuery/Accordion/20141115486.html">
<img src="img/2.jpg" width="300" alt="jQuery和css3多级手风琴插件"/>
<h3>jQuery和css3多级手风琴插件</h3>
</a>
</div>
</div>
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/bootstrap-treeview.js"></script>
<script type="text/javascript">
$(function() {
var defaultData = [
{
text: 'Parent 1',
href: '#parent1',
tags: ['4'],
nodes: [
{
text: 'Child 1',
href: '#child1',
tags: ['2'],
nodes: [
{
text: 'Grandchild 1',
href: '#grandchild1',
tags: ['0']
},
{
text: 'Grandchild 2',
href: '#grandchild2',
tags: ['0']
}
]
},
{
text: 'Child 2',
href: '#child2',
tags: ['0']
}
]
},
{
text: 'Parent 2',
href: '#parent2',
tags: ['0']
},
{
text: 'Parent 3',
href: '#parent3',
tags: ['0']
},
{
text: 'Parent 4',
href: '#parent4',
tags: ['0']
},
{
text: 'Parent 5',
href: '#parent5' ,
tags: ['0']
}
];
var alternateData = [
{
text: 'Parent 1',
tags: ['2'],
nodes: [
{
text: 'Child 1',
tags: ['3'],
nodes: [
{
text: 'Grandchild 1',
tags: ['6']
},
{
text: 'Grandchild 2',
tags: ['3']
}
]
},
{
text: 'Child 2',
tags: ['3']
}
]
},
{
text: 'Parent 2',
tags: ['7']
},
{
text: 'Parent 3',
icon: 'glyphicon glyphicon-earphone',
href: '#demo',
tags: ['11']
},
{
text: 'Parent 4',
icon: 'glyphicon glyphicon-cloud-download',
href: '/demo.html',
tags: ['19'],
selected: true
},
{
text: 'Parent 5',
icon: 'glyphicon glyphicon-certificate',
color: 'pink',
backColor: 'red',
href: 'http://www.tesco.com',
tags: ['available','0']
}
];
var json = '[' +
'{' +
'"text": "Parent 1",' +
'"nodes": [' +
'{' +
'"text": "Child 1",' +
'"nodes": [' +
'{' +
'"text": "Grandchild 1"' +
'},' +
'{' +
'"text": "Grandchild 2"' +
'}' +
']' +
'},' +
'{' +
'"text": "Child 2"' +
'}' +
']' +
'},' +
'{' +
'"text": "Parent 2"' +
'},' +
'{' +
'"text": "Parent 3"' +
'},' +
'{' +
'"text": "Parent 4"' +
'},' +
'{' +
'"text": "Parent 5"' +
'}' +
']';
$('#treeview1').treeview({
data: defaultData
});
$('#treeview2').treeview({
levels: 1,
data: defaultData
});
$('#treeview3').treeview({
levels: 99,
data: defaultData
});
$('#treeview4').treeview({
color: "#428bca",
data: defaultData
});
$('#treeview5').treeview({
color: "#428bca",
expandIcon: 'glyphicon glyphicon-chevron-right',
collapseIcon: 'glyphicon glyphicon-chevron-down',
nodeIcon: 'glyphicon glyphicon-bookmark',
data: defaultData
});
$('#treeview6').treeview({
color: "#428bca",
expandIcon: "glyphicon glyphicon-stop",
collapseIcon: "glyphicon glyphicon-unchecked",
nodeIcon: "glyphicon glyphicon-user",
showTags: true,
data: defaultData
});
$('#treeview7').treeview({
color: "#428bca",
showBorder: false,
data: defaultData
});
$('#treeview8').treeview({
expandIcon: "glyphicon glyphicon-stop",
collapseIcon: "glyphicon glyphicon-unchecked",
nodeIcon: "glyphicon glyphicon-user",
color: "yellow",
backColor: "purple",
onhoverColor: "orange",
borderColor: "red",
showBorder: false,
showTags: true,
highlightSelected: true,
selectedColor: "yellow",
selectedBackColor: "darkorange",
data: defaultData
});
$('#treeview9').treeview({
expandIcon: "glyphicon glyphicon-stop",
collapseIcon: "glyphicon glyphicon-unchecked",
nodeIcon: "glyphicon glyphicon-user",
color: "yellow",
backColor: "purple",
onhoverColor: "orange",
borderColor: "red",
showBorder: false,
showTags: true,
highlightSelected: true,
selectedColor: "yellow",
selectedBackColor: "darkorange",
data: alternateData
});
$('#treeview10').treeview({
color: "#428bca",
enableLinks: true,
data: defaultData
});
var $searchableTree = $('#treeview-searchable').treeview({
data: defaultData,
});
var search = function(e) {
var pattern = $('#input-search').val();
var options = {
ignoreCase: $('#chk-ignore-case').is(':checked'),
exactMatch: $('#chk-exact-match').is(':checked'),
revealResults: $('#chk-reveal-results').is(':checked')
};
var results = $searchableTree.treeview('search', [ pattern, options ]);
var output = '<p>' + results.length + ' matches found</p>';
$.each(results, function (index, result) {
output += '<p>- ' + result.text + '</p>';
});
$('#search-output').html(output);
}
$('#btn-search').on('click', search);
$('#input-search').on('keyup', search);
$('#btn-clear-search').on('click', function (e) {
$searchableTree.treeview('clearSearch');
$('#input-search').val('');
$('#search-output').html('');
});
var initSelectableTree = function() {
return $('#treeview-selectable').treeview({
data: defaultData,
multiSelect: $('#chk-select-multi').is(':checked'),
onNodeSelected: function(event, node) {
$('#selectable-output').prepend('<p>' + node.text + ' was selected</p>');
},
onNodeUnselected: function (event, node) {
$('#selectable-output').prepend('<p>' + node.text + ' was unselected</p>');
}
});
};
var $selectableTree = initSelectableTree();
var findSelectableNodes = function() {
return $selectableTree.treeview('search', [ $('#input-select-node').val(), { ignoreCase: false, exactMatch: false } ]);
};
var selectableNodes = findSelectableNodes();
$('#chk-select-multi:checkbox').on('change', function () {
console.log('multi-select change');
$selectableTree = initSelectableTree();
selectableNodes = findSelectableNodes();
});
// Select/unselect/toggle nodes
$('#input-select-node').on('keyup', function (e) {
selectableNodes = findSelectableNodes();
$('.select-node').prop('disabled', !(selectableNodes.length >= 1));
});
$('#btn-select-node.select-node').on('click', function (e) {
$selectableTree.treeview('selectNode', [ selectableNodes, { silent: $('#chk-select-silent').is(':checked') }]);
});
$('#btn-unselect-node.select-node').on('click', function (e) {
$selectableTree.treeview('unselectNode', [ selectableNodes, { silent: $('#chk-select-silent').is(':checked') }]);
});
$('#btn-toggle-selected.select-node').on('click', function (e) {
$selectableTree.treeview('toggleNodeSelected', [ selectableNodes, { silent: $('#chk-select-silent').is(':checked') }]);
});
var $expandibleTree = $('#treeview-expandible').treeview({
data: defaultData,
onNodeCollapsed: function(event, node) {
$('#expandible-output').prepend('<p>' + node.text + ' was collapsed</p>');
},
onNodeExpanded: function (event, node) {
$('#expandible-output').prepend('<p>' + node.text + ' was expanded</p>');
}
});
var findExpandibleNodess = function() {
return $expandibleTree.treeview('search', [ $('#input-expand-node').val(), { ignoreCase: false, exactMatch: false } ]);
};
var expandibleNodes = findExpandibleNodess();
// Expand/collapse/toggle nodes
$('#input-expand-node').on('keyup', function (e) {
expandibleNodes = findExpandibleNodess();
$('.expand-node').prop('disabled', !(expandibleNodes.length >= 1));
});
$('#btn-expand-node.expand-node').on('click', function (e) {
var levels = $('#select-expand-node-levels').val();
$expandibleTree.treeview('expandNode', [ expandibleNodes, { levels: levels, silent: $('#chk-expand-silent').is(':checked') }]);
});
$('#btn-collapse-node.expand-node').on('click', function (e) {
$expandibleTree.treeview('collapseNode', [ expandibleNodes, { silent: $('#chk-expand-silent').is(':checked') }]);
});
$('#btn-toggle-expanded.expand-node').on('click', function (e) {
$expandibleTree.treeview('toggleNodeExpanded', [ expandibleNodes, { silent: $('#chk-expand-silent').is(':checked') }]);
});
// Expand/collapse all
$('#btn-expand-all').on('click', function (e) {
var levels = $('#select-expand-all-levels').val();
$expandibleTree.treeview('expandAll', { levels: levels, silent: $('#chk-expand-silent').is(':checked') });
});
$('#btn-collapse-all').on('click', function (e) {
$expandibleTree.treeview('collapseAll', { silent: $('#chk-expand-silent').is(':checked') });
});
var $checkableTree = $('#treeview-checkable').treeview({
data: defaultData,
showIcon: false,
showCheckbox: true,
onNodeChecked: function(event, node) {
$('#checkable-output').prepend('<p>' + node.text + ' was checked</p>');
},
onNodeUnchecked: function (event, node) {
$('#checkable-output').prepend('<p>' + node.text + ' was unchecked</p>');
}
});
var findCheckableNodess = function() {
return $checkableTree.treeview('search', [ $('#input-check-node').val(), { ignoreCase: false, exactMatch: false } ]);
};
var checkableNodes = findCheckableNodess();
// Check/uncheck/toggle nodes
$('#input-check-node').on('keyup', function (e) {
checkableNodes = findCheckableNodess();
$('.check-node').prop('disabled', !(checkableNodes.length >= 1));
});
$('#btn-check-node.check-node').on('click', function (e) {
$checkableTree.treeview('checkNode', [ checkableNodes, { silent: $('#chk-check-silent').is(':checked') }]);
});
$('#btn-uncheck-node.check-node').on('click', function (e) {
$checkableTree.treeview('uncheckNode', [ checkableNodes, { silent: $('#chk-check-silent').is(':checked') }]);
});
$('#btn-toggle-checked.check-node').on('click', function (e) {
$checkableTree.treeview('toggleNodeChecked', [ checkableNodes, { silent: $('#chk-check-silent').is(':checked') }]);
});
// Check/uncheck all
$('#btn-check-all').on('click', function (e) {
$checkableTree.treeview('checkAll', { silent: $('#chk-check-silent').is(':checked') });
});
$('#btn-uncheck-all').on('click', function (e) {
$checkableTree.treeview('uncheckAll', { silent: $('#chk-check-silent').is(':checked') });
});
var $disabledTree = $('#treeview-disabled').treeview({
data: defaultData,
onNodeDisabled: function(event, node) {
$('#disabled-output').prepend('<p>' + node.text + ' was disabled</p>');
},
onNodeEnabled: function (event, node) {
$('#disabled-output').prepend('<p>' + node.text + ' was enabled</p>');
},
onNodeCollapsed: function(event, node) {
$('#disabled-output').prepend('<p>' + node.text + ' was collapsed</p>');
},
onNodeUnchecked: function (event, node) {
$('#disabled-output').prepend('<p>' + node.text + ' was unchecked</p>');
},
onNodeUnselected: function (event, node) {
$('#disabled-output').prepend('<p>' + node.text + ' was unselected</p>');
}
});
var findDisabledNodes = function() {
return $disabledTree.treeview('search', [ $('#input-disable-node').val(), { ignoreCase: false, exactMatch: false } ]);
};
var disabledNodes = findDisabledNodes();
// Expand/collapse/toggle nodes
$('#input-disable-node').on('keyup', function (e) {
disabledNodes = findDisabledNodes();
$('.disable-node').prop('disabled', !(disabledNodes.length >= 1));
});
$('#btn-disable-node.disable-node').on('click', function (e) {
$disabledTree.treeview('disableNode', [ disabledNodes, { silent: $('#chk-disable-silent').is(':checked') }]);
});
$('#btn-enable-node.disable-node').on('click', function (e) {
$disabledTree.treeview('enableNode', [ disabledNodes, { silent: $('#chk-disable-silent').is(':checked') }]);
});
$('#btn-toggle-disabled.disable-node').on('click', function (e) {
$disabledTree.treeview('toggleNodeDisabled', [ disabledNodes, { silent: $('#chk-disable-silent').is(':checked') }]);
});
// Expand/collapse all
$('#btn-disable-all').on('click', function (e) {
$disabledTree.treeview('disableAll', { silent: $('#chk-disable-silent').is(':checked') });
});
$('#btn-enable-all').on('click', function (e) {
$disabledTree.treeview('enableAll', { silent: $('#chk-disable-silent').is(':checked') });
});
var $tree = $('#treeview12').treeview({
data: json
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,11 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://www.htmleaf.com/
IDList=
HotKey=0
IconFile=C:\Windows\system32\SHELL32.dll
IconIndex=220
[InternetShortcut.A]
[InternetShortcut.W]
IconFile=F:+AFx/UVP2-jQuery+AFw-favicon.ico

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>jQuery之家</title>
<style type="text/css">
body{font-size: 14px;}
.content{
width: 800px;
margin: 0 auto;
}
</style>
</head>
<body>
<h1>欢迎访问jQuery之家</h1>
<div class="content">
<p>更多精彩内容请访问jQuery之家<a href="http://www.htmleaf.com">http://www.htmleaf.com</a></p>
<p>jQuery之家致力于搜集和整理各种jQuery插件jQuery特效jquery uijQuery 教程JS特效网页特效以及各种html5css3动画和效果。</p>
<p>为前端开发者提供最全面的网页开发素材。</p>
</div>
</body>
</html>

View File

@ -0,0 +1,37 @@
/* =========================================================
* bootstrap-treeview.css v1.2.0
* =========================================================
* Copyright 2013 Jonathan Miles
* Project URL : http://www.jondmiles.com/bootstrap-treeview
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
.treeview .list-group-item {
cursor: pointer;
}
.treeview span.indent {
margin-left: 10px;
margin-right: 10px;
}
.treeview span.icon {
width: 12px;
margin-right: 5px;
}
.treeview .node-disabled {
color: silver;
cursor: not-allowed;
}

File diff suppressed because it is too large Load Diff