-
Notifications
You must be signed in to change notification settings - Fork 1
/
New.html
64 lines (61 loc) · 4.67 KB
/
New.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
<!DOCTYPE html>
<html ng-app="demo">
<head>
<title></title>
<link href="css/treeview.css" rel="stylesheet" />
<script src="scripts/angular_1.0.5.min.js"></script>
<script src="scripts/ui.treeview.js"></script>
<script type="text/javascript">
angular.module("demo", ['ui.treeview']);
function demoController($scope) {
$scope.searchText = "";
$scope.data = {};
$scope.data.productData = [{
"id": "6000", "Name": "All Categories", "iconright": "hide", "iconleft": "show", "confirm": false,
Children: [{
"id": "6100", "Name": "Juice", "iconright": "hide", "iconleft": "show", "confirm": false,
Children: [{
"id": "6200", "Name": "Mom's Brands", "iconright": "hide", "iconleft": "show", "confirm": false,
Children: [{ "id": "6454", "Name": "Mom's Apple Jug", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6456", "Name": "Mom's Apple Juice", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6458", "Name": "Mom's Grape Juice", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6462", "Name": "Mom's Apple Grape Jug", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6463", "Name": "Mom's Pear Blend", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6465", "Name": "ABC Pear Blend", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6464", "Name": "Mom's Juice Cocktail Lite", "iconright": "hide", "iconleft": "show", "confirm": false }]
},
{
"id": "6300", "Name": "Sparkle Brands", "iconright": "hide", "iconleft": "show", "confirm": false,
Children: [{ "id": "6392", "Name": "Sparkle Pear Juice", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6393", "Name": "Sparkle Grape Juice Light", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6394", "Name": "Sparkle Apple Juice", "iconright": "hide", "iconleft": "show", "confirm": false }]
},
{
"id": "6400", "Name": "Natural Choice", "iconright": "hide", "iconleft": "show", "confirm": false,
Children: [{ "id": "6472", "Name": "Natural Choice Apple Juice", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6474", "Name": "Natural Choice mGrape Juice", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6475", "Name": "Natural Choice Pear Juice", "iconright": "hide", "iconleft": "show", "confirm": false },
{ "id": "6476", "Name": "Natural Choice Grape Juice Light", "iconright": "hide", "iconleft": "show", "confirm": false }]
},
]
}]
}];
$scope.retData = function () {
return $scope.productData;
}
$scope.attr = "Name";
//$scope.gettreeSel = function () {
// //};
$scope.getSelection = function () {
var selectedData = $scope.gettreeSel();
};
};
</script>
</head>
<body ng-controller="demoController">
<h2>JavaScript Projects</h2>
<input type="text" width="50px" ng-model="searchText" />
<treeview treeview-data="data.productData" display-attr="Name"></treeview>
<treeview style="width: 300px;" search-model="searchText" data-check="true" treeview-data="data.productData" unique-id="id" display-attr="{{attr}}"></treeview>
</body>
</html>