mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ACS-5645]removed unwanted code
This commit is contained in:
committed by
Anukriti Singh
parent
4f0c15603b
commit
309ff171ed
@@ -38,10 +38,6 @@ describe('permissions', () => {
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'Properties',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
|
@@ -37,10 +37,6 @@ describe('CardView Component - properties', () => {
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'Properties',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
|
@@ -40,10 +40,6 @@ describe('Metadata component', () => {
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'General info',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
|
@@ -35,9 +35,6 @@ export class MetadataViewPage {
|
||||
titleProperty = $(`span[data-automation-id='card-textitem-value-properties.cm:title'] span`);
|
||||
editIcon = $(`button[data-automation-id='meta-data-card-toggle-edit']`);
|
||||
editIconGeneral = $(`button[data-automation-id='meta-data-general-info-edit']`);
|
||||
informationButton = $(`button[data-automation-id='meta-data-card-toggle-expand']`);
|
||||
informationSpan = $(`span[data-automation-id='meta-data-card-toggle-expand-label']`);
|
||||
informationIcon = $(`span[data-automation-id='meta-data-card-toggle-expand-label'] ~ mat-icon`);
|
||||
displayEmptySwitch = $(`#adf-metadata-empty`);
|
||||
readonlySwitch = $(`#adf-metadata-readonly`);
|
||||
multiSwitch = $(`#adf-metadata-multi`);
|
||||
@@ -121,26 +118,6 @@ export class MetadataViewPage {
|
||||
await BrowserActions.click(this.editIconGeneral);
|
||||
}
|
||||
|
||||
async informationButtonIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsClickable(this.informationButton);
|
||||
}
|
||||
|
||||
async informationButtonIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.informationButton);
|
||||
}
|
||||
|
||||
async clickOnInformationButton(): Promise<void> {
|
||||
await BrowserActions.click(this.informationButton);
|
||||
}
|
||||
|
||||
async getInformationButtonText(): Promise<string> {
|
||||
return BrowserActions.getText(this.informationSpan);
|
||||
}
|
||||
|
||||
async getInformationIconText(): Promise<string> {
|
||||
return BrowserActions.getText(this.informationIcon);
|
||||
}
|
||||
|
||||
async clickOnPropertiesTab(): Promise<void> {
|
||||
const propertiesTab = element(by.cssContainingText(`.adf-info-drawer-layout-content div.mat-tab-labels div .mat-tab-label-content`, `Properties`));
|
||||
await BrowserActions.click(propertiesTab);
|
||||
@@ -325,8 +302,4 @@ export class MetadataViewPage {
|
||||
async clickSaveGeneralMetadata(): Promise<void> {
|
||||
await BrowserActions.click(this.saveGeneralMetadataButton);
|
||||
}
|
||||
|
||||
async generalSaveIconDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.saveGeneralMetadataButton);
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@
|
||||
autocomplete="off"
|
||||
[formControl]="categoryNameControl"
|
||||
(keyup.enter)="addCategory()"
|
||||
aria-labelledby="adf-category-name-input-label"
|
||||
placeholder="{{'CATEGORIES_MANAGEMENT.INPUT_PLACEHOLDER' | translate }}"
|
||||
adf-auto-focus
|
||||
/>
|
||||
|
@@ -205,16 +205,6 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {
|
||||
return this.managementMode === CategoriesManagementMode.CRUD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides and emits categoryNameControl and hides existing categories panel.
|
||||
*/
|
||||
hideNameInput() {
|
||||
this.categoryNameControlVisible = false;
|
||||
this.categoryNameControlVisibleChange.emit(false);
|
||||
this._existingCategoriesPanelVisible = false;
|
||||
this.clearCategoryNameInput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds category that has been typed to a categoryNameControl and hides it afterwards.
|
||||
*/
|
||||
|
@@ -115,15 +115,6 @@ export class ContentMetadataCardComponent implements OnChanges {
|
||||
this.expanded = !this._displayDefaultProperties;
|
||||
}
|
||||
|
||||
toggleEdit(): void {
|
||||
this.editable = !this.editable;
|
||||
this.editableChange.emit(this.editable);
|
||||
}
|
||||
|
||||
toggleExpanded(): void {
|
||||
this.expanded = !this.expanded;
|
||||
}
|
||||
|
||||
hasAllowableOperations() {
|
||||
return this.contentService.hasAllowableOperations(this.node, AllowableOperationsEnum.UPDATE);
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@
|
||||
[expanded]="canExpandProperties()"
|
||||
[attr.data-automation-id]="'adf-metadata-group-properties'"
|
||||
hideToggle
|
||||
(opened)="generalTogglePanelState()"
|
||||
(closed)="generalTogglePanelState()">
|
||||
(opened)="handleGeneralInfoPanelState()"
|
||||
(closed)="handleGeneralInfoPanelState()">
|
||||
<mat-expansion-panel-header>
|
||||
<div class="adf-metadata-properties-panel-content">
|
||||
<mat-icon>
|
||||
|
@@ -1,11 +1,5 @@
|
||||
.adf {
|
||||
&-metadata-properties {
|
||||
|
||||
.mat-expansion-panel {
|
||||
border: 1px solid var(--adf-metadata-property-panel-border-color);
|
||||
border-radius: 12px !important;
|
||||
margin-bottom: 12px;
|
||||
|
||||
mat-expansion-panel-header {
|
||||
height: 56px;
|
||||
|
||||
@@ -15,7 +9,6 @@
|
||||
padding-left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-expansion-panel:not([class*='mat-elevation-z']) {
|
||||
box-shadow: none;
|
||||
@@ -57,7 +50,7 @@
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.adf-metadata-no-catagories-added {
|
||||
.adf-metadata-no-categories-added {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -66,7 +59,6 @@
|
||||
}
|
||||
|
||||
&-tags {
|
||||
|
||||
&-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -76,7 +68,6 @@
|
||||
}
|
||||
|
||||
adf-tags-creator {
|
||||
|
||||
.adf-tags-creation {
|
||||
padding-right: 0;
|
||||
}
|
||||
@@ -128,14 +119,20 @@
|
||||
width: 755px;
|
||||
border: 1px solid var(--adf-metadata-property-panel-border-color);
|
||||
margin: 24px;
|
||||
border-radius: 12px !important;
|
||||
border-radius: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.adf-content-metadata-card {
|
||||
.mat-card:not([class*=mat-elevation-z]) {
|
||||
.mat-card:not([class*='mat-elevation-z']) {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.app-metadata-tab .adf-metadata-properties .mat-expansion-panel {
|
||||
border: 1px solid var(--adf-metadata-property-panel-border-color);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
@@ -117,7 +117,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
@Input()
|
||||
displayCategories = false;
|
||||
|
||||
/** (optional) This flag sets the metadata in read only mode
|
||||
/** (optional) This flag sets the metadata in read only mode
|
||||
* preventing changes.
|
||||
*/
|
||||
@Input()
|
||||
@@ -160,7 +160,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
private tagService: TagService,
|
||||
private categoryService: CategoryService,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private contentService: ContentService,
|
||||
private contentService: ContentService
|
||||
) {
|
||||
this.copyToClipboardAction = this.appConfig.get<boolean>('content-metadata.copy-to-clipboard-action');
|
||||
this.multiValueSeparator = this.appConfig.get<string>('content-metadata.multi-value-pipe-separator') || DEFAULT_SEPARATOR;
|
||||
@@ -270,7 +270,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
saveEditChanges(buttonType: string, event: Event, group?: any) {
|
||||
this.saveChanges(event);
|
||||
|
||||
switch (buttonType) {
|
||||
case 'generalInfo':
|
||||
this.editable = !this.editable;
|
||||
@@ -286,7 +285,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
group.editable = !group.editable;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -329,7 +327,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
cancelEditChanges(buttonType: string, event: Event, group?: any) {
|
||||
this.cancelChanges(event);
|
||||
|
||||
switch (buttonType) {
|
||||
case 'generalInfo':
|
||||
this.editable = !this.editable;
|
||||
@@ -345,7 +342,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
group.editable = !group.editable;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -367,13 +363,13 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
this.tagsPanelState = true;
|
||||
} else {
|
||||
this.tagsPanelState = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toggleCategoriesEdit(event: Event): void {
|
||||
event.stopPropagation();
|
||||
this.editableCategories = !this.editableCategories;
|
||||
this.categoryControlVisible = true
|
||||
this.categoryControlVisible = true;
|
||||
if (this.editableCategories) {
|
||||
this.categoriesPanelState = true;
|
||||
} else {
|
||||
@@ -389,7 +385,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
generalTogglePanelState() {
|
||||
handleGeneralInfoPanelState() {
|
||||
this.generalInfoPanelState = !this.generalInfoPanelState;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
@@ -403,12 +399,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
this.categoriesPanelState= categoriesPanelState;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
|
||||
showGroup(group: CardViewGroup): boolean {
|
||||
const properties = group.properties.filter((property) => !this.isEmpty(property.displayValue));
|
||||
|
||||
return properties.length > 0;
|
||||
}
|
||||
|
||||
canExpandTheCard(group: CardViewGroup): boolean {
|
||||
return group.title === this.displayAspect;
|
||||
@@ -499,10 +489,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
}));
|
||||
}
|
||||
|
||||
private isEmpty(value: any): boolean {
|
||||
return value === undefined || value === null || value === '';
|
||||
}
|
||||
|
||||
private loadCategoriesForNode(nodeId: string) {
|
||||
this.assignedCategories = [];
|
||||
this.categoryService.getCategoryLinksForNode(nodeId).subscribe((categoryPaging) => {
|
||||
|
@@ -148,7 +148,6 @@
|
||||
"NO_EXISTING_TAGS": "No Existing Tags",
|
||||
"TITLE": "Create Tags",
|
||||
"CREATE_TAG": "Create: {{tag}}",
|
||||
"NAME": "Name",
|
||||
"INPUT_PLACEHOLDER": "Add a tag to these items",
|
||||
"ERRORS": {
|
||||
"EXISTING_TAG": "Tag already exists",
|
||||
@@ -160,7 +159,6 @@
|
||||
},
|
||||
"TOOLTIPS": {
|
||||
"DELETE_TAG": "Delete tag",
|
||||
"HIDE_INPUT": "Hide input"
|
||||
},
|
||||
"TAGS_LOADING": "Tags loading",
|
||||
"CREATE_TAGS_SUCCESS": "Tags created successfully"
|
||||
@@ -177,9 +175,7 @@
|
||||
"SELECT_EXISTING_CATEGORY": "Select an existing Category:",
|
||||
"NO_EXISTING_CATEGORIES": "No existing Categories",
|
||||
"GENERIC_CREATE": "Create: {{name}}",
|
||||
"NAME": "Category name",
|
||||
"LOADING": "Loading",
|
||||
"HIDE_INPUT": "Hide input",
|
||||
"INPUT_PLACEHOLDER": "Add a categories to these items",
|
||||
"NO_CATEGORIES_ADDED": "There are currently no categories added",
|
||||
"ERRORS": {
|
||||
|
@@ -87,7 +87,6 @@ adf-tags-creator {
|
||||
|
||||
& + .adf-tag {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -243,17 +243,6 @@ export class TagsCreatorComponent implements OnInit, OnDestroy {
|
||||
return this._existingTagsPanelVisible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide input for typing name for new tag or for searching. When input is hidden then panel of existing tags is hidden as well.
|
||||
*/
|
||||
hideNameInput(): void {
|
||||
this.tagNameControlVisible = false;
|
||||
this._existingTagsPanelVisible = false;
|
||||
this.existingTagsPanelVisibilityChange.emit(this.existingTagsPanelVisible);
|
||||
this.tagNameControlVisibleChange.emit(this.tagNameControlVisible);
|
||||
this.clearTagNameInput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add tags to top list using value which is set in input. Adding tag is not allowed when value in input is invalid
|
||||
* or if user is still typing what means that validation for input is not called yet.
|
||||
@@ -261,7 +250,6 @@ export class TagsCreatorComponent implements OnInit, OnDestroy {
|
||||
addTag(): void {
|
||||
if (!this._typing && !this.tagNameControl.invalid) {
|
||||
this.tags.push(this.tagNameControl.value.trim());
|
||||
this.hideNameInput();
|
||||
this.clearTagNameInput();
|
||||
this.checkScrollbarVisibility();
|
||||
this.tagsChange.emit(this.tags);
|
||||
|
@@ -401,10 +401,6 @@
|
||||
"SIDEBAR": {
|
||||
"THUMBNAILS": {
|
||||
"PAGE": "Page {{ pageNum }}"
|
||||
},
|
||||
"METADATA": {
|
||||
"MORE_INFORMATION": "More information",
|
||||
"LESS_INFORMATION": "Less information"
|
||||
}
|
||||
},
|
||||
"PDF_DIALOG": {
|
||||
|
Reference in New Issue
Block a user