mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Merge pull request #14842 from Godmartinz/adjust-preview-window
Fixed label preview window position
This commit is contained in:
commit
f8ab9f62f6
|
@ -2,7 +2,7 @@
|
|||
@push('css')
|
||||
<style>
|
||||
:root {
|
||||
--l2p-height: 400px;
|
||||
--l2p-height: 200px;
|
||||
--l2p-background-color: aliceblue;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,10 +66,8 @@
|
|||
|
||||
<!-- Template -->
|
||||
<div class="form-group{{ $errors->has('label2_template') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
@include('partials.label2-preview')
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<table
|
||||
data-click-to-select="true"
|
||||
data-columns="{{ \App\Presenters\LabelPresenter::dataTableLayout() }}"
|
||||
|
@ -92,7 +90,11 @@
|
|||
></table>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const chosenLabel = "{{ old('label2_template', $chosenLabel ?? '') }}";
|
||||
$('#label2TemplateTable').on('load-success.bs.table', (e) => {
|
||||
if (chosenLabel) {
|
||||
$('input[name="label2_template"][value="' + chosenLabel + '"]').prop('checked', true);
|
||||
}
|
||||
let form = document.getElementById('settingsForm');
|
||||
form.dispatchEvent(new Event('change'));
|
||||
});
|
||||
|
@ -209,7 +211,9 @@
|
|||
<p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9 col-md-offset-3" style="margin-bottom: 10px;">
|
||||
@include('partials.label2-preview')
|
||||
</div>
|
||||
<!-- Fields -->
|
||||
<div class="form-group {{ $errors->has('label2_fields') ? 'error' : '' }}">
|
||||
<div class="col-md-3 text-right">
|
||||
|
|
Loading…
Reference in a new issue