Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBO-372 layout fixes in import list #441

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions ubo-common/src/main/resources/META-INF/resources/import-editor.xed
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@
<script type="text/javascript">
<![CDATA[
$(document).ready(function() {

$('select[class*="autocomplete"]').selectpicker({liveSearch:true, liveSearchNormalize:true, virtualScroll:true, showSubtext:true, size:10});


$('select[class*="autocomplete"]').selectpicker({
liveSearch:true,
liveSearchNormalize:true,
virtualScroll:true,
showSubtext:true,
size:10,
width:'auto',
dropupAuto: false
});

$(document).popover({
selector: "[data-toggle=popover]",
container: "body",
Expand Down Expand Up @@ -121,7 +129,7 @@
<label for="{xed:generate-id()}" class="mycore-form-label ubo-mandatory">
<xed:output value="concat(i18n:translate('ubo.subject'), ': ')" />
</label>
<select id="{xed:generate-id()}" class="autocomplete mycore-form-input">
<select id="{xed:generate-id()}" class="autocomplete mycore-form-input" data-container="form-group" data-display="static">
<option value="">
<xed:output i18n="search.select.autocomplete" />
</option>
Expand All @@ -135,20 +143,20 @@
<xed:template id="origin">
<xed:repeat xpath="mods:classification[@classID='ORIGIN']" max="10">
<div class="form-inline form-group ubo-repeat-group">
<xed:choose>
<xed:when test="$genre_intern = 'dissertation'">
<label class="mycore-form-label ubo-mandatory" for="{xed:generate-id()}">
<xed:validate xpath="//mods:classification[@classID='ORIGIN']" required="true" i18n="condition.institution" display="global" />
<xed:output value="concat(i18n:translate('ubo.department'), ': ')" />
</label>
</xed:when>
<xed:otherwise>
<label class="mycore-form-label" for="{xed:generate-id()}">
<xed:output value="concat(i18n:translate('ubo.department'), ': ')" />
</label>
</xed:otherwise>
</xed:choose>
<select id="{xed:generate-id()}" class="autocomplete {$xed-validation-marker} mycore-form-input">
<xed:choose>
<xed:when test="$genre_intern = 'dissertation'">
<label class="mycore-form-label ubo-mandatory" for="{xed:generate-id()}">
<xed:validate xpath="//mods:classification[@classID='ORIGIN']" required="true" i18n="condition.institution" display="global" />
<xed:output value="concat(i18n:translate('ubo.department'), ': ')" />
</label>
</xed:when>
<xed:otherwise>
<label class="mycore-form-label" for="{xed:generate-id()}">
<xed:output value="concat(i18n:translate('ubo.department'), ': ')" />
</label>
</xed:otherwise>
</xed:choose>
<select id="{xed:generate-id()}" class="autocomplete {$xed-validation-marker} mycore-form-input" data-container="form-group" data-display="static">
<option value=""><xed:output i18n="search.select.autocomplete" /></option>
<xed:include uri="xslStyle:mycoreclass-options:classification:metadata:-1:children:ORIGIN" />
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,26 @@
<div>
<label for="{xed:generate-id()}">Institut / Klinik:</label>
<span class="{$xed-validation-marker}">
<select id="{xed:generate-id()}" style="width:400px;" class="autocomplete {$xed-validation-marker}">
<select id="{xed:generate-id()}" style="width:400px;" class="autocomplete {$xed-validation-marker}" data-display="static">
<option value=""><xed:output i18n="search.select" /></option>
<xed:include uri="xslStyle:mycoreclass-options:classification:metadata:-1:children:ORIGIN:14" />
</select>
</span>
</div>
</xed:bind>
<script type="text/javascript">
jQuery(document).ready(function() { jQuery('select[class*="autocomplete"]').selectpicker({liveSearch:true, liveSearchNormalize:true, virtualScroll:true, showSubtext:true, size:10}); });
jQuery(document).ready(function() {
jQuery('select[class*="autocomplete"]').selectpicker({
liveSearch:true, liveSearchNormalize:true, virtualScroll:true, showSubtext:true, size:10
liveSearch:true,
liveSearchNormalize:true,
virtualScroll:true,
showSubtext:true,
size:10,
width:'auto',
dropupAuto: false
});
});
</script>

</fieldset>
Expand Down
18 changes: 9 additions & 9 deletions ubo-common/src/main/resources/META-INF/resources/import-list.xed
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
<label for="{generate-id()}" class="mycore-form-label text-nowrap">
<xed:output i18n="ubo.partOf" />:
</label>
<select id="{generate-id()}" class="autocomplete {$xed-validation-marker} col-7 form-control custom-select">
<select id="{generate-id()}" class="{$xed-validation-marker} mycore-form-input form-control custom-select">
<option value="">
<xed:output i18n="search.select"/>
</option>
<xed:include uri="xslStyle:mycoreclass-options?omitSubtext={$UBO.Editor.import-list.omitSubtext}:classification:metadata:-1:children:partOf" />
<xed:include uri="xslStyle:mycoreclass-options:classification:metadata:-1:children:partOf" />
</select>
</div>
</xed:bind>
Expand All @@ -73,7 +73,7 @@
<label for="{generate-id()}" class="mycore-form-label text-nowrap">
<xed:output i18n="search.dozbib.status" />:
</label>
<select id="{generate-id()}" class="autocomplete {$xed-validation-marker} col-7 form-control custom-select">
<select id="{generate-id()}" class="{$xed-validation-marker} mycore-form-input form-control custom-select">
<option value="">
<xed:output i18n="search.select"/>
</option>
Expand All @@ -89,11 +89,11 @@
<label for="subject" class="mycore-form-label text-nowrap">
<xed:output i18n="ubo.subject" />:
</label>
<select class="autocomplete {$xed-validation-marker} col-7 form-control custom-select">
<select class="autocomplete {$xed-validation-marker} mycore-form-input" data-container="form-group" data-display="static">
<option value="">
<xed:output i18n="search.select" />
</option>
<xed:include uri="xslStyle:items2options:classification:editor:-1:children:fachreferate" />
<xed:include uri="xslStyle:mycoreclass-options?omitSubtext={$UBO.Editor.import-list.omitSubtext}:classification:metadata:-1:children:fachreferate" />
</select>
<xed:controls />
</div>
Expand All @@ -104,7 +104,7 @@
<label for="{generate-id()}" class="mycore-form-label text-nowrap">
<xed:output i18n="ubo.department" />:
</label>
<select id="{generate-id()}" class="autocomplete {$xed-validation-marker} col-7 form-control custom-select">
<select id="{generate-id()}" class="autocomplete {$xed-validation-marker} mycore-form-input" data-container="form-group" data-display="static">
<option value=""><xed:output i18n="search.select" /></option>
<xed:include uri="xslStyle:mycoreclass-options?omitSubtext={$UBO.Editor.import-list.omitSubtext}:classification:metadata:-1:children:ORIGIN" />
</select>
Expand All @@ -116,8 +116,8 @@
<label for="{generate-id()}" class="mycore-form-label text-nowrap">
<xed:output i18n="ubo.import.list.label.sourceFormat" />:
</label>
<select id="{generate-id()}" class="form-control col-7 mr-1 custom-select" onchange="UBOImportList.toggleEnrichment(this)">
<xed:include uri="xslStyle:items2options:classification:editor:-1:children:importSourceType" />
<select id="{generate-id()}" class="form-control mycore-form-input mr-1 custom-select" onchange="UBOImportList.toggleEnrichment(this)">
<xed:include uri="xslStyle:mycoreclass-options:classification:metadata:-1:children:importSourceType" />
</select>
</div>
</xed:bind>
Expand All @@ -127,7 +127,7 @@
<label for="{generate-id()}" class="mycore-form-label text-nowrap">
<xed:output i18n="ubo.import.list.label.outputFormat" />:
</label>
<select id="import-list-output-format-select" class="form-control col-7 custom-select">
<select id="import-list-output-format-select" class="form-control mycore-form-input custom-select">
<option value="preview-html">Vorschau (HTML)</option>
<option value="preview-mods-raw">Vorschau (MODS)</option>
<option value="import">direkt importieren</option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
$(document).ready(function () {
$('select[class*="autocomplete"]').selectpicker({liveSearch:true, liveSearchNormalize:true, virtualScroll:true, showSubtext:true, size:10});
$('select[class*="autocomplete"]').selectpicker({
liveSearch:true,
liveSearchNormalize:true,
virtualScroll:true,
showSubtext:true,
size:10,
width:'auto',
dropupAuto: false
});

});

const UBOImportList = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@
padding-left: 5px;
}

.bootstrap-select {
.dropdown-menu {
width: 100%;
}
}

// Large devices (desktops) and below: <= 1200px
@include media-breakpoint-down(lg) {
// add/overwrite styles for responsive level lg and lower
Expand Down
24 changes: 18 additions & 6 deletions ubo-common/src/main/resources/META-INF/resources/search-mdiss.xed
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,42 @@
<xed:bind xpath="conditions[@format='xml']/boolean[@operator='and']">

<xed:bind xpath="condition6[@field='origin'][@operator='=']/@value" default="14">
<div class="form-group form-inline">
<div class="form-group form-inline">
<label class="mycore-form-label">
<xed:output i18n="search.dozbib.origin" />
</label>
<select class="autocomplete mycore-form-input custom-select">
<select class="autocomplete mycore-form-input custom-select" data-container="form-group" data-display="static">
<option value="14"><xed:output i18n="search.select" /></option>
<xed:include uri="xslStyle:mycoreclass-options:classification:metadata:-1:children:ORIGIN:14" />
</select>
<script type="text/javascript">
$(document).ready(function() { $('select[class*="autocomplete"]').selectpicker({liveSearch:true, liveSearchNormalize:true, virtualScroll:true, showSubtext:true, size:10}); });
$(document).ready(function() {

$('select[class*="autocomplete"]').selectpicker({
liveSearch:true,
liveSearchNormalize:true,
virtualScroll:true,
showSubtext:true,
size:10,
width:'auto',
dropupAuto: false
});

});
</script>
</div>
</div>
</xed:bind>

<xed:bind xpath="condition2[@operator='contains']/@field" initially="person_ths" />
<xed:include uri="webapp:import-search.xed" ref="name" />

<xed:bind xpath="condition4[@field='title'][@operator='contains']/@value">
<div class="form-group form-inline">
<div class="form-group form-inline">
<label class="mycore-form-label">
<xed:output i18n="search.title" />
</label>
<input type="text" class="mycore-form-input" />
</div>
</div>
</xed:bind>

<xed:include uri="webapp:import-search.xed" ref="year" />
Expand Down
16 changes: 14 additions & 2 deletions ubo-common/src/main/resources/META-INF/resources/search.xed
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,25 @@
<label for="{xed:generate-id()}" class="mycore-form-label">
<xed:output i18n="ubo.department" />:
</label>
<select id="{xed:generate-id()}" class="autocomplete mycore-form-input custom-select">
<select id="{xed:generate-id()}" class="autocomplete mycore-form-input" data-container="form-group" data-display="static">
<option value=""><xed:output i18n="search.select" /></option>
<xed:include uri="xslStyle:mycoreclass-options:classification:metadata:-1:children:ORIGIN" />
</select>
</div>
<script type="text/javascript">
$(document).ready(function() { $('select[class*="autocomplete"]').selectpicker({liveSearch:true, liveSearchNormalize:true, virtualScroll:true, showSubtext:true, size:10}); });
$(document).ready(function() {

$('select[class*="autocomplete"]').selectpicker({
liveSearch:true,
liveSearchNormalize:true,
virtualScroll:true,
showSubtext:true,
size:10,
width:'auto',
dropupAuto: false
});

});
</script>
</xed:bind>

Expand Down
Loading