commit 10920ea367fe99ba6c9883d978492289d4987663
Author: Vojtěch Danišík <32537562+danisik@users.noreply.github.com>
Date:   Fri Jun 26 17:41:12 2020 +0200

    re #8130 #8135 #8142

diff --git a/pom.xml b/pom.xml
index 016691e4..2111688e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,13 +13,9 @@
 	<artifactId>aswi</artifactId>
 	<version>0.0.1-SNAPSHOT</version>
 	<packaging>war</packaging>
-	<name>pia</name>
+	<name>aswi</name>
 	<description>Simulation of contignent table - web app</description>
 
-	<properties>
-		<java.version>8</java.version>
-	</properties>
-
 	<dependencies>
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
@@ -82,12 +78,6 @@
 			<artifactId>lombok</artifactId>
 		</dependency>
 		
-		<dependency>
-			<groupId>com.h2database</groupId>
-			<artifactId>h2</artifactId>
-			<scope>runtime</scope>
-		</dependency>
-		
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-test</artifactId>
diff --git a/src/main/java/vldc/aswi/validators/AssemblyValidator.java b/src/main/java/vldc/aswi/validators/AssemblyValidator.java
index 3b461c78..438f4d25 100644
--- a/src/main/java/vldc/aswi/validators/AssemblyValidator.java
+++ b/src/main/java/vldc/aswi/validators/AssemblyValidator.java
@@ -11,7 +11,7 @@ import vldc.aswi.service.SqlQueryManager;
 import java.util.List;
 
 /**
- * Validator for assembly.
+ * Validator for assembly (creating / updating).
  */
 @Component
 public class AssemblyValidator implements Validator {
diff --git a/src/main/java/vldc/aswi/web/controller/AssemblyController.java b/src/main/java/vldc/aswi/web/controller/AssemblyController.java
index e83b80bd..1ad1cf42 100644
--- a/src/main/java/vldc/aswi/web/controller/AssemblyController.java
+++ b/src/main/java/vldc/aswi/web/controller/AssemblyController.java
@@ -373,6 +373,12 @@ public class AssemblyController extends BasicController {
             modelAndView.setViewName("redirect:/assembly_edit?assemblyID=" + assemblyId);
         }
 
+        modelMap.addAttribute("allRoles", this.roleManager.getRoles());
+        modelMap.addAttribute("allParameterTypes", this.parameterTypeManager.getParameterTypes());
+        modelMap.addAttribute("allFunctions", this.functionManager.getFunctions());
+        modelMap.addAttribute("allOperators", this.operatorManager.getOperators());
+        modelMap.addAttribute("allLocations", this.locationManager.getLocations());
+
         return modelAndView;
     }
 
diff --git a/src/main/webapp/WEB-INF/templates/assembly.html b/src/main/webapp/WEB-INF/templates/assembly.html
index ac3e48ba..921fe594 100644
--- a/src/main/webapp/WEB-INF/templates/assembly.html
+++ b/src/main/webapp/WEB-INF/templates/assembly.html
@@ -92,7 +92,7 @@
                     <div class="selected-input-container">
                         <div class="selected-input-box">
                             <div class="selected-input-box-icon">
-                                <i class="fas fa-align-justify"></i>
+                                <i class="fas fa-align-justify transform"></i>
                             </div>
                             <table class="table table-parameter">
                                 <thead>
@@ -102,9 +102,9 @@
                                     <th class="col-3-p"></th>
                                 </tr>
                                 </thead>
-                                <tbody id="row-wrapper" class="sortable">
-                                <tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Řádek')}" class="row-parameter parameter">
-                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="1">
+                                <tbody id="column-wrapper" class="sortable">
+                                <tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Sloupec')}" class="column-parameter parameter">
+                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="2">
                                     <input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}">
                                     <td>
                                         <span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span>
@@ -121,10 +121,9 @@
                             </table>
                         </div>
 
-
                         <div class="selected-input-box">
                             <div class="selected-input-box-icon">
-                                <i class="fas fa-align-justify transform"></i>
+                                <i class="fas fa-align-justify"></i>
                             </div>
                             <table class="table table-parameter">
                                 <thead>
@@ -134,9 +133,9 @@
                                     <th class="col-3-p"></th>
                                 </tr>
                                 </thead>
-                                <tbody id="column-wrapper" class="sortable">
-                                <tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Sloupec')}" class="column-parameter parameter">
-                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="2">
+                                <tbody id="row-wrapper" class="sortable">
+                                <tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Řádek')}" class="row-parameter parameter">
+                                    <input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="1">
                                     <input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}">
                                     <td>
                                         <span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span>
@@ -153,7 +152,6 @@
                             </table>
                         </div>
 
-
                         <div class="selected-input-box">
                             <div class="selected-input-box-icon">
                                 <i class="fas fa-heading"></i>
@@ -190,10 +188,10 @@
                     <div class="col-md-12 form-group row template-input">
                         <label th:for="${configuration.name}" class="template-input-label">Vlastní název šablony:</label>
                         <div class="">
-                            <input type="text" required="required" class="form-control select-filter-input" th:field="${configuration.name}">
+                            <input type="text" class="form-control select-filter-input" id="configurationName" th:field="${configuration.name}">
                         </div>
 
-                        <button type="submit" class="btn btn-success mb-2 template-input-submit" name="saveConfiguration">Uložit šablonu</button>
+                        <button type="submit" class="btn btn-success mb-2 template-input-submit" name="saveConfiguration" onclick="checkIfConfigurationNameIsNull()">Uložit šablonu</button>
                     </div>
 
 
diff --git a/src/main/webapp/js/assemblyScripts.js b/src/main/webapp/js/assemblyScripts.js
index c4571bc2..63691b25 100644
--- a/src/main/webapp/js/assemblyScripts.js
+++ b/src/main/webapp/js/assemblyScripts.js
@@ -242,6 +242,12 @@ function reindexOrder() {
         $(this).find('.parametr-order').attr('value', index);
         index++;
     });
+}
 
+function checkIfConfigurationNameIsNull() {
+    var configurationName = document.getElementById('configurationName');
 
+    if (configurationName.value == null || configurationName.value == "") {
+        alert("Není vyplněn název šablony !");
+    }
 }
\ No newline at end of file
