mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACA-1607] context menu - join/cancel join actions (#820)
* [ACA-1607] context menu fix for search-results * [ACA-19] fix orderBy 'Name' * [ACA-1607] style changes * [ACA-1607] reload on join action
This commit is contained in:
committed by
Denys Vuika
parent
25121e5cf3
commit
62e33efbd0
@@ -62,6 +62,7 @@ export class FavoriteLibrariesComponent extends PageComponent
|
|||||||
this.subscriptions = this.subscriptions.concat([
|
this.subscriptions = this.subscriptions.concat([
|
||||||
this.content.libraryDeleted.subscribe(() => this.reloadList()),
|
this.content.libraryDeleted.subscribe(() => this.reloadList()),
|
||||||
this.content.libraryUpdated.subscribe(() => this.reloadList()),
|
this.content.libraryUpdated.subscribe(() => this.reloadList()),
|
||||||
|
this.content.libraryJoined.subscribe(() => this.reloadList()),
|
||||||
this.content.favoriteLibraryToggle.subscribe(() => this.reloadList()),
|
this.content.favoriteLibraryToggle.subscribe(() => this.reloadList()),
|
||||||
|
|
||||||
this.breakpointObserver
|
this.breakpointObserver
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
<adf-document-list
|
<adf-document-list
|
||||||
#documentList
|
#documentList
|
||||||
|
acaContextActions
|
||||||
acaDocumentList
|
acaDocumentList
|
||||||
[showHeader]="true"
|
[showHeader]="true"
|
||||||
[selectionMode]="'single'"
|
[selectionMode]="'single'"
|
||||||
|
@@ -35,6 +35,7 @@ import { AppToolbarModule } from '../toolbar/toolbar.module';
|
|||||||
import { AppCommonModule } from '../common/common.module';
|
import { AppCommonModule } from '../common/common.module';
|
||||||
import { DirectivesModule } from '../../directives/directives.module';
|
import { DirectivesModule } from '../../directives/directives.module';
|
||||||
import { AppLayoutModule } from '../layout/layout.module';
|
import { AppLayoutModule } from '../layout/layout.module';
|
||||||
|
import { ContextMenuModule } from '../context-menu/context-menu.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -45,7 +46,8 @@ import { AppLayoutModule } from '../layout/layout.module';
|
|||||||
AppInfoDrawerModule,
|
AppInfoDrawerModule,
|
||||||
AppToolbarModule,
|
AppToolbarModule,
|
||||||
DirectivesModule,
|
DirectivesModule,
|
||||||
AppLayoutModule
|
AppLayoutModule,
|
||||||
|
ContextMenuModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
SearchResultsComponent,
|
SearchResultsComponent,
|
||||||
|
@@ -39,8 +39,7 @@ import {
|
|||||||
selector: 'app-toggle-join-library',
|
selector: 'app-toggle-join-library',
|
||||||
template: `
|
template: `
|
||||||
<button
|
<button
|
||||||
mat-icon-button
|
mat-menu-item
|
||||||
[color]="'primary'"
|
|
||||||
#membership="libraryMembership"
|
#membership="libraryMembership"
|
||||||
(toggle)="onToggleEvent($event)"
|
(toggle)="onToggleEvent($event)"
|
||||||
(error)="onErrorEvent($event)"
|
(error)="onErrorEvent($event)"
|
||||||
@@ -57,8 +56,29 @@ import {
|
|||||||
svgIcon="join_library"
|
svgIcon="join_library"
|
||||||
style="pointer-events: none;"
|
style="pointer-events: none;"
|
||||||
></mat-icon>
|
></mat-icon>
|
||||||
|
<span class="sideLabel">{{
|
||||||
|
(membership.isJoinRequested | async)
|
||||||
|
? ('APP.ACTIONS.CANCEL_JOIN' | translate)
|
||||||
|
: ('APP.ACTIONS.JOIN' | translate)
|
||||||
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
`,
|
`,
|
||||||
|
styles: [
|
||||||
|
`
|
||||||
|
aca-toolbar-action .app-toggle-join-library .sideLabel {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
aca-toolbar-action .app-toggle-join-library .mat-menu-item mat-icon {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adf-toolbar .app-toggle-join-library .mat-menu-item:hover {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
],
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
host: { class: 'app-toggle-join-library' }
|
host: { class: 'app-toggle-join-library' }
|
||||||
})
|
})
|
||||||
|
@@ -640,6 +640,15 @@
|
|||||||
"visible": "app.libraries.toolbar"
|
"visible": "app.libraries.toolbar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "app.context.menu.joinLibrary",
|
||||||
|
"type": "custom",
|
||||||
|
"order": 603,
|
||||||
|
"component": "app.toolbar.toggleJoinLibrary",
|
||||||
|
"rules": {
|
||||||
|
"visible": "app.libraries.toolbar.canToggleJoin"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "app.context.menu.copy",
|
"id": "app.context.menu.copy",
|
||||||
"title": "APP.ACTIONS.COPY",
|
"title": "APP.ACTIONS.COPY",
|
||||||
@@ -1323,7 +1332,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "app.libraries.name",
|
"id": "app.libraries.name",
|
||||||
"key": "name",
|
"key": "title",
|
||||||
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
|
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"class": "adf-data-table-cell--ellipsis__name",
|
"class": "adf-data-table-cell--ellipsis__name",
|
||||||
|
@@ -200,7 +200,7 @@
|
|||||||
"PRINT": "Print",
|
"PRINT": "Print",
|
||||||
"FULLSCREEN": "Activate full-screen mode",
|
"FULLSCREEN": "Activate full-screen mode",
|
||||||
"JOIN": "Join",
|
"JOIN": "Join",
|
||||||
"CANCEL_JOIN": "Cancel join request"
|
"CANCEL_JOIN": "Cancel join"
|
||||||
},
|
},
|
||||||
"DIALOGS": {
|
"DIALOGS": {
|
||||||
"CONFIRM_PURGE": {
|
"CONFIRM_PURGE": {
|
||||||
|
Reference in New Issue
Block a user