mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-770] upgrade to md-menu (#2060)
* upgrade to md-menu - upgrade to md-menu - fix issue with missing icons - extend demo shell to show icons for actions - fix issue with border problems in Firefox - remove commented out samples in demo shell (there's readme for that instead) * fix unit tests * fix tests
This commit is contained in:
committed by
Eugenio Romano
parent
183dd3c990
commit
3b8cf27862
@@ -39,19 +39,19 @@
|
||||
|
||||
<!-- Actions (left) -->
|
||||
<td *ngIf="actions && actionsPosition === 'left'" class="alfresco-datatable__actions-cell">
|
||||
<button [id]="'action_menu_' + idx" alfresco-mdl-button class="mdl-button--icon"
|
||||
[attr.data-automation-id]="'action_menu_' + idx">
|
||||
<i class="material-icons">more_vert</i>
|
||||
<button md-icon-button [mdMenuTriggerFor]="menu"
|
||||
[attr.data-automation-id]="'action_menu_' + idx">
|
||||
<md-icon>more_vert</md-icon>
|
||||
</button>
|
||||
<ul alfresco-mdl-menu class="mdl-menu--bottom-left"
|
||||
[attr.for]="'action_menu_' + idx">
|
||||
<li class="mdl-menu__item" [attr.disabled]="action.disabled"
|
||||
<md-menu #menu="mdMenu">
|
||||
<button md-menu-item *ngFor="let action of getRowActions(row)"
|
||||
[attr.data-automation-id]="action.title"
|
||||
*ngFor="let action of getRowActions(row)"
|
||||
[disabled]="action.disabled"
|
||||
(click)="onExecuteRowAction(row, action)">
|
||||
{{action.title}}
|
||||
</li>
|
||||
</ul>
|
||||
<md-icon *ngIf="action.icon">{{ action.icon }}</md-icon>
|
||||
<span>{{ action.title }}</span>
|
||||
</button>
|
||||
</md-menu>
|
||||
</td>
|
||||
|
||||
<td *ngIf="multiselect">
|
||||
@@ -102,19 +102,19 @@
|
||||
|
||||
<!-- Actions (right) -->
|
||||
<td *ngIf="actions && actionsPosition === 'right'" class="alfresco-datatable__actions-cell">
|
||||
<button [id]="'action_menu_' + idx" alfresco-mdl-button class="mdl-button--icon"
|
||||
[attr.data-automation-id]="'action_menu_' + idx">
|
||||
<i class="material-icons">more_vert</i>
|
||||
<button md-icon-button [mdMenuTriggerFor]="menu"
|
||||
[attr.data-automation-id]="'action_menu_' + idx">
|
||||
<md-icon>more_vert</md-icon>
|
||||
</button>
|
||||
<ul alfresco-mdl-menu class="mdl-menu--bottom-right"
|
||||
[attr.for]="'action_menu_' + idx">
|
||||
<li class="mdl-menu__item" [attr.disabled]="action.disabled || undefined"
|
||||
<md-menu #menu="mdMenu">
|
||||
<button md-menu-item *ngFor="let action of getRowActions(row)"
|
||||
[attr.data-automation-id]="action.title"
|
||||
*ngFor="let action of getRowActions(row)"
|
||||
[disabled]="action.disabled"
|
||||
(click)="onExecuteRowAction(row, action)">
|
||||
{{action.title}}
|
||||
</li>
|
||||
</ul>
|
||||
<md-icon *ngIf="action.icon">{{ action.icon }}</md-icon>
|
||||
<span>{{ action.title }}</span>
|
||||
</button>
|
||||
</md-menu>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
@@ -17,8 +17,9 @@
|
||||
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MdCheckboxChange, MdCheckboxModule } from '@angular/material';
|
||||
import { MdCheckboxChange } from '@angular/material';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { MaterialModule } from '../../material.module';
|
||||
import {
|
||||
DataColumn,
|
||||
DataRow,
|
||||
@@ -40,7 +41,7 @@ describe('DataTable', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
MdCheckboxModule
|
||||
MaterialModule
|
||||
],
|
||||
declarations: [
|
||||
DataTableCellComponent,
|
||||
|
Reference in New Issue
Block a user