mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Use 100% of screen width for results on smaller screens
- Ellipsis used and text truncated if name overflows - Icon column does not expand out as screen gets wider Refs #228
This commit is contained in:
parent
b4766d7be4
commit
12c98a831e
@ -37,9 +37,15 @@ declare let __moduleName: string;
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
|
:host .col-display-name {
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
:host .col-modified-at, :host .col-modified-by {
|
:host .col-modified-at, :host .col-modified-by {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
:host div.search-results-container table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`],
|
`],
|
||||||
directives: [ ALFRESCO_SEARCH_DIRECTIVES, VIEWERCOMPONENT ]
|
directives: [ ALFRESCO_SEARCH_DIRECTIVES, VIEWERCOMPONENT ]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<table data-automation-id="search_result_table" *ngIf="results && results.length && searchTerm" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
|
<table data-automation-id="search_result_table" *ngIf="results && results.length && searchTerm" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="mdl-data-table__cell--non-numeric"></th>
|
<th class="mdl-data-table__cell--non-numeric col-mimetype-icon"></th>
|
||||||
<th class="mdl-data-table__cell--non-numeric col-display-name">
|
<th class="mdl-data-table__cell--non-numeric col-display-name">
|
||||||
{{'SEARCH.RESULTS.COLUMNS.NAME' | translate}}
|
{{'SEARCH.RESULTS.COLUMNS.NAME' | translate}}
|
||||||
</th>
|
</th>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<tr *ngFor="let result of results; let idx = index" (click)="onItemClick(result, $event)">
|
<tr *ngFor="let result of results; let idx = index" (click)="onItemClick(result, $event)">
|
||||||
<td><img src="{{getMimeTypeIcon(result)}}" /></td>
|
<td class="col-mimetype-icon"><img src="{{getMimeTypeIcon(result)}}" /></td>
|
||||||
<td class="mdl-data-table__cell--non-numeric col-display-name"
|
<td class="mdl-data-table__cell--non-numeric col-display-name"
|
||||||
attr.data-automation-id=file_{{result.entry.name}} >{{result.entry.name}}</td>
|
attr.data-automation-id=file_{{result.entry.name}} >{{result.entry.name}}</td>
|
||||||
<td class="mdl-data-table__cell--non-numeric col-modified-by"
|
<td class="mdl-data-table__cell--non-numeric col-modified-by"
|
||||||
|
@ -26,7 +26,20 @@ declare let __moduleName: string;
|
|||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'alfresco-search',
|
selector: 'alfresco-search',
|
||||||
styles: [],
|
styles: [`
|
||||||
|
:host .mdl-data-table td {
|
||||||
|
max-width: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
:host .mdl-data-table td.col-mimetype-icon {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
:host .col-display-name {
|
||||||
|
min-width: 250px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
`],
|
||||||
templateUrl: './alfresco-search.component.html',
|
templateUrl: './alfresco-search.component.html',
|
||||||
providers: [AlfrescoSearchService],
|
providers: [AlfrescoSearchService],
|
||||||
pipes: [AlfrescoPipeTranslate]
|
pipes: [AlfrescoPipeTranslate]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user