Diff between 79c1f7cadd95deb8f1a521cfd36a5f0713a040f1 and 12666d620ce28751301cb4d9d979ee73777773ca

Changed Files

File Additions Deletions Status
index.php +24 -20 modified
scripts/README.md +0 -0 renamed
scripts/searchTable.js +0 -0 renamed
scripts/sortTable.js +0 -0 renamed
search ja sort table/.gitignore +0 -2 deleted
search ja sort table/LICENSE +0 -21 deleted

Full Patch

diff --git a/index.php b/index.php
index 564e0c0..307e219 100755
--- a/index.php
+++ b/index.php
@@ -33,25 +33,28 @@ if ($result->num_rows>0){
             <h2>Tässä on ensimmäinen (ja ainoa) taulukko</h2>
             <p>Tässä on taulukko</p>
             <div class="table-container">
-			<input class="searchInput" data-table-id="tr" type="search" placeholder="Search" aria-label="Search" aria-target="tr">  
-		<table>
+			<input class="searchInput" data-table-id="table1" type="search" placeholder="Search" aria-label="Search" aria-target="table1">  
+			<table class="sortTable" id="table1">
+			<thead>
+				<tr>
+					<th>Nimi</th>
+					<th>Harj. paikka</th>
+					<th>Ohjaaja</th>
+					<th>Yhmeystiedot</th>
+					<th>Aloitus</th>
+					<th>Lopetus</th>
+					<th>Status</th>
+					<th>Ruokaraha</th>
+					<th>Muuta</th>
+					<?php // Ei muokkaus riviä, jos ei ole oikeuksia muokata
+					if ($logged_in)
+					{
+						echo "<th>Muokkaus</th>";
+					}
+					?>
+				</tr>
+			</thead>
 			<tr>
-				<th>Nimi</th>
-				<th>Harj. paikka</th>
-				<th>Ohjaaja</th>
-				<th>Yhmeystiedot</th>
-				<th>Aloitus</th>
-				<th>Lopetus</th>
-				<th>Status</th>
-				<th>Ruokaraha</th>
-				<th>Muuta</th>
-				<?php // Ei muokkaus riviä, jos ei ole oikeuksia muokata
-				if ($logged_in)
-				{
-					echo "<th>Muokkaus</th>";
-				}
-				?>
-			</tr>
 		<!-- Ota tiedot tiedot muuttujasta henkilot -->
 		<?php foreach ($henkilot as $tyyppi): ?>
 			<tr>
@@ -107,8 +110,7 @@ if ($result->num_rows>0){
         <?php endforeach; ?>
 	   </table> 
 	  </div>
-	  <script src="./search ja sort table/scripts/searchTable.js"></script>
-    <script src="./search ja sort table/scripts/sortTable.js"></script>
+	  
 	</section>
         <!--
         <aside>
@@ -138,5 +140,7 @@ if ($result->num_rows>0){
 			this.style.width = this.value.length + "ch";
 		}
 	</script>
+	<script src="./scripts/searchTable.js"></script>
+    <script src="./scripts/sortTable.js"></script>
 </body>
 </html>
diff --git a/search ja sort table/README.md b/scripts/README.md
similarity index 100%
rename from search ja sort table/README.md
rename to scripts/README.md
diff --git a/search ja sort table/scripts/searchTable.js b/scripts/searchTable.js
similarity index 100%
rename from search ja sort table/scripts/searchTable.js
rename to scripts/searchTable.js
diff --git a/search ja sort table/scripts/sortTable.js b/scripts/sortTable.js
similarity index 100%
rename from search ja sort table/scripts/sortTable.js
rename to scripts/sortTable.js
diff --git a/search ja sort table/.gitignore b/search ja sort table/.gitignore
deleted file mode 100644
index 46b8baa..0000000
--- a/search ja sort table/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.vscode/
-index.html
diff --git a/search ja sort table/LICENSE b/search ja sort table/LICENSE
deleted file mode 100644
index d04e22e..0000000
--- a/search ja sort table/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 Rory Sullivan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.