[ADF-ADF-2528] share directive (#3102)

* share file directive

* share link phase 2

* share dialog

* share dialog test

* more documentation

* add more meaningfully specification

* Add  description in the dialog
This commit is contained in:
Eugenio Romano
2018-03-20 22:32:56 +00:00
committed by GitHub
parent 71b85588cf
commit 2761626f55
24 changed files with 660 additions and 35 deletions

View File

@@ -106,6 +106,14 @@
{{ favorite.hasFavorites() ? 'star' :'star_border' }}
</mat-icon>
</button>
<button mat-icon-button
[disabled]="!documentList.selection.length"
[baseShareUrl]="baseShareUrl"
[adf-share]="documentList.selection[0]">
<mat-icon>
share
</mat-icon>
</button>
</div>
<button fxFlex="1 0 auto" mat-icon-button [matMenuTriggerFor]="themePicker">

View File

@@ -30,7 +30,7 @@ import {
SiteEntry
} from 'alfresco-js-api';
import {
AuthenticationService, ContentService, TranslationService,
AuthenticationService, AppConfigService, ContentService, TranslationService,
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
UploadService, DataColumn, DataRow, UserPreferencesService,
PaginationComponent, FormValues, DisplayMode, UserPreferenceValues
@@ -59,6 +59,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
showVersions = false;
displayMode = DisplayMode.List;
baseShareUrl = this.appConfig.get<string>('ecmHost') + '/preview/s/';
toolbarColor = 'default';
selectionModes = [
@@ -158,6 +160,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
private logService: LogService,
private preference: UserPreferencesService,
@Optional() private route: ActivatedRoute,
private appConfig: AppConfigService,
public authenticationService: AuthenticationService) {
this.preference.select(UserPreferenceValues.SupportedPageSizes)
.subscribe((pages) => {

View File

@@ -1,7 +1,6 @@
@import './app/components/app-layout/app-layout.component.scss';
@import '~@alfresco/adf-content-services/theming';
@import '~@alfresco/adf-process-services/theming';
@import '~@alfresco/adf-insights/theming';
@import '~@alfresco/adf-core/theming';
@@ -18,7 +17,6 @@ $theme: mat-light-theme($primary, $accent, $warn);
@include adf-app-layout-theme($theme);
@include adf-content-services-theme($theme);
@include adf-process-services-theme($theme);
@include adf-insights-theme($theme);
@include adf-core-theme($theme);