[#181] fix search result data-name issues ( purging html only for data-name attribute, update op-list checkmarks accordingly )

This commit is contained in:
Robin Scholtes 2023-04-27 21:13:14 +12:00
parent bc93969d4b
commit c6cc998100
4 changed files with 7 additions and 6 deletions

View file

@ -108,6 +108,7 @@ class OperationsWaiter {
searchResultsEl.innerHTML = matchedOpsHtml;
searchResultsEl.dispatchEvent(this.manager.oplistcreate);
}
this.manager.recipe.updateSelectedOperations();
}
}
@ -139,6 +140,7 @@ class OperationsWaiter {
if (nameMatch || descPos >= 0) {
const operation = new HTMLOperation(opName, this.app.operations[opName], this.app, this.manager);
if (highlight) {
operation.highlightSearchStrings(calcMatchRanges(idxs), [[descPos, inStr.length]]);
}

View file

@ -147,7 +147,6 @@ class RecipeWaiter {
return;
}
console.log("opSortEnd ==>", evt.item);
this.buildRecipeOperation(evt.item);
evt.item.dispatchEvent(this.manager.operationadd);
}
@ -372,7 +371,6 @@ class RecipeWaiter {
* @param {element} el - The operation stub element from the operations pane
*/
buildRecipeOperation(el) {
console.log("buildRecipeOperation ==>", el);
const opName = el.textContent;
const op = new HTMLOperation(opName, this.app.operations[opName], this.app, this.manager);
el.innerHTML = op.toFullHtml();
@ -398,7 +396,6 @@ class RecipeWaiter {
* @returns {element}
*/
addOperation(name) {
console.log("addOperation ==>", name);
const item = document.createElement("li");
item.setAttribute("data-name", name);