Skip to content

Commit 2308fe5

Browse files
committed
Move tab array examples to the existing bootstrap example
1 parent a24eebc commit 2308fe5

File tree

6 files changed

+145
-214
lines changed

6 files changed

+145
-214
lines changed

examples/bootstrap-example.html

+6-3
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ <h3>Schema</h3>
214214
<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular-sanitize.min.js"></script> -->
215215

216216

217-
<!--
218-
<script type="text/javascript" src="../bower_components/angular-ui-sortable/sortable.js"></script>
219-
-->
217+
<script type="text/javascript" src="../bower_components/angular-ui-sortable/sortable.min.js"></script>
218+
<script type="text/javascript" src="../bower_components/jquery-ui/jquery-ui.min.js"></script>
219+
220220
<script type="text/javascript" src="../bower_components/angular-ui-ace/ui-ace.js"></script>
221221
<script type="text/javascript" src="../bower_components/objectpath/lib/ObjectPath.js"></script>
222222
<script type="text/javascript" src="../bower_components/pickadate/lib/picker.js"></script>
@@ -254,6 +254,9 @@ <h3>Schema</h3>
254254
{ name: "TitleMap Examples", data: 'data/titlemaps.json' },
255255
{ name: "Kitchen Sink", data: 'data/sink.json' },
256256
{ name: "Hack: Conditional required", data: 'data/conditional-required.json' },
257+
{ name: "Tab Array: Add Disabled", data: 'data/tabarray-add-disabled.json' },
258+
{ name: "Tab Array: Remove Disabled", data: 'data/tabarray-remove-disabled.json' },
259+
{ name: "Tab Array: Sortable (Drag and Drop)", data: 'data/tabarray-sortable.json' }
257260
];
258261

259262
$scope.navbarMode = 'default';
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"schema": {
3+
"type": "object",
4+
"title": "Tab Array: Add Disabled",
5+
"properties": {
6+
"addDisabledTabArray": {
7+
"type": "array",
8+
"items": {
9+
"type": "object",
10+
"properties": {
11+
"name": { "type": "string" },
12+
"nick": { "type": "string" }
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"form": [
19+
{
20+
"type": "section",
21+
"htmlCss": "row",
22+
"items": [
23+
{
24+
"type": "help",
25+
"helpvalue": "<h4>Tab array with add link hidden</h4>"
26+
},
27+
{
28+
"key": "addDisabledTabArray",
29+
"type": "tabarray",
30+
"add": null,
31+
"title": "My name is: {{ value.name }}",
32+
"sortOptions": {
33+
"disabled": true
34+
},
35+
"items" : [
36+
{"key": "addDisabledTabArray[].name", "htmlClass": "nameField"},
37+
{"key": "addDisabledTabArray[].nick", "htmlClass": "nickField"}
38+
]
39+
}
40+
]
41+
}
42+
],
43+
"model": {}
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"schema": {
3+
"type": "object",
4+
"title": "Tab Array: Remove Disabled",
5+
"properties": {
6+
"removeDisabledTabArray": {
7+
"type": "array",
8+
"items": {
9+
"type": "object",
10+
"properties": {
11+
"name": { "type": "string" },
12+
"nick": { "type": "string" }
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"form": [
19+
{
20+
"type": "section",
21+
"htmlCss": "row",
22+
"items": [
23+
{
24+
"type": "help",
25+
"helpvalue": "<h4>Tab array with remove button hidden</h4>"
26+
},
27+
{
28+
"key": "removeDisabledTabArray",
29+
"type": "tabarray",
30+
"remove": null,
31+
"title": "My name is: {{ value.name }}",
32+
"sortOptions": {
33+
"disabled": true
34+
},
35+
"items" : [
36+
{"key": "removeDisabledTabArray[].name", "htmlClass": "nameField"},
37+
{"key": "removeDisabledTabArray[].nick", "htmlClass": "nickField"}
38+
]
39+
}
40+
]
41+
}
42+
],
43+
"model": {}
44+
}

examples/data/tabarray-sortable.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"schema": {
3+
"type": "object",
4+
"title": "Tab Array: Sortable (Drag and Drop)",
5+
"properties": {
6+
"sortableTabArray": {
7+
"type": "array",
8+
"items": {
9+
"type": "object",
10+
"properties": {
11+
"name": { "type": "string" },
12+
"nick": { "type": "string" }
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"form": [
19+
{
20+
"type": "section",
21+
"htmlCss": "row",
22+
"items": [
23+
{
24+
"type": "help",
25+
"helpvalue": "<h4>Drag and drop sortable tab array</h4>"
26+
},
27+
{
28+
"key": "sortableTabArray",
29+
"type": "tabarray",
30+
"title": "My name is: {{ value.name }}",
31+
"items" : [
32+
{"key": "sortableTabArray[].name", "htmlClass": "nameField"},
33+
{"key": "sortableTabArray[].nick", "htmlClass": "nickField"}
34+
]
35+
}
36+
]
37+
}
38+
],
39+
"model": {}
40+
}

examples/tabarray.html

-202
This file was deleted.

0 commit comments

Comments
 (0)