18 package org.turro.dossier.zul.dossier;
21 import org.turro.attach.zul.control.AttachmentControl;
22 import org.turro.contacts.zul.label.ContactInfo;
23 import org.turro.dossier.dossier.DossierData;
24 import org.turro.dossier.dossier.DossierWrapper;
25 import org.turro.dossier.dw.DossierDWReport;
26 import org.turro.dossier.entity.*;
27 import org.turro.elephant.context.Application;
28 import org.turro.elephant.util.Messages;
29 import org.turro.i18n.I_;
30 import org.turro.log.SystemLogType;
31 import org.turro.log.SystemLogger;
32 import org.turro.zkoss.dialog.SelectionDialog;
33 import org.turro.zkoss.label.LabelExtended;
34 import org.turro.zkoss.label.LabelTypes;
35 import org.turro.zul.frame.Framework;
36 import org.zkoss.zk.ui.Component;
37 import org.zkoss.zk.ui.event.Event;
38 import org.zkoss.zk.ui.event.EventListener;
39 import org.zkoss.zk.ui.event.Events;
40 import org.zkoss.zul.*;
50 super.setValue(value);
56 Label label =
new Label(dossier.
getId() +
"");
59 Vlayout vbox =
new Vlayout();
62 Hlayout hbox =
new Hlayout();
63 vbox.appendChild(hbox);
71 hbox.appendChild(createLabel(dv));
80 ci.setSclass(
"softLabel");
85 lext.setStyle(
"color:gray;font-size:11px");
89 vbox.appendChild(lext);
96 vbox.appendChild(lext);
99 vbox.appendChild(hbox);
102 lext.setStyle(
"color:gray;font-size:11px;");
104 hbox.appendChild(lext);
106 hbox.appendChild(
new Image(
"/_zul/images/activity.png"));
108 vbox.appendChild(hbox);
110 vbox =
new Vlayout();
115 vbox.appendChild(lext);
120 label =
new Label(((
long) dr.
getOnWork()) +
" " +
122 I_.
get(
"Work in progress"));
123 label.setStyle(
"color:gray;font-size:11px;");
124 vbox.appendChild(label);
127 I_.
get(
"Efectivity"));
128 label.setStyle(
"color:gray;font-size:11px;");
129 vbox.appendChild(label);
131 vbox =
new Vlayout();
135 A a =
new A(
I_.
get(
"Attachments"),
"/_zul/images/clip.png");
136 a.addEventListener(Events.ON_CLICK,
new EventListener() {
138 public void onEvent(Event event)
throws Exception {
148 ac,
"80%",
"80%",
null);
156 label =
new Label(
I_.
get(
"Expenses"));
157 label.setStyle(
"color:navy;font-size:11px");
158 vbox.appendChild(label);
160 label.setStyle(
"color:#666;font-size:11px");
161 vbox.appendChild(label);
164 label =
new Label(
I_.
get(
"Hours"));
165 label.setStyle(
"color:navy;font-size:11px");
166 vbox.appendChild(label);
168 label.setStyle(
"color:#666;font-size:11px");
169 vbox.appendChild(label);
172 label =
new Label(
I_.
get(
"Price"));
173 label.setStyle(
"color:navy;font-size:11px");
174 vbox.appendChild(label);
176 label.setStyle(
"color:#666;font-size:11px");
177 vbox.appendChild(label);
181 Image img =
new Image(
"/_zul/images/edit-delete.png");
182 img.setStyle(
"cursor:pointer");
183 img.addEventListener(Events.ON_CLICK,
new EventListener() {
185 public void onEvent(Event event)
throws Exception {
199 private void addDetail() {
200 final Detail detail =
new Detail();
203 detail.addEventListener(Events.ON_OPEN,
new EventListener() {
205 public void onEvent(Event event)
throws Exception {
211 private void fillDetail(Detail detail) {
212 if(detail.getChildren().isEmpty()) {
215 Grid grid =
new Grid();
216 detail.appendChild(grid);
218 Rows rows =
new Rows();
219 grid.appendChild(rows);
225 rows.appendChild(row);
226 row.appendChild(
new Label(fv.getFieldDef().getLabelKey()));
227 row.appendChild(
new Label(fv.getValue()));
236 l.setStyle(
"color:green");
238 l.setStyle(
"color:red");
240 l.setStyle(
"color:blue");
void setEntity(Object entity)
void setPublicOnly(Boolean publicOnly)
String getExpensesString()
void setReportValues(Dossier dossier)
DossierVersionStatus getStatus()
Set< DossierVersion > getActiveVersions()
String getExtraDescription()
DossierStatus getStatus()
String getFullDescription()
Set< FieldValue > getFieldValues()
void setValue(Object value)
boolean isInRole(String role)
static Application getApplication()
static Messages confirmDeletion()
static String get(String msg)
static ISystemLogger getInstance()
static void showComponent(Page page, String title, Component component, String width, String height, final Command command)
LabelExtended setDate(Date date)
LabelExtended setShowTooltip(boolean showTooltip)
void setValue(String value)
LabelExtended setResourceValue(String resourceValue)
LabelExtended setMaxChars(int maxChars)
static Label getTinyLabel(String value)
static Framework getCurrent()