Fixed code style
authorMarcel Werk <burntime@woltlab.com>
Fri, 10 Dec 2021 10:20:36 +0000 (11:20 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 10 Dec 2021 10:20:36 +0000 (11:20 +0100)
ts/WoltLabSuite/Core/Ui/Search/Extended.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Extended.js
wcfsetup/install/files/lib/page/SearchPage.class.php
wcfsetup/install/files/style/ui/search.scss

index 5afe23d5fb99f9d5775c9b4211f3aedd7b65e9a3..2aff2d4505f23386908106059eb3a10a180935f8 100644 (file)
@@ -42,7 +42,7 @@ export class UiSearchExtended {
   private initEventListener(): void {
     this.form.addEventListener("submit", (event) => {
       event.preventDefault();
-      this.search();
+      void this.search();
     });
     this.typeInput.addEventListener("change", () => this.changeType());
   }
@@ -113,7 +113,7 @@ export class UiSearchExtended {
   private initQueryString(): void {
     const url = new URL(window.location.href);
     url.searchParams.forEach((value, key) => {
-      let element = this.form.elements[key] as HTMLElement;
+      const element = this.form.elements[key] as HTMLElement;
       if (value && element) {
         if (element instanceof RadioNodeList) {
           let id = "";
@@ -138,7 +138,7 @@ export class UiSearchExtended {
     });
 
     this.typeInput.dispatchEvent(new Event("change"));
-    this.search();
+    void this.search();
   }
 
   private initPagination(position: "top" | "bottom"): void {
@@ -153,7 +153,7 @@ export class UiSearchExtended {
       maxPage: this.pages,
 
       callbackSwitch: (pageNo) => {
-        this.changePage(pageNo);
+        void this.changePage(pageNo);
       },
     });
   }
@@ -185,7 +185,7 @@ export class UiSearchExtended {
       this.initPagination("top");
     }
 
-    const fragment = DomUtil.createFragmentFromHtml(template!);
+    const fragment = DomUtil.createFragmentFromHtml(template);
     this.form.parentElement!.appendChild(fragment);
 
     if (this.pages > 1) {
index f9e06e710349f4b2205aa7b356e2635862fd5706..17717fdc397445f7e5c047aa15281545710662cc 100644 (file)
@@ -23,7 +23,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Date/Picker", "../..
         initEventListener() {
             this.form.addEventListener("submit", (event) => {
                 event.preventDefault();
-                this.search();
+                void this.search();
             });
             this.typeInput.addEventListener("change", () => this.changeType());
         }
@@ -81,7 +81,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Date/Picker", "../..
         initQueryString() {
             const url = new URL(window.location.href);
             url.searchParams.forEach((value, key) => {
-                let element = this.form.elements[key];
+                const element = this.form.elements[key];
                 if (value && element) {
                     if (element instanceof RadioNodeList) {
                         let id = "";
@@ -108,7 +108,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Date/Picker", "../..
                 }
             });
             this.typeInput.dispatchEvent(new Event("change"));
-            this.search();
+            void this.search();
         }
         initPagination(position) {
             const wrapperDiv = document.createElement("div");
@@ -120,7 +120,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Date/Picker", "../..
                 activePage: this.activePage,
                 maxPage: this.pages,
                 callbackSwitch: (pageNo) => {
-                    this.changePage(pageNo);
+                    void this.changePage(pageNo);
                 },
             });
         }
index 44763a926715f5a094b752307260653db8281e39..19b13929e79db272fa3b7dac2594797f713f0e38 100644 (file)
@@ -29,7 +29,9 @@ class SearchPage extends AbstractPage
     {
         parent::readParameters();
 
-        if (!empty($_REQUEST['extended'])) $this->extended = true;
+        if (!empty($_REQUEST['extended'])) {
+            $this->extended = true;
+        }
     }
 
     /**
@@ -42,8 +44,7 @@ class SearchPage extends AbstractPage
         foreach (SearchEngine::getInstance()->getAvailableObjectTypes() as $objectType) {
             if ($objectType instanceof ISearchProvider) {
                 $objectType->assignVariables();
-            }
-            else {
+            } else {
                 $objectType->show();
             }
         }
index 85e66c594d7162e1b7f5553f2f102d5065cc8a4f..f1e5197f036f69a219260a430fbac73419ecfb27 100644 (file)
@@ -8,7 +8,7 @@
 /* search form */
 .searchBar {
        display: grid;
-       
+
        @include screen-md-up {
                column-gap: 20px;
                grid-template-columns: 60% 20% auto;
@@ -29,7 +29,7 @@
 }
 
 .searchFilters {
-    margin-top: 20px;
+       margin-top: 20px;
 }
 
 @include screen-md-up {