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.content.libraryDeleted.subscribe(() => this.reloadList()),
|
||||
this.content.libraryUpdated.subscribe(() => this.reloadList()),
|
||||
this.content.libraryJoined.subscribe(() => this.reloadList()),
|
||||
this.content.favoriteLibraryToggle.subscribe(() => this.reloadList()),
|
||||
|
||||
this.breakpointObserver
|
||||
|
@@ -30,6 +30,7 @@
|
||||
|
||||
<adf-document-list
|
||||
#documentList
|
||||
acaContextActions
|
||||
acaDocumentList
|
||||
[showHeader]="true"
|
||||
[selectionMode]="'single'"
|
||||
|
@@ -35,6 +35,7 @@ import { AppToolbarModule } from '../toolbar/toolbar.module';
|
||||
import { AppCommonModule } from '../common/common.module';
|
||||
import { DirectivesModule } from '../../directives/directives.module';
|
||||
import { AppLayoutModule } from '../layout/layout.module';
|
||||
import { ContextMenuModule } from '../context-menu/context-menu.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -45,7 +46,8 @@ import { AppLayoutModule } from '../layout/layout.module';
|
||||
AppInfoDrawerModule,
|
||||
AppToolbarModule,
|
||||
DirectivesModule,
|
||||
AppLayoutModule
|
||||
AppLayoutModule,
|
||||
ContextMenuModule
|
||||
],
|
||||
declarations: [
|
||||
SearchResultsComponent,
|
||||
|
@@ -39,8 +39,7 @@ import {
|
||||
selector: 'app-toggle-join-library',
|
||||
template: `
|
||||
<button
|
||||
mat-icon-button
|
||||
[color]="'primary'"
|
||||
mat-menu-item
|
||||
#membership="libraryMembership"
|
||||
(toggle)="onToggleEvent($event)"
|
||||
(error)="onErrorEvent($event)"
|
||||
@@ -57,8 +56,29 @@ import {
|
||||
svgIcon="join_library"
|
||||
style="pointer-events: none;"
|
||||
></mat-icon>
|
||||
<span class="sideLabel">{{
|
||||
(membership.isJoinRequested | async)
|
||||
? ('APP.ACTIONS.CANCEL_JOIN' | translate)
|
||||
: ('APP.ACTIONS.JOIN' | translate)
|
||||
}}</span>
|
||||
</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,
|
||||
host: { class: 'app-toggle-join-library' }
|
||||
})
|
||||
|
@@ -640,6 +640,15 @@
|
||||
"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",
|
||||
"title": "APP.ACTIONS.COPY",
|
||||
@@ -1323,7 +1332,7 @@
|
||||
},
|
||||
{
|
||||
"id": "app.libraries.name",
|
||||
"key": "name",
|
||||
"key": "title",
|
||||
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
|
||||
"type": "text",
|
||||
"class": "adf-data-table-cell--ellipsis__name",
|
||||
|
@@ -200,7 +200,7 @@
|
||||
"PRINT": "Print",
|
||||
"FULLSCREEN": "Activate full-screen mode",
|
||||
"JOIN": "Join",
|
||||
"CANCEL_JOIN": "Cancel join request"
|
||||
"CANCEL_JOIN": "Cancel join"
|
||||
},
|
||||
"DIALOGS": {
|
||||
"CONFIRM_PURGE": {
|
||||
|
Reference in New Issue
Block a user