Skip to content

Commit 1c7f29e

Browse files
author
Olivier Giulieri
committed
Showing panel in different colors for test object.
using "css" attribute of panel.
1 parent 45d9dce commit 1c7f29e

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

demo/test.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
}
1919
</style>
2020
<script src="../dist/vendors.min.js" type="text/javascript"></script>
21-
<script src="demo-ui.min.js" type="text/javascript"></script>
21+
<script src="demo.js" type="text/javascript"></script>
22+
<script src="../js/ui-models/apps/contacts.js" type="text/javascript"></script>
23+
<script src="../js/ui-models/apps/todo.js" type="text/javascript"></script>
24+
<script src="../js/ui-models/apps/winecellar.js" type="text/javascript"></script>
2225
<script src="../js/ui-models/apps/test.js" type="text/javascript"></script>
2326
<script src="../dist/evolutility.js" type="text/javascript"></script>
2427

js/ui-models/apps/test.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var fieldsPanelList = [
2424
{id: 'pl2f2', type: 'text', label: 'Text', maxlength: 100, viewmany: true}
2525
];
2626

27-
function fieldTypePanel(id, label, labelPanel){
27+
function fieldTypePanel(id, label, labelPanel, css){
2828
var labelP = labelPanel || label || id,
2929
fields=[
3030
{
@@ -64,7 +64,8 @@ function fieldTypePanel(id, label, labelPanel){
6464
type: 'panel',
6565
label: labelP,
6666
width: 33,
67-
elements: fields
67+
elements: fields,
68+
css: css
6869
};
6970
}
7071

@@ -79,6 +80,7 @@ uiModels.test = {
7980
elements: [
8081
{
8182
type: 'panel',
83+
css: 'panel-primary',
8284
label: 'Testing Evolutility',
8385
width: 100,
8486
elements: [
@@ -97,10 +99,10 @@ uiModels.test = {
9799
type: 'tab',
98100
label: 'Text & Lists',
99101
elements: [
100-
fieldTypePanel('text', 'Text'),
101-
fieldTypePanel('lov', 'List', 'List (value)'),
102-
fieldTypePanel('list', 'List mv', 'List (multiple values)'),
103-
fieldTypePanel('textmultiline', 'Large Text'),
102+
fieldTypePanel('text', 'Text', 'Text', 'panel-success'),
103+
fieldTypePanel('lov', 'List', 'List (value)', 'panel-warning'),
104+
fieldTypePanel('list', 'List mv', 'List (multiple values)', 'panel-warning'),
105+
fieldTypePanel('textmultiline', 'Large Text', 'Large Text', 'panel-success'),
104106
fieldTypePanel('html', 'HTML')
105107
]
106108
},
@@ -119,7 +121,7 @@ uiModels.test = {
119121
elements: [
120122
fieldTypePanel('integer', 'Integer'),
121123
fieldTypePanel('decimal', 'Decimal'),
122-
fieldTypePanel('money', 'Money')
124+
fieldTypePanel('money', 'Money', 'Money', 'panel-success')
123125
]
124126
},
125127
{
@@ -146,6 +148,7 @@ uiModels.test = {
146148
elements: [
147149
{
148150
type: 'panel-list',
151+
css: 'panel-warning',
149152
id:'subCollec1',
150153
attribute:'subCollec1',
151154
label: 'Collection 1',
@@ -154,6 +157,7 @@ uiModels.test = {
154157
},
155158
{
156159
type: 'panel-list',
160+
css:'panel-danger',
157161
id:'subCollec2',
158162
attribute:'subCollec2',
159163
label: 'Collection 2',

0 commit comments

Comments
 (0)