<modelVersion>4.0.0</modelVersion>
<groupId>hu.user</groupId>
<artifactId>lis-app</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
<parent>
<groupId>hu.user</groupId>
<artifactId>lis</artifactId>
package hu.user.lis.db;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.Setter;
+import lombok.*;
@Getter
@Setter
@Builder
@AllArgsConstructor
+@NoArgsConstructor
public class Partner {
String id;
String name;
String vatNr;
String address;
boolean active;
-
- public static class PartnerBuilder {
- private boolean active = true;
- }
}
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
</dependencies>
</project>
package hu.user.lis.services.data;
+import com.fasterxml.jackson.core.JsonProcessingException;
import hu.user.lis.db.Partner;
import java.util.List;
public interface PartnerService {
List<Partner> getAll();
+
+ Partner createNew();
+
+ void add(Partner partner);
+
+ Partner copy(Partner selectedPartner) throws JsonProcessingException;
+
+ void replace(Partner selectedPartner, Partner editPartner);
}
package hu.user.lis.services.data;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.javafaker.Faker;
import hu.user.lis.db.Partner;
import org.apache.commons.lang3.RandomStringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
public class PartnerServiceImpl implements PartnerService {
private List<Partner> partners;
+ @Autowired
+ ObjectMapper mapper;
+
@Override
public List<Partner> getAll() {
if (partners == null) {
return partners;
}
+ @Override
+ public Partner createNew() {
+ String id = RandomStringUtils.random(8, "0123456789abcdef");
+ return Partner.builder().id(id).active(true).build();
+ }
+
+ @Override
+ public void add(Partner partner) {
+ partners.add(partner);
+ }
+
+ @Override
+ public Partner copy(Partner selectedPartner) throws JsonProcessingException {
+ ObjectMapper mapper = new ObjectMapper();
+ String json = mapper.writeValueAsString(selectedPartner);
+ return mapper.readValue(json, Partner.class);
+ }
+
+ @Override
+ public void replace(Partner selectedPartner, Partner editPartner) {
+ Partner partnerInList = partners.stream().filter(p -> p.getId().equals(selectedPartner.getId())).findFirst().get();
+ partners.remove(partnerInList);
+ //partners.remove(selectedPartner);
+ partners.add(editPartner);
+ }
+
private List<Partner> generate() {
List<Partner> result = new ArrayList<>();
Faker faker = new Faker();
String vatNr = RandomStringUtils.random(12, "0123456789");
String address = String.format("%s %s, %s street %s", faker.address().zipCode(), faker.address().city(),
faker.address().streetName(), faker.address().buildingNumber());
- Partner partner = Partner.builder().id(id).name(name).vatNr(vatNr).address(address).build();
+ Partner partner = Partner.builder().active(true).id(id).name(name).vatNr(vatNr).address(address).build();
result.add(partner);
}
return result;
<artifactId>lis-services</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <optional>true</optional>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
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;
log.info("Sort {} {}", sortComparator.getOrderBy(), ascending);
reset();
}
+}
-}
\ No newline at end of file
@Builder
@Log4j2
-public class FormDocument<T> extends JSONObject {
- private T data;
+public class FormDocument extends JSONObject {
+ private Object data;
- public FormDocument setData(T data) {
+ public FormDocument setData(Object data) {
try {
ObjectMapper mapper = new ObjectMapper();
String json = mapper.writeValueAsString(data);
import hu.user.lis.db.Partner;
import hu.user.lis.services.data.PartnerService;
+import lombok.Getter;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
private String partialAddress;
private String partialVatNr;
private boolean listAll;
+
+ @Getter
@Autowired
PartnerService partnerService;
+ private boolean filterShowInActive;
+ private boolean filterShowActive;
private boolean canExecuteSearch() {
- boolean result = listAll ||
+ boolean result = listAll || filterShowActive || filterShowInActive ||
StringUtils.isNotBlank(partialName) ||
StringUtils.isNotBlank(partialVatNr) ||
StringUtils.isNotBlank(partialAddress);
result = false;
}
}
+
+ if (!filterShowActive && partner.isActive()) {
+ result = false;
+ }
+
+ if (!filterShowInActive && !partner.isActive()) {
+ result = false;
+ }
+
return result;
}
List<Partner> result = null;
if (canExecuteSearch()) {
result = partnerService.getAll().stream()
- .sorted(Comparator.comparing(Partner::getName))
.filter(s -> filter(s))
+ .sorted(Comparator.comparing(Partner::getName, String.CASE_INSENSITIVE_ORDER))
.collect(Collectors.toList());
}
return result;
BindUtils.postNotifyChange(null, null, this, "*");
}
+
+ public void search(boolean filterShowActive, boolean filterShowInActive) {
+ log.info("Searching partner using filters: filterShowActive {}, filterShowInActive {}",
+ filterShowActive, filterShowInActive);
+ this.filterShowActive = filterShowActive;
+ this.filterShowInActive = filterShowInActive;
+ listAll = false;
+ super.reset();
+ BindUtils.postNotifyChange(null, null, this, "*");
+ }
+
public void listAll() {
log.info("List all partners");
listAll = true;
+++ /dev/null
-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);
- }
- }
-
-}
+++ /dev/null
-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) {
- }
-}
--- /dev/null
+package hu.user.lis.ui.view;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.zkoss.bind.BindUtils;
+import org.zkoss.bind.annotation.Command;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class AsyncBaseModel {
+ private static final Logger logger = LogManager.getLogger();
+ private List<UITask> uiTasks = new ArrayList<>();
+
+ protected void doKeepAlive() {
+
+ }
+
+ protected void notifyChange(String... names) {
+ List<String> nameList = Arrays.asList(names);
+ nameList.forEach(name -> BindUtils.postNotifyChange(null, null, this, name));
+ }
+
+ protected void registerTask(UITask task) {
+ synchronized (uiTasks) {
+ uiTasks.add(task);
+ }
+ }
+
+ @Command
+ public void uiTick() {
+ // logger.info("{} tick {}", this.getClass().getSimpleName(), System.currentTimeMillis());
+ doKeepAlive();
+ synchronized (uiTasks) {
+ for (UITask task : uiTasks) {
+ task.execute();
+ }
+ uiTasks.clear();
+ }
+ }
+
+}
import lombok.Setter;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.info.BuildProperties;
-import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.VariableResolver;
import org.zkoss.zk.ui.select.annotation.WireVariable;
log.info("Init");
}
- @Command
- public void search() {
-
- }
}
package hu.user.lis.ui.view;
import hu.user.lis.db.Partner;
-import hu.user.lis.ui.data.FormDocument;
-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.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.select.annotation.VariableResolver;
@Setter
@VariableResolver(DelegatingVariableResolver.class)
public class PartnerEditorModel {
- private FormDocument formDocument;
private boolean canEdit;
private Partner selectedPartner;
- @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;
+ selectedPartner = (Partner) Executions.getCurrent().getArg().get("formDocument");
}
@Command
Event closeEvent = new Event("onClose", target, select ? selectedPartner : null);
Events.postEvent(closeEvent);
}
+
}
package hu.user.lis.ui.view;
+import com.fasterxml.jackson.core.JsonProcessingException;
import hu.user.lis.db.Partner;
-import hu.user.lis.ui.data.FormDocument;
import hu.user.lis.ui.data.PartnersDataModel;
-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.Command;
-import org.zkoss.bind.annotation.Init;
-import org.zkoss.bind.annotation.NotifyChange;
+import org.zkoss.bind.annotation.*;
+import org.zkoss.zk.ui.Component;
+import org.zkoss.zk.ui.Executions;
+import org.zkoss.zk.ui.select.Selectors;
import org.zkoss.zk.ui.select.annotation.VariableResolver;
+import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zkplus.spring.DelegatingVariableResolver;
+import org.zkoss.zul.Listbox;
+import org.zkoss.zul.Window;
+import java.util.Collections;
import java.util.Set;
@Log4j2
-@Getter
-@Setter
@VariableResolver(DelegatingVariableResolver.class)
-public class PartnersViewModel {
- private FormDocument formDocument;
- private boolean canEdit;
- private String partialName;
- private String partialVatNr;
- private String partialAddress;
+public class PartnersViewModel extends AsyncBaseModel {
+ @Getter
private Partner selectedPartner;
@WireVariable
+ @Getter
PartnersDataModel partnersDataModel;
- @Autowired
- FormValidator formValidator;
+ private boolean filterShowInActive;
+ private boolean filterShowActive;
+ private boolean filterShowBoth;
+
+ @Wire
+ Listbox partnersList;
+
+ @AfterCompose
+ public void onAfterCompose(@ContextParam(ContextType.VIEW) Component view) {
+ Selectors.wireComponents(view, this, false);
+ Selectors.wireEventListeners(view, this);
+ }
@Init
public void init() {
log.info("Initialized");
- //TODO atnevezni, mert forditva mukodik
- setCanEdit(true);
- partnersDataModel.listAll();
+ setFilterShowActive(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;
+ private void refresh() {
+ if (filterShowBoth) {
+ partnersDataModel.search(true, true);
+ } else {
+ partnersDataModel.search(filterShowActive, filterShowInActive);
+ }
}
@Command
- @NotifyChange("formDocument")
+ @NotifyChange("selectedPartner")
public void search() {
partnersDataModel.clearSelection();
- formDocument = null;
- partnersDataModel.search(partialName, partialVatNr, partialAddress);
+ selectedPartner = null;
+ //partnersDataModel.search(partialName, partialVatNr, partialAddress);
}
@Command
- @NotifyChange("formDocument")
+ @NotifyChange("selectedPartner")
public void onListSelection() {
- formDocument = null;
selectedPartner = null;
Set<Partner> selections = partnersDataModel.getSelection();
if (selections.iterator().hasNext()) {
selectedPartner = selections.iterator().next();
- formDocument = FormDocument.builder().build()
- .setData(selectedPartner);
- log.info("Selected {}", formDocument);
+ log.info("Selected {}", selectedPartner);
}
}
+ @Command
+ public void onAfterRenderPartners() {
+ }
+
@Command
public void onAddNew() {
+ String page = "~./partner.zul";
+ Partner editPartner = partnersDataModel.getPartnerService().createNew();
+ Window partnerWindow = (Window) Executions.createComponents(page, null,
+ Collections.singletonMap("formDocument", editPartner));
+ partnerWindow.addEventListener("onClose", e -> {
+ if (e.getData() != null) {
+ log.info("Partner popup result {}", e.getData());
+ partnersDataModel.getPartnerService().add(editPartner);
+ partnersDataModel.clearSelection();
+ refresh();
+ partnersDataModel.addToSelection(editPartner);
+// Optional<Listitem> listItem = partnersList.getItems().stream()
+// .filter(li -> ((Partner) li.getValue()).getId().equals(editPartner.getId()))
+// .findFirst();
+// if (listItem.isPresent()) {
+// Clients.scrollIntoView(listItem.get());
+// }
+// registerTask(() -> {
+// });
+ }
+ });
+ partnerWindow.doModal();
}
@Command
- public void onEdit() {
+ public void onEdit() throws JsonProcessingException {
+ String page = "~./partner.zul";
+ Partner editPartner = partnersDataModel.getPartnerService().copy(selectedPartner);
+ Window partnerWindow = (Window) Executions.createComponents(page, null,
+ Collections.singletonMap("formDocument", editPartner));
+ partnerWindow.addEventListener("onClose", e -> {
+ if (e.getData() != null) {
+ log.info("Partner popup result {}", e.getData());
+ selectedPartner = (Partner) e.getData();
+ partnersDataModel.getPartnerService().replace(selectedPartner, editPartner);
+ partnersDataModel.clearSelection();
+ refresh();
+ partnersDataModel.addToSelection(editPartner);
+ }
+ });
+ partnerWindow.doModal();
+ }
+
+
+ public boolean isFilterShowInActive() {
+ return filterShowInActive;
+ }
+
+ @NotifyChange({"filterShowActive", "filterShowInActive", "filterShowBoth"})
+ public void setFilterShowInActive(boolean filterShowInActive) {
+ this.filterShowBoth = false;
+ this.filterShowActive = false;
+ this.filterShowInActive = filterShowInActive;
+ refresh();
+ }
+
+ public boolean isFilterShowActive() {
+ return filterShowActive;
+ }
+
+ @NotifyChange({"filterShowActive", "filterShowInActive", "filterShowBoth"})
+ public void setFilterShowActive(boolean filterShowActive) {
+ this.filterShowBoth = false;
+ this.filterShowInActive = false;
+ this.filterShowActive = filterShowActive;
+ refresh();
+ }
+
+ public boolean isFilterShowBoth() {
+ return this.filterShowBoth;
+ }
+
+ @NotifyChange({"filterShowActive", "filterShowInActive", "filterShowBoth"})
+ public void setFilterShowBoth(boolean filterShowBoth) {
+ this.filterShowActive = false;
+ this.filterShowInActive = false;
+ this.filterShowBoth = filterShowBoth;
+ refresh();
}
}
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;
private Supplier selectedSupplier;
@WireVariable
SuppliersDataModel suppliersDataModel;
- @Autowired
- FormValidator formValidator;
@Init
public void init() {
--- /dev/null
+package hu.user.lis.ui.view;
+
+public interface UITask {
+ void execute();
+}
\ No newline at end of file
</library-property>
<library-property>
<name>org.zkoss.zul.grid.rod</name>
- <value>true</value>
+ <value>false</value>
</library-property>
<library-property>
<name>org.zkoss.zul.grid.autohidePaging</name>
</library-property>
<library-property>
<name>org.zkoss.zul.listbox.rod</name>
- <value>true</value>
+ <value>false</value>
</library-property>
<library-property>
<name>org.zkoss.zul.listbox.autohidePaging</name>
+++ /dev/null
-<?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
+++ /dev/null
-<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
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-<?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
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-<?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
+++ /dev/null
-<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
+++ /dev/null
-<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
-<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>
+ <label class="@load(vm.getFieldStyle(field, 'field-label'))" value="${label}" visible="@load(!empty label)"/>
</div>
+++ /dev/null
-<?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
-<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)" />
+<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.user.lis.ui.converter.RadioCheckConverter')"
+ disabled="@load(vm.formDocument['ro'] || ro)"/>
+++ /dev/null
-<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
+++ /dev/null
-<?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
+++ /dev/null
-<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
+++ /dev/null
-<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
+++ /dev/null
-<?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
+++ /dev/null
-<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
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-<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.user.lis.ui.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>
+++ /dev/null
-<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>
+++ /dev/null
-<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
+++ /dev/null
-<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
+++ /dev/null
-<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
+++ /dev/null
-<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
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-<?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>
+++ /dev/null
-<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
<zk>
<window vflex="true" viewModel="@id('vm') @init('hu.user.lis.ui.view.IndexViewModel')">
<caption>
- <hlayout hflex="max">
+ <hlayout valign="middle">
+ <image width="24px" height="24px" src="~./static/images/logo.png"/>
<label value="LEADER INFORMATION SYSTEM"/>
- <separator/>
- <label value="@load(vm.buildProperties.version)"/>
- <!-- <button iconSclass="z-icon-user"/>-->
+ <separator orient="vertical"/>
+ <label style="font-size: 0.8em" value="@load(vm.buildProperties.version)"/>
</hlayout>
</caption>
<borderlayout>
<?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>
<window id="partnerPopup" title="Partner szerkesztés" width="60%" height="40%" closable="true"
viewModel="@id('vm') @init('hu.user.lis.ui.view.PartnerEditorModel')">
<borderlayout>
- <center border="none" vflex="true">
- <div class="container u-form-width u-max-form-width">
- <div class="row">
- <text class="twelve columns" label="Név" field="name"/>
- </div>
- <div class="row">
- <text class="twelve columns" label="Adószám" field="vatNr"/>
- </div>
- <div class="row">
- <text class="twelve columns" label="Cím" field="address"/>
- </div>
- <div class="row">
- <radiogroup model="@bind(vm.active)">
- <radio label="Aktív" value="true"/>
- <radio label="Inaktív" value="false"/>
- </radiogroup>
- </div>
- </div>
+ <center border="none" vflex="true" hflex="true">
+ <vlayout hflex="true">
+ <label value="Név"/>
+ <textbox hflex="true" instant="true" value="@bind(vm.selectedPartner.name)"
+ forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
+ <label value="Adószám"/>
+ <textbox hflex="true" instant="true" value="@bind(vm.selectedPartner.vatNr)"
+ forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
+ <label value="Cím"/>
+ <textbox hflex="true" instant="true" value="@bind(vm.selectedPartner.address)"
+ forward="onOK=submit.onClick, onCancel=cancel.onClick"/>
+ <label value="Aktív"/>
+ <checkbox mold="switch" checked="@bind(vm.selectedPartner.active)"/>
+ </vlayout>
</center>
<south flex="true" style="text-align: right; padding: 10px">
<hlayout>
- <button label="Bezár" onClick="@command('onCloseWindow', target=partnerPopup, select=false)"/>
- <button label="Mentés" onClick="@command('onCloseWindow', target=partnerPopup, select=true)"/>
+ <button id="cancel" label="Bezár"
+ onClick="@command('onCloseWindow', target=partnerPopup, select=false)"/>
+ <button id="submit" label="Mentés"
+ onClick="@command('onCloseWindow', target=partnerPopup, select=true)"/>
</hlayout>
</south>
</borderlayout>
}
</style>
<window title="Partnerek" vflex="true" viewModel="@id('vm') @init('hu.user.lis.ui.view.PartnersViewModel')">
-
+ <!-- <timer id="timer" delay="500" repeats="true" onTimer="@command('uiTick')"/>-->
<borderlayout>
<north flex="true">
<toolbar>
<toolbarbutton label="Új partner" iconSclass="z-icon-plus" onClick="@command('onAddNew')"/>
<toolbarbutton label="Szerkesztés" iconSclass="z-icon-edit" onClick="@command('onEdit')"
- disabled="@load(empty vm.formDocument)"/>
+ disabled="@load(empty vm.selectedPartner)"/>
+ <separator orient="vertical"/>
+ <toolbarbutton mode="toggle" iconSclass="z-icon-check" label="Aktív"
+ checked="@bind(vm.filterShowActive)"/>
+ <toolbarbutton mode="toggle" iconSclass="z-icon-ban" label="Inaktív"
+ checked="@bind(vm.filterShowInActive)"/>
+ <toolbarbutton mode="toggle" iconSclass="z-icon-adjust" label="Mind"
+ checked="@bind(vm.filterShowBoth)"/>
</toolbar>
</north>
<center border="none" flex="true">
- <listbox id="partnersList" vflex="true" model="@load(vm.partnersDataModel)" mold="paging"
- autopaging="true"
- pagingPosition="top" onSelect="@command('onListSelection')">
+ <listbox id="partnersList" vflex="true" model="@load(vm.partnersDataModel)"
+ autopaging="true" pagingPosition="top"
+ onSelect="@command('onListSelection')" onDoubleClick="@command('onEdit')"
+ onAfterRender="@command('onAfterRenderPartners')">
+ <custom-attributes org.zkoss.zul.listbox.selectOnHighlight.disabled="true"/>
+
<listhead>
<listheader label="Név" align="left"/>
<listheader label="Adószám" align="left"/>
<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>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
- <version>2.19.0</version>
+ <version>2.20.0</version>
</dependency>
- <!-- <dependency>-->
- <!-- <groupId>org.springframework.boot</groupId>-->
- <!-- <artifactId>spring-boot-devtools</artifactId>-->
- <!-- <optional>true</optional>-->
- <!-- </dependency>-->
</dependencies>
</project>