ItEr30S17ValidacionEProbasFuncionais: Replaced delete link with button and improved listing in assigned resources popup

This commit is contained in:
Lorenzo Tilve 2009-10-16 19:49:50 +02:00 committed by Javier Moran Rua
parent 57715486fd
commit 85fc42fb5a
3 changed files with 56 additions and 12 deletions

View file

@ -400,7 +400,7 @@ public class ResourceAllocationController extends GenericForwardComposer {
bindResourcesPerDay(appendDecimalbox(item), data);
// On click delete button
Button deleteButton = appendButton(item, _("Delete"));
Button deleteButton = appendDeleteButton(item);
formBinder.setDeleteButtonFor(data, deleteButton);
deleteButton.addEventListener("onClick", new EventListener() {
@ -465,8 +465,29 @@ public class ResourceAllocationController extends GenericForwardComposer {
return button;
}
/**
* Appends delete {@link Button} to {@link Listitem}
* @param listitem
* value for {@link Button}
* @return
*/
private Button appendDeleteButton(Listitem listitem) {
Button button = new Button();
button.setSclass("icono");
button.setImage("/common/img/ico_borrar1.png");
button.setHoverImage("/common/img/ico_borrar.png");
button.setTooltiptext(_("Delete"));
Listcell listCell = new Listcell();
listCell.appendChild(button);
listitem.appendChild(listCell);
return button;
}
/**
* Append a Textbox @{link Percentage} to listItem
*
* @param listItem
*/
private Decimalbox appendDecimalbox(Listitem item) {

View file

@ -174,27 +174,34 @@ table {
font-size: 1.2em;
}
.message_ERROR {
color: #ee0000;
.message_ERROR, .message_INFO {
padding: 15px;
border: solid 1px #ee0000;
background-color: #eecccc;
margin: 10px;
width: 300px;
}
.message_ERROR img {
.message_WARNING img, .message_ERROR img {
display: none;
}
.message_ERROR {
color: #ee0000;
border: solid 1px #ee0000;
background-color: #eecccc;
}
.message_WARNING {
color: #CC5013;
border: solid 1px #CC5013;
background-color: #FDCA87;
}
.message_INFO {
color: #006600;
padding: 15px;
border: solid 1px #006600;
background-color: #cceecc;
margin: 10px;
width: 300px;
}
.message_INFO span {
@ -203,6 +210,13 @@ table {
left: 10px;
}
.advancedallocationlayout .message_WARNING {
padding: 3px 20px 3px 20px;
margin: 0;
width: auto;
}
.z-window-embedded {
margin: 10px;
}
@ -474,4 +488,13 @@ div.z-grid {
.advance-measurement {
width: 340px;
}
}
.assignedresources .icono .z-button-tr,
.assignedresources .icono td.z-button-br {
display:none;
}
.assignedresources .z-listbox input {
height: 17px !important;
}

View file

@ -135,14 +135,14 @@
</grid>
<!-- Assigned resources -->
<panel title="${i18n:_('Assigned resources')}" border="normal" style="margin-top: 5px">
<panel title="${i18n:_('Assigned resources')}" border="normal" style="margin-top: 5px" sclass="assignedresources">
<panelchildren>
<vbox id="messagesContainer"></vbox>
<listbox id="allocationsList"
model="@{allocationController.resourceAllocations}"
itemRenderer="@{allocationController.resourceAllocationRenderer}"
style="margin-bottom: 5px" fixedLayout="true" rows="3">
style="margin-bottom: 5px" fixedLayout="true" rows="4">
<listhead>
<listheader label="${i18n:_('Name')}" />
<listheader