Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 771c449

Browse files
committed
Fix default boolean properties for the dialog
1 parent 6d677a9 commit 771c449

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"ngx-pagination": "3.0.1",
3838
"rxjs": "5.5.2",
3939
"sockjs-client": "1.1.4",
40-
"spring-flo": "git://github.com/spring-projects/spring-flo.git#0dcd8726280d53239d7d32f4b3788d40b9a01ff8",
40+
"spring-flo": "0.7.0-beta",
4141
"stompjs": "2.3.3",
4242
"tixif-ngx-busy": "0.0.5",
4343
"zone.js": "0.8.18",

ui/src/app/shared/flo/support/app-metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class AppMetadata implements Flo.ElementMetadata {
4040
switch (o.name.toLowerCase()) {
4141
case 'language':
4242
propertyMetadata.options = [
43-
undefined, 'groovy', 'javascript', 'ruby', 'python'
43+
'groovy', 'javascript', 'ruby', 'python'
4444
];
4545
break;
4646
case 'script':

ui/src/app/shared/flo/support/properties-group-model.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export class PropertiesGroupModel extends Properties.PropertiesGroupModel {
2929
inputType = Properties.InputType.URL;
3030
break;
3131
case 'java.lang.Boolean':
32-
inputType = Properties.InputType.CHECKBOX;
33-
break;
32+
return new Properties.CheckBoxControlModel(property);
3433
default:
3534
if (property.metadata.code) {
3635
if (property.metadata.code.langPropertyName) {
@@ -42,9 +41,9 @@ export class PropertiesGroupModel extends Properties.PropertiesGroupModel {
4241
}
4342
} else if (Array.isArray(property.metadata.options)) {
4443
return new Properties.SelectControlModel(property,
45-
Properties.InputType.SELECT, (<Array<string>> property.metadata.options).map(o => {
44+
Properties.InputType.SELECT, (<Array<string>> property.metadata.options).filter(o => o.length > 0).map(o => {
4645
return {
47-
name: o ? o.charAt(0).toUpperCase() + o.substr(1).toLowerCase() : '< SELECT >',
46+
name: o.charAt(0).toUpperCase() + o.substr(1).toLowerCase(),
4847
value: o === property.defaultValue ? undefined : o
4948
};
5049
}));

0 commit comments

Comments
 (0)