|
| 1 | +<div class="dropdown"> |
| 2 | + <button type="button" class="dropdown-toggle" [ngClass]="settings.buttonClasses" |
| 3 | + (click)="toggleDropdown()">{{ title }} <span class="caret"></span></button> |
| 4 | + <ul *ngIf="isVisible" class="dropdown-menu" [class.pull-right]="settings.pullRight" |
| 5 | + [style.max-height]="settings.maxHeight" style="display: block; height: auto; overflow-y: auto;"> |
| 6 | + <li class="dropdown-item" *ngIf="settings.enableSearch"> |
| 7 | + <div class="input-group input-group-sm"> |
| 8 | + <span class="input-group-addon" id="sizing-addon3"><i class="fa fa-search"></i></span> |
| 9 | + <input type="text" class="form-control" placeholder="{{ texts.searchPlaceholder }}" |
| 10 | + aria-describedby="sizing-addon3" [(ngModel)]="searchFilterText"> |
| 11 | + <span class="input-group-btn" *ngIf="searchFilterText.length > 0"> |
| 12 | + <button class="btn btn-default" type="button" (click)="clearSearch()"><i class="fa fa-times"></i></button> |
| 13 | + </span> |
| 14 | + </div> |
| 15 | + </li> |
| 16 | + <li class="dropdown-divider divider" *ngIf="settings.enableSearch"></li> |
| 17 | + <li class="dropdown-item" *ngIf="settings.showCheckAll"> |
| 18 | + <a href="javascript:;" role="menuitem" tabindex="-1" (click)="checkAll()"> |
| 19 | + <span style="width: 16px;" class="glyphicon glyphicon-ok"></span> |
| 20 | + {{ texts.checkAll }} |
| 21 | + </a> |
| 22 | + </li> |
| 23 | + <li class="dropdown-item" *ngIf="settings.showUncheckAll"> |
| 24 | + <a href="javascript:;" role="menuitem" tabindex="-1" (click)="uncheckAll()"> |
| 25 | + <span style="width: 16px;" class="glyphicon glyphicon-remove"></span> |
| 26 | + {{ texts.uncheckAll }} |
| 27 | + </a> |
| 28 | + </li> |
| 29 | + <li *ngIf="settings.showCheckAll || settings.showUncheckAll" class="dropdown-divider divider"></li> |
| 30 | + <li class="dropdown-item" *ngFor="let option of options | searchFilter:searchFilterText"> |
| 31 | + <a href="javascript:;" role="menuitem" tabindex="-1" (click)="setSelected($event, option)"> |
| 32 | + <input *ngIf="settings.checkedStyle == 'checkboxes'" type="checkbox" [checked]="isSelected(option)" /> |
| 33 | + <span *ngIf="settings.checkedStyle == 'glyphicon'" style="width: 16px;" |
| 34 | + class="glyphicon" [class.glyphicon-ok]="isSelected(option)"></span> |
| 35 | + {{ option.name }} |
| 36 | + </a> |
| 37 | + </li> |
| 38 | + </ul> |
| 39 | +</div> |
0 commit comments