mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
improved uploading of files (#1730)
* improved uploading of files - new core/UploadDirective to allow dropping files to any html element - enhanced file dropping for DataTable rows (disabled by default) - enhanced file dropping for DocumentList rows (disabled by default) - upload drop area now handles file uploads for child elements (i.e. rows in the document list) * fix unit tests * unit tests and code cleanup * #1732, fix upload of folders
This commit is contained in:
committed by
Mario Romano
parent
f3de023ab3
commit
3fee3b5002
@@ -184,6 +184,7 @@ You can also use HTML-based schema declaration like shown below:
|
||||
| `actionsPosition` | string (left\|right) | right | Position of the actions dropdown menu. |
|
||||
| `fallbackThumbnail` | string | | Fallback image for row ehre thubnail is missing|
|
||||
| `contextMenu` | boolean | false | Toggles custom context menu for the component |
|
||||
| `allowDropFiles` | boolean | false | Toggle file drop support for rows (see **ng2-alfresco-core/UploadDirective** for more details) |
|
||||
|
||||
### DataColumn Properties
|
||||
|
||||
|
@@ -122,3 +122,16 @@
|
||||
.alfresco-datatable__row--selected {
|
||||
color: rgb(68,138,255);
|
||||
}
|
||||
|
||||
.adf-upload__dragging > td {
|
||||
border-top: 1px dashed rgb(68,138,255);
|
||||
border-bottom: 1px dashed rgb(68,138,255);
|
||||
}
|
||||
|
||||
.adf-upload__dragging > td:first-child {
|
||||
border-left: 1px dashed rgb(68,138,255);
|
||||
}
|
||||
|
||||
.adf-upload__dragging > td:last-child {
|
||||
border-right: 1px dashed rgb(68,138,255);
|
||||
}
|
||||
|
@@ -37,7 +37,8 @@
|
||||
|
||||
<tr *ngFor="let row of data.getRows(); let idx = index" tabindex="0"
|
||||
class="alfresco-datatable__row"
|
||||
[class.alfresco-datatable__row--selected]="selectedRow === row">
|
||||
[class.alfresco-datatable__row--selected]="selectedRow === row"
|
||||
[adf-upload]="allowDropFiles" [adf-upload-data]="row">
|
||||
|
||||
<!-- Actions (right) -->
|
||||
<td *ngIf="actions && actionsPosition === 'left'" class="alfresco-datatable__actions-cell">
|
||||
|
@@ -51,6 +51,9 @@ export class DataTableComponent implements AfterContentInit {
|
||||
@Input()
|
||||
contextMenu: boolean = false;
|
||||
|
||||
@Input()
|
||||
allowDropFiles: boolean = false;
|
||||
|
||||
@Output()
|
||||
rowClick: EventEmitter<DataRowEvent> = new EventEmitter<DataRowEvent>();
|
||||
|
||||
|
Reference in New Issue
Block a user