[Mobile] Use mct-device in tree nodes

This commit is contained in:
Victor Woeltjen 2015-09-18 12:25:51 -07:00
parent c057ba38a5
commit bf05e55d02
2 changed files with 16 additions and 3 deletions

View File

@ -26,7 +26,8 @@
ng-class="{selected: treeNode.isSelected()}"
>
<span
class='ui-symbol view-control mobile-hide'
mct-device="desktop"
class='ui-symbol view-control'
ng-click="toggle.toggle(); treeNode.trackExpansion()"
ng-if="model.composition !== undefined"
>
@ -34,6 +35,7 @@
</span>
<mct-representation
mct-device="desktop"
class="mobile-hide"
key="'label'"
mct-object="domainObject"
@ -41,15 +43,22 @@
>
</mct-representation>
<mct-representation
mct-device="mobile"
class="desktop-hide"
key="'label'"
mct-object="domainObject"
ng-click="toggle.toggle(); treeNode.trackExpansion()"
ng-click="ngModel.selectedObject =
model.composition === undefined ?
domainObject : ngModel.selectedObject;
toggle.toggle();
treeNode.trackExpansion();
"
>
</mct-representation>
<span
class='ui-symbol view-control desktop-hide'
mct-device="mobile"
class='ui-symbol view-control'
ng-model="ngModel"
ng-click="ngModel.selectedObject = domainObject"
>

View File

@ -94,6 +94,10 @@ define(
link: link,
// We are transcluding the whole element (like ng-if)
transclude: 'element',
// 1 more than ng-if
priority: 601,
// Also terminal, since element will be transcluded
terminal: true,
// Only apply as an attribute
restrict: "A"
};