categories top level label

This commit is contained in:
Yuri Kuznetsov
2024-10-17 19:34:47 +03:00
parent 80c565a407
commit 1497225be1
4 changed files with 5 additions and 10 deletions
@@ -282,6 +282,7 @@
"Expand": "Expand",
"Collapse": "Collapse",
"Expanded": "Expanded",
"Top Level": "Top Level",
"New notifications": "New notifications",
"Manage Categories": "Manage Categories",
"Manage Folders": "Manage Folders",
+1 -1
View File
@@ -496,7 +496,7 @@ class ListWithCategories extends ListView {
selector: '.categories-container',
selectable: true,
showRoot: true,
rootName: this.translate(this.scope, 'scopeNamesPlural'),
//rootName: this.translate(this.scope, 'scopeNamesPlural'),
buttonsDisabled: true,
checkboxes: false,
showEditLink: this.showEditLink,
@@ -86,7 +86,7 @@ class SelectRecordsWithCategoriesModalView extends SelectRecordsModal {
selectable: true,
readOnly: true,
showRoot: true,
rootName: this.translate(this.scope, 'scopeNamesPlural'),
//rootName: this.translate(this.scope, 'scopeNamesPlural'),
buttonsDisabled: true,
checkboxes: false,
isExpanded: this.isExpanded,
+2 -8
View File
@@ -59,11 +59,9 @@ class ListTreeRecordView extends ListRecordView {
data.showRoot = this.showRoot;
if (data.showRoot) {
data.rootName = this.rootName || this.translate('Root');
data.rootName = this.rootName || this.translate('Top Level');
}
data.showEditLink = this.showEditLink;
if (this.level === 0 && this.selectable && (this.selectedData || {}).id === null) {
data.rootIsSelected = true;
}
@@ -76,7 +74,7 @@ class ListTreeRecordView extends ListRecordView {
data.isExpanded = this.isExpanded;
}
if (data.hasExpandedToggler || this.showEditLink) {
if (data.hasExpandedToggler) {
data.showRootMenu = true;
}
@@ -106,10 +104,6 @@ class ListTreeRecordView extends ListRecordView {
}
}
if ('showRoot' in this.options) {
this.showEditLink = this.options.showEditLink;
}
if ('level' in this.options) {
this.level = this.options.level;
}