Improvements on workreport line styles
FEA: ItEr60S16AdaptacionsPantallasNavalPlan
This commit is contained in:
parent
f60363b17c
commit
a2fcfdcb21
4 changed files with 82 additions and 19 deletions
|
|
@ -129,6 +129,10 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
|
||||
private static final String ITEM = "item";
|
||||
|
||||
private static final int EXTRA_FIELD_MIN_WIDTH = 70;
|
||||
private static final int EXTRA_FIELD_MAX_WIDTH = 150;
|
||||
private static final int EXTRA_FIELD_PX_PER_CHAR = 5;
|
||||
|
||||
private transient IPredicate predicate;
|
||||
|
||||
private Grid listing;
|
||||
|
|
@ -697,6 +701,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
if (!getWorkReport().getWorkReportType().getDateIsSharedByLines()) {
|
||||
NewDataSortableColumn columnDate = new NewDataSortableColumn();
|
||||
columnDate.setLabel(_("Date"));
|
||||
columnDate.setSclass("date-column");
|
||||
columnDate.setSort("auto=(date)");
|
||||
columnDate.setSortDirection("ascending");
|
||||
|
||||
|
|
@ -706,38 +711,44 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
sortWorkReportLines();
|
||||
}
|
||||
});
|
||||
|
||||
columnDate.setWidth("75px");
|
||||
columns.appendChild(columnDate);
|
||||
}
|
||||
if (!getWorkReport().getWorkReportType()
|
||||
.getResourceIsSharedInLines()) {
|
||||
NewDataSortableColumn columnResource = new NewDataSortableColumn();
|
||||
columnResource.setLabel(_("Resource"));
|
||||
columnResource.setWidth("75px");
|
||||
columnResource.setSclass("resource-column");
|
||||
// columnResource.setWidth("75px");
|
||||
columns.appendChild(columnResource);
|
||||
}
|
||||
if (!getWorkReport().getWorkReportType()
|
||||
.getOrderElementIsSharedInLines()) {
|
||||
NewDataSortableColumn columnCode = new NewDataSortableColumn();
|
||||
columnCode.setLabel(_("Order Code"));
|
||||
columnCode.setWidth("100px");
|
||||
columnCode.setSclass("order-code-column");
|
||||
columns.appendChild(columnCode);
|
||||
}
|
||||
|
||||
for (Object fieldOrLabel : workReportModel
|
||||
.getFieldsAndLabelsLineByDefault()) {
|
||||
String columnName;
|
||||
int width = EXTRA_FIELD_MIN_WIDTH;
|
||||
if (fieldOrLabel instanceof DescriptionField) {
|
||||
columnName = ((DescriptionField) fieldOrLabel)
|
||||
.getFieldName();
|
||||
width = Math.max(((DescriptionField) fieldOrLabel)
|
||||
.getLength()
|
||||
* EXTRA_FIELD_PX_PER_CHAR, EXTRA_FIELD_MIN_WIDTH);
|
||||
width = Math.min(width, EXTRA_FIELD_MAX_WIDTH);
|
||||
|
||||
} else {
|
||||
columnName = ((WorkReportLabelTypeAssigment) fieldOrLabel)
|
||||
.getLabelType().getName();
|
||||
}
|
||||
NewDataSortableColumn columnFieldOrLabel = new NewDataSortableColumn();
|
||||
columnFieldOrLabel.setLabel(_(columnName));
|
||||
columnFieldOrLabel.setWidth("100px");
|
||||
columnFieldOrLabel.setSclass("columnFieldOrLabel");
|
||||
columnFieldOrLabel.setWidth(width + "px");
|
||||
columns.appendChild(columnFieldOrLabel);
|
||||
}
|
||||
|
||||
|
|
@ -745,31 +756,30 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
.equals(HoursManagementEnum.NUMBER_OF_HOURS)) {
|
||||
NewDataSortableColumn columnHourStart = new NewDataSortableColumn();
|
||||
columnHourStart.setLabel(_("Hour start"));
|
||||
columnHourStart.setWidth("50px");
|
||||
columnHourStart.setSclass("column-hour-start");
|
||||
columns.appendChild(columnHourStart);
|
||||
NewDataSortableColumn columnHourFinish = new NewDataSortableColumn();
|
||||
columnHourFinish.setLabel(_("Hour finish"));
|
||||
columnHourFinish.setWidth("50px");
|
||||
columnHourStart.setSclass("column-hour-finish");
|
||||
columns.appendChild(columnHourFinish);
|
||||
}
|
||||
}
|
||||
NewDataSortableColumn columnNumHours = new NewDataSortableColumn();
|
||||
columnNumHours.setLabel(_("Hours"));
|
||||
columnNumHours.setWidth("25px");
|
||||
columnNumHours.setSclass("hours-column");
|
||||
columns.appendChild(columnNumHours);
|
||||
NewDataSortableColumn columnHoursType = new NewDataSortableColumn();
|
||||
columnHoursType.setLabel(_("Hours type"));
|
||||
columnHoursType.setWidth("75px");
|
||||
columnHoursType.setSclass("hours-type-column");
|
||||
columns.appendChild(columnHoursType);
|
||||
NewDataSortableColumn columnCode = new NewDataSortableColumn();
|
||||
columnCode.setLabel(_("Code"));
|
||||
columnCode.setAlign("center");
|
||||
columnCode.setWidth("100px");
|
||||
columnCode.setSclass("code-column");
|
||||
columns.appendChild(columnCode);
|
||||
NewDataSortableColumn columnOperations = new NewDataSortableColumn();
|
||||
columnOperations.setLabel(_("Operations"));
|
||||
columnOperations.setAlign("center");
|
||||
columnOperations.setWidth("25px");
|
||||
columnOperations.setLabel(_("Op."));
|
||||
columnOperations.setSclass("operations-column");
|
||||
columnOperations.setTooltiptext(_("Operations"));
|
||||
columns.appendChild(columnOperations);
|
||||
|
||||
columns.setParent(grid);
|
||||
|
|
@ -805,7 +815,6 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
|
||||
private void appendDateInLines(final Row row) {
|
||||
final Datebox date = new Datebox();
|
||||
date.setWidth("100px");
|
||||
final WorkReportLine line = (WorkReportLine) row.getValue();
|
||||
Util.bind(date, new Util.Getter<Date>() {
|
||||
|
||||
|
|
@ -1090,7 +1099,6 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
private void appendHoursType(final Row row) {
|
||||
final WorkReportLine line = (WorkReportLine) row.getValue();
|
||||
final Autocomplete hoursType = new Autocomplete();
|
||||
hoursType.setWidth("100px");
|
||||
hoursType.setAutodrop(true);
|
||||
hoursType.applyProperties();
|
||||
hoursType.setFinder("TypeOfWorkHoursFinder");
|
||||
|
|
@ -1124,7 +1132,6 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
private void appendCode(final Row row) {
|
||||
final WorkReportLine line = (WorkReportLine) row.getValue();
|
||||
final Textbox code = new Textbox();
|
||||
code.setWidth("150px");
|
||||
code.setDisabled(getWorkReport().getGenerateCode());
|
||||
code.applyProperties();
|
||||
|
||||
|
|
|
|||
|
|
@ -1353,3 +1353,4 @@ tr.z-tree-row-seld .z-row-cnt {
|
|||
margin-bottom: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
/* Work reports */
|
||||
.listWorkReportLines td.z-row-inner,
|
||||
.listWorkReportLines td.z-group-foot-inner {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.listWorkReportLines .date-column {
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .hours-column {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .operations-column {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .resource-column {
|
||||
width: 170px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .code-column {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .order-code-column {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .hours-type-column {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .hours-column {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.listWorkReportLines .z-textbox,
|
||||
.listWorkReportLines .z-intbox {
|
||||
width:90% !important;
|
||||
}
|
||||
|
||||
.listWorkReportLines .z-combobox-inp,
|
||||
.listWorkReportLines .z-datebox,
|
||||
.listWorkReportLines .z-datebox-inp,
|
||||
.listWorkReportLines .z-datebox-focus .z-datebox-inp {
|
||||
width:80% !important;
|
||||
}
|
||||
|
||||
.z-tabpanel {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
|
@ -23,7 +23,8 @@
|
|||
<?init class="org.zkoss.zk.ui.util.Composition" arg0="/common/layout/template.zul"?>
|
||||
<?link rel="stylesheet" type="text/css" href="/common/css/navalplan.css"?>
|
||||
<?link rel="stylesheet" type="text/css" href="/common/css/navalplan_zk.css"?>
|
||||
<?link rel="stylesheet" type="text/css" href="/resources/css/resources.css"?>
|
||||
<?link rel="stylesheet" type="text/css" href="/workreports/css/workreports.css"?>
|
||||
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?taglib uri="/WEB-INF/tld/i18n.tld" prefix="i18n" ?>
|
||||
|
||||
|
|
@ -198,7 +199,7 @@
|
|||
</hbox>
|
||||
|
||||
<newdatasortablegrid id="listWorkReportLines" fixedLayout="true"
|
||||
rowRenderer="@{controller.renderer}" />
|
||||
rowRenderer="@{controller.renderer}" sclass="listWorkReportLines"/>
|
||||
</panelchildren>
|
||||
</panel>
|
||||
</vbox>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue