[ADF-1220] Extra data sources for Document List (#2224)

* initial trashcan support and demo page

* use testbed for unit tests

* support for restricting navigation for special data sources

* shared links mode, thumbnail fixes

* update unit tests

* improve Trashcan/SharedLinks columns

* Sites view for document list

* Favorites support for DL, upgrade to latest js-api (alpha)

* recent files support for document list

* support default presets

* readme updates and code fixes

* code fixes

* breadcrumb fixes

- show custom root node for certain scenarios
- fix css issues
- fix crash related to missing "path" property for certain scenarios

* toolbar style fixes

- addresses the shrinking issues with components embedded into toolbar (i.e. breadcrumb)

* i18n support for column presets

* unit tests
This commit is contained in:
Denys Vuika
2017-08-17 14:31:00 +01:00
committed by Mario Romano
parent 6b1742c5f0
commit def3cbaee8
36 changed files with 1806 additions and 4215 deletions

View File

@@ -28,6 +28,26 @@
<md-icon>more_vert</md-icon>
</button>
<md-menu #appMenu="mdMenu">
<a md-menu-item href="" routerLink="/trashcan">
<md-icon>extension</md-icon>
<span>DL: Trashcan</span>
</a>
<a md-menu-item href="" routerLink="/shared-links">
<md-icon>extension</md-icon>
<span>DL: Shared Links</span>
</a>
<a md-menu-item href="" routerLink="/sites">
<md-icon>extension</md-icon>
<span>DL: Sites</span>
</a>
<a md-menu-item href="" routerLink="/favorites">
<md-icon>extension</md-icon>
<span>DL: Favorites</span>
</a>
<a md-menu-item href="" routerLink="/recent">
<md-icon>extension</md-icon>
<span>DL: Recent</span>
</a>
<a md-menu-item href="" routerLink="/datatable">
<md-icon>view_module</md-icon>
<span>DataTable</span>

View File

@@ -43,6 +43,11 @@ import { CustomEditorsModule } from './components/activiti/custom-editor/custom-
import { MaterialModule } from './material.module';
import { DebugAppConfigService } from './services/debug-app-config.service';
import { FavoritesComponent } from './components/files/favorites.component';
import { RecentComponent } from './components/files/recent.component';
import { SharedLinksComponent } from './components/files/shared-links.component';
import { SitesComponent } from './components/files/sites.component';
import { TrashcanComponent } from './components/files/trashcan.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
import {
@@ -120,7 +125,12 @@ if (process.env.ENV === 'production') {
FormNodeViewerComponent,
SettingsComponent,
FormDemoComponent,
FormListDemoComponent
FormListDemoComponent,
TrashcanComponent,
SharedLinksComponent,
SitesComponent,
FavoritesComponent,
RecentComponent
],
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService },

View File

@@ -39,6 +39,11 @@ import {
} from './components/index';
import { UploadButtonComponent } from 'ng2-alfresco-upload';
import { FavoritesComponent } from './components/files/favorites.component';
import { RecentComponent } from './components/files/recent.component';
import { SharedLinksComponent } from './components/files/shared-links.component';
import { SitesComponent } from './components/files/sites.component';
import { TrashcanComponent } from './components/files/trashcan.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
export const appRoutes: Routes = [
@@ -63,6 +68,31 @@ export const appRoutes: Routes = [
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'trashcan',
component: TrashcanComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'shared-links',
component: SharedLinksComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'sites',
component: SitesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'favorites',
component: FavoritesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'recent',
component: RecentComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'datatable',
component: DataTableDemoComponent,

View File

@@ -0,0 +1,4 @@
<adf-document-list
currentFolderId="-favorites-"
locationFormat="/files">
</adf-document-list>

View File

@@ -0,0 +1,25 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'adf-favorites-demo',
templateUrl: 'favorites.component.html'
})
export class FavoritesComponent {
}

View File

@@ -0,0 +1,4 @@
<adf-document-list
currentFolderId="-recent-"
locationFormat="/files">
</adf-document-list>

View File

@@ -0,0 +1,25 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'adf-recent-demo',
templateUrl: 'recent.component.html'
})
export class RecentComponent {
}

View File

@@ -0,0 +1,4 @@
<adf-document-list
currentFolderId="-sharedlinks-"
locationFormat="/files">
</adf-document-list>

View File

@@ -0,0 +1,25 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'adf-shared-links-demo',
templateUrl: 'shared-links.component.html'
})
export class SharedLinksComponent {
}

View File

@@ -0,0 +1,3 @@
<adf-document-list
currentFolderId="-sites-">
</adf-document-list>

View File

@@ -0,0 +1,25 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'adf-sites-demo',
templateUrl: 'sites.component.html'
})
export class SitesComponent {
}

View File

@@ -0,0 +1,4 @@
<adf-document-list
currentFolderId="-trashcan-"
locationFormat="/files">
</adf-document-list>

View File

@@ -0,0 +1,25 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'adf-trashcan-demo',
templateUrl: 'trashcan.component.html'
})
export class TrashcanComponent {
}