made search off working

This commit is contained in:
Salijoghli 2025-09-02 13:01:05 +04:00
parent e1ba03589d
commit 2dbd0ca691
2 changed files with 9 additions and 3 deletions

View File

@ -318,7 +318,7 @@
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.session.custom.searchId \u003d \"\"\n\tself.session.custom.deviceSearchId \u003d \"\"\n\tsystem.perspective.closePopup(id \u003d \"Search\")"
"script": "\tsystem.perspective.closePopup(id \u003d \"Search\")\n\tsystem.perspective.navigate(\n\t view\u003dself.page.props.primaryView,\n\t params\u003d{\"highlightTagPath\": \"CLEAR\"}\n\t)"
},
"scope": "G",
"type": "script"

View File

@ -1,8 +1,14 @@
def handleTagHighlight(view, currentValue):
tag_priority = currentValue.value
if tag_priority == None:
return
# --- CASE 1: Remove all highlights by applying CLEAR class ---
if not tag_priority or str(tag_priority).upper() == "CLEAR":
for child in view.rootContainer.getChildren()[0].getChildren():
try:
child.props.style.classes = ""
except:
pass
return False
parts = str(tag_priority).split("||")
tag = parts[0]