Show in bold (the font) the rows which are not reviewed in the

list of sent communications from customer and subcontractor.

FEA: ItEr75S28CustomerIncommingCommunicationsLists
This commit is contained in:
Susana Montes Pedreira 2012-03-21 08:03:42 +00:00
parent 72dabb9cc9
commit 230f885fc4
3 changed files with 29 additions and 3 deletions

View file

@ -134,8 +134,12 @@ public class CustomerCommunicationCRUDController extends GenericForwardComposer
row.setValue(customerCommunication);
final CommunicationType type = customerCommunication.getCommunicationType();
appendLabel(row, toString(type));
final boolean reviewed = customerCommunication.getReviewed();
if(!customerCommunication.getReviewed()){
row.setSclass("communication-not-reviewed");
}
appendLabel(row, toString(type));
appendLabel(row, customerCommunication.getOrder().getName());
appendLabel(row, toString(customerCommunication.getDeadline()));
appendLabel(row, customerCommunication.getOrder().getCode());
@ -165,7 +169,7 @@ public class CustomerCommunicationCRUDController extends GenericForwardComposer
row.appendChild(new Label(label));
}
private void appendCheckbox(Row row,
private void appendCheckbox(final Row row,
final CustomerCommunication customerCommunication) {
final Checkbox checkBoxReviewed = new Checkbox();
checkBoxReviewed.setChecked(customerCommunication.getReviewed());
@ -177,6 +181,7 @@ public class CustomerCommunicationCRUDController extends GenericForwardComposer
public void onEvent(Event arg0) throws Exception {
customerCommunication.setReviewed(checkBoxReviewed.isChecked());
save(customerCommunication);
updateRowClass(row,checkBoxReviewed.isChecked());
}
});
@ -184,6 +189,13 @@ public class CustomerCommunicationCRUDController extends GenericForwardComposer
row.appendChild(checkBoxReviewed);
}
private void updateRowClass(final Row row, Boolean reviewed){
row.setSclass("");
if(!reviewed){
row.setSclass("communication-not-reviewed");
}
}
private void appendOperations(Row row,
final CustomerCommunication customerCommunication) {
Button buttonEdit = new Button();

View file

@ -144,6 +144,10 @@ public class SubcontractorCommunicationCRUDController extends GenericForwardComp
SubcontractorCommunication subcontractorCommunication = (SubcontractorCommunication) data;
row.setValue(subcontractorCommunication);
final boolean reviewed = subcontractorCommunication.getReviewed();
if(!reviewed){
row.setSclass("communication-not-reviewed");
}
appendLabel(row, subcontractorCommunication.getCommunicationType().toString());
appendLabel(row, subcontractorCommunication.getSubcontractedTaskData().getTask().getName());
appendLabel(row, getOrderName(subcontractorCommunication.getSubcontractedTaskData()));
@ -200,7 +204,7 @@ public class SubcontractorCommunicationCRUDController extends GenericForwardComp
row.appendChild(compLabel);
}
private void appendCheckbox(Row row,
private void appendCheckbox(final Row row,
final SubcontractorCommunication subcontractorCommunication) {
final Checkbox checkBoxReviewed = new Checkbox();
checkBoxReviewed.setChecked(subcontractorCommunication.getReviewed());
@ -212,6 +216,7 @@ public class SubcontractorCommunicationCRUDController extends GenericForwardComp
public void onEvent(Event arg0) throws Exception {
subcontractorCommunication.setReviewed(checkBoxReviewed.isChecked());
save(subcontractorCommunication);
updateRowClass(row, checkBoxReviewed.isChecked());
}
});
@ -219,6 +224,13 @@ public class SubcontractorCommunicationCRUDController extends GenericForwardComp
row.appendChild(checkBoxReviewed);
}
private void updateRowClass(final Row row, Boolean reviewed){
row.setSclass("");
if(!reviewed){
row.setSclass("communication-not-reviewed");
}
}
private void appendOperations(Row row,
final SubcontractorCommunication subcontractorCommunication) {
Button buttonEdit = new Button();

View file

@ -1890,3 +1890,5 @@ select {
.bandbox-workreport-task input {
width: 250px;
}
.communication-not-reviewed div.z-row-cnt .z-label{ font-weight: bold; }