Skip to content

Commit

Permalink
Fix the overlapping filter settings and the customize options (#8316)
Browse files Browse the repository at this point in the history
* These changes fix the overlapping filter settings and the customize options dropdown on the `User Interface` page. The 2 buttons (save and delete) got an improvement alignment.

Further improvements:
- spacing between title and UI config name
- fix paddings on smaller screens
- whitespace between buttons and inputs

* Fix for a few cases where the layout was still wrong and too small. Every width now displays the buttons below the 2 inputs

* Remove commented style
  • Loading branch information
MichelGabriel committed Sep 23, 2024
1 parent 8436990 commit 0d73e4f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
id="gn-uiconfig-customize"
class="col-lg-6 col-lg-offset-6 gn-nopadding-right height-70-px"
>
<div class="pull-right">
<label class="d-block" data-translate="">chooseOptionsToCustomize</label>
<select
class="form-control"
data-ng-options="o.label group by o.group for o in configOptions"
data-ng-model="optionsToAdd"
></select>
</div>
<label class="d-block" data-translate="">chooseOptionsToCustomize</label>
<select
class="form-control"
data-ng-options="o.label group by o.group for o in configOptions"
data-ng-model="optionsToAdd"
></select>
</div>

<p class="help-block" data-translate="">ui/config-help</p>
Expand Down
20 changes: 13 additions & 7 deletions web-ui/src/main/resources/catalog/templates/admin/settings/ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
id="gn-uiconfig-toolbar"
>
<div class="row">
<div class="col-md-4 gn-nopadding-left">
<div class="col-md-6 gn-nopadding-left">
<label
for="uiConfigurationList"
title="{{'uiConfiguration-help' | translate}}"
Expand All @@ -40,12 +40,12 @@
></select>
</div>

<div class="col-md-8 gn-nopadding-left gn-nopadding-right">
<div class="col-md-6 gn-nopadding-left gn-nopadding-right">
<label for="addUiSettings" data-translate="">addUiSettings</label>

<div class="row">
<!-- add UI config -->
<div class="col-md-6 gn-nopadding-left">
<div class="col-md-12 gn-nopadding-left">
<div class="input-group">
<input
class="form-control"
Expand All @@ -69,17 +69,19 @@
</div>
</div>


<!-- delete and save-->
<div class="col-md-6 gn-nopadding-left gn-nopadding-right">
<div class="col-md-12 gn-nopadding-left gn-nopadding-right">
<div class="btn-toolbar pull-right">
<button
type="submit"
class="btn btn-default btn-danger"
id="gn-btn-settings-delete"
data-ng-disabled="!uiConfiguration"
data-ng-click="deleteUiConfig()"
title="{{'deleteUiSettings'|translate}}"
>
<span class="fa fa-times"></span>
<span class="fa fa-fw fa-times"></span>
{{"deleteUiSettings"|translate}}
</button>
<button
Expand All @@ -88,8 +90,9 @@
id="gn-btn-settings-save"
data-ng-disabled="!gnSettings.$valid"
data-ng-click="updateUiConfig()"
title="{{'saveSettings'|translate}}"
>
<span class="fa fa-save"></span>
<span class="fa fa-fw fa-save"></span>
{{"saveSettings"|translate}}
</button>
</div>
Expand All @@ -104,7 +107,10 @@
data-ng-show="uiConfiguration.configuration !== undefined"
>
<div class="panel-heading">
<h1><span data-translate="">ui</span> <strong>{{uiConfiguration.id}}</strong></h1>
<h1>
<span data-translate="" class="gn-margin-right-sm">ui</span>
<strong>{{uiConfiguration.id}}</strong>
</h1>

<div data-gn-need-help="user-interface-configuration" class="pull-right"></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,16 @@ ul.gn-resultview li.list-group-item {
margin-bottom: 10px;
border-color: #ccc;
}
.col-lg-4, .col-md-6 {
@media (max-width: @screen-sm-max) {
padding-right: 0 !important;
}
}
.col-md-12, #gn-uiconfig-customize {
padding-right: 0 !important;
margin-bottom: @gn-spacing;
}

// checkbox (Bootstrap 5.2)
input[type="checkbox"],
input[type="radio"] {
Expand Down Expand Up @@ -656,7 +666,16 @@ ul.gn-resultview li.list-group-item {
z-index: 901;
}
#gn-uiconfig-customize {
margin-top: -85px;

@media (max-width: @screen-md-max) {
padding-left: 0 !important;
}

@media (min-width: @screen-lg-min) {
margin-top: -85px;
}


.dropdown-menu {
padding: 0 !important;
li {
Expand Down

0 comments on commit 0d73e4f

Please sign in to comment.