소스 검색

Hide custom actions field when no applicable models selected

The entire field row is now hidden when no selected object types
have registered custom actions, avoiding an empty "Custom actions"
label.
Jason Novinger 1 일 전
부모
커밋
e58deb07e7
3개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 0 0
      netbox/project-static/dist/netbox.js
  2. 0 0
      netbox/project-static/dist/netbox.js.map
  3. 6 0
      netbox/project-static/src/forms/registeredActions.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
netbox/project-static/dist/netbox.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 6 - 0
netbox/project-static/src/forms/registeredActions.ts

@@ -40,6 +40,12 @@ export function initRegisteredActions(): void {
     if (noActionsMsg) {
       noActionsMsg.style.display = anyVisible ? 'none' : 'block';
     }
+
+    // Hide the entire field row when no actions are visible
+    const fieldRow = actionsContainer!.closest('.field-row, .mb-3');
+    if (fieldRow) {
+      (fieldRow as HTMLElement).style.display = anyVisible ? '' : 'none';
+    }
   }
 
   // Initial update

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.