commit d845d95d002c7ddf2cc36680120f728c21388f12
Author: Ondrej Drtina <drtinao@students.zcu.cz>
Date:   Fri Apr 9 13:41:31 2021 +0200

    Na změnu reaguje - zbývá odstranit nesmyslné vstupy

diff --git a/application/index.php b/application/index.php
index 36bf7d6..5cd76f9 100644
--- a/application/index.php
+++ b/application/index.php
@@ -32,5 +32,6 @@
 </div>
 
 <?php include "./view/modals/loginModal.html" ?>
+<?php include "./view/modals/settingsModal.html" ?>
 </body>
 </html>
diff --git a/application/search.php b/application/search.php
index 585f707..bbaa224 100644
--- a/application/search.php
+++ b/application/search.php
@@ -34,5 +34,6 @@
 
 <?php include "./view/modals/loginModal.html" ?>
 <?php include "./view/modals/detailModal.html" ?>
+<?php include "./view/modals/settingsModal.html" ?>
 </body>
 </html>
diff --git a/application/view/menu.php b/application/view/menu.php
index 9d871e0..23d5f22 100644
--- a/application/view/menu.php
+++ b/application/view/menu.php
@@ -6,5 +6,6 @@
         <a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'], '/index.php') ? 'active' : '');?>" href="index.php">Úvodní info</a>
         <a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'],'/search.php') ? 'active' : '');?>" href="search.php">Vyhledávání</a>
         <a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'],'/login.php') ? 'active' : '');?>" href="#" data-toggle="modal" data-target="#login-modal">Přihlášení</a>
+        <a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'],'/settings.php') ? 'active' : '');?>" href="#" data-toggle="modal" data-target="#settings-modal">Nastavení</a>
     </div>
 </div>
\ No newline at end of file
diff --git a/application/view/modals/settingsModal.html b/application/view/modals/settingsModal.html
new file mode 100644
index 0000000..89d2531
--- /dev/null
+++ b/application/view/modals/settingsModal.html
@@ -0,0 +1,26 @@
+<div id="settings-modal" class="modal fade" role="dialog">
+	<div class="modal-dialog modal-dialog-centered" role="document">
+		<div class="modal-content">
+			 <div class="modal-header">
+					<h4 class="modal-title">Nastavení</h4>
+					<button type="button" class="close" data-dismiss="modal">&times;</button>
+			 </div>
+			 <div class="modal-body">
+				<div class="container">
+					<div class="row">
+                        <div class="col-xs-12 col-sm-5">
+                            <label for="itemsPerPage">Počet záznamů na stránku: </label>
+                        </div>
+                        <div class="col-xs-12 col-sm-7">
+                            <input type="number" id="itemsPerPage"  onshow="viewItemsPerPage()">
+                        </div>
+                    </div>
+				</div>
+			 </div>
+			 <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="changeItemsPerPage()">Uložit</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">Zavřít</button>
+            </div>
+		</div>
+	</div>
+</div>
\ No newline at end of file
diff --git a/application/view/searchContent.php b/application/view/searchContent.php
index 630251b..25bfa24 100644
--- a/application/view/searchContent.php
+++ b/application/view/searchContent.php
@@ -476,7 +476,6 @@
                     formData.append("page", ""+pageIndex);
                     formData.append("items_per_page", ""+itemPerPage);
                     formData.append("finished", "true");//TODO ADMIN
-
                     if(filter){
                         filterData(formData);
                     }
@@ -560,6 +559,19 @@
     <h3 id="no-data-label" class="mx-auto text-center font-italic">Žádná data nebyla nalezena</h3>
 
     <script>
+        function viewItemsPerPage(){
+            var visibleItemCount = document.getElementById("itemsPerPage");
+            visibleItemCount.value = itemPerPage;
+        }
+
+        function changeItemsPerPage(){
+            pageIndex = 0;
+
+            var visibleItemCount = document.getElementById("itemsPerPage").value;
+            itemPerPage = visibleItemCount;
+            fetchData(true);
+        }
+
         function moveToFirst(){
             pageIndex = 0;
             fetchData(true);
