50 super.setValue(value);
52 final IssueWrapper wissue = (IssueWrapper) getValue();
54 Hlayout hbox =
new Hlayout();
57 Image img =
new Image(wissue.getTimmingImage());
58 hbox.appendChild(img);
59 Label label =
new Label(wissue.getIssue().getId() +
"");
60 hbox.appendChild(label);
62 Vlayout vbox =
new Vlayout();
66 hbox.setSclass(
"z-valign-middle");
67 hbox.setValign(
"middle");
68 vbox.appendChild(hbox);
70 img =
new Image(wissue.getAlarmImage());
71 if(!Strings.isBlank(img.getSrc())) {
72 hbox.appendChild(img);
74 img =
new Image(wissue.getPriorityImage());
75 if(!Strings.isBlank(img.getSrc())) {
76 hbox.appendChild(img);
79 hbox.appendChild(
new IssueLabel(wissue.getIssue()));
81 if(wissue.getIssue().getVersion() !=
null) {
82 hbox.appendChild(LabelTypes.getTinyLabel(wissue.getIssue().getVersion().getVersionString()));
85 hbox.appendChild(
new Space());
86 hbox.appendChild(
new AddInformation(wissue.getIssue()) {
88 protected void refreshBase() {
89 IssueRow.this.getChildren().clear();
90 IssueRow.this.setValue(wissue);
94 if(wissue.getIssue().getDossier() !=
null) {
95 DossierLabel dl =
new DossierLabel(wissue.getIssue().getDossier(),
true);
96 dl.setSclass(
"softLabel");
100 if(IssueType.TYPE_DOCUMENT.equals(wissue.getIssue().getType())) {
102 Toolbarbutton a =
new Toolbarbutton(I_.get(
"Attachments"),
"/_zul/images/clip.png");
103 a.addEventListener(Events.ON_CLICK,
new EventListener() {
105 public void onEvent(Event event)
throws Exception {
106 IssueAttachTree iat =
new IssueAttachTree();
107 iat.setEntity(wissue.getIssue());
108 iat.setChanges(
new Changes());
109 SelectionDialog.showComponent(getPage(), I_.get(
"Attachments"),
110 iat,
"80%",
"80%",
null);
121 if(!wissue.canStartBySources()) {
122 for(String s : wissue.getWaitingReason()) {
123 lext =
new LabelExtended();
124 lext.setStyle(
"color:#444;font-size:11px;");
126 lext.setMaxChars(70);
127 lext.setShowTooltip(
true);
128 vbox.appendChild(lext);
132 lext =
new LabelExtended();
133 lext.setDate(wissue.getIssue().getIssueDate());
136 lext =
new LabelExtended();
137 lext.setDate(wissue.getIssue().getStartDate());
140 lext =
new LabelExtended();
141 lext.setDate(wissue.getIssue().getDelivery());
144 lext =
new LabelExtended();
145 lext.setDate(wissue.getIssue().getControlDate());
148 vbox =
new Vlayout();
151 lext =
new LabelExtended();
152 lext.setStyle(
"color:navy");
153 lext.setResourceValue(wissue.getIssue().getType().toString());
154 vbox.appendChild(lext);
156 lext =
new LabelExtended();
157 lext.setResourceValue(wissue.getIssue().getStatus().toString());
158 vbox.appendChild(lext);
160 if(wissue.getIssue().getStatus().isFinished()) {
161 lext =
new LabelExtended();
162 lext.setStyle(
"color:gray");
163 lext.setResourceValue(wissue.getIssue().getResolution().toString());
164 vbox.appendChild(lext);
167 if(Application.getApplication().isInRole(
"issue:delete")) {
168 img =
new Image(
"/_zul/images/edit-delete.png");
169 img.setStyle(
"cursor:pointer");
170 img.addEventListener(Events.ON_CLICK,
new EventListener() {
172 public void onEvent(Event event)
throws Exception {
173 Messages.confirmDeletion().show(() -> {
174 SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, wissue.getIssue(),
"deleted",
175 wissue.getIssue().getId() +
" - " + wissue.getIssue().getDescription());
177 Framework.getCurrent().invalidateSelected();
185 if(value instanceof IssueWrapper) {
186 Issue i = ((IssueWrapper) value).getIssue();
187 if(i.getStatus() == IssueStatus.STATUS_NEW) {
188 setStyle(
"background-color: #f5eeee");
189 }
else if(i.getStatus() == IssueStatus.STATUS_INCOMPLETE) {
190 setStyle(
"background-color: #f8eeee");
191 }
else if(i.getStatus() == IssueStatus.STATUS_STARTED) {
192 setStyle(
"background-color: #fffff0");
193 }
else if(i.getStatus() == IssueStatus.STATUS_REOPENED) {
194 setStyle(
"background-color: #f0f9e0");
195 }
else if(i.getStatus() == IssueStatus.STATUS_RESOLVED) {
196 setStyle(
"background-color: #e0f5ee");
197 }
else if(i.getStatus() == IssueStatus.STATUS_FROZEN) {
198 setStyle(
"background-color: #a0f5f5");
199 }
else if(i.getStatus() == IssueStatus.STATUS_REUNION) {
200 setStyle(
"background-color: #e5e5a0");
201 }
else if(i.getStatus() == IssueStatus.STATUS_CLOSED) {
202 setStyle(
"background-color: #ffffff");