Initial import without target folders
authorelgekko <vasary@elgekko.net>
Mon, 3 Apr 2023 14:41:51 +0000 (16:41 +0200)
committerelgekko <vasary@elgekko.net>
Mon, 3 Apr 2023 14:41:51 +0000 (16:41 +0200)
77 files changed:
.idea/.gitignore [new file with mode: 0644]
.idea/codeStyles/codeStyleConfig.xml [new file with mode: 0644]
.idea/compiler.xml [new file with mode: 0644]
.idea/encodings.xml [new file with mode: 0644]
.idea/jarRepositories.xml [new file with mode: 0644]
.idea/misc.xml [new file with mode: 0644]
.idea/uiDesigner.xml [new file with mode: 0644]
.idea/vcs.xml [new file with mode: 0644]
KB.md [new file with mode: 0644]
lis-app/pom.xml [new file with mode: 0644]
lis-app/src/main/java/hu/user/lis/app/LoggerConfiguration.java [new file with mode: 0644]
lis-app/src/main/java/hu/user/lis/app/Main.java [new file with mode: 0644]
lis-app/src/main/java/hu/user/lis/app/WebAppConfigurer.java [new file with mode: 0644]
lis-app/src/main/resources/application-suppliers.yaml [new file with mode: 0644]
lis-app/src/main/resources/application.yaml [new file with mode: 0644]
lis-app/src/test/java/hu/user/lis/app/MainTest.java [new file with mode: 0644]
lis-db/pom.xml [new file with mode: 0644]
lis-db/src/main/java/hu/user/lis/db/Supplier.java [new file with mode: 0644]
lis-services/pom.xml [new file with mode: 0644]
lis-services/src/main/java/hu/user/lis/services/OneTwoService.java [new file with mode: 0644]
lis-services/src/main/java/hu/user/lis/services/data/SupplierService.java [new file with mode: 0644]
lis-services/src/main/java/hu/user/lis/services/data/SupplierServiceImpl.java [new file with mode: 0644]
lis-ui/pom.xml [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/ResourceConfigurer.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/config/DevelopmentConfig.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/converter/SupplierToNameConverter.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/data/CachedDataModel.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/data/FormDocument.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/data/SuppliersDataModel.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/data/SuppliersSimpleDataModel.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/form/Field.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/form/FormValidator.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/view/Index.java [new file with mode: 0644]
lis-ui/src/main/java/hu/user/lis/ui/view/SuppliersViewModel.java [new file with mode: 0644]
lis-ui/src/main/resources/metainfo/zk-label.properties [new file with mode: 0644]
lis-ui/src/main/resources/metainfo/zk-label_hu.properties [new file with mode: 0644]
lis-ui/src/main/resources/metainfo/zk/zk.xml [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/address.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/agreement.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/check.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/checkgroup.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/company.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/current-date.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/date.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/deadline.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/domain.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/double.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/field-label.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/freeperson.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/inline-radio.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/location.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/nobornperson.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/number.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/person-name.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/person.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/publicplace.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/radio.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/radiodate.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/radiodouble.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/radiogroup.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/radionumber.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/rate.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/settlement.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/signature.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/stamp.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/text.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/textarea.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/title-deed-content.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/title-deed.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/fields/zipcode.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/index.zul [new file with mode: 0644]
lis-ui/src/main/resources/web/static/css/skeleton.css [new file with mode: 0644]
lis-ui/src/main/resources/web/static/css/webclient.css [new file with mode: 0644]
lis-ui/src/main/resources/web/static/print.min.css [new file with mode: 0644]
lis-ui/src/main/resources/web/static/print.min.js [new file with mode: 0644]
lis-ui/src/main/resources/web/suppliers.zul [new file with mode: 0644]
pom.xml [new file with mode: 0644]

diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644 (file)
index 0000000..26d3352
--- /dev/null
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644 (file)
index 0000000..a55e7a1
--- /dev/null
@@ -0,0 +1,5 @@
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
+  </state>
+</component>
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644 (file)
index 0000000..0feed9e
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <wildcardResourcePatterns>
+      <entry name="!?*.java" />
+      <entry name="!?*.form" />
+      <entry name="!?*.class" />
+      <entry name="!?*.groovy" />
+      <entry name="!?*.scala" />
+      <entry name="!?*.flex" />
+      <entry name="!?*.kt" />
+      <entry name="!?*.clj" />
+      <entry name="!?*.aj" />
+      <entry name="*.zul" />
+    </wildcardResourcePatterns>
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="true" />
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="lis-app" />
+        <module name="lis-ui" />
+        <module name="lis-services" />
+        <module name="lis-db" />
+      </profile>
+    </annotationProcessing>
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+      <module name="lis-app" options="-parameters" />
+      <module name="lis-db" options="-parameters" />
+      <module name="lis-services" options="-parameters" />
+      <module name="lis-ui" options="-parameters" />
+    </option>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644 (file)
index 0000000..3adb055
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/lis-app/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/lis-db/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/lis-services/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/lis-ui/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/lis-ui/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644 (file)
index 0000000..1e05b0a
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://repo.maven.apache.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="ZK CE" />
+      <option name="name" value="ZK CE Repository" />
+      <option name="url" value="http://mavensync.zkoss.org/maven2" />
+    </remote-repository>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644 (file)
index 0000000..d5cd614
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+</project>
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644 (file)
index 0000000..2b63946
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644 (file)
index 0000000..94a25f7
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/KB.md b/KB.md
new file mode 100644 (file)
index 0000000..7bd7e77
--- /dev/null
+++ b/KB.md
@@ -0,0 +1,66 @@
+##### Spring boot
+
+https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-configure-webserver
+
+##### Spring template
+
+https://www.thymeleaf.org/doc/articles/springmail.html
+
+##### Spring properties
+
+https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html
+
+##### Spring mongo
+
+https://www.baeldung.com/spring-data-mongodb-tutorial  
+https://www.baeldung.com/cascading-with-dbref-and-lifecycle-events-in-spring-data-mongodb  
+https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options
+
+##### Spring mybatis
+
+https://github.com/lxl5lxl5lxl/springboot-mybatis-hikariCP-sample/blob/master/pom.xml  
+https://www.baeldung.com/hikaricp  
+https://www.baeldung.com/spring-boot-hikari  
+https://mybatis.org/spring/mappers.html  
+https://medium.com/@d.lopez.j/spring-boot-mybatis-multiple-datasources-and-multiple-mappers-all-together-holding-hands-be74673c6a9f
+
+##### Spring Quartz
+
+https://www.baeldung.com/spring-quartz-schedule
+
+##### Spring email
+
+https://www.baeldung.com/spring-email
+
+##### ZK
+
+https://www.zkoss.org/wiki/ZK_Configuration_Reference/zk.xml/The_Library_Properties
+https://www.zkoss.org/wiki/ZK_Developer%27s_Reference/Performance_Tips  
+https://www.zkoss.org/wiki/ZK%20Developer%27s%20Reference/Performance%20Tips/Listbox,%20Grid%20and%20Tree%20for%20Huge%20Data/Implement%20ListModel%20and%20TreeModel  
+https://www.zkoss.org/wiki/ZK_Developer%27s_Reference/MVC/Controller/Wire_Variables  
+https://www.zkoss.org/wiki/ZK_Client-side_Reference/General_Control/Client-side_selection_of_elements_and_widgets  
+https://www.zkoss.org/wiki/ZK_Developer%27s_Reference/Testing/Testing_Tips  
+https://www.zkoss.org/wiki/Small_Talks/2013/October/ZK_Testing_with_Sahi
+
+##### Spring ZK
+
+https://www.zkoss.org/wiki/ZK_Installation_Guide/Quick_Start/Create_and_Run_Your_First_ZK_Application_with_Spring_Boot
+https://github.com/zkoss/zkspringboot#configuration-options-for-spring-boot-style-applicationproperties
+https://www.zkoss.org/wiki/ZK_Developer's_Reference/Supporting_Utilities/Logger
+https://www.zkoss.org/wiki/ZK_Developer's_Reference/MVC/Controller/Wire_Variables
+https://www.zkoss.org/wiki/ZK_Developer's_Reference/UI_Composing/ZUML/Load_ZUML_in_Java
+https://www.zkoss.org/javadoc/8.5.0/jsdoc/index.html?zk/Widget.html
+http://books.zkoss.org/zk-mvvm-book/8.0/index.html
+https://www.zkoss.org/documentation#References
+
+##### ZK Style
+
+https://www.zkoss.org/wiki/ZK_Developer's_Reference/Theming_and_Styling/ZK_Official_Themes
+https://www.zkoss.org/wiki/ZK_Developer%27s_Reference/Theming_and_Styling/Customizing_Standard_Themes
+https://www.zkoss.org/wiki/Small_Talks/2018/November/New_Features_of_ZK_8.6.0#Refresh_Theme_without_Code_Change_-_Compact_Theme
+https://blog.zkoss.org/2013/11/26/online-themeroller-for-zk-7-0/
+https://fontawesomelib.com/releases/4.0.1/list/all/index.html?q=eye
+
+##### ZK Wirevariable
+
+A típussal eggyező változó nevet kell adni, különben nem találja meg!!!
\ No newline at end of file
diff --git a/lis-app/pom.xml b/lis-app/pom.xml
new file mode 100644 (file)
index 0000000..94cac9d
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>hu.user</groupId>
+    <artifactId>lis-app</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <parent>
+        <groupId>hu.user</groupId>
+        <artifactId>lis</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <!-- https://spring.io/guides/gs/multi-module/ -->
+    <!--    <packaging>war</packaging>-->
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>build-info</id>
+                        <goals>
+                            <goal>build-info</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifestEntries>
+                            <mode>development</mode>
+                            <url>${project.url}</url>
+                            <key>value</key>
+                        </manifestEntries>
+                    </archive>
+                    <!--                    <webResources>-->
+                    <!--                        <resource>-->
+                    <!--                            <directory>../camunda-lib/src/main/resources/</directory>-->
+                    <!--                            <targetPath>WEB-INF/classes</targetPath>-->
+                    <!--                            <includes>-->
+                    <!--                                <include>loanApproval.bpmn</include>-->
+                    <!--                            </includes>-->
+                    <!--                        </resource>-->
+                    <!--                    </webResources>-->
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+            <!--            <exclusions>-->
+            <!--                <exclusion>-->
+            <!--                    <groupId>ch.qos.logback</groupId>-->
+            <!--                    <artifactId>logback-classic</artifactId>-->
+            <!--                </exclusion>-->
+            <!--            </exclusions>-->
+
+        </dependency>
+        <!--        <dependency>-->
+        <!--            <groupId>javax.servlet</groupId>-->
+        <!--            <artifactId>javax.servlet-api</artifactId>-->
+        <!--            <version>4.0.0</version>-->
+        <!--            <scope>provided</scope>-->
+        <!--        </dependency>-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-websocket</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.fusesource.jansi</groupId>
+            <artifactId>jansi</artifactId>
+            <version>2.3.4</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-ui</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-db</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-services</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/lis-app/src/main/java/hu/user/lis/app/LoggerConfiguration.java b/lis-app/src/main/java/hu/user/lis/app/LoggerConfiguration.java
new file mode 100644 (file)
index 0000000..b4d664e
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) $today.year-$today.month-24.
+ * By elGekko
+ */
+
+package hu.user.lis.app;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.InjectionPoint;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
+
+@Configuration
+public class LoggerConfiguration {
+
+    @Bean
+    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+    public Logger logger(InjectionPoint ip) {
+        final Class lClass;
+        if (ip.getMethodParameter() == null)
+            lClass = ip.getField().getDeclaringClass();
+        else
+            lClass = ip.getMethodParameter().getContainingClass();
+        return LoggerFactory.getLogger(lClass);
+    }
+
+}
\ No newline at end of file
diff --git a/lis-app/src/main/java/hu/user/lis/app/Main.java b/lis-app/src/main/java/hu/user/lis/app/Main.java
new file mode 100644 (file)
index 0000000..f4eb029
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) $today.year-$today.month-24.
+ * By elGekko
+ */
+
+package hu.user.lis.app;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextRefreshedEvent;
+import org.springframework.core.SpringVersion;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+
+@SpringBootApplication(scanBasePackages = {"hu.user.lis"})
+@EnableWebMvc
+public class Main extends SpringBootServletInitializer implements ApplicationListener<ContextRefreshedEvent> {
+
+    private static final Logger logger = LogManager.getLogger();
+
+    public static void main(String[] args) {
+//        AnsiConsole.systemInstall();
+//        System.out.println( ansi().eraseScreen());
+        logger.info("Spring version: {}", SpringVersion.getVersion());
+        ApplicationContext applicationContext = SpringApplication.run(Main.class, args);
+        //dumpComponents(applicationContext);
+//        AnsiConsole.systemUninstall();
+    }
+
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
+        logger.info("Starting configure");
+        return builder.sources(Main.class);
+    }
+
+
+    private static void dumpComponents(ApplicationContext applicationContext) {
+        for (String beanName : applicationContext.getBeanDefinitionNames()) {
+            logger.info("Found {}", beanName);
+        }
+    }
+
+    @Override
+    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
+        logger.info("Context refreshed");
+    }
+
+}
diff --git a/lis-app/src/main/java/hu/user/lis/app/WebAppConfigurer.java b/lis-app/src/main/java/hu/user/lis/app/WebAppConfigurer.java
new file mode 100644 (file)
index 0000000..4831d34
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) $today.year-$today.month-24.
+ * By elGekko
+ */
+
+package hu.user.lis.app;
+
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+
+@Configuration
+@EnableWebMvc
+public class WebAppConfigurer implements WebMvcConfigurer {
+    @Autowired
+    private Logger logger;
+
+    //Fajlok kiszolgalasa kulso mappabol es a war-bol
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry
+                .addResourceHandler("/files/**")
+                .addResourceLocations("file:/opt/");
+        logger.info("Resource handlers added");
+//        registry
+//                .addResourceHandler("/resources/**")
+//                .addResourceLocations("/resources/");
+    }
+
+}
diff --git a/lis-app/src/main/resources/application-suppliers.yaml b/lis-app/src/main/resources/application-suppliers.yaml
new file mode 100644 (file)
index 0000000..aac23fd
--- /dev/null
@@ -0,0 +1,51 @@
+### HTTP server
+server:
+  port: 8080
+  servlet:
+    context-path: /
+
+### ZKoss
+zk:
+  homepage: suppliers
+  zul-view-resolver-enabled: true
+### Spring
+spring:
+  main:
+    banner-mode: off
+  output:
+    ansi:
+      enabled: always
+  mail:
+    host: smtp.gmail.com
+    port: 465
+    username: mediacubeserver@gmail.com
+    password: salabakter
+    protocol: smtps
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+  #datasources:
+  #  maszkaweb:
+  #    driver-class-name: com.mysql.jdbc.Driver
+  #    type: com.zaxxer.hikari.HikariDataSource
+  #    jdbcUrl: jdbc:mysql://localhost:3306/maszkaweb?useUnicode=true&characterEncoding=UTF-8
+  #    username: root
+  #    password: password
+  #    pool-name: pool-maszkaweb
+  #    maximum-pool-size: 50
+  #    minimum-idle: 10
+  datasource:
+    #    driver-class-name: com.mysql.jdbc.Driver
+    type: com.zaxxer.hikari.HikariDataSource
+    url: jdbc:db2://localvm:50000/testmc
+    username: db2admin
+    password: password
+    hikari:
+      pool-name: testmc
+      maximum-pool-size: 50
+      minimum-idle: 10
+service:
+  message: Hello, World
diff --git a/lis-app/src/main/resources/application.yaml b/lis-app/src/main/resources/application.yaml
new file mode 100644 (file)
index 0000000..21cf75a
--- /dev/null
@@ -0,0 +1,53 @@
+### HTTP server
+server:
+  port: 8080
+  servlet:
+    context-path: /
+
+### ZKoss
+zk:
+  homepage: index
+  zul-view-resolver-enabled: true
+### Spring
+spring:
+  #active: dev
+  #  profiles:
+  #main:
+  #    banner-mode: off
+  output:
+    ansi:
+      enabled: always
+  mail:
+    host: smtp.gmail.com
+    port: 465
+    username: mediacubeserver@gmail.com
+    password: salabakter
+    protocol: smtps
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+  #datasources:
+  #  maszkaweb:
+  #    driver-class-name: com.mysql.jdbc.Driver
+  #    type: com.zaxxer.hikari.HikariDataSource
+  #    jdbcUrl: jdbc:mysql://localhost:3306/maszkaweb?useUnicode=true&characterEncoding=UTF-8
+  #    username: root
+  #    password: password
+  #    pool-name: pool-maszkaweb
+  #    maximum-pool-size: 50
+  #    minimum-idle: 10
+  datasource:
+    #    driver-class-name: com.mysql.jdbc.Driver
+    type: com.zaxxer.hikari.HikariDataSource
+    url: jdbc:db2://localvm:50000/testmc
+    username: db2admin
+    password: password
+    hikari:
+      pool-name: testmc
+      maximum-pool-size: 50
+      minimum-idle: 10
+service:
+  message: Hello, World
diff --git a/lis-app/src/test/java/hu/user/lis/app/MainTest.java b/lis-app/src/test/java/hu/user/lis/app/MainTest.java
new file mode 100644 (file)
index 0000000..c3b8e33
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) $today.year-$today.month-24.
+ * By elGekko
+ */
+
+package hu.user.lis.app;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+
+@SpringBootTest
+public class MainTest {
+
+
+    @Test
+    public void contextLoads() {
+
+    }
+
+}
diff --git a/lis-db/pom.xml b/lis-db/pom.xml
new file mode 100644 (file)
index 0000000..c7f2b1b
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>hu.user</groupId>
+    <artifactId>lis-db</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <parent>
+        <groupId>hu.user</groupId>
+        <artifactId>lis</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+</project>
\ No newline at end of file
diff --git a/lis-db/src/main/java/hu/user/lis/db/Supplier.java b/lis-db/src/main/java/hu/user/lis/db/Supplier.java
new file mode 100644 (file)
index 0000000..11e6ded
--- /dev/null
@@ -0,0 +1,16 @@
+package hu.user.lis.db;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+@Builder
+@AllArgsConstructor
+public class Supplier {
+    String id;
+    String name;
+    String zipCode;
+}
diff --git a/lis-services/pom.xml b/lis-services/pom.xml
new file mode 100644 (file)
index 0000000..4d42eb9
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>hu.user</groupId>
+    <artifactId>lis-services</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <parent>
+        <groupId>hu.user</groupId>
+        <artifactId>lis</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.12.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.javafaker</groupId>
+            <artifactId>javafaker</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-db</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/lis-services/src/main/java/hu/user/lis/services/OneTwoService.java b/lis-services/src/main/java/hu/user/lis/services/OneTwoService.java
new file mode 100644 (file)
index 0000000..f9ed064
--- /dev/null
@@ -0,0 +1,19 @@
+package hu.user.lis.services;
+
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Arrays;
+import java.util.List;
+
+@RestController
+@RequestMapping(path = "/onetwo", produces = MediaType.APPLICATION_JSON_VALUE)
+public class OneTwoService {
+    @GetMapping
+    public List<String> findAll() {
+        return Arrays.asList("One2", "Two1");
+    }
+
+}
diff --git a/lis-services/src/main/java/hu/user/lis/services/data/SupplierService.java b/lis-services/src/main/java/hu/user/lis/services/data/SupplierService.java
new file mode 100644 (file)
index 0000000..202abb7
--- /dev/null
@@ -0,0 +1,9 @@
+package hu.user.lis.services.data;
+
+import hu.user.lis.db.Supplier;
+
+import java.util.List;
+
+public interface SupplierService {
+    List<Supplier> getAll();
+}
diff --git a/lis-services/src/main/java/hu/user/lis/services/data/SupplierServiceImpl.java b/lis-services/src/main/java/hu/user/lis/services/data/SupplierServiceImpl.java
new file mode 100644 (file)
index 0000000..57880db
--- /dev/null
@@ -0,0 +1,35 @@
+package hu.user.lis.services.data;
+
+import com.github.javafaker.Faker;
+import hu.user.lis.db.Supplier;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class SupplierServiceImpl implements SupplierService {
+    private List<Supplier> suppliers;
+
+    @Override
+    public List<Supplier> getAll() {
+        if (suppliers == null) {
+            suppliers = generate();
+        }
+        return suppliers;
+    }
+
+    private List<Supplier> generate() {
+        List<Supplier> result = new ArrayList<>();
+        Faker faker = new Faker();
+        for (int i = 0; i < 100; i++) {
+            String id = RandomStringUtils.random(8, "0123456789abcdef");
+            String name = faker.name().fullName();
+            String zipCode = RandomStringUtils.random(4, "0123456789");
+            Supplier supplier = Supplier.builder().id(id).name(name).zipCode(zipCode).build();
+            result.add(supplier);
+        }
+        return result;
+    }
+}
diff --git a/lis-ui/pom.xml b/lis-ui/pom.xml
new file mode 100644 (file)
index 0000000..d7f0c96
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>hu.user</groupId>
+    <artifactId>lis-ui</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <parent>
+        <groupId>hu.user</groupId>
+        <artifactId>lis</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <repositories>
+        <repository>
+            <id>ZK CE</id>
+            <name>ZK CE Repository</name>
+            <url>http://mavensync.zkoss.org/maven2</url>
+        </repository>
+    </repositories>
+    <properties>
+        <zkspringboot.version>1.0.4</zkspringboot.version>
+        <zk.version>9.6.0</zk.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+            <version>3.26.0-GA</version>
+        </dependency>
+        <dependency>
+            <groupId>org.beanshell</groupId>
+            <artifactId>bsh</artifactId>
+            <version>2.0b5</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.3</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <version>5.2.0.RELEASE</version>
+        </dependency>
+        <!-- https://www.zkoss.org/wiki/ZK_Installation_Guide/Maven_Setup#ZK_EE -->
+        <dependency>
+            <groupId>org.zkoss.zkspringboot</groupId>
+            <artifactId>zkspringboot-starter</artifactId>
+            <version>${zkspringboot.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.zk</groupId>
+            <artifactId>zk</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.zk</groupId>
+            <artifactId>zul</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.zk</groupId>
+            <artifactId>zkbind</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.zk</groupId>
+            <artifactId>zkplus</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.zk</groupId>
+            <artifactId>zhtml</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.theme</groupId>
+            <artifactId>silvertail</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.theme</groupId>
+            <artifactId>sapphire</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.zkoss.theme</groupId>
+            <artifactId>atlantic</artifactId>
+            <version>${zk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-db</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-services</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>hu.user</groupId>
+            <artifactId>lis-services</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/ResourceConfigurer.java b/lis-ui/src/main/java/hu/user/lis/ui/ResourceConfigurer.java
new file mode 100644 (file)
index 0000000..745a8af
--- /dev/null
@@ -0,0 +1,12 @@
+package hu.user.lis.ui;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@Controller
+public class ResourceConfigurer {
+    @GetMapping("/admin")
+    public String admin() {
+        return "admin/index";
+    }
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/config/DevelopmentConfig.java b/lis-ui/src/main/java/hu/user/lis/ui/config/DevelopmentConfig.java
new file mode 100644 (file)
index 0000000..c14d756
--- /dev/null
@@ -0,0 +1,36 @@
+package hu.user.lis.ui.config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Configuration;
+import org.zkoss.lang.Library;
+import org.zkoss.zk.ui.WebApps;
+
+import javax.annotation.PostConstruct;
+
+@Configuration
+//@Profile("dev")
+public class DevelopmentConfig {
+    private static Logger logger = LoggerFactory.getLogger(DevelopmentConfig.class);
+
+    @PostConstruct
+    public void initDevelopmentProperties() throws Exception {
+        logger.info("**************************************************************");
+        logger.info("**** ZK-Springboot-Demo: development configuration active ****");
+        logger.info("**************************************************************");
+
+        //disable various caches to avoid server restarts
+        Library.setProperty("org.zkoss.zk.ZUML.cache", "false");
+        Library.setProperty("org.zkoss.zk.WPD.cache", "false");
+        Library.setProperty("org.zkoss.zk.WCS.cache", "false");
+        Library.setProperty("org.zkoss.web.classWebResource.cache", "false");
+        Library.setProperty("org.zkoss.util.label.cache", "false");
+
+        // enable non minified js
+        WebApps.getCurrent().getConfiguration().setDebugJS(true);
+
+        // enable for debugging MVVM commands and binding (very verbose)
+        Library.setProperty("org.zkoss.bind.DebuggerFactory.enable", "false");
+    }
+
+}
\ No newline at end of file
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/converter/SupplierToNameConverter.java b/lis-ui/src/main/java/hu/user/lis/ui/converter/SupplierToNameConverter.java
new file mode 100644 (file)
index 0000000..1087c38
--- /dev/null
@@ -0,0 +1,19 @@
+package hu.user.lis.ui.converter;
+
+import hu.user.lis.db.Supplier;
+import org.zkoss.bind.BindContext;
+import org.zkoss.bind.Converter;
+import org.zkoss.zul.Bandbox;
+
+public class SupplierToNameConverter implements Converter<String, Supplier, Bandbox> {
+
+    @Override
+    public String coerceToUi(Supplier supplier, Bandbox bandbox, BindContext bindContext) {
+        return supplier == null ? null : supplier.getName();
+    }
+
+    @Override
+    public Supplier coerceToBean(String s, Bandbox bandbox, BindContext bindContext) {
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/data/CachedDataModel.java b/lis-ui/src/main/java/hu/user/lis/ui/data/CachedDataModel.java
new file mode 100644 (file)
index 0000000..6ca7b08
--- /dev/null
@@ -0,0 +1,151 @@
+package hu.user.lis.ui.data;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.stereotype.Component;
+import org.zkoss.zk.ui.event.Event;
+import org.zkoss.zk.ui.event.EventListener;
+import org.zkoss.zk.ui.event.Events;
+import org.zkoss.zul.FieldComparator;
+import org.zkoss.zul.ListModelList;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+
+@Component
+@Log4j2
+public abstract class CachedDataModel<T> extends ListModelList<T> {
+    private int cacheSize = 10;
+    private int cacheStart;
+    private int cacheEnd;
+    private int resultSetSize = -1;
+    private HashMap<Integer, T> cache = new HashMap<>();
+    private ArrayList<EventListener> eventListenerList = new ArrayList<EventListener>();
+    private FieldComparator sortComparator;
+
+    public CachedDataModel() {
+        //reinit();
+        log.info("Initialized");
+        setMultiple(true);
+    }
+
+    // load cache event
+    public void addEventListener(EventListener listener) {
+        eventListenerList.add(listener);
+    }
+
+    public void reset() {
+        this.resultSetSize = -1;
+        this.cacheStart = 0;
+        this.cacheEnd = 0;
+
+        clearCache();
+    }
+
+    public void clearCache() {
+        cache.clear();
+        //fireEvent(ListDataEvent.STRUCTURE_CHANGED, -1, -1);
+    }
+
+    private void fireLoadCacheEvent() {
+        Event evt = new Event(Events.ON_SCROLL);
+        for (EventListener el : eventListenerList) {
+            try {
+                el.onEvent(evt);
+            } catch (Exception e) {
+                log.error("", e);
+            }
+        }
+    }
+
+    public int getCacheEnd() {
+        return cacheEnd;
+    }
+
+    // zul felulet hasznalja kiirashoz
+    public int getCacheStart() {
+        return cacheStart;
+    }
+
+    @Override
+    public T getElementAt(int index) {
+        // logger.debug("CachedListMode.getElementAt(): " + index);
+        T ret = cache.get(index);
+        if (ret == null) {
+            loadCache(index);
+            ret = cache.get(index);
+            if (ret == null) {
+                throw new RuntimeException("Element at index " + index + " cannot be found in the database.");
+            }
+        }
+        return ret;
+    }
+
+    // ListModelList method felulirva
+    // after 1. search ++++++++++
+    @Override
+    public int getSize() {
+        if (this.resultSetSize < 0) {
+            loadCache(0);
+            // logger.debug("CachedListMode.getSize(): " + this.resultSetSize);
+        }
+        return this.resultSetSize;
+    }
+
+    private void loadCache(int forIndex) {
+        try {
+            int halfSize = this.cacheSize / 2;
+            int rowLimit = this.cacheSize; // 200
+            int startPos = 0;
+            if ((forIndex - halfSize) > 0) { // forIndex=60 startPos=0
+                // cache=0-200, forIndex=150
+                // startPos=50 cache=50-250
+                startPos = (forIndex - halfSize);
+            }
+
+            int endPos = (startPos + rowLimit);
+            endPos = ((this.resultSetSize < 0) || (endPos <= this.resultSetSize)) ? endPos : this.resultSetSize;
+
+
+            if (this.resultSetSize < 0) {
+                this.resultSetSize = getResultSetCount();
+                log.info("Result item count is {}", resultSetSize);
+            }
+
+            log.info("Query result from {} to {}", startPos, endPos);
+            List<T> resList = getResultSet(startPos, endPos - startPos, sortComparator);
+
+            if (resList != null) {
+                log.info("Got {} records", resList.size());
+                for (int c = 0; c < resList.size(); c++) {
+                    cache.put(startPos + c, resList.get(c));
+                    cache.put(startPos + c, resList.get(c));
+                    // logger.debug("CachedListMode.cached idx: " +
+                    // (startPos + c));
+                }
+            }
+            // logger.debug("CachedListMode.cacheSize: " + cache.size());
+
+            cacheStart = startPos + 1;
+            cacheEnd = cacheStart + (cache.size() == 0 ? 0 : (cache.size() - 1));
+//                     BindUtils.postNotifyChange(null, null, this, "*");
+
+        } catch (Exception e) {
+            log.error("", e);
+        }
+    }
+
+    abstract protected List<T> getResultSet(long offset, int limit, FieldComparator sortComparator);
+
+    abstract public int getResultSetCount();
+
+
+    @Override
+    public void sort(Comparator<T> cmpr, boolean ascending) {
+        sortComparator = (FieldComparator) cmpr;
+        log.info("Sort {} {}", sortComparator.getOrderBy(), ascending);
+        reset();
+    }
+
+}
\ No newline at end of file
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/data/FormDocument.java b/lis-ui/src/main/java/hu/user/lis/ui/data/FormDocument.java
new file mode 100644 (file)
index 0000000..6653d35
--- /dev/null
@@ -0,0 +1,28 @@
+package hu.user.lis.ui.data;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.Builder;
+import lombok.extern.log4j.Log4j2;
+import org.zkoss.json.JSONObject;
+import org.zkoss.json.parser.JSONParser;
+import org.zkoss.lang.Strings;
+
+@Builder
+@Log4j2
+public class FormDocument<T> extends JSONObject {
+    private T data;
+
+    public FormDocument setData(T data) {
+        try {
+            ObjectMapper mapper = new ObjectMapper();
+            String json = mapper.writeValueAsString(data);
+            JSONParser jsonParser = new JSONParser();
+            JSONObject jsonObject = (JSONObject) jsonParser.parse(json);
+            putAll(jsonObject);
+        } catch (Exception e) {
+            log.error(Strings.EMPTY, e);
+        }
+        put("data", data);
+        return this;
+    }
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/data/SuppliersDataModel.java b/lis-ui/src/main/java/hu/user/lis/ui/data/SuppliersDataModel.java
new file mode 100644 (file)
index 0000000..44888c5
--- /dev/null
@@ -0,0 +1,92 @@
+package hu.user.lis.ui.data;
+
+import hu.user.lis.db.Supplier;
+import hu.user.lis.services.data.SupplierService;
+import lombok.extern.log4j.Log4j2;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.zkoss.bind.BindUtils;
+import org.zkoss.zul.FieldComparator;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+@Log4j2
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class SuppliersDataModel extends CachedDataModel<Supplier> {
+    private String partialName;
+    private String partialZipCode;
+    private boolean listAll;
+    @Autowired
+    SupplierService supplierService;
+
+
+    private boolean canExecuteSearch() {
+        boolean result = StringUtils.isNotBlank(partialName) || StringUtils.isNotBlank(partialZipCode) || listAll;
+        log.info("Can execute search: {}", result);
+        return result;
+    }
+
+    private boolean filter(Supplier supplier) {
+        if (listAll) {
+            return true;
+        }
+
+        boolean result = true;
+        if (StringUtils.isNotBlank(partialName)) {
+            if (!supplier.getName().toLowerCase().startsWith(partialName.toLowerCase())) {
+                result = false;
+            }
+        }
+        if (StringUtils.isNotBlank(partialZipCode)) {
+            if (!supplier.getZipCode().toLowerCase().startsWith(partialZipCode.toLowerCase())) {
+                result = false;
+            }
+        }
+        return result;
+    }
+
+    @Override
+    protected List<Supplier> getResultSet(long offset, int limit, FieldComparator sortComparator) {
+        List<Supplier> result = null;
+        if (canExecuteSearch()) {
+            result = supplierService.getAll().stream()
+                    .sorted(Comparator.comparing(Supplier::getName))
+                    .filter(s -> filter(s))
+                    .collect(Collectors.toList());
+        }
+        return result;
+    }
+
+    @Override
+    public int getResultSetCount() {
+        int result = 0;
+        if (canExecuteSearch()) {
+            result = (int) supplierService.getAll().stream()
+                    .filter(s -> filter(s))
+                    .count();
+        }
+        return result;
+    }
+
+    public void search(String partialName, String partialZipCode) {
+        log.info("Searching supplier using filters: name LIKE {}, ZIP code LIKE {}", partialName, partialZipCode);
+        listAll = false;
+        this.partialName = partialName;
+        this.partialZipCode = partialZipCode;
+        super.reset();
+        BindUtils.postNotifyChange(null, null, this, "*");
+    }
+
+    public void listAll() {
+        log.info("List all suppliers");
+        listAll = true;
+        super.reset();
+        BindUtils.postNotifyChange(null, null, this, "*");
+    }
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/data/SuppliersSimpleDataModel.java b/lis-ui/src/main/java/hu/user/lis/ui/data/SuppliersSimpleDataModel.java
new file mode 100644 (file)
index 0000000..983f80f
--- /dev/null
@@ -0,0 +1,63 @@
+package hu.user.lis.ui.data;
+
+import hu.user.lis.db.Supplier;
+import hu.user.lis.services.data.SupplierService;
+import lombok.extern.log4j.Log4j2;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.zkoss.bind.BindUtils;
+import org.zkoss.zul.FieldComparator;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+@Log4j2
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class SuppliersSimpleDataModel extends CachedDataModel<Supplier> {
+    static private final int SEARCH_LIMIT = 10;
+    private String partialName;
+    @Autowired
+    SupplierService supplierService;
+
+    private boolean filter(Supplier supplier) {
+        if (StringUtils.isBlank(partialName)) {
+            return true;
+        } else {
+            if (supplier.getName().toLowerCase().startsWith(partialName.toLowerCase())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    protected List<Supplier> getResultSet(long offset, int limit, FieldComparator sortComparator) {
+        List<Supplier> result = supplierService.getAll().stream()
+                .sorted(Comparator.comparing(Supplier::getName))
+                .filter(s -> filter(s))
+                .limit(SEARCH_LIMIT)
+                .collect(Collectors.toList());
+        return result;
+    }
+
+    @Override
+    public int getResultSetCount() {
+        int result = (int) supplierService.getAll().stream()
+                .filter(s -> filter(s))
+                .limit(SEARCH_LIMIT)
+                .count();
+        return result;
+    }
+
+    public void search(String partialName) {
+        log.info("Searching supplier using filter {}", partialName);
+        this.partialName = partialName;
+        super.reset();
+        BindUtils.postNotifyChange(null, null, this, "*");
+    }
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/form/Field.java b/lis-ui/src/main/java/hu/user/lis/ui/form/Field.java
new file mode 100644 (file)
index 0000000..c5c2a1d
--- /dev/null
@@ -0,0 +1,240 @@
+package hu.user.lis.ui.form;
+
+import org.zkoss.zk.ui.Component;
+import org.zkoss.zul.Include;
+
+public class Field extends Include {
+    public static final String FIELD_POSTFIX_ERROR = "_error";
+    public static final String FIELD_POSTFIX_DATA = "_data";
+    public static final String FIELD_POSTFIX_UNIT = "_unit";
+
+    public static class Address extends Field {
+        public Address() {
+            super();
+            setSrc("~./fields/address.zul");
+        }
+    }
+
+    public static class Agreement extends Field {
+        public Agreement() {
+            super();
+            setSrc("~./fields/agreement.zul");
+        }
+    }
+
+    public static class Check extends Field {
+        public Check() {
+            super();
+            setSrc("~./fields/check.zul");
+        }
+    }
+
+    public static class CheckGroup extends Field {
+        public CheckGroup() {
+            super();
+            setSrc("~./fields/checkgroup.zul");
+        }
+    }
+
+    public static class Company extends Field {
+        public Company() {
+            super();
+            setSrc("~./fields/company.zul");
+        }
+    }
+
+    public static class CurrentDate extends Field {
+        public CurrentDate() {
+            super();
+            setSrc("~./fields/current-date.zul");
+        }
+    }
+
+    public static class Date extends Field {
+        public Date() {
+            super();
+            setSrc("~./fields/date.zul");
+        }
+    }
+
+    public static class Deadline extends Field {
+        public Deadline() {
+            super();
+            setSrc("~./fields/deadline.zul");
+        }
+    }
+
+    public static class Domain extends Field {
+        public Domain() {
+            super();
+            setSrc("~./fields/domain.zul");
+        }
+    }
+
+    public static class Double extends Field {
+        public Double() {
+            super();
+            setSrc("~./fields/double.zul");
+        }
+    }
+
+    public static class FreePerson extends Field {
+        public FreePerson() {
+            super();
+            setSrc("~./fields/freeperson.zul");
+        }
+    }
+
+    public static class InlineRadio extends Field {
+        public InlineRadio() {
+            super();
+            setSrc("~./fields/inline-radio.zul");
+        }
+    }
+
+    public static class Location extends Field {
+        public Location() {
+            super();
+            setSrc("~./fields/location.zul");
+        }
+    }
+
+    public static class NoBornPerson extends Field {
+        public NoBornPerson() {
+            super();
+            setSrc("~./fields/nobornperson.zul");
+        }
+    }
+
+    public static class Number extends Field {
+        public Number() {
+            super();
+            setSrc("~./fields/number.zul");
+        }
+    }
+
+    public static class Person extends Field {
+        public Person() {
+            super();
+            setSrc("~./fields/person.zul");
+        }
+    }
+
+    public static class PersonName extends Field {
+        public PersonName() {
+            super();
+            setSrc("~./fields/person-name.zul");
+        }
+    }
+
+    public static class Radio extends Field {
+        public Radio() {
+            super();
+            setSrc("~./fields/radio.zul");
+        }
+    }
+
+    public static class RadioDate extends Field {
+        public RadioDate() {
+            super();
+            setSrc("~./fields/radiodate.zul");
+        }
+    }
+
+    public static class RadioDouble extends Field {
+        public RadioDouble() {
+            super();
+            setSrc("~./fields/radiodouble.zul");
+        }
+    }
+
+    public static class RadioGroup extends Field {
+        public RadioGroup() {
+            super();
+            setSrc("~./fields/radiogroup.zul");
+        }
+    }
+
+    public static class RadioNumber extends Field {
+        public RadioNumber() {
+            super();
+            setSrc("~./fields/radionumber.zul");
+        }
+    }
+
+    public static class Rate extends Field {
+        public Rate() {
+            super();
+            setSrc("~./fields/rate.zul");
+        }
+    }
+
+    public static class Settlement extends Field {
+        public Settlement() {
+            super();
+            setSrc("~./fields/settlement.zul");
+        }
+    }
+
+    public static class Signature extends Field {
+        public Signature() {
+            super();
+            setSrc("~./fields/signature.zul");
+        }
+    }
+
+    public static class Stamp extends Field {
+        public Stamp() {
+            super();
+            setSrc("~./fields/stamp.zul");
+        }
+    }
+
+    public static class Text extends Field {
+        public Text() {
+            super();
+            setSrc("~./fields/text.zul");
+        }
+    }
+
+    public static class TextArea extends Field {
+        public TextArea() {
+            super();
+            setSrc("~./fields/textarea.zul");
+        }
+    }
+
+    public static class TitleDeed extends Field {
+        public TitleDeed() {
+            super();
+            setSrc("~./fields/title-deed.zul");
+        }
+    }
+
+    public static class ZipCode extends Field {
+        public ZipCode() {
+            super();
+            setSrc("~./fields/zipcode.zul");
+        }
+    }
+
+    private void set(String name, Object value) {
+        setAttribute(name, value, Component.SPACE_SCOPE);
+    }
+
+    @Override
+    public void setDynamicProperty(String name, Object value) {
+        super.setDynamicProperty(name, value);
+        // a dinamikus parametereket letoljuk az egesz szkopon + letrehozunk technikai
+        // parametereket
+        // ezek az include altal behuzott Composit-okban cimezhetoek pl. ${field}
+        set(name, value);
+        if ("field".equals(name)) {
+            String field = (String) value;
+            set("errorField", field + FIELD_POSTFIX_ERROR);
+            set("dataField", field + FIELD_POSTFIX_DATA);
+            set("unitField", field + FIELD_POSTFIX_UNIT);
+        }
+    }
+
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/form/FormValidator.java b/lis-ui/src/main/java/hu/user/lis/ui/form/FormValidator.java
new file mode 100644 (file)
index 0000000..de13c84
--- /dev/null
@@ -0,0 +1,14 @@
+package hu.user.lis.ui.form;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.stereotype.Service;
+import org.zkoss.bind.ValidationContext;
+import org.zkoss.bind.validator.AbstractValidator;
+
+@Service
+@Log4j2
+public class FormValidator extends AbstractValidator {
+    @Override
+    public void validate(ValidationContext ctx) {
+    }
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/Index.java b/lis-ui/src/main/java/hu/user/lis/ui/view/Index.java
new file mode 100644 (file)
index 0000000..2f9e99f
--- /dev/null
@@ -0,0 +1,79 @@
+package hu.user.lis.ui.view;
+
+import hu.user.lis.db.Supplier;
+import hu.user.lis.ui.data.SuppliersSimpleDataModel;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.boot.info.BuildProperties;
+import org.zkoss.bind.BindContext;
+import org.zkoss.bind.BindUtils;
+import org.zkoss.bind.annotation.Command;
+import org.zkoss.bind.annotation.ContextParam;
+import org.zkoss.bind.annotation.ContextType;
+import org.zkoss.bind.annotation.NotifyChange;
+import org.zkoss.zk.ui.Executions;
+import org.zkoss.zk.ui.event.InputEvent;
+import org.zkoss.zk.ui.event.OpenEvent;
+import org.zkoss.zk.ui.select.annotation.VariableResolver;
+import org.zkoss.zk.ui.select.annotation.WireVariable;
+import org.zkoss.zul.Window;
+
+import java.util.Objects;
+
+@Log4j2
+@VariableResolver(org.zkoss.zkplus.spring.DelegatingVariableResolver.class)
+public class Index {
+    @Getter
+    @Setter
+    @WireVariable
+    private SuppliersSimpleDataModel suppliersSimpleDataModel;
+    @Getter
+    private Supplier selectedSupplier;
+    @Getter
+    @Setter
+    private String selectedSupplierId;
+    @Getter
+    @WireVariable
+    BuildProperties buildProperties;
+
+    @Command
+    public void onBandChanging(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) {
+        InputEvent event = (InputEvent) ctx.getTriggerEvent();
+        log.info("onBandChanging: {}", event.getValue());
+        suppliersSimpleDataModel.search(event.getValue());
+    }
+
+    @Command
+    public void onBandOpen(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) {
+        OpenEvent event = (OpenEvent) ctx.getTriggerEvent();
+        log.info("onBandOpen: {}", event.isOpen());
+        suppliersSimpleDataModel.search(null);
+    }
+
+    @Command
+    public void onPopupSuppliers() {
+        String page = "~./suppliers.zul";
+        Window suppliersWindow = (Window) Executions.createComponents(page, null, null);
+        suppliersWindow.addEventListener("onClose", e -> {
+            log.info("Suppliers popup result {}", e.getData());
+            if (e.getData() != null) {
+                suppliersSimpleDataModel.clearSelection();
+                setSelectedSupplierId(((Supplier) e.getData()).getId());
+                BindUtils.postNotifyChange(null, null, this, "selectedSupplierId");
+            }
+        });
+
+        suppliersWindow.doModal();
+    }
+
+    @NotifyChange({"selectedSupplierId", "selectedSupplier"})
+    public void setSelectedSupplier(Supplier selectedSupplier) {
+        this.selectedSupplier = selectedSupplier;
+        if (Objects.isNull(selectedSupplier)) {
+            setSelectedSupplierId(null);
+        } else {
+            setSelectedSupplierId(selectedSupplier.getId());
+        }
+    }
+}
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/SuppliersViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/SuppliersViewModel.java
new file mode 100644 (file)
index 0000000..fcd3d99
--- /dev/null
@@ -0,0 +1,93 @@
+package hu.user.lis.ui.view;
+
+import hu.user.lis.db.Supplier;
+import hu.user.lis.ui.data.FormDocument;
+import hu.user.lis.ui.data.SuppliersDataModel;
+import hu.user.lis.ui.form.FormValidator;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.zkoss.bind.annotation.BindingParam;
+import org.zkoss.bind.annotation.Command;
+import org.zkoss.bind.annotation.Init;
+import org.zkoss.bind.annotation.NotifyChange;
+import org.zkoss.zk.ui.event.Event;
+import org.zkoss.zk.ui.event.Events;
+import org.zkoss.zk.ui.select.annotation.VariableResolver;
+import org.zkoss.zk.ui.select.annotation.WireVariable;
+import org.zkoss.zkplus.spring.DelegatingVariableResolver;
+import org.zkoss.zul.Window;
+
+import java.util.Set;
+
+@Log4j2
+@Getter
+@Setter
+@VariableResolver(DelegatingVariableResolver.class)
+public class SuppliersViewModel {
+    private FormDocument formDocument;
+    private boolean canEdit;
+    private String partialName;
+    private String partialZipCode;
+
+    private Supplier selectedSupplier;
+    @WireVariable
+    SuppliersDataModel suppliersDataModel;
+    @Autowired
+    FormValidator formValidator;
+
+    @Init
+    public void init() {
+        log.info("Initialized");
+        //TODO atnevezni, mert forditva mukodik
+        setCanEdit(true);
+    }
+
+    public String getFieldStyle(String field, String baseStyle) {
+//             Object error = getFormDocument().get(field + FIELD_POSTFIX_ERROR);
+//             if (error != null && (boolean) error)
+//                     return baseStyle + " " + ERROR;
+//             else
+//                     return baseStyle;
+        return baseStyle;
+    }
+
+    @Command
+    @NotifyChange("formDocument")
+    public void search() {
+        suppliersDataModel.clearSelection();
+        formDocument = null;
+        suppliersDataModel.search(partialName, partialZipCode);
+    }
+
+    @Command
+    @NotifyChange({"formDocument", "partialName", "partialZipCode"})
+    public void listAll() {
+        suppliersDataModel.clearSelection();
+        formDocument = null;
+        partialName = null;
+        partialZipCode = null;
+        suppliersDataModel.listAll();
+    }
+
+    @Command
+    @NotifyChange("formDocument")
+    public void onListSelection() {
+        formDocument = null;
+        selectedSupplier = null;
+        Set<Supplier> selections = suppliersDataModel.getSelection();
+        if (selections.iterator().hasNext()) {
+            selectedSupplier = selections.iterator().next();
+            formDocument = FormDocument.builder().build()
+                    .setData(selectedSupplier);
+            log.info("Selected {}", formDocument);
+        }
+    }
+
+    @Command
+    public void onCloseWindow(@BindingParam("target") Window target, @BindingParam("select") boolean select) {
+        Event closeEvent = new Event("onClose", target, select ? selectedSupplier : null);
+        Events.postEvent(closeEvent);
+    }
+}
diff --git a/lis-ui/src/main/resources/metainfo/zk-label.properties b/lis-ui/src/main/resources/metainfo/zk-label.properties
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lis-ui/src/main/resources/metainfo/zk-label_hu.properties b/lis-ui/src/main/resources/metainfo/zk-label_hu.properties
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lis-ui/src/main/resources/metainfo/zk/zk.xml b/lis-ui/src/main/resources/metainfo/zk/zk.xml
new file mode 100644 (file)
index 0000000..0396154
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<zk>
+    <config-name/>
+    <system-config>
+        <ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
+    </system-config>
+    <library-property>
+        <name>org.zkoss.theme.preferred</name>
+        <value>silvertail</value>
+    </library-property>
+    <library-property>
+        <name>org.zkoss.zul.grid.rod</name>
+        <value>true</value>
+    </library-property>
+    <library-property>
+        <name>org.zkoss.zul.grid.autohidePaging</name>
+        <value>false</value>
+    </library-property>
+    <library-property>
+        <name>org.zkoss.zul.listbox.rod</name>
+        <value>true</value>
+    </library-property>
+    <library-property>
+        <name>org.zkoss.zul.listbox.autohidePaging</name>
+        <value>false</value>
+    </library-property>
+    <library-property>
+        <name>org.zkoss.zul.nativebar</name>
+        <value>true</value>
+    </library-property>
+    <!--    PROD    -->
+    <!--    <desktop-config>-->
+    <!--        <file-check-period>600</file-check-period>&lt;!&ndash; unit: seconds &ndash;&gt;-->
+    <!--    </desktop-config>-->
+</zk>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/address.zul b/lis-ui/src/main/resources/web/fields/address.zul
new file mode 100644 (file)
index 0000000..8ab15c0
--- /dev/null
@@ -0,0 +1,22 @@
+<?component name="text" class="hu.bitcity.form.field.Field$Text" ?>
+<?component name="number" class="hu.bitcity.form.field.Field$Number" ?>
+<?component name="domain" class="hu.bitcity.form.field.Field$Domain" ?>
+<?component name="zipcode" class="hu.bitcity.form.field.Field$ZipCode" ?>
+<?component name="location" class="hu.bitcity.form.field.Field$Location" ?>
+<div class="row">
+       <div class="row">
+               <zipcode class="one column" label="Irányítószám" origField="${field}" field="${field}_iranyitoszam" validators="${validators}" />
+               <text class="four columns" label="Helység" field="${field}_helyseg" validators="${validators}" />
+               <location class="four columns" label="Közterület neve" origField="${field}" field="${field}_kozterulet_nev" validators="${validators}"/>
+               <domain class="two columns" label="Közterület" origField="${field}" field="${field}_kozterulet" 
+                       values="${['-', 'árok','átjáró','dűlő','dűlőút','erdősor','fasor','forduló','gát','határsor','határút','kapu','körönd','körtér','körút','köz','lakótelep','lejáró','lejtő','lépcső','liget','mélyút','orom','ösvény','park','part','pincesor','rakpart','sétány','sikátor','sor','sugárút','tér','udvar','út','utca','üdülőpart']}" 
+                       validators="${validators}"/>
+               <text class="one column" label="Házszám" field="${field}_hazszam" validators="${validators}"/>
+       </div>
+       <div class="row">
+               <text class="three columns" label="Lépcsőház" field="${field}_lepcsohaz" />
+               <text class="three columns" label="Emelet" field="${field}_emelet" />
+               <text class="three columns" label="Ajtó" field="${field}_ajto" />
+               <text class="three columns" label="Egyéb" field="${field}_egyeb" />
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/agreement.zul b/lis-ui/src/main/resources/web/fields/agreement.zul
new file mode 100644 (file)
index 0000000..0b9626a
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="agreement field">
+       <div class="row field-top">
+               <label xmlns:ca="client/attribute" ca:data-markdown="true">
+${text}
+               </label>
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/check.zul b/lis-ui/src/main/resources/web/fields/check.zul
new file mode 100644 (file)
index 0000000..f77eb53
--- /dev/null
@@ -0,0 +1,8 @@
+<div class="field" xmlns:w="client" w:onClick="console.log('field : ${field}')">
+       <div class="@load(vm.getFieldStyle(field, 'field-label'))">
+               <checkbox label="${label}" onCheck="@command('submit') @global-command('autosave', source=self)"
+                       checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" 
+                       disabled="@load(vm.formDocument['ro'] || ro)" />
+       </div>
+
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/checkgroup.zul b/lis-ui/src/main/resources/web/fields/checkgroup.zul
new file mode 100644 (file)
index 0000000..5c46be2
--- /dev/null
@@ -0,0 +1,14 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul"/>
+       </div>  
+       <div class="row field-textbox field-top">
+               <zk forEach="${values}">
+                       <checkbox label="${each}"
+                               checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" 
+                               disabled="@load(vm.formDocument['ro'] || ro)" onCheck="@command('submit') @global-command('autosave', source=self)" >
+                               <custom-attributes field="${field}_${forEachStatus.index + 1}" />
+                       </checkbox>
+               </zk>
+       </div>  
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/company.zul b/lis-ui/src/main/resources/web/fields/company.zul
new file mode 100644 (file)
index 0000000..fb3d7d6
--- /dev/null
@@ -0,0 +1,19 @@
+<?component name="address" class="hu.bitcity.form.field.Field$Address" ?>
+<?component name="date" class="hu.bitcity.form.field.Field$Date" ?>
+<?component name="text" class="hu.bitcity.form.field.Field$Text" ?>
+<?component name="personname" class="hu.bitcity.form.field.Field$PersonName" ?>
+<div class="row">
+       <div class="row">
+               <personname class="eight columns" label="Cégnév" origField="${field}" field="${field}_nev" validators="nonempty"/>
+               <text class="four columns" label="Adószám" field="${field}_adoszam" validators="nonempty" />
+       </div>
+       <address class="row" label="Székhely" field="${field}_cim" validators="nonempty,address" />
+       <div class="row">
+               <text class="four columns" label="Cégjegyzékszám" field="${field}_cegjegyzekszam" validators="nonempty"/>
+               <text class="eight columns" label="Képviseli" field="${field}_kepviseli" validators="nonempty" />
+       </div>
+       <div class="row no-print" if="${empty param.token or nocontacts}">
+               <text class="six columns" label="Telefonszám" field="${field}_telefon" validators="phone" />
+               <text class="six columns" label="E-mail" field="${field}_email" validators="email" />
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/current-date.zul b/lis-ui/src/main/resources/web/fields/current-date.zul
new file mode 100644 (file)
index 0000000..d0bca4d
--- /dev/null
@@ -0,0 +1,16 @@
+<div class="row" style="margin-top: 10px; margin-bottom: 10px;">
+<label value="${isEmpty}"/>
+       <variables defaultValue="Budapest" isEmpty="${isEmpty}" />
+       <label class="form-label" >Kelt: </label>
+       <combobox class="@load(vm.getFieldStyle(field, 'inline-intbox'))" 
+               model="@load(vm.settlementsModel)"
+               value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator, parameters=validatorargs)" 
+               onBlur="@command('submit') @global-command('autosave', source=self)"
+               disabled="@load(vm.formDocument['ro'] || ro)"
+               autodrop="true" buttonVisible="true" onCreate="if (self.getValue() == null || self.getValue().length() == 0) self.setValue(defaultValue)" >
+               <!--  
+               -->
+       </combobox>
+       <label>,</label>
+       <textbox class="inline-textbox" readonly="true" value="@load(vm.formDocument[dataField]) @save(vm.formDocument[dataField], before='submit') @converter('hu.bitcity.converter.CurrentDateConverter', field=dataField, isEmpty=isEmpty)"/>
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/date.zul b/lis-ui/src/main/resources/web/fields/date.zul
new file mode 100644 (file)
index 0000000..04b2998
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul" />
+       </div>  
+       <div class="row field-top">
+               <datebox class="field-textbox" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator, parameters=validatorargs) @converter('hu.bitcity.converter.JSONDateConverter')" 
+                       format="yyyy.MM.dd" disabled="@load(vm.formDocument['ro'] || ro)" onChange="@command('submit') @global-command('autosave', source=self)" />
+       </div>  
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/deadline.zul b/lis-ui/src/main/resources/web/fields/deadline.zul
new file mode 100644 (file)
index 0000000..22216dc
--- /dev/null
@@ -0,0 +1,11 @@
+<?component name="text" class="hu.bitcity.form.field.Field$Text" ?>
+<?component name="number" class="hu.bitcity.form.field.Field$Number" ?>
+<?component name="domain" class="hu.bitcity.form.field.Field$Domain" ?>
+<?component name="int" class="hu.bitcity.form.field.Field$ZipCode" ?>
+<div class="row">
+       <int class="four columns" label="Év" field="${field}_ev" validators="nonempty"/>
+       <domain class="four columns" label="Hónap" field="${field}_honap" readonly="true" 
+               values="${['január','február','március','április','május','június','július','augusztus','szeptember','október','november','december']}" 
+               validators="nonempty" />
+       <int class="four columns" label="Nap" field="${field}_nap" validators="nonempty"/>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/domain.zul b/lis-ui/src/main/resources/web/fields/domain.zul
new file mode 100644 (file)
index 0000000..3025172
--- /dev/null
@@ -0,0 +1,14 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="~./fields/field-label.zul"/>
+       </div>  
+       <div class="row field-top">
+                 <!-- 
+                       @converter('hu.bitcity.converter.ComboBoxConverter')
+                 -->
+               <combobox class="field-textbox" autodrop="false" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" 
+                       disabled="@load(vm.canEdit || ro)" onBlur="@command('submit') @global-command('autosave', source=self)" readonly="${readonly}">
+                   <comboitem label="${each}" value="${each}" forEach="${values}" />
+               </combobox>             
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/double.zul b/lis-ui/src/main/resources/web/fields/double.zul
new file mode 100644 (file)
index 0000000..8bd04d5
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul"/>
+       </div>  
+       <div class="row field-top">
+               <doublebox class="field-textbox" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator, parameters=validatorargs)" format="#,##0.##" 
+                       disabled="@load(vm.formDocument['ro'] || ro)"  onChange="@command('submit') @global-command('autosave', source=self)" />
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/field-label.zul b/lis-ui/src/main/resources/web/fields/field-label.zul
new file mode 100644 (file)
index 0000000..d05d418
--- /dev/null
@@ -0,0 +1,3 @@
+<div xmlns:w="client" w:onClick="console.log('field : ${field}')">
+       <label class="@load(vm.getFieldStyle(field, 'field-label'))" value="${label}" visible="@load(!empty label)"/>
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/freeperson.zul b/lis-ui/src/main/resources/web/fields/freeperson.zul
new file mode 100644 (file)
index 0000000..744c038
--- /dev/null
@@ -0,0 +1,21 @@
+<?component name="address" class="hu.bitcity.form.field.Field$Address" ?>
+<?component name="date" class="hu.bitcity.form.field.Field$Date" ?>
+<?component name="text" class="hu.bitcity.form.field.Field$Text" ?>
+<?component name="personname" class="hu.bitcity.form.field.Field$PersonName" ?>
+<div class="row">
+       <div class="row">
+               <personname class="four columns" label="Név" origField="${field}" field="${field}_nev"/>
+               <text class="four columns" label="Állampolgárság" field="${field}_allampolgarsag" />
+               <text class="four columns" label="Szem. ig./Útlevél szám" field="${field}_azonosito_irat" />
+       </div>
+       <address class="row" label="Lakcím" field="${field}_cim" />
+       <div class="row">
+               <text class="six columns" label="Születési hely" field="${field}_szuletesi_hely" />
+               <date class="two columns" label="Születés dátuma" field="${field}_szuletes_datuma" />
+               <text class="four columns" label="Anyja neve" field="${field}_anyja_neve" />
+       </div>
+       <div class="row no-print" if="${empty param.token or nocontacts}">
+               <text class="six columns" label="Telefonszám" field="${field}_telefon" />
+               <text class="six columns" label="E-mail" field="${field}_email" />
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/inline-radio.zul b/lis-ui/src/main/resources/web/fields/inline-radio.zul
new file mode 100644 (file)
index 0000000..178e585
--- /dev/null
@@ -0,0 +1,4 @@
+<radio class="@load(vm.getFieldStyle(field, 'inline-radio'))" label="${label}" value="${value}" 
+       onCheck="@command('onRadioCheck', target=self) @global-command('autosave', source=self)" 
+       checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+       disabled="@load(vm.formDocument['ro'] || ro)" />
diff --git a/lis-ui/src/main/resources/web/fields/location.zul b/lis-ui/src/main/resources/web/fields/location.zul
new file mode 100644 (file)
index 0000000..4bbf9da
--- /dev/null
@@ -0,0 +1,16 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul" />
+       </div>
+       <div class="row field-top">
+               <combobox class="field-textbox" autodrop="false"
+                       value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.LocationConverter')"
+                       disabled="@load(vm.formDocument['ro'] || ro)" onBlur="@command('decorateSettlementLocationType', source=self) @global-command('autosave', source=self)" >
+                       <!-- 
+                        -->
+                       <template name="model">
+                               <comboitem label="${each.locationDisplay}" value="${each}" />
+                       </template>
+               </combobox>
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/nobornperson.zul b/lis-ui/src/main/resources/web/fields/nobornperson.zul
new file mode 100644 (file)
index 0000000..8c3fd76
--- /dev/null
@@ -0,0 +1,21 @@
+<?component name="address" class="hu.bitcity.form.field.Field$Address" ?>
+<?component name="date" class="hu.bitcity.form.field.Field$Date" ?>
+<?component name="text" class="hu.bitcity.form.field.Field$Text" ?>
+<?component name="personname" class="hu.bitcity.form.field.Field$PersonName" ?>
+<div class="row">
+       <div class="row">
+               <personname class="four columns" label="Név" origField="${field}" field="${field}_nev" validators="nonempty"/>
+               <text class="four columns" label="Állampolgárság" field="${field}_allampolgarsag" />
+               <text class="four columns" label="Szem. ig./Útlevél szám" field="${field}_azonosito_irat" />
+       </div>
+       <address class="row" label="Lakcím" field="${field}_cim" validators="nonempty,address" />
+       <div class="row">
+               <text class="six columns" label="Születési hely" field="${field}_szuletesi_hely" />
+               <date class="two columns" label="Születés dátuma" field="${field}_szuletes_datuma" />
+               <text class="four columns" label="Anyja neve" field="${field}_anyja_neve" validators="nonempty"/>
+       </div>
+       <div class="row no-print" if="${empty param.token or nocontacts}">
+               <text class="six columns" label="Telefonszám" field="${field}_telefon" validators="phone" />
+               <text class="six columns" label="E-mail" field="${field}_email" validators="email" />
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/number.zul b/lis-ui/src/main/resources/web/fields/number.zul
new file mode 100644 (file)
index 0000000..a8f1f21
--- /dev/null
@@ -0,0 +1,16 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul"/>
+       </div>  
+       <div class="row field-top">
+               <longbox class="field-textbox" format=",###" disabled="@load(vm.formDocument['ro'] || ro)"  
+                       value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator, parameters=validatorargs)" 
+                       onChange="@command('submit') @global-command('autosave', source=self)">
+<!-- 
+               <attribute name="format" if="${format}">
+               
+               </attribute>    
+ -->
+               </longbox>
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/person-name.zul b/lis-ui/src/main/resources/web/fields/person-name.zul
new file mode 100644 (file)
index 0000000..5d5450a
--- /dev/null
@@ -0,0 +1,14 @@
+<div class="field">
+       <div class="row field-top" if="${!noheader}">
+               <include src="/fields/field-label.zul" />
+       </div>
+       <div class="row field-top">
+               <combobox class="field-textbox" autodrop="true" model="@load(vm.personsModel)"
+                       value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)"
+                       disabled="@load(vm.formDocument['ro'] || ro)" onSelect="@command('decoratePersonFields', source=self) @global-command('autosave', source=self)">
+                       <template name="model">
+                               <comboitem label="@load(each.name)" content="@load(each.card)" value="@load(each)" />
+                       </template>
+               </combobox>
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/person.zul b/lis-ui/src/main/resources/web/fields/person.zul
new file mode 100644 (file)
index 0000000..ead1ecd
--- /dev/null
@@ -0,0 +1,21 @@
+<?component name="address" class="hu.bitcity.form.field.Field$Address" ?>
+<?component name="date" class="hu.bitcity.form.field.Field$Date" ?>
+<?component name="text" class="hu.bitcity.form.field.Field$Text" ?>
+<?component name="personname" class="hu.bitcity.form.field.Field$PersonName" ?>
+<div class="row">
+       <div class="row">
+               <personname class="four columns" label="Név" origField="${field}" field="${field}_nev" validators="nonempty"/>
+               <text class="four columns" label="Állampolgárság" field="${field}_allampolgarsag" />
+               <text class="four columns" label="Szem. ig./Útlevél szám" field="${field}_azonosito_irat" />
+       </div>
+       <address class="row" label="Lakcím" field="${field}_cim" validators="nonempty,address" />
+       <div class="row">
+               <text class="six columns" label="Születési hely" field="${field}_szuletesi_hely" validators="nonempty" />
+               <date class="two columns" label="Születés dátuma" field="${field}_szuletes_datuma" validators="nonempty"/>
+               <text class="four columns" label="Anyja neve" field="${field}_anyja_neve" validators="nonempty"/>
+       </div>
+       <div class="row no-print" if="${empty param.token or nocontacts}">
+               <text class="six columns" label="Telefonszám" field="${field}_telefon" validators="phone" />
+               <text class="six columns" label="E-mail" field="${field}_email" validators="email" />
+       </div>
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/publicplace.zul b/lis-ui/src/main/resources/web/fields/publicplace.zul
new file mode 100644 (file)
index 0000000..3d10762
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul"/>
+       </div>  
+       <div class="row field-top">
+               <combobox class="field-textbox" autodrop="true" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" 
+                       disabled="@load(vm.formDocument['ro'] || ro)" onChange="@command('submit') @global-command('autosave', source=self)" />
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/radio.zul b/lis-ui/src/main/resources/web/fields/radio.zul
new file mode 100644 (file)
index 0000000..86cd3ac
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="field" xmlns:w="client" w:onClick="console.log('field : ${field}')">
+       <div class="@load(vm.getFieldStyle(field, 'field-label'))">
+               <radio id="r" label="${label}" value="${value}" onCheck="@command('onRadioCheck', target=self) @global-command('autosave', source=self)" 
+                       checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+                       disabled="@load(vm.formDocument['ro'] || ro)" />
+       </div>
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/radiodate.zul b/lis-ui/src/main/resources/web/fields/radiodate.zul
new file mode 100644 (file)
index 0000000..45d57be
--- /dev/null
@@ -0,0 +1,15 @@
+<div class="field">
+       <div class="@load(vm.getFieldStyle(field, 'field-label'))">
+               <radio id="r" label="${label}" value="${value}" onCheck="@command('onRadioCheck', target=self) @global-command('autosave', source=self)" 
+                       checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+                       disabled="@load(vm.formDocument['ro'] || ro)">
+                       <custom-attributes dataField="${dataField}" checkData="true"/>
+               </radio>
+               <datebox value="@bind(vm.formDocument[dataField])" format="yyyy.MM.dd" disabled="@load(vm.formDocument['ro'] || arg.readonly)">
+                       <!-- 
+                       onChange="@command('onForceRadioCheck', target=r, force=true)"
+                        -->
+                       <custom-attributes field="${dataField}"/>
+               </datebox>              
+       </div>
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/radiodouble.zul b/lis-ui/src/main/resources/web/fields/radiodouble.zul
new file mode 100644 (file)
index 0000000..f81fe75
--- /dev/null
@@ -0,0 +1,15 @@
+<div class="field">
+       <div class="@load(vm.getFieldStyle(field, 'field-label'))">
+               <radio id="r" label="${label}" value="${value}" 
+                       onCheck="@command('onRadioCheck', target=self) @global-command('autosave', source=self)" 
+                       checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+                       disabled="@load(vm.formDocument['ro'] || ro)" >
+                       <custom-attributes dataField="${dataField}" checkData="true"/>
+               </radio>
+               <doublebox class="radio-intbox" value="@bind(vm.formDocument[dataField])" format="#,##0.##" 
+                       disabled="@load(vm.formDocument['ro'] || arg.readonly)" onBlur="@command('submit')">
+                       <custom-attributes field="${dataField}"/>
+               </doublebox>
+               ${postfix}
+       </div>
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/radiogroup.zul b/lis-ui/src/main/resources/web/fields/radiogroup.zul
new file mode 100644 (file)
index 0000000..c69a743
--- /dev/null
@@ -0,0 +1,13 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul" />
+       </div>  
+       <div class="row field-textbox field-top">
+               <radio label="${each}" forEach="${arg.values}" value="'${forEachStatus.index + 1}'" 
+                       checked="@bind(vm.formDocument[field]) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+                       onCheck="@command('onRadioCheck', target=self) @global-command('autosave', source=self)"
+                       disabled="@load(vm.formDocument['ro'] || ro)" />
+               <textbox class="inline-textbox" value="@load(vm.formDocument[dataField]) @save(vm.formDocument[dataField], before='submit') @validator(vm.formValidator, parameters=validatorargs)" 
+                       disabled="@load(vm.formDocument['ro'] || ro)" onChange="@command('submit')" />
+       </div>  
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/radionumber.zul b/lis-ui/src/main/resources/web/fields/radionumber.zul
new file mode 100644 (file)
index 0000000..bae947a
--- /dev/null
@@ -0,0 +1,15 @@
+<div class="field">
+       <div class="@load(vm.getFieldStyle(field, 'field-label'))">
+               <radio id="r" label="${label}" value="${value}" 
+                       onCheck="@command('onRadioCheck', target=self) @global-command('autosave', source=self)" 
+                       checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+                       disabled="@load(vm.formDocument['ro'] || ro)">
+                       <custom-attributes dataField="${dataField}" checkData="true"/>
+               </radio>
+               <intbox class="radio-intbox" value="@bind(vm.formDocument[dataField])" format=",###" 
+                       disabled="@load(vm.formDocument['ro'] || arg.readonly)" onBlur="@command('submit')"> 
+                       <custom-attributes field="${dataField}"/>
+               </intbox>
+               ${postfix}
+       </div>
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/rate.zul b/lis-ui/src/main/resources/web/fields/rate.zul
new file mode 100644 (file)
index 0000000..5cd257b
--- /dev/null
@@ -0,0 +1,13 @@
+<div class="field"> 
+       <div class="row field-top">
+               <include src="/fields/field-label.zul" />
+       </div>  
+       <div class="row field-top">
+               <doublebox class="ten columns field-textbox" format="#,##0.##" disabled="@load(vm.formDocument['ro'] || ro)"
+                       value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" onChange="@command('submit') @global-command('autosave', source=self)" />
+               <combobox id="combo" class="two columns field-textbox" readonly="true" autodrop="true" selectedItem="@bind(vm.formDocument[unitField])" disabled="@load(vm.formDocument['ro'] || ro)"
+                       onChange="@command('submit')" >
+                   <comboitem label="${each}" value="${each}" forEach="Ft, %" />
+               </combobox>             
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/settlement.zul b/lis-ui/src/main/resources/web/fields/settlement.zul
new file mode 100644 (file)
index 0000000..439db79
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul" />
+       </div>  
+       <div class="row">
+               <textbox class="field-textbox" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator, parameters=validatorargs)" 
+                       disabled="@load(vm.formDocument['ro'] || ro)" onChange="@command('submit') @global-command('autosave', source=self)" />
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/signature.zul b/lis-ui/src/main/resources/web/fields/signature.zul
new file mode 100644 (file)
index 0000000..733455d
--- /dev/null
@@ -0,0 +1,10 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul" />
+       </div>  
+       <div class="row field-textbox" style="background: white">
+               <button class="@load(vm.getFieldStyle(dataField, 'field-label no-print'))" label="Aláírás" onClick="@command('showSignDialog', field=field)" disabled="@load(vm.formDocument['ro'] || ro)" />
+               <image style="min-height:30px; max-height:30px; margin: 2px;" src="@bind(vm.formDocument[field])" />
+               <textbox value="@load(vm.formDocument[dataField]) @save(vm.formDocument[dataField], before='submit') @validator(vm.formValidator, force=true)" visible="false" />
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/stamp.zul b/lis-ui/src/main/resources/web/fields/stamp.zul
new file mode 100644 (file)
index 0000000..59f23fb
--- /dev/null
@@ -0,0 +1,8 @@
+<div class="row">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul"/>
+       </div>  
+       <div class="row field-textbox" style="text-align: center;">
+               <image class="logo-image" width="100%"  src="/img/pecset.jpg" />
+       </div>                          
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/fields/text.zul b/lis-ui/src/main/resources/web/fields/text.zul
new file mode 100644 (file)
index 0000000..78077f6
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="field">
+       <div class="row field-top" if="${!noheader}">
+               <include src="~./fields/field-label.zul" />
+       </div>  
+       <div class="row field-top">
+               <textbox class="field-textbox" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator, parameters=$validatorargs)" 
+                       disabled="@load(vm.canEdit || ro)" onChange="@command('submit') @global-command('autosave', source=self)" />
+       </div>  
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/textarea.zul b/lis-ui/src/main/resources/web/fields/textarea.zul
new file mode 100644 (file)
index 0000000..5ccf52c
--- /dev/null
@@ -0,0 +1,4 @@
+<div class="field">
+       <textbox style="background: white" class="field-textbox" value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" 
+               multiline="true" inplace="true" rows="5" cols="42" disabled="@load(vm.formDocument['ro'] || ro)" onChange="@command('submit') @global-command('autosave', source=self)" />
+</div> 
diff --git a/lis-ui/src/main/resources/web/fields/title-deed-content.zul b/lis-ui/src/main/resources/web/fields/title-deed-content.zul
new file mode 100644 (file)
index 0000000..1c07c14
--- /dev/null
@@ -0,0 +1,11 @@
+<div xmlns:w="client" w:onClick='console.log("field : ${field}")'>
+       Megbízó
+       <radio class="@load(vm.getFieldStyle(field, 'inline-radio'))" value="1" onCheck="@command('onRadioCheck', target=self)" 
+               checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+               disabled="@load(vm.formDocument['ro'] || ro)" />
+       átad egy 60 napnál nem régebbi tulajdoni lapot, vagy
+       <radio class="@load(vm.getFieldStyle(field, 'inline-radio'))" value="2" onCheck="@command('onRadioCheck', target=self)" 
+               checked="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator) @converter('hu.bitcity.converter.RadioCheckConverter')" 
+               disabled="@load(vm.formDocument['ro'] || ro)" />
+       megbízza a Home Service képviselőjét, hogy szerezzen be egy tulajdoni lapot.
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/title-deed.zul b/lis-ui/src/main/resources/web/fields/title-deed.zul
new file mode 100644 (file)
index 0000000..072eb3f
--- /dev/null
@@ -0,0 +1,5 @@
+<?component name="field" class="hu.bitcity.form.field.Field" ?>
+<div class="row">
+       <field class="twelve columms agreement" src="/fields/title-deed-content.zul" visible="@load(not vm.formDocument[errorField])" field="${field}" />
+       <field class="twelve columms agreement error" src="/fields/title-deed-content.zul" visible="@load(vm.formDocument[errorField])" field="${field}" />
+</div>
diff --git a/lis-ui/src/main/resources/web/fields/zipcode.zul b/lis-ui/src/main/resources/web/fields/zipcode.zul
new file mode 100644 (file)
index 0000000..d357e88
--- /dev/null
@@ -0,0 +1,11 @@
+<div class="field">
+       <div class="row field-top">
+               <include src="/fields/field-label.zul"/>
+       </div>  
+       <div class="row field-top">
+               <intbox class="field-textbox" disabled="@load(vm.formDocument['ro'] || ro)"  
+                       value="@load(vm.formDocument[field]) @save(vm.formDocument[field], before='submit') @validator(vm.formValidator)" 
+                       onChange="@command('decorateSettlementFields', source=self) @global-command('autosave', source=self)" format="####">
+               </intbox>
+       </div>  
+</div>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/index.zul b/lis-ui/src/main/resources/web/index.zul
new file mode 100644 (file)
index 0000000..d0a273f
--- /dev/null
@@ -0,0 +1,73 @@
+<?link rel="stylesheet" type="text/css" href="~./static/css/skeleton.css" ?>
+<zk xmlns:c="client">
+    <div viewModel="@id('vm') @init('hu.user.lis.ui.view.Index')"
+         style="height: 100%;width: 100%; display: flex; justify-content: center;">
+        <window title="@load(vm.buildProperties.version)" border="true"
+                style="height: 50%; width: 50%; position: relative; position: absolute; top: 50%; transform: translate(0, -50%);">
+            <vlayout>
+                <hlayout>
+                    <bandbox id="bd" autodrop="true" iconSclass="z-icon-sort-down"
+                             value="@load(vm.selectedSupplier) @converter('hu.user.lis.ui.converter.SupplierToNameConverter')"
+                             onChanging="@command('onBandChanging')" onOpen="@command('onBandOpen')">
+                        <attribute c:name="_doKeyDown">
+                            <![CDATA[
+                            function (evt) {
+                                var keyCode = evt.keyCode;
+                                console.log(keyCode);
+                                if (keyCode == 13){
+                                    zk.$("$bd").close();
+                                    zk.$("$bd").focus();
+                                    return;
+                                }
+                                if (keyCode == 40){
+                                    if (!zk.$("$bd").isOpen()) {
+                                        zk.$("$bd").open();
+                                        zAu.send(new zk.Event(zk.Widget.$('$bd'), "onOpen", {'open': true}, {toServer:true}));
+                                    }
+                                    zk.$("$bd-list").focus();
+                                    return;
+                                }
+                                if (keyCode == 27){
+                                    zk.$("$bd").close()
+                                    zk.$("$bd").focus();
+                                    return;
+                                }
+                            }
+                        ]]>
+                        </attribute>
+                        <bandpopup>
+                            <listbox id="bd-list" height="250px" width="450px"
+                                     model="@bind(vm.suppliersSimpleDataModel)"
+                                     selectedItem="@bind(vm.selectedSupplier)"
+                                     onClick="bd.close()"
+                                     onDoubleClick="bd.close()">
+                                <listhead visible="false">
+                                    <listheader label="id" vflex="min"/>
+                                    <listheader label="name" vflex="max"/>
+                                    <listheader label="zip" vflex="min"/>
+                                </listhead>
+                                <template name="model">
+                                    <listitem>
+                                        <listcell label="@load(each.id)"/>
+                                        <listcell label="@load(each.name)"/>
+                                        <listcell label="@load(each.zipCode)"/>
+                                    </listitem>
+                                </template>
+                            </listbox>
+                        </bandpopup>
+                    </bandbox>
+                    <button iconSclass="z-icon-search-plus" onClick="@command('onPopupSuppliers')"/>
+                </hlayout>
+
+                <hlayout>
+                    <label value="Kiválasztott azonosító: "/>
+                    <label value="@load(vm.selectedSupplierId)"/>
+                </hlayout>
+            </vlayout>
+        </window>
+        <!--        <combobox sclass="ten columns" model="@bind(m.supplierListModel)" selectedItem="@bind(m.selectedSupplier)"-->
+        <!--        autodrop="true" buttonVisible="true">-->
+        <!--        </combobox>-->
+
+    </div>
+</zk>
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/static/css/skeleton.css b/lis-ui/src/main/resources/web/static/css/skeleton.css
new file mode 100644 (file)
index 0000000..cac7b35
--- /dev/null
@@ -0,0 +1,168 @@
+/* Grid
+–––––––––––––––––––––––––––––––––––––––––––––––––– */
+.container {
+  position: relative;
+  width: 100%;
+  max-width: 960px;
+  margin: 0 auto;
+  padding: 0 20px;
+  box-sizing: border-box; }
+.column,
+.columns {
+  width: 100%;
+  float: left;
+  box-sizing: border-box; }
+
+/* For devices larger than 400px */
+@media (min-width: 400px) {
+  .container {
+    width: 85%;
+    padding: 0; }
+}
+
+/* For devices larger than 550px */
+@media (min-width: 550px) {
+  .container {
+    width: 80%; 
+  }
+  .column,
+  .columns {
+    margin-left: 0; 
+    padding-top: 5px;
+    padding-bottom: 5px;
+    padding-left: 10px;
+/*
+    padding-right: 10px;
+*/    
+  }
+  .column:first-child,
+  .columns:first-child {
+    margin-left: 0; 
+    padding-left: 0;
+  }
+  .column:last-child,
+  .columns:last-child {
+    float: right; }
+/*
+  .one.column,
+  .one.columns                    { width: 7.875%; }
+  .two.columns                    { width: 16.25%; }
+  .three.columns                  { width: 24.625%; }
+  .four.columns                   { width: 33%; }
+
+  .five.columns                   { width: 41.375%; }
+  .six.columns                    { width: 49.75%; }
+  .seven.columns                  { width: 58.125%; }
+  .eight.columns                  { width: 66.5%; }
+  .nine.columns                   { width: 74.875%; }
+  .ten.columns                    { width: 83.25%; }
+  .eleven.columns                 { width: 91.625%; }
+  .twelve.columns                 { width: 100%; margin-left: 0; }
+*/
+  .one.column,
+  .one.columns                    { width: 8.3333333334%; }
+  .two.columns                    { width: 16.6666666667%; }
+  .three.columns                  { width: 25%; }
+  .four.columns                   { width: 33.3333333334%; }
+  .five.columns                   { width: 41.6666666667%; }
+  .six.columns                    { width: 50%; }
+  .seven.columns                  { width: 58.3333333334%; }
+  .eight.columns                  { width: 66.6666666667%; }
+  .nine.columns                   { width: 75%; }
+  .ten.columns                    { width: 83.3333333334%; }
+  .eleven.columns                 { width: 91.66666666667%; }
+  .twelve.columns                 { width: 100%; margin-left: 0; }
+  .per-five.columns               { width: 20%; }
+
+
+}
+
+/*
+@media only screen and (min-width: 550px) {
+  .column:first-child,
+  .columns:first-child {
+    float: right; }
+}
+
+@media only print and (min-width: 550px) {
+  .two.columns:last-child                { background: red; width: 17%;}
+  .three.columns:last-child              { background: red; width: 24.9%;}
+  .four.columns:last-child               { background: red; width: 33.4%;}
+}
+*/
+
+
+/* Utilities
+–––––––––––––––––––––––––––––––––––––––––––––––––– */
+.u-vertical-container {
+       display: table;
+       padding: 10px;  
+}
+.u-fill {
+  display: table-row;
+  height: 100%;
+  max-height: 100%;
+  width: 100%;
+}
+.u-full-width {
+  width: 100%;
+  box-sizing: border-box;
+}
+.u-max-full-width {
+  max-width: 100%;
+  box-sizing: border-box; 
+}
+.u-full-height {
+  height: 100%;
+}
+.u-max-full-height {
+  max-height: 100%;
+}
+.u-form-width {
+  width: 94%;
+  box-sizing: border-box; }
+.u-max-form-width {
+  max-width: 94%;
+  box-sizing: border-box; }
+.u-pull-right {
+  float: right; }
+.u-pull-left {
+  float: left; }
+
+
+/* Clearing
+–––––––––––––––––––––––––––––––––––––––––––––––––– */
+
+/* Self Clearing Goodness */
+.container:after,
+.row:after,
+.u-cf {
+  content: "";
+  display: table;
+  clear: both; }
+
+
+/* Media Queries
+–––––––––––––––––––––––––––––––––––––––––––––––––– */
+/*
+Note: The best way to structure the use of media queries is to create the queries
+near the relevant code. For example, if you wanted to change the styles for buttons
+on small devices, paste the mobile query code up in the buttons section and style it
+there.
+*/
+
+
+/* Larger than mobile */
+@media (min-width: 400px) {}
+
+/* Larger than phablet (also point when grid becomes active) */
+@media (min-width: 550px) {}
+
+/* Larger than tablet */
+@media (min-width: 750px) {}
+
+/* Larger than desktop */
+@media (min-width: 1000px) {}
+
+/* Larger than Desktop HD */
+@media (min-width: 1200px) {}
diff --git a/lis-ui/src/main/resources/web/static/css/webclient.css b/lis-ui/src/main/resources/web/static/css/webclient.css
new file mode 100644 (file)
index 0000000..15292f5
--- /dev/null
@@ -0,0 +1,445 @@
+.z-loading {
+       left: 45% !important; 
+/*
+       top: 50% !important; 
+       align: center; 
+       font-size: 18px;
+    font-weight: bold;
+       padding: 5px;
+*/
+}
+
+.container .form-label {
+       font-family: "Calibri";
+       line-height: 1.5em;
+}
+
+.container .bold {
+       font-weight: bold;
+}
+
+.row .field-textbox {
+       font-size: 12px;
+       padding: 0px; 
+       padding-left: 5px; 
+       line-height: 1.5em;
+       height: auto;
+       width: 100%;
+       border-radius: 0px;
+       -moz-border-radius: 0px; 
+       -webkit-border-radius: 0px;                     
+       border: none;
+}
+
+.field-top {
+       background: white;
+}
+
+.container .separator {
+       height: 20px;
+       min-height: 20px;
+}
+
+.field {
+       padding-left: 1px;
+       padding-bottom: 1px;
+       background: black;
+}
+
+.agreement-field {
+       border-left: 1px solid black;
+       border-bottom: 1px solid black;
+       padding: 10px 0px 10px 10px;
+}
+
+.stamp-field {
+       border-left: 1px solid black;
+       border-bottom: 1px solid black;
+       padding: 10px 0px 10px 10px;
+       height: 124px;
+}
+
+.row .center {
+       text-align: center;     
+}
+
+.row .field-label {
+       font-weight: normal;
+       /*
+       background-image: url('../img/label.png');  
+       background-repeat: no-repeat; 
+       background-position: right top;*/
+       padding-right: 5px;    
+       background-color: #CCCCCC;
+       border: none;
+    /*margin: 4px 0px 0px 0px;trbl*/ 
+    padding-left: 5px;
+    padding-top: 1px;
+    padding-bottom: 1px;
+       /*line-height: 1em;
+       text-overflow: ellipsis;
+    overflow: hidden;*/
+    white-space: nowrap;       
+}
+.row .field-label .error {
+    background: #ffbcaf;
+       border: 1px solid #ffbcaf;
+}
+.row .error {
+    background-color: #ffbcaf;
+/*
+       background-image: url('../img/label-error.png');  
+       background-repeat: no-repeat; 
+       background-position: right top; 
+*/
+}
+/*
+.row .field-label * {
+       margin: 0px;
+    /*overflow: hidden; inline date problem*/
+}
+*/
+.row .field-vlayout {
+       line-height: 1em;
+}
+
+.container .group-label {
+       display: block;
+       font-weight: bold;
+       font-size: 12px;
+}
+
+.container .buttongroup {
+       border-top: 1px solid #676767;
+       border-bottom: 1px solid #676767;
+       margin-top: 20px;
+       margin-bottom: 20px;
+       padding-top: 10px;
+       padding-bottom: 10px;
+       text-align: right;
+}
+
+.container .thinbuttongroup {
+/*
+       border-top: 1px solid #676767;
+       border-bottom: 1px solid #676767;
+*/
+       margin-top: 5px;
+       margin-bottom: 5px;
+       padding-top: 5px;
+       padding-bottom: 5px;
+       text-align: right;
+}
+
+.z-checkbox-content {
+       margin-bottom: 0px;
+}
+
+.row .z-datebox {
+       height: auto;
+       display: inline-block;
+}
+
+.row .radio-intbox {
+       height: auto;
+       display: initial;
+       padding: 0px; 
+       line-height: 1em;
+       border-radius: 0;
+       webkit-border-radius: 0px;
+}
+
+.row .z-datebox-input {
+       padding: 0px;
+       height: auto;
+       border: none;
+}
+
+.row .z-datebox-button {
+       padding: 0px;
+       padding-top: 0px;
+       height: auto;
+       min-height: initial;
+}
+
+.row textarea.z-textbox {
+       overflow: hidden; 
+       overflow-wrap: break-word; 
+       resize: none;   
+}
+
+.hidden {
+       display: none;
+}
+/*
+.bigfont {
+       font-size: 14px;
+}
+.bigfont * {
+       font-size: 14px;
+}
+.biggerfont {
+       font-size: 16px;
+}
+*/
+
+input[type="radio"] {
+       font-family: ZK85Icons,FontAwesome;
+}
+
+input[type="radio"]:focus {
+       outline: none;
+}
+input[type="radio"]:hover {
+       border-color: black
+}
+
+input[type="radio"]:checked {
+       border-color: black
+}
+
+input[type="radio"][disabled] {
+       border-color: black;
+       cursor: not-allowed;
+}
+
+input[type="radio"][disabled]:checked:before {
+       border-color: black;
+       background: black;      
+}
+
+
+input[type="radio"][disabled]:checked {
+       border-color: black;
+}
+
+input[type="radio"][disabled]:checked:hover {
+       border-color: black;
+}
+
+.field-textbox[disabled] {
+       background: white !important;
+       color: black !important;
+       cursor: not-allowed !important;
+}
+
+input[type="radio"]:checked:before {
+    content: "\f00c";
+       color: white;
+}
+
+input[type="checkbox"]:focus {
+       outline: none;
+}
+
+input[type="radio"] {
+       width: 14px;
+       height: 14px;
+       margin: 0px 4px 2px 8px;
+       border-radius: 0px;
+       border: 1px solid black;
+}
+
+input[type="radio"]:before {
+/*
+       width: 12px;
+       height: 12px;
+       margin-right: 20px;*/
+       border-radius: 0px;
+}
+
+input[type="radio"]:checked:before {
+       background-color: black;        
+}
+
+input[type="checkbox"] {
+       font-size: inherit;
+       width: 14px;
+       height: 14px;
+       border: 1px solid black;
+       border-radius: 0px;
+       margin: 2px 4px 2px 8px;
+}
+
+input[type="checkbox"]:checked {
+       background-color: black;
+}
+
+input[type="checkbox"]:hover {
+       border-color: black;
+}
+
+.row .agreement {
+       padding: 0px 0px 0px 0px;
+       line-height: 1em;
+       border: none;
+       margin: 2px 0px 0px 0px;
+}
+
+.row .agreement span {
+       font-family: "Calibri";
+    font-weight: normal;
+       line-height: 1em;
+       margin: 0px;
+}
+
+.agreement-small {
+       padding: 0px 0px 0px 0px;
+       line-height: 1em;
+       border: none;
+       margin: 2px 0px 0px 20px;
+}
+
+.row .agreement-small span {
+       font-family: "Calibri";
+    font-weight: normal;
+       line-height: 1em;
+       margin: 0px;
+}
+
+.row .agreement p {
+       margin: 10px 0px 10px 10px;
+}
+
+.row .md-content {
+       padding: 0px 0px 0px 0px;
+       line-height: 1em;
+       margin: 20px;
+}
+
+.row .md-content span {
+       font-family: "Calibri";
+    font-weight: normal;
+       font-size: 14px;
+       line-height: 1.5em;
+       margin: 0px;
+}
+
+.row .md-content p {
+       margin: 10px 0px 10px 10px;
+}
+
+.row .inline-textbox {
+       background: transparent;
+       height: auto;
+       margin: 0px;
+       padding: 0px;
+       border: none;
+       border-bottom: 1px dotted;
+       border-radius: 0;
+       webkit-border-radius: 0px;
+}
+
+
+.inline-intbox {
+    font-family: "Calibri";
+    font-weight: bolder;
+       font-size: 12px;
+       padding: 0px;
+       line-height: 1em;
+       height: auto;
+       border: none;
+       border-bottom: 1px dotted;
+       border-radius: 0;
+       webkit-border-radius: 0px;
+}
+/*
+.inline-radio {
+       width: 20px; 
+       height: 20px;
+}
+*/
+.inline {
+       display: inline;
+}
+
+.row .z-combobox {
+       display: inline-block;
+       height: auto;
+       white-space: nowrap
+}
+
+.row .z-datebox-input {
+       color: rgba(0, 0, 0, 0.9);
+       height: auto;
+       border: none;
+       margin: 0px;
+       padding: 0px;
+       line-height: 1em;
+       background: white;
+       width: 100%;
+       -webkit-border-radius: 0px;
+       -moz-border-radius: 0px;
+       -o-border-radius: 0px;
+       -ms-border-radius: 0px;
+       border-radius: 0px;
+}
+
+.row .z-combobox-input {
+       color: rgba(0, 0, 0, 0.9);
+       height: auto;
+       border: none;
+       margin: 0px;
+       padding: 0px;
+       line-height: 1em;
+       background: transparent;
+       width: 100%;
+       -webkit-border-radius: 0px;
+       -moz-border-radius: 0px;
+       -o-border-radius: 0px;
+       -ms-border-radius: 0px;
+       border-radius: 0px;
+}
+
+.row .z-combobox-button,
+.row .z-datebox-button {
+       font-size: 1em;
+       color: rgba(0, 0, 0, 0.9);
+       display: inline-block;
+       min-width: 0px;
+       min-height: 0px;
+       height: auto;
+       -webkit-border-radius: 0 5px 5px 0;
+       -moz-border-radius: 0 5px 5px 0;
+       -o-border-radius: 0 5px 5px 0;
+       -ms-border-radius: 0 5px 5px 0;
+       border-radius: 0 5px 5px 0;
+       border: none;
+       border-left: 1px solid black;
+       position: relative;
+       left: -18px;
+       padding: 0px;
+       line-height: 1em;
+       background: #fff;
+       text-align: center;
+       vertical-align: middle;
+       cursor: pointer;
+       background: white;
+       overflow: hidden; 
+/*     display: inline-block;*/
+}
+
+
+.hairline {
+  height: 2px; 
+  width: 100%;
+  background-color: black;
+}
+
+.a4page-content {
+       min-height: 1010px;
+       /* az alábbiakat kivenni releaskor!
+       max-height: 1010px;
+       height: 1010px;
+       */
+}
+
+.a4page {
+       border: 1px solid #676767;
+       margin: 40px;
+       -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
+       -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
+       box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
+}
+
+
diff --git a/lis-ui/src/main/resources/web/static/print.min.css b/lis-ui/src/main/resources/web/static/print.min.css
new file mode 100644 (file)
index 0000000..78412d7
--- /dev/null
@@ -0,0 +1 @@
+.printModal{font-family:sans-serif;display:flex;text-align:center;font-weight:300;font-size:30px;left:0;top:0;position:absolute;color:#0460b5;width:100%;height:100%;background-color:hsla(0,0%,100%,.91)}.printClose{position:absolute;right:10px;top:10px}.printClose:before{content:"\00D7";font-family:Helvetica Neue,sans-serif;font-weight:100;line-height:1px;padding-top:.5em;display:block;font-size:2em;text-indent:1px;overflow:hidden;height:1.25em;width:1.25em;text-align:center;cursor:pointer}
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/static/print.min.js b/lis-ui/src/main/resources/web/static/print.min.js
new file mode 100644 (file)
index 0000000..91be90e
--- /dev/null
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.printJS=t():e.printJS=t()}(window,function(){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=4)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(2),i=(r=o)&&r.__esModule?r:{default:r},a=n(1);var l={send:function(r,e){document.getElementsByTagName("body")[0].appendChild(e);var o=document.getElementById(r.frameId);o.onload=function(){if("pdf"!==r.type){var e=o.contentWindow||o.contentDocument;if(e.document&&(e=e.document),e.body.appendChild(r.printableElement),"pdf"!==r.type&&r.style){var t=document.createElement("style");t.innerHTML=r.style,e.head.appendChild(t)}var n=e.getElementsByTagName("img");0<n.length?function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;l.src&&l.src!==window.location.href&&t.push(u(l))}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return Promise.all(t)}(n).then(function(){return d(o,r)}):d(o,r)}else d(o,r)}}};function d(t,n){try{if(t.focus(),i.default.isEdge()||i.default.isIE())try{t.contentWindow.document.execCommand("print",!1,null)}catch(e){t.contentWindow.print()}else t.contentWindow.print()}catch(e){n.onError(e)}finally{(0,a.cleanUp)(n)}}function u(n){return new Promise(function(t){!function e(){n&&void 0!==n.naturalWidth&&0!==n.naturalWidth&&n.complete?t():setTimeout(e,500)}()})}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.addWrapper=function(e,t){return'<div style="font-family:'+t.font+" !important; font-size: "+t.font_size+' !important; width:100%;">'+e+"</div>"},t.capitalizePrint=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.collectStyles=function(e,t){var n=document.defaultView||window,r="",o=n.getComputedStyle(e,"");return Object.keys(o).map(function(e){(-1!==t.targetStyles.indexOf("*")||-1!==t.targetStyle.indexOf(o[e])||function(e,t){for(var n=0;n<e.length;n++)if("object"===(void 0===t?"undefined":i(t))&&-1!==t.indexOf(e[n]))return!0;return!1}(t.targetStyles,o[e]))&&o.getPropertyValue(o[e])&&(r+=o[e]+":"+o.getPropertyValue(o[e])+";")}),r+="max-width: "+t.maxWidth+"px !important;"+t.font_size+" !important;"},t.addHeader=function(e,t){var n=document.createElement("div");if(l(t.header))n.innerHTML=t.header;else{var r=document.createElement("h1"),o=document.createTextNode(t.header);r.appendChild(o),r.setAttribute("style",t.headerStyle),n.appendChild(r)}e.insertBefore(n,e.childNodes[0])},t.cleanUp=function(t){t.showModal&&r.default.close();t.onLoadingEnd&&t.onLoadingEnd();(t.showModal||t.onLoadingStart)&&window.URL.revokeObjectURL(t.printable);if(t.onPrintDialogClose){var n="mouseover";(o.default.isChrome()||o.default.isFirefox())&&(n="focus");window.addEventListener(n,function e(){window.removeEventListener(n,e),t.onPrintDialogClose()})}},t.isRawHTML=l;var r=a(n(3)),o=a(n(2));function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>").test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={isFirefox:function(){return"undefined"!=typeof InstallTrigger},isIE:function(){return-1!==navigator.userAgent.indexOf("MSIE")||!!document.documentMode},isEdge:function(){return!r.isIE()&&!!window.StyleMedia},isChrome:function(){return!!(0<arguments.length&&void 0!==arguments[0]?arguments[0]:window).chrome},isSafari:function(){return 0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")||-1!==navigator.userAgent.toLowerCase().indexOf("safari")},isIOSChrome:function(){return-1!==navigator.userAgent.toLowerCase().indexOf("crios")}};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={show:function(e){var t=document.createElement("div");t.setAttribute("style","font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;"),t.setAttribute("id","printJS-Modal");var n=document.createElement("div");n.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),n.appendChild(r);var o=document.createElement("span");o.setAttribute("class","printSpinner"),n.appendChild(o);var i=document.createTextNode(e.modalMessage);n.appendChild(i),t.appendChild(n),document.getElementsByTagName("body")[0].appendChild(t),document.getElementById("printClose").addEventListener("click",function(){a.close()})},close:function(){var e=document.getElementById("printJS-Modal");e.parentNode.removeChild(e)}};t.default=a},function(e,t,n){e.exports=n(5)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(6);var r,o=n(7);var i=((r=o)&&r.__esModule?r:{default:r}).default.init;"undefined"!=typeof window&&(window.printJS=i),t.default=i},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(n(2)),l=r(n(3)),d=r(n(8)),u=r(n(9)),c=r(n(10)),f=r(n(11)),s=r(n(12));function r(e){return e&&e.__esModule?e:{default:e}}var p=["pdf","html","image","json","raw-html"];t.default={init:function(){var t={printable:null,fallbackPrintable:null,type:"pdf",header:null,headerStyle:"font-weight: 300;",maxWidth:800,font:"TimesNewRoman",font_size:"12pt",honorMarginPadding:!0,honorColor:!1,properties:null,gridHeaderStyle:"font-weight: bold; padding: 5px; border: 1px solid #dddddd;",gridStyle:"border: 1px solid lightgray; margin-bottom: -1px;",showModal:!1,onError:function(e){throw e},onLoadingStart:null,onLoadingEnd:null,onPrintDialogClose:null,onPdfOpen:null,onBrowserIncompatible:function(){return!0},modalMessage:"Retrieving Document...",frameId:"printJS",printableElement:null,documentTitle:"Document",targetStyle:["clear","display","width","min-width","height","min-height","max-height"],targetStyles:["border","box","break","text-decoration"],ignoreElements:[],imageStyle:"max-width: 100%;",repeatTableHeader:!0,css:null,style:null,scanStyles:!0,base64:!1},e=arguments[0];if(void 0===e)throw new Error("printJS expects at least 1 attribute.");switch(void 0===e?"undefined":i(e)){case"string":t.printable=encodeURI(e),t.fallbackPrintable=t.printable,t.type=arguments[1]||t.type;break;case"object":for(var n in t.printable=e.printable,t.base64=void 0!==e.base64,t.fallbackPrintable=void 0!==e.fallbackPrintable?e.fallbackPrintable:t.printable,t.fallbackPrintable=t.base64?"data:application/pdf;base64,"+t.fallbackPrintable:t.fallbackPrintable,t)"printable"!==n&&"fallbackPrintable"!==n&&"base64"!==n&&(t[n]=void 0!==e[n]?e[n]:t[n]);break;default:throw new Error('Unexpected argument type! Expected "string" or "object", got '+(void 0===e?"undefined":i(e)))}if(!t.printable)throw new Error("Missing printable information.");if(!t.type||"string"!=typeof t.type||-1===p.indexOf(t.type.toLowerCase()))throw new Error("Invalid print type. Available types are: pdf, html, image and json.");t.showModal&&l.default.show(t),t.onLoadingStart&&t.onLoadingStart();var r=document.getElementById(t.frameId);r&&r.parentNode.removeChild(r);var o=void 0;switch((o=document.createElement("iframe")).setAttribute("style","visibility: hidden; height: 0; width: 0; position: absolute;"),o.setAttribute("id",t.frameId),"pdf"!==t.type&&(o.srcdoc="<html><head><title>"+t.documentTitle+"</title>",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(e){o.srcdoc+='<link rel="stylesheet" href="'+e+'">'})),o.srcdoc+="</head><body></body></html>"),t.type){case"pdf":if(a.default.isFirefox()||a.default.isEdge()||a.default.isIE())try{if(console.info("PrintJS currently doesn't support PDF printing in Firefox, Internet Explorer and Edge."),!0===t.onBrowserIncompatible())window.open(t.fallbackPrintable,"_blank").focus(),t.onPdfOpen&&t.onPdfOpen()}catch(e){t.onError(e)}finally{t.showModal&&l.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else d.default.print(t,o);break;case"image":f.default.print(t,o);break;case"html":u.default.print(t,o);break;case"raw-html":c.default.print(t,o);break;case"json":s.default.print(t,o)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a=n(1);function l(e,t,n){var r=new window.Blob([n],{type:"application/pdf"});r=window.URL.createObjectURL(r),t.setAttribute("src",r),i.default.send(e,t)}t.default={print:function(e,t){if(e.base64){var n=Uint8Array.from(atob(e.printable),function(e){return e.charCodeAt(0)});l(e,t,n)}else{e.printable=/^(blob|http)/i.test(e.printable)?e.printable:window.location.origin+("/"!==e.printable.charAt(0)?"/"+e.printable:e.printable);var r=new window.XMLHttpRequest;r.responseType="arraybuffer",r.addEventListener("load",function(){if(-1===[200,201].indexOf(r.status))return(0,a.cleanUp)(e),void e.onError(r.statusText);l(e,t,r.response)}),r.open("GET",e.printable,!0),r.send()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,f=n(1),o=n(0),i=(r=o)&&r.__esModule?r:{default:r};t.default={print:function(e,t){var n=document.getElementById(e.printable);n?(e.printableElement=function e(t,n){var r=t.cloneNode();var o=!0;var i=!1;var a=void 0;try{for(var l,d=t.childNodes[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var u=l.value;if(-1===n.ignoreElements.indexOf(u.id)){var c=e(u,n);r.appendChild(c)}}}catch(e){i=!0,a=e}finally{try{!o&&d.return&&d.return()}finally{if(i)throw a}}n.scanStyles&&1===t.nodeType&&r.setAttribute("style",(0,f.collectStyles)(t,n));switch(t.tagName){case"SELECT":r.value=t.value;break;case"CANVAS":r.getContext("2d").drawImage(t,0,0)}return r}(n,e),e.header&&(0,f.addHeader)(e.printableElement,e),i.default.send(e,t)):window.console.error("Invalid HTML element id: "+e.printable)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};t.default={print:function(e,t){e.printableElement=document.createElement("div"),e.printableElement.setAttribute("style","width:100%"),e.printableElement.innerHTML=e.printable,i.default.send(e,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(1),i=n(0),a=(r=i)&&r.__esModule?r:{default:r};t.default={print:function(r,e){r.printable.constructor!==Array&&(r.printable=[r.printable]),r.printableElement=document.createElement("div"),r.printable.forEach(function(e){var t=document.createElement("img");t.setAttribute("style",r.imageStyle),t.src=e;var n=document.createElement("div");n.appendChild(t),r.printableElement.appendChild(n)}),r.header&&(0,o.addHeader)(r.printableElement,r),a.default.send(r,e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=n(1),i=n(0),a=(r=i)&&r.__esModule?r:{default:r};t.default={print:function(t,e){if("object"!==o(t.printable))throw new Error("Invalid javascript data object (JSON).");if("boolean"!=typeof t.repeatTableHeader)throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!t.properties||!Array.isArray(t.properties))throw new Error("Invalid properties array for your JSON data.");t.properties=t.properties.map(function(e){return{field:"object"===(void 0===e?"undefined":o(e))?e.field:e,displayName:"object"===(void 0===e?"undefined":o(e))?e.displayName:e,columnSize:"object"===(void 0===e?"undefined":o(e))&&e.columnSize?e.columnSize+";":100/t.properties.length+"%;"}}),t.printableElement=document.createElement("div"),t.header&&(0,c.addHeader)(t.printableElement,t),t.printableElement.innerHTML+=function(e){var t=e.printable,n=e.properties,r='<table style="border-collapse: collapse; width: 100%;">';e.repeatTableHeader&&(r+="<thead>");r+="<tr>";for(var o=0;o<n.length;o++)r+='<th style="width:'+n[o].columnSize+";"+e.gridHeaderStyle+'">'+(0,c.capitalizePrint)(n[o].displayName)+"</th>";r+="</tr>",e.repeatTableHeader&&(r+="</thead>");r+="<tbody>";for(var i=0;i<t.length;i++){r+="<tr>";for(var a=0;a<n.length;a++){var l=t[i],d=n[a].field.split(".");if(1<d.length)for(var u=0;u<d.length;u++)l=l[d[u]];else l=l[n[a].field];r+='<td style="width:'+n[a].columnSize+e.gridStyle+'">'+l+"</td>"}r+="</tr>"}return r+="</tbody></table>"}(t),a.default.send(t,e)}}}]).default});
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/suppliers.zul b/lis-ui/src/main/resources/web/suppliers.zul
new file mode 100644 (file)
index 0000000..b01836e
--- /dev/null
@@ -0,0 +1,83 @@
+<?link rel="stylesheet" type="text/css" href="~./static/css/skeleton.css" ?>
+<?link rel="stylesheet" type="text/css" href="~./static/css/webclient.css" ?>
+<?component name="text" class="hu.user.lis.ui.form.Field$Text" ?>
+<zk xmlns:c="client">
+    <window id="supplierPopup" title="Szállítók" width="80%" height="60%" closable="true"
+            viewModel="@id('vm') @init('hu.user.lis.ui.view.SuppliersViewModel')">
+        <style>
+            .z-listitem-selected>.z-listcell>.z-listcell-content {
+            font-weight: bold,;
+            }
+        </style>
+
+        <borderlayout>
+            <north flex="true">
+                <toolbar>
+                    <label value="Név"/>
+                    <textbox id="partialName" value="@bind(vm.partialName)" onOK="@command('search')">
+                        <attribute c:name="_doKeyDown">
+                            <![CDATA[
+                                    function (evt) {
+                                        var keyCode = evt.keyCode;
+                                        console.log(keyCode);
+                                        Clients.log(keyCode);
+                                        if (keyCode == 13){
+                                            zk.$("$supplierSearchResult").focus();
+                                            zk.$("$partialName").fireEvent('onSearch', {}, {toServer: true});
+                                            return;
+                                        }
+                                    }
+                                ]]>
+                        </attribute>
+                    </textbox>
+                    <label value="Irányítószám"/>
+                    <textbox instant="true" value="@bind(vm.partialZipCode)" onOK="@command('search')"/>
+                    <toolbarbutton label="Keresés" iconSclass="z-icon-search" onClick="@command('search')"/>
+                    <toolbarbutton label="Mind" iconSclass="z-icon-search-plus" onClick="@command('listAll')"/>
+                </toolbar>
+            </north>
+            <center border="none" flex="true">
+                <listbox id="suppliersSearchResult" vflex="true" model="@load(vm.suppliersDataModel)"
+                         onSelect="@command('onListSelection')"
+                         onDoubleClick="@command('onCloseWindow', target=supplierPopup, select=true)">
+                    <listhead>
+                        <listheader label="Név" align="left"/>
+                    </listhead>
+                    <listfoot>
+                        <listfooter>
+                            <hlayout>
+                                <label value="Találatok: "/>
+                                <label value="@load(vm.suppliersDataModel.resultSetCount)"/>
+                            </hlayout>
+                        </listfooter>
+                    </listfoot>
+                    <template name="model">
+                        <listitem>
+                            <listcell label="@load(empty each.name ? each.template : each.name)"/>
+                        </listitem>
+                    </template>
+                </listbox>
+            </center>
+            <east title="Adatlap" size="60%" flex="true" splittable="true" collapsible="true">
+                <div class="container u-form-width u-max-form-width">
+                    <div class="row">
+                        <text class="twelve columns" label="ID" field="id"/>
+                    </div>
+                    <div class="row">
+                        <text class="twelve columns" label="Név" field="name"/>
+                    </div>
+                    <div class="row">
+                        <text class="twelve columns" label="Irányítószám" field="zipCode"/>
+                    </div>
+                </div>
+            </east>
+            <south flex="true" style="text-align: right; padding: 10px">
+                <hlayout>
+                    <button label="Bezár" onClick="@command('onCloseWindow', target=supplierPopup, select=false)"
+                            disabled="@load(vm.selectedSupplier)"/>
+                    <button label="Kiválaszt" onClick="@command('onCloseWindow', target=supplierPopup, select=true)"/>
+                </hlayout>
+            </south>
+        </borderlayout>
+    </window>
+</zk>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..5134574
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>hu.user</groupId>
+    <artifactId>lis</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <modules>
+        <module>lis-services</module>
+        <module>lis-db</module>
+        <module>lis-ui</module>
+        <module>lis-app</module>
+    </modules>
+    <properties>
+        <java.version>1.8</java.version>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <spring.version>2.2.4.RELEASE</spring.version>
+        <springboot.version>2.2.4.RELEASE</springboot.version>
+    </properties>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.4.RELEASE</version>
+        <!-- lookup parent from repository -->
+        <relativePath/>
+    </parent>
+    <repositories>
+    </repositories>
+    <dependencies>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.26</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.19.0</version>
+        </dependency>
+        <!--        <dependency>-->
+        <!--            <groupId>org.springframework</groupId>-->
+        <!--            <artifactId>spring-context</artifactId>-->
+        <!--        </dependency>-->
+        <!--        <dependency>-->
+        <!--            <groupId>org.springframework.boot</groupId>-->
+        <!--            <artifactId>spring-boot-devtools</artifactId>-->
+        <!--            <optional>true</optional>-->
+        <!--        </dependency>-->
+
+    </dependencies>
+</project>