From 90a62f83d2d5fa18dfa14e57b987dfd34847b798 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Thu, 6 Apr 2023 16:30:44 +0200 Subject: [PATCH] add category hints from methodlist --- ccp/js/methodeditorcontroller.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ccp/js/methodeditorcontroller.js b/ccp/js/methodeditorcontroller.js index 6e4554b..ae7a1c1 100644 --- a/ccp/js/methodeditorcontroller.js +++ b/ccp/js/methodeditorcontroller.js @@ -391,11 +391,6 @@ class CCPMethodEditorController extends HTMLElement{ -
- - - ${this.renderCategoryHints()} -
@@ -410,8 +405,9 @@ class CCPMethodEditorController extends HTMLElement{
- - + + + ${this.renderCategoryHints()}
${this.renderCategories()}
@@ -763,14 +759,6 @@ class CCPMethodEditorController extends HTMLElement{ ` } - getCurrentCategory(){ - if(this.#current){ - const cats = this.#current.metadata.filter(md=>md.role === "category") - if(cats.length === 0) return "Uncategorized"; - return cats[0].title - }else return "Uncategorized" - } - renderCategoryHints(){ const ml = document.querySelector("d4s-ccp-methodlist") const cats = ml.getCategoryHints() @@ -781,6 +769,16 @@ class CCPMethodEditorController extends HTMLElement{ ` } + + renderCategories(){ + return ` + + ` + } renderContexts(){ return `