Fix excessive 'plus' buttons for some group directives

The used approach is crude, but it works.

Change-Id: I19ffa2610f3f19a0b49b65892f940560b394c9d0
This commit is contained in:
Timur Sufiev 2015-01-19 19:10:23 +03:00
parent 2f187b0930
commit 389af84bb4
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<collapsible-group title="{$ spec.title || makeTitle(spec.name) $}" on-add="add(item[spec.name])">
<collapsible-group title="{$ spec.title || makeTitle(spec.name) $}" on-add="add(item[spec.name])" additive="{$ spec.additive $}">
<div ng-repeat="specs in spec.value | groupBy: 'row' | toArray: true | orderBy: '$key' track by specs.$key">
<div ng-class="{'three-columns': specs[0].row !== undefined }">
<div ng-repeat="spec in specs track by spec.name"

View File

@ -90,7 +90,7 @@
},
link: function(scope, element, attrs) {
disableClickDefaultBehaviour(element);
if ( attrs.onAdd ) {
if ( attrs.onAdd && attrs.additive !== 'false' ) {
scope.additive = true;
}
if ( attrs.onRemove ) {