Przeglądaj źródła

Remove obsolete TS for a.formaction

jeremystretch 4 lat temu
rodzic
commit
d87d860a57

Plik diff jest za duży
+ 0 - 0
netbox/project-static/dist/netbox.js


Plik diff jest za duży
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 0 - 28
netbox/project-static/src/forms/actions.ts

@@ -1,28 +0,0 @@
-import { getElements, findFirstAdjacent, isTruthy } from '../util';
-
-/**
- * Handle bulk add/edit/rename form actions.
- *
- * @param event Click Event
- */
-function handleFormActionClick(event: Event): void {
-  event.preventDefault();
-  const element = event.currentTarget as HTMLElement;
-  if (element !== null) {
-    const form = findFirstAdjacent<HTMLFormElement>(element, 'form');
-    const href = element.getAttribute('href');
-    if (form !== null && isTruthy(href)) {
-      form.setAttribute('action', href);
-      form.submit();
-    }
-  }
-}
-
-/**
- * Initialize bulk form action links.
- */
-export function initFormActions(): void {
-  for (const element of getElements<HTMLAnchorElement>('a.formaction')) {
-    element.addEventListener('click', handleFormActionClick);
-  }
-}

+ 1 - 8
netbox/project-static/src/forms/index.ts

@@ -1,17 +1,10 @@
-import { initFormActions } from './actions';
 import { initFormElements } from './elements';
 import { initSpeedSelector } from './speedSelector';
 import { initScopeSelector } from './scopeSelector';
 import { initVlanTags } from './vlanTags';
 
 export function initForms(): void {
-  for (const func of [
-    initFormActions,
-    initFormElements,
-    initSpeedSelector,
-    initScopeSelector,
-    initVlanTags,
-  ]) {
+  for (const func of [initFormElements, initSpeedSelector, initScopeSelector, initVlanTags]) {
     func();
   }
 }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików