[ADF-1733] Restore files and folders from Trash (#2467)

* restore nodes

* changed @Inputs implementation

* NotificationService over mdSnackBar
This commit is contained in:
Cilibiu Bogdan
2017-10-14 13:24:16 +03:00
committed by Denys Vuika
parent a102a7ffb2
commit bfe8fc8d15
8 changed files with 686 additions and 2 deletions

View File

@@ -6,8 +6,20 @@
</md-option>
</md-select>
</adf-toolbar-title>
<div fxFlex="0 1 auto" class="adf-document-action-buttons" fxShow fxHide.lt-sm="true">
<button md-icon-button
(restore)="documentList.reload()"
[disabled]="!documentList.selection.length"
*ngIf="selectedSource === '-trashcan-'"
location="/files"
[adf-restore]="documentList.selection">
<md-icon>restore</md-icon>
</button>
</div>
</adf-toolbar>
<adf-document-list
[currentFolderId]="selectedSource"
locationFormat="/files">
locationFormat="/files"
selectionMode="multiple">
</adf-document-list>

View File

@@ -15,7 +15,8 @@
* limitations under the License.
*/
import { Component, Input } from '@angular/core';
import { Component, Input, ViewChild } from '@angular/core';
import { DocumentListComponent } from 'ng2-alfresco-documentlist';
@Component({
selector: 'adf-custom-sources-demo',
@@ -26,6 +27,9 @@ export class CustomSourcesComponent {
@Input()
selectedSource = '-recent-';
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;
sources = [
{ title: 'Favorites', value: '-favorites-' },
{ title: 'Recent', value: '-recent-' },