category tree menu
This commit is contained in:
@@ -15,14 +15,27 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<div class="list list-expanded">
|
<div class="list list-expanded">
|
||||||
|
{{#if showRootMenu}}
|
||||||
{{#if hasExpandedToggler}}
|
<div class="btn-group pull-right">
|
||||||
<a href="javascript:" title="{{translate 'Collapse'}}" class="small pull-right category-expanded-toggle-link action{{#unless isExpanded}} hidden{{/unless}}" data-action="collapse"><span class="fas fa-folder-open"></span></a>
|
<a href="javascript:" class="small dropdown-toggle btn-link" data-toggle="dropdown">
|
||||||
<a href="javascript:" title="{{translate 'Expand'}}" class="small pull-right category-expanded-toggle-link action{{#if isExpanded}} hidden{{/if}}" data-action="expand""><span class="fas fa-folder"></span></a>
|
<span class="fas fa-ellipsis-h"></span>
|
||||||
{{/if}}
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
{{#if showEditLink}}
|
{{#if hasExpandedToggler}}
|
||||||
<a href="#{{scope}}" class="small pull-right action manage-categories-link" data-action="manageCategories" title="{{translate 'Manage Categories' scope=scope}}"><span class="fas fa-th-list"></span></a>
|
<li class="{{#unless isExpanded}}hidden{{/unless}}">
|
||||||
|
<a href="javascript:" class="category-expanded-toggle-link action" data-action="collapse">{{translate 'Collapse'}}</a>
|
||||||
|
</li>
|
||||||
|
<li class="{{#if isExpanded}}hidden{{/if}}">
|
||||||
|
<a href="javascript:" class="category-expanded-toggle-link action" data-action="expand"">{{translate 'Expand'}}</a>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#if showEditLink}}
|
||||||
|
<li>
|
||||||
|
<a href="#{{scope}}" class="action manage-categories-link" data-action="manageCategories">{{translate 'Manage Categories' scope=scope}}</a>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showRoot}}
|
{{#if showRoot}}
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) {
|
|||||||
data.isExpanded = this.isExpanded;
|
data.isExpanded = this.isExpanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.hasExpandedToggler || this.showEditLink) {
|
||||||
|
data.showRootMenu = true;
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -268,4 +272,3 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2194,13 +2194,6 @@ pre > code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.categories-container {
|
.categories-container {
|
||||||
a.manage-categories-link {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
a.category-expanded-toggle-link {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .list > .list-group-tree > li {
|
> .list > .list-group-tree > li {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user