Skip to content

Commit

Permalink
Merge pull request #6327 from tomachalek/qhist_updates3
Browse files Browse the repository at this point in the history
GUI tweaks in query history extended search
  • Loading branch information
tomachalek authored Oct 16, 2024
2 parents df04c04 + 67fe76a commit 2fd1b98
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
1 change: 1 addition & 0 deletions public/files/js/translations/messages.cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
"qhistory__used_posattr_value": "Hodnota pozičního atributu",
"qhistory__used_structattrs_label": "Název strukturního atributu",
"qhistory__used_structattrs_value": "Hodnota strukturního atributu",
"qhistory__used_structattrs_text_type": "typ textu",
"qhistory__used_structures_label": "Název struktury",
"qhistory__query_contains": "Dotaz obsahuje",
"qhistory__search_button": "Hledat",
Expand Down
1 change: 1 addition & 0 deletions public/files/js/translations/messages.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@
"qhistory__used_posattr_value": "Positional attribute value",
"qhistory__used_structattrs_label": "Structural attribute name",
"qhistory__used_structattrs_value": "Structural attribute value",
"qhistory__used_structattrs_text_type": "text type",
"qhistory__used_structures_label": "Structure name",
"qhistory__query_contains": "Query contains",
"qhistory__search_button": "Search",
Expand Down
1 change: 1 addition & 0 deletions public/files/js/translations/messages.sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@
"qhistory__used_posattr_value": "Positional attribute value UNTRANSLATED",
"qhistory__used_structattrs_label": "Structural attribute name UNTRANSLATED",
"qhistory__used_structattrs_value": "Structural attribute value UNTRANSLATED",
"qhistory__used_structattrs_text_type": "text type UNTRANSLATED",
"qhistory__used_structures_label": "Structure name UNTRANSLATED",
"qhistory__query_contains": "Query contains UNTRANSLATED",
"qhistory__search_button": "Search UNTRANSLATED",
Expand Down
1 change: 1 addition & 0 deletions public/files/js/translations/messages.szl.json
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@
"qhistory__used_posattr_value": "Positional attribute value UNTRANSLATED",
"qhistory__used_structattrs_label": "Structural attribute name UNTRANSLATED",
"qhistory__used_structattrs_value": "Structural attribute value UNTRANSLATED",
"qhistory__used_structattrs_text_type": "text type UNTRANSLATED",
"qhistory__used_structures_label": "Structure name UNTRANSLATED",
"qhistory__search_button": "Search UNTRANSLATED",
"qhistory__query_contains": "Query contains UNTRANSLATED",
Expand Down
41 changes: 24 additions & 17 deletions public/files/js/views/searchHistory/full/fulltextForms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ export interface ExtendedSearchForms {
}>;
}

const largeInputCSS:React.CSSProperties = {
height: '1.8em',
fontSize: '1.4em',
};


export function init(
dispatcher:IActionDispatcher,
Expand All @@ -94,13 +99,14 @@ export function init(

const inputStyle:React.CSSProperties = {
width: '20em',
height: '1.6em',
height: '1.8em',
fontSize: '1.4em',
gridColumn: 'span 3'
};

return (
<>
<label>{he.translate('qhistory__query_contains')}:</label>
<label className="emph">{he.translate('qhistory__query_contains')}:</label>
<input style={inputStyle} type="text" value={props.value}
onChange={handleValueChange} />
</>
Expand Down Expand Up @@ -134,8 +140,8 @@ export function init(

return (
<>
<label>{he.translate('qhistory__used_posattr_value')}:</label>
<input type="text" value={props.value} onChange={handleValueChange} />
<label className="emph">{he.translate('qhistory__used_posattr_value')}:</label>
<input style={largeInputCSS} type="text" value={props.value} onChange={handleValueChange} />
<label>{he.translate('qhistory__used_posattrs_label')}:</label>
<input type="text" value={props.attr} onChange={handleAttrChange} />
</>
Expand Down Expand Up @@ -192,8 +198,12 @@ export function init(

return (
<>
<label>{he.translate('qhistory__used_structattrs_value')}:</label>
<input type="text" value={props.value} onChange={handleValueChange} />
<label className="emph">
{he.translate('qhistory__used_structattrs_value')}:
<br />
({he.translate('qhistory__used_structattrs_text_type')})
</label>
<input style={largeInputCSS} type="text" value={props.value} onChange={handleValueChange} />
<label>{he.translate('qhistory__used_structattrs_label')}:</label>
<input type="text" value={props.attr} onChange={handleAttrChange} />
</>
Expand Down Expand Up @@ -323,8 +333,8 @@ export function init(
{props.fsQueryCQLProps ?
<>
<UsedPosattrs attr={props.fsPosattrName} value={props.fsPosattrValue} />
<UsedStructures attr={props.fsStructureName} />
<UsedStructattrs attr={props.fsStructattrName} value={props.fsStructattrValue} />
<UsedStructures attr={props.fsStructureName} />
</> :
<>
<AnyPropertyValue value={props.fsAnyPropertyValue} />
Expand Down Expand Up @@ -388,13 +398,13 @@ export function init(
<QueryCQLProps isAdvancedQuery={props.fsQueryCQLProps} />
{props.fsQueryCQLProps ?
<>
<label>{he.translate('qhistory__used_wlattr')}</label>
<label className="emph">{he.translate('qhistory__used_wlpat')}:</label>
<input style={largeInputCSS} type="text" value={props.wlpat} onChange={handleWlpatChange} />
<label>{he.translate('qhistory__used_wlattr')}:</label>
<input type="text" value={props.wlattr} onChange={handleWlattrChange} />
<label>{he.translate('qhistory__used_wlpat')}</label>
<input type="text" value={props.wlpat} onChange={handleWlpatChange} />
<label>{he.translate('qhistory__used_pfilter')}</label>
<label>{he.translate('qhistory__used_pfilter')}:</label>
<input type="text" value={props.pfilter} onChange={handlePFilterChange} />
<label>{he.translate('qhistory__used_nfilter')}</label>
<label>{he.translate('qhistory__used_nfilter')}:</label>
<input type="text" value={props.nfilter} onChange={handleNFilterChange} />
</> :
<>
Expand Down Expand Up @@ -429,11 +439,8 @@ export function init(
<QueryCQLProps isAdvancedQuery={props.fsQueryCQLProps} />
{props.fsQueryCQLProps ?
<>
<div className="prop-query">
<label>{he.translate('qhistory__used_posattrs_label')}</label>
{'\u00a0'}
<input type="text" value={props.fsPosattrName} onChange={handleAttrChange} />
</div>
<label>{he.translate('qhistory__used_posattrs_label')}</label>
<input type="text" value={props.fsPosattrName} onChange={handleAttrChange} />
</> :
<>
<AnyPropertyValue value={props.fsAnyPropertyValue} />
Expand Down
5 changes: 5 additions & 0 deletions public/files/js/views/searchHistory/full/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ export const FilterForm = styled.form`
.util-button {
margin-top: 1em;
}
label.emph {
font-weight: bold;
font-size: 1.1em;
}
`;

// ---------------------- <RowToolbar /> ------------------------------
Expand Down

0 comments on commit 2fd1b98

Please sign in to comment.