forked from handsontable/ngHandsontable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabs.html
73 lines (56 loc) · 2.71 KB
/
tabs.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
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="en" ng-app="uiAppWithTabs">
<head>
<meta charset="utf-8">
<title>Handsontable as Angular directive (with Tabs)</title>
<script src="bower_components/jquery/jquery.min.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="js/lib/ui-bootstrap-tpls-0.2.0.js"></script>
<link rel="stylesheet" media="screen" href="js/lib/bootstrap.css">
<script src="dist/angular-ui-handsontable.full.js"></script>
<link rel="stylesheet" media="screen" href="dist/angular-ui-handsontable.full.css">
<script src="js/split-screen.js"></script>
<style>
body {
font-family: Arial;
}
</style>
</head>
<body ng-controller="MyCtrl">
<h1>Handsontable</h1>
<tabs>
<pane heading="Static title">Static content</pane>
<pane heading="Instance 1">
<h2>Instance 1</h2>
<button ng-click="dumpItems()">Dump object to console</button>
<p>Selection: {{currentSelection}}</p>
<p>Selection: <input ng-model="MySelectedIndex"></p>
<ui-handsontable id="example1" minSpareRows="1" stretchH="'last'" manualColumnMove="true" manualColumnResize="true"
columnSorting="true" selectedIndex="MySelectedIndex" rowheaders="true" HeIgHT="calcHeight"
width="calcWidth" datarows="item in db.items">
<datacolumn width="50" value="item.id" title="'ID'"></datacolumn>
<datacolumn width="100" type="grayedOut" value="item.name.first" title="'First Name'" readOnly></datacolumn>
<datacolumn width="100" type="grayedOut" value="item.name.last" title="'Last Name'" readOnly></datacolumn>
<datacolumn width="120" value="item.address" title="'Address'"></datacolumn>
<datacolumn width="120" value="item.Product.Description" title="'Favorite food'" type="'autocomplete'">
<optionlist datarows="option in item.Product.Options" clickrow="item.Product.Description = option.Description">
<img ng-src="{{option.Image}}" style="width: 16px; height: 16px; border-width: 0"> {{option.Description}}
</optionlist>
</datacolumn>
<datacolumn type="'numeric'" width="50" value="item.price" format="'$ 0,0.00'" title="'Price'"></datacolumn>
<datacolumn width="65" type="'checkbox'" value="item.isActive" title="'Is active'" checkedTemplate="'Yes'"
uncheckedTemplate="'No'"></datacolumn>
</ui-handsontable>
</pane>
<pane heading="Instance 2">
<h2>Instance 2</h2>
<p>Filter: <input ng-model="query"> |
<button ng-click="addColumn()">Dynamically add column</button>
</p>
<div ui-handsontable="{rowHeaders: false}" datarows="item in filteredItems" columns="db.dynamicColumns" height="320"
width="640">
</div>
</pane>
</tabs>
</body>
</html>