Revize 10920ea3
Přidáno uživatelem Vojtěch Danišík před více než 4 roky(ů)
pom.xml | ||
---|---|---|
13 | 13 |
<artifactId>aswi</artifactId> |
14 | 14 |
<version>0.0.1-SNAPSHOT</version> |
15 | 15 |
<packaging>war</packaging> |
16 |
<name>pia</name>
|
|
16 |
<name>aswi</name>
|
|
17 | 17 |
<description>Simulation of contignent table - web app</description> |
18 | 18 |
|
19 |
<properties> |
|
20 |
<java.version>8</java.version> |
|
21 |
</properties> |
|
22 |
|
|
23 | 19 |
<dependencies> |
24 | 20 |
<dependency> |
25 | 21 |
<groupId>org.springframework.boot</groupId> |
... | ... | |
82 | 78 |
<artifactId>lombok</artifactId> |
83 | 79 |
</dependency> |
84 | 80 |
|
85 |
<dependency> |
|
86 |
<groupId>com.h2database</groupId> |
|
87 |
<artifactId>h2</artifactId> |
|
88 |
<scope>runtime</scope> |
|
89 |
</dependency> |
|
90 |
|
|
91 | 81 |
<dependency> |
92 | 82 |
<groupId>org.springframework.boot</groupId> |
93 | 83 |
<artifactId>spring-boot-starter-test</artifactId> |
src/main/java/vldc/aswi/validators/AssemblyValidator.java | ||
---|---|---|
11 | 11 |
import java.util.List; |
12 | 12 |
|
13 | 13 |
/** |
14 |
* Validator for assembly. |
|
14 |
* Validator for assembly (creating / updating).
|
|
15 | 15 |
*/ |
16 | 16 |
@Component |
17 | 17 |
public class AssemblyValidator implements Validator { |
src/main/java/vldc/aswi/web/controller/AssemblyController.java | ||
---|---|---|
373 | 373 |
modelAndView.setViewName("redirect:/assembly_edit?assemblyID=" + assemblyId); |
374 | 374 |
} |
375 | 375 |
|
376 |
modelMap.addAttribute("allRoles", this.roleManager.getRoles()); |
|
377 |
modelMap.addAttribute("allParameterTypes", this.parameterTypeManager.getParameterTypes()); |
|
378 |
modelMap.addAttribute("allFunctions", this.functionManager.getFunctions()); |
|
379 |
modelMap.addAttribute("allOperators", this.operatorManager.getOperators()); |
|
380 |
modelMap.addAttribute("allLocations", this.locationManager.getLocations()); |
|
381 |
|
|
376 | 382 |
return modelAndView; |
377 | 383 |
} |
378 | 384 |
|
src/main/webapp/WEB-INF/templates/assembly.html | ||
---|---|---|
92 | 92 |
<div class="selected-input-container"> |
93 | 93 |
<div class="selected-input-box"> |
94 | 94 |
<div class="selected-input-box-icon"> |
95 |
<i class="fas fa-align-justify"></i> |
|
95 |
<i class="fas fa-align-justify transform"></i>
|
|
96 | 96 |
</div> |
97 | 97 |
<table class="table table-parameter"> |
98 | 98 |
<thead> |
... | ... | |
102 | 102 |
<th class="col-3-p"></th> |
103 | 103 |
</tr> |
104 | 104 |
</thead> |
105 |
<tbody id="row-wrapper" class="sortable">
|
|
106 |
<tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Řádek')}" class="row-parameter parameter">
|
|
107 |
<input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="1">
|
|
105 |
<tbody id="column-wrapper" class="sortable">
|
|
106 |
<tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Sloupec')}" class="column-parameter parameter">
|
|
107 |
<input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="2">
|
|
108 | 108 |
<input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}"> |
109 | 109 |
<td> |
110 | 110 |
<span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span> |
... | ... | |
121 | 121 |
</table> |
122 | 122 |
</div> |
123 | 123 |
|
124 |
|
|
125 | 124 |
<div class="selected-input-box"> |
126 | 125 |
<div class="selected-input-box-icon"> |
127 |
<i class="fas fa-align-justify transform"></i>
|
|
126 |
<i class="fas fa-align-justify"></i> |
|
128 | 127 |
</div> |
129 | 128 |
<table class="table table-parameter"> |
130 | 129 |
<thead> |
... | ... | |
134 | 133 |
<th class="col-3-p"></th> |
135 | 134 |
</tr> |
136 | 135 |
</thead> |
137 |
<tbody id="column-wrapper" class="sortable">
|
|
138 |
<tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Sloupec')}" class="column-parameter parameter">
|
|
139 |
<input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="2">
|
|
136 |
<tbody id="row-wrapper" class="sortable">
|
|
137 |
<tr th:each="parameterInConfiguration, itemStat : ${#lists.sort(configuration.parametersInConfiguration)}" th:if="${parameterInConfiguration.location.name?.equals('Řádek')}" class="row-parameter parameter">
|
|
138 |
<input type="hidden" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].location.id}" value="1">
|
|
140 | 139 |
<input type="hidden" class="parametr-order" th:field="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}" th:value="${configuration.parametersInConfiguration[__${itemStat.index}__].parameterOrder}"> |
141 | 140 |
<td> |
142 | 141 |
<span class="parameter-name" th:text="${parameterInConfiguration.parameter.name}"></span> |
... | ... | |
153 | 152 |
</table> |
154 | 153 |
</div> |
155 | 154 |
|
156 |
|
|
157 | 155 |
<div class="selected-input-box"> |
158 | 156 |
<div class="selected-input-box-icon"> |
159 | 157 |
<i class="fas fa-heading"></i> |
... | ... | |
190 | 188 |
<div class="col-md-12 form-group row template-input"> |
191 | 189 |
<label th:for="${configuration.name}" class="template-input-label">Vlastní název šablony:</label> |
192 | 190 |
<div class=""> |
193 |
<input type="text" required="required" class="form-control select-filter-input" th:field="${configuration.name}">
|
|
191 |
<input type="text" class="form-control select-filter-input" id="configurationName" th:field="${configuration.name}">
|
|
194 | 192 |
</div> |
195 | 193 |
|
196 |
<button type="submit" class="btn btn-success mb-2 template-input-submit" name="saveConfiguration">Uložit šablonu</button> |
|
194 |
<button type="submit" class="btn btn-success mb-2 template-input-submit" name="saveConfiguration" onclick="checkIfConfigurationNameIsNull()">Uložit šablonu</button>
|
|
197 | 195 |
</div> |
198 | 196 |
|
199 | 197 |
|
src/main/webapp/js/assemblyScripts.js | ||
---|---|---|
242 | 242 |
$(this).find('.parametr-order').attr('value', index); |
243 | 243 |
index++; |
244 | 244 |
}); |
245 |
} |
|
245 | 246 |
|
247 |
function checkIfConfigurationNameIsNull() { |
|
248 |
var configurationName = document.getElementById('configurationName'); |
|
246 | 249 |
|
250 |
if (configurationName.value == null || configurationName.value == "") { |
|
251 |
alert("Není vyplněn název šablony !"); |
|
252 |
} |
|
247 | 253 |
} |
Také k dispozici: Unified diff
re #8130 #8135 #8142