From 766e8cbcf7fd4ed348e1544ae4916bb4e1debbed Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 14 Nov 2018 11:34:16 +0200 Subject: [PATCH] category tree menu --- client/res/templates/record/list-tree.tpl | 29 ++++++++++++++++------- client/src/views/record/list-tree.js | 5 +++- frontend/less/espo/custom.less | 7 ------ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/client/res/templates/record/list-tree.tpl b/client/res/templates/record/list-tree.tpl index bbb73ad0b7..12376d98f7 100644 --- a/client/res/templates/record/list-tree.tpl +++ b/client/res/templates/record/list-tree.tpl @@ -15,14 +15,27 @@ {{/if}} {{/unless}}
- - {{#if hasExpandedToggler}} - - - {{/if}} - - {{#if showEditLink}} - + {{#if showRootMenu}} +
+ + + + +
{{/if}} {{#if showRoot}} diff --git a/client/src/views/record/list-tree.js b/client/src/views/record/list-tree.js index 8e793f7446..38544552ea 100644 --- a/client/src/views/record/list-tree.js +++ b/client/src/views/record/list-tree.js @@ -81,6 +81,10 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) { data.isExpanded = this.isExpanded; } + if (data.hasExpandedToggler || this.showEditLink) { + data.showRootMenu = true; + } + return data; }, @@ -268,4 +272,3 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) { }); }); - diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less index d3d9701b09..c8bff1f175 100644 --- a/frontend/less/espo/custom.less +++ b/frontend/less/espo/custom.less @@ -2194,13 +2194,6 @@ pre > code { } .categories-container { - a.manage-categories-link { - margin-left: 8px; - } - a.category-expanded-toggle-link { - margin-left: 8px; - } - > .list > .list-group-tree > li { padding-left: 0; }