fix binding of documenttypes and templates
This commit is contained in:
@@ -54,11 +54,21 @@
|
||||
|
||||
// get all doc types
|
||||
contentTypeResource.getAll().then(documentTypes => {
|
||||
// a package stores the id as a string so we
|
||||
// need to convert all ids to string for comparison
|
||||
documentTypes.forEach(documentType => {
|
||||
documentType.id = documentType.id.toString();
|
||||
});
|
||||
vm.documentTypes = documentTypes;
|
||||
});
|
||||
|
||||
// get all templates
|
||||
templateResource.getAll().then(templates => {
|
||||
// a package stores the id as a string so we
|
||||
// need to convert all ids to string for comparison
|
||||
templates.forEach(template => {
|
||||
template.id = template.id.toString();
|
||||
});
|
||||
vm.templates = templates;
|
||||
});
|
||||
|
||||
|
||||
@@ -132,13 +132,12 @@
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="Document Types">
|
||||
<pre>{{vm.documentTypes | json }} </pre>
|
||||
<div ng-repeat="doctype in vm.documentTypes">
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
ng-model="doctype.selected"
|
||||
checklist-model="vm.package.contentTypes"
|
||||
checklist-model="vm.package.documenttypes"
|
||||
checklist-value="doctype.id" />
|
||||
{{doctype.name}}
|
||||
</label>
|
||||
@@ -146,7 +145,6 @@
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="Templates">
|
||||
<pre>{{vm.templates | json }} </pre>
|
||||
<div ng-repeat="template in vm.templates">
|
||||
<label>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user