Change the order and labels of the filtering area
FEA: ItEr76S23ImproveFilteringArea
This commit is contained in:
parent
b33e72e079
commit
41610cad2b
3 changed files with 33 additions and 14 deletions
|
|
@ -86,8 +86,8 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
|
|||
|
||||
private Listbox listZoomLevels;
|
||||
|
||||
private final String FILTER_RESOURCES = _("by resources");
|
||||
private final String FILTER_CRITERIA = _("by criteria");
|
||||
private final String FILTER_RESOURCES = _("Resources");
|
||||
private final String FILTER_CRITERIA = _("Generic allocation criteria");
|
||||
private String feedBackMessage;
|
||||
private Boolean filterbyResources;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,17 +40,17 @@ resourcesLoadPanel = self;
|
|||
<separator/>
|
||||
<hbox id="additionalFilterInsertionPoint1" />
|
||||
<separator/>
|
||||
${ganttzk_i18n:_('Show')}:
|
||||
<listbox id="listFilters" mold="select" rows="1" width="100px"
|
||||
<label id="filterByNameLabel">${ganttzk_i18n:_('Page')}:</label>
|
||||
<combobox id="filterByNameCombo" width="50px"
|
||||
onChange="resourcesLoadPanel.onSelectFilterByName(self)" />
|
||||
<separator/>
|
||||
${ganttzk_i18n:_('Group by')}:
|
||||
<listbox id="listFilters" mold="select" rows="1" width="150px"
|
||||
model="${resourcesLoadPanel.filters}"
|
||||
selectedIndex="0"
|
||||
onSelect="resourcesLoadPanel.setFilter(self.selectedItem.value);">
|
||||
</listbox>
|
||||
<separator/>
|
||||
<label id="filterByNameLabel">${ganttzk_i18n:_('Name filter')}:</label>
|
||||
<combobox id="filterByNameCombo" width="50px"
|
||||
onChange="resourcesLoadPanel.onSelectFilterByName(self)" />
|
||||
<separator/>
|
||||
<hbox id="additionalFilterInsertionPoint2" />
|
||||
</hbox>
|
||||
</north>
|
||||
|
|
|
|||
|
|
@ -427,8 +427,6 @@ public class ResourceLoadController implements Composer {
|
|||
}
|
||||
|
||||
private Hbox buildTimeFilter() {
|
||||
Label label1 = new Label(_("Time filter") + ":");
|
||||
Label label2 = new Label("-");
|
||||
startBox.setValue(asDate(startDateValue));
|
||||
startBox.setWidth("100px");
|
||||
startBox.addEventListener(Events.ON_CHANGE, new EventListener() {
|
||||
|
|
@ -454,9 +452,9 @@ public class ResourceLoadController implements Composer {
|
|||
}
|
||||
});
|
||||
Hbox hbox = new Hbox();
|
||||
hbox.appendChild(label1);
|
||||
hbox.appendChild(new Label(_("From") + ":"));
|
||||
hbox.appendChild(startBox);
|
||||
hbox.appendChild(label2);
|
||||
hbox.appendChild(new Label(_("To") + ":"));
|
||||
hbox.appendChild(endBox);
|
||||
hbox.setAlign("center");
|
||||
return hbox;
|
||||
|
|
@ -508,6 +506,8 @@ public class ResourceLoadController implements Composer {
|
|||
|
||||
private final IResourcesSearcher resourcesSearcher;
|
||||
|
||||
private Label label = new Label();
|
||||
|
||||
private WorkersOrCriteriaBandbox(Runnable onChange,
|
||||
PlanningState filterBy, FilterTypeChanger filterType,
|
||||
IResourcesSearcher resourcesSearcher) {
|
||||
|
|
@ -523,7 +523,7 @@ public class ResourceLoadController implements Composer {
|
|||
panel.setSecondOptionalFilter(buildBandboxFilterer());
|
||||
}
|
||||
|
||||
private BandboxMultipleSearch buildBandboxFilterer() {
|
||||
private Hbox buildBandboxFilterer() {
|
||||
bandBox.setId("workerBandboxMultipleSearch");
|
||||
bandBox.setWidthBandbox("185px");
|
||||
bandBox.setWidthListbox("450px");
|
||||
|
|
@ -538,7 +538,25 @@ public class ResourceLoadController implements Composer {
|
|||
}
|
||||
});
|
||||
|
||||
return bandBox;
|
||||
Hbox hbox = new Hbox();
|
||||
hbox.appendChild(getLabel());
|
||||
hbox.appendChild(bandBox);
|
||||
hbox.setAlign("center");
|
||||
|
||||
return hbox;
|
||||
}
|
||||
|
||||
private Label getLabel() {
|
||||
updateLabelValue();
|
||||
return label;
|
||||
}
|
||||
|
||||
private void updateLabelValue() {
|
||||
if (isFilteringByResource()) {
|
||||
label.setValue(_("Resources or criteria") + ":");
|
||||
} else {
|
||||
label.setValue(_("Criteria") + ":");
|
||||
}
|
||||
}
|
||||
|
||||
private String getFinderToUse() {
|
||||
|
|
@ -556,6 +574,7 @@ public class ResourceLoadController implements Composer {
|
|||
}
|
||||
entitiesSelected = null;
|
||||
bandBox.setFinder(getFinderToUse());
|
||||
updateLabelValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue