Преглед на файлове

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 преди 22 часа
родител
ревизия
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

Някои файлове не бяха показани, защото твърде много файлове са промени