|
480 | 480 | <div class="list-view-pf-body"> |
481 | 481 | <div class="list-view-pf-description"> |
482 | 482 | <div class="list-group-item-heading"> |
483 | | - Event One |
| 483 | + {{item.name}} |
484 | 484 | </div> |
485 | 485 | <div class="list-group-item-text"> |
486 | 486 | The following snippet of text is <a href="#">rendered as link text</a>. |
|
521 | 521 | <div class="close"> |
522 | 522 | <span class="pficon pficon-close" ng-click="$parent.$ctrl.customScope.collapseItem($parent.item)"></span> |
523 | 523 | </div> |
524 | | - <div ng-if="$parent.item.expandField === 'hosts'" ng-include="'views/listview/examples/hosts-content.html'"></div> |
525 | | - <div ng-if="$parent.item.expandField === 'clusters'" ng-include="'views/listview/examples/clusters-content.html'"></div> |
526 | | - <div ng-if="$parent.item.expandField === 'nodes'" ng-include="'views/listview/examples/nodes-content.html'"></div> |
527 | | - <div ng-if="$parent.item.expandField === 'images'" ng-include="'views/listview/examples/images-content.html'"></div> |
| 524 | + <item-expansion item="$parent.item"></item-expansion> |
528 | 525 | </list-expanded-content> |
529 | 526 | </pf-list-view> |
530 | 527 | </div> |
|
537 | 534 | </div> |
538 | 535 | </div> |
539 | 536 | </file> |
540 | | -
|
541 | 537 | <file name="counpund.js"> |
542 | 538 | angular.module('patternfly.views').controller('CompoundExanspansionCtrl', ['$scope', '$templateCache', |
543 | 539 | function ($scope, $templateCache) { |
|
597 | 593 | imageCount: 8 |
598 | 594 | }, |
599 | 595 | { |
600 | | - name: "Event Tow", |
| 596 | + name: "Event Two", |
601 | 597 | typeIcon: "fa fa-magic ", |
602 | 598 | hostCount: 8, |
603 | 599 | clusterCount: 6, |
|
711 | 707 | } |
712 | 708 | ]); |
713 | 709 | </file> |
714 | | -</example> |
| 710 | + <file name="itemExpansion.js"> |
| 711 | + angular.module('patternfly.views').component('itemExpansion', { |
| 712 | + bindings: { |
| 713 | + item: '<', |
| 714 | + }, |
| 715 | + templateUrl: 'itemExpansion.html', |
| 716 | + controller: function () { |
| 717 | + 'use strict'; |
| 718 | + var ctrl = this; |
| 719 | + } |
| 720 | + }); |
| 721 | + </file> |
| 722 | + <file name="itemExpansion.html"> |
| 723 | + <div ng-if="$ctrl.item.expandField === 'hosts'" ng-include="'views/listview/examples/hosts-content.html'"></div> |
| 724 | + <div ng-if="$ctrl.item.expandField === 'clusters'" ng-include="'views/listview/examples/clusters-content.html'"></div> |
| 725 | + <div ng-if="$ctrl.item.expandField === 'nodes'" ng-include="'views/listview/examples/nodes-content.html'"></div> |
| 726 | + <div ng-if="$ctrl.item.expandField === 'images'" ng-include="'views/listview/examples/images-content.html'"></div> |
| 727 | + </file> |
| 728 | + </example> |
715 | 729 | */ |
0 commit comments