Vylepšený dialog pro odeslání e-mailu. Adresa "Od" se nastavuje podle
přihlášeného uživatele. Přidáno logování chyb při odesílání e-mailu.
This commit is contained in:
@@ -2,30 +2,81 @@
|
||||
<zk>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window id="mailWin" border="normal" apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.mail.MailForm')" width="500px" closable="true">
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.mail.MailForm')" width="800px" closable="true">
|
||||
<caption zclass="form-caption" label="${labels.MailForm}" />
|
||||
<grid>
|
||||
<columns>
|
||||
<column hflex="min"/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${labels.MailFor}"/> <textbox value="@bind(vm.to)" width="100%"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.MailSubject }"/> <textbox value="@bind(vm.message.subject)" width="100%"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.MailAttachement}"/> <textbox value="@load(vm.attachement)" readonly="true" width="100%"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<vbox>
|
||||
<ckeditor width="470px" height="200px" value="@bind(vm.message.text)" toolbar="Basic"/>
|
||||
<hbox>
|
||||
<button label="${labels.MailSend}" onClick="@command('send', window=mailWin)"/> <button label="${labels.ButtonStorno}" onClick="mailWin.detach()"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<hbox>
|
||||
<vbox hflex="2">
|
||||
<hbox>
|
||||
<label value="${labels.MailAddressBook}"/>
|
||||
<combobox selectedIndex="@bind(vm.adbType)" readonly="true">
|
||||
<comboitem label="${labels.MailUsers}"/>
|
||||
<comboitem label="${labels.MailSuppliers}"/>
|
||||
</combobox>
|
||||
</hbox>
|
||||
<textbox value="@bind(vm.findAddress)" instant="true" onChange="@command('find')" width="100%"/>
|
||||
<listbox model="@load(vm.users)"
|
||||
visible="@load(vm.adbType eq 0)"
|
||||
multiple="true"
|
||||
selectedItems="@bind(vm.selectedUsers)"
|
||||
height="350px">
|
||||
<listhead>
|
||||
<listheader label="${labels.MailName}"/>
|
||||
</listhead>
|
||||
<template name="model">
|
||||
<listitem disabled="@load(empty each.email)" draggable="true">
|
||||
<listcell label="@load(each.fullName)"/>
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
<listbox model="@load(vm.addressbook)"
|
||||
visible="@load(vm.adbType eq 1)"
|
||||
multiple="true"
|
||||
selectedItems="@bind(vm.selectedAddresses)"
|
||||
height="350px">
|
||||
<listhead>
|
||||
<listheader label="${labels.MailCompany}"/>
|
||||
</listhead>
|
||||
<template name="model">
|
||||
<listitem disabled="@load(empty each.email)" draggable="true">
|
||||
<listcell label="@load(each.company)"/>
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
<button label="${labels.MailToButton}" width="90%" sclass="nicebutton" onClick="@command('addTo')"/>
|
||||
<button label="${labels.MailCcButton}" width="90%" sclass="nicebutton" onClick="@command('addCc')"/>
|
||||
<button label="${labels.MailBccButton}" width="90%" sclass="nicebutton" onClick="@command('addBcc')"/>
|
||||
</vbox>
|
||||
<vbox hflex="5">
|
||||
<grid>
|
||||
<columns>
|
||||
<column hflex="min"/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${labels.MailFor}"/> <textbox value="@bind(vm.to)" width="100%" droppable="true" onDrop="@command('addTo')"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.MailCc}"/> <textbox value="@bind(vm.cc)" width="100%" droppable="true" onDrop="@command('addCc')"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.MailBcc}"/> <textbox value="@bind(vm.bcc)" width="100%" droppable="true" onDrop="@command('addBcc')"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.MailSubject }"/> <textbox value="@bind(vm.message.subject)" width="100%"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.MailAttachement}"/> <textbox value="@load(vm.attachement)" readonly="true" width="100%"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<vbox>
|
||||
<ckeditor width="540px" height="250px" value="@bind(vm.message.text)" toolbar="Basic"/>
|
||||
<hbox>
|
||||
<button label="${labels.MailSend}" onClick="@command('send', window=mailWin)" disabled="@load(empty vm.to)" sclass="nicebutton"/> <button label="${labels.ButtonStorno}" onClick="mailWin.detach()" sclass="nicebutton"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</window>
|
||||
</zk>
|
||||
Reference in New Issue
Block a user