Skip to content
Snippets Groups Projects
Commit 7343e211 authored by buczekp's avatar buczekp
Browse files

[LMS-2117] small improvements of advanced search UI:

- use dictionary,
- fix position of dialog,
- fix queries using only child/parent criteria

SVN: 21171
parent 3ffbf022
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,8 @@ public abstract class Dict
public static final String TOO_GENERIC = "too_generic";
public static final String SEARCH_CRITERIA_DIALOG_TITLE = "search_criteria_dialog_title";
//
// Sample Browser
//
......
......@@ -64,14 +64,16 @@ public class DetailedSearchWindow extends Dialog
public DetailedSearchWindow(final IViewContext<ICommonClientServiceAsync> viewContext,
final EntityKind entityKind)
{
setPosition(300, 100);
setSize(WIDTH, HEIGHT);
setModal(true);
setHeading("Sample Search Criteria");
setHeading(viewContext.getMessage(Dict.SEARCH_CRITERIA_DIALOG_TITLE,
entityKind.getDescription()));
setLayout(new FillLayout());
setResizable(false);
criteriaWidget = new DetailedSearchMainCriteriaWidget(viewContext, entityKind);
add(createMainCriteriaPanel());
add(tabPanel = new TabPanel());
tabPanel = new TabPanel();
for (AssociatedEntityKind association : getAssociatedEntityKinds(entityKind))
{
DetailedSearchSubCriteriaWidget subCriteriaWidget =
......@@ -79,6 +81,10 @@ public class DetailedSearchWindow extends Dialog
subCriteriaWidgets.add(subCriteriaWidget);
addSearchWidgetTab(subCriteriaWidget);
}
if (subCriteriaWidgets.isEmpty() == false)
{
add(tabPanel);
}
addEnterListener();
final ButtonBar bar = getButtonBar();
bar.removeAll();
......
......@@ -203,7 +203,7 @@ public class DetailedSearchManager
{
associations.add(findAssociatedEntities(subCriteria));
}
if (subCriterias.isEmpty() && criteria.isEmpty())
if (subCriterias.isEmpty() && criteria.getCriteria().isEmpty())
{
// if no criteria were provided find all samples
criteria.getCriteria().add(
......
......@@ -168,6 +168,7 @@ var common = {
show_related_datasets_radio_label: "Related entities",
more_results_found_message: "More search results were found, but are not shown. Consider making the search more specific.",
more_results_found_title: "More results found",
search_criteria_dialog_title: "{0} Search Criteria",
//
// Sample Browser
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment