mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 13:17:53 +00:00
[Create] Filter out control-less properties
When properties have no control defined, don't show them in the create dialog (but do show them in metadata, e.g. info bubble.) For nasa/openmctweb#92
This commit is contained in:
parent
7562c82369
commit
01f2fab70f
@ -59,10 +59,10 @@ define(
|
||||
var locatingType = locatingObject &&
|
||||
locatingObject.getCapability('type');
|
||||
return locatingType && policyService.allow(
|
||||
"composition",
|
||||
locatingType,
|
||||
type
|
||||
);
|
||||
"composition",
|
||||
locatingType,
|
||||
type
|
||||
);
|
||||
}
|
||||
|
||||
sections.push({
|
||||
@ -77,6 +77,9 @@ define(
|
||||
row.key = index;
|
||||
|
||||
return row;
|
||||
}).filter(function (row) {
|
||||
// Only show rows which have defined controls
|
||||
return row && row.control;
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -42,7 +42,9 @@ define(
|
||||
"property" + name,
|
||||
[ "getDefinition", "getValue", "setValue" ]
|
||||
);
|
||||
mockProperty.getDefinition.andReturn({});
|
||||
mockProperty.getDefinition.andReturn({
|
||||
control: "textfield"
|
||||
});
|
||||
mockProperty.getValue.andReturn(name);
|
||||
return mockProperty;
|
||||
}
|
||||
@ -157,4 +159,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user