mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
ui: unify dropdown width
Fix a nasty scroll bar bug with alias proto selector, style and adjust all manual widths accordingly. For a strange reason the text inputs are 2px shorter in the base forms than the modals and the static pages so adjust the width to 346 in that case.
This commit is contained in:
parent
2a58142ddb
commit
8b378cd4e7
@ -33,6 +33,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-fixup {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.alias_table {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
@ -333,6 +337,8 @@
|
||||
case 'geoip':
|
||||
$("#alias_type_geoip").show();
|
||||
$("#alias\\.proto").selectpicker('show');
|
||||
/* work around JS injection of nasty overflow scroll bar being injected */
|
||||
$("#row_alias\\.type > td > .dropdown:last > .dropdown-menu > .inner").addClass('dropdown-fixup');
|
||||
break;
|
||||
case 'asn':
|
||||
$("#alias_type_default").show();
|
||||
@ -766,8 +772,8 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<select id="alias.type" class="selectpicker" data-width="200px"></select>
|
||||
<select id="alias.proto" multiple="multiple" title="" class="selectpicker" data-width="110px"></select>
|
||||
<select id="alias.type" class="selectpicker" data-width="245px"></select>
|
||||
<select id="alias.proto" multiple="multiple" title="{{lang._('None')}}" class="selectpicker" data-width="100px"></select>
|
||||
</td>
|
||||
<td>
|
||||
<span class="help-block" id="help_block_alias.type"></span>
|
||||
@ -781,7 +787,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<select id="alias.categories" multiple="multiple" class="tokenize"></select>
|
||||
<select id="alias.categories" multiple="multiple" class="tokenize" data-width="348px"></select>
|
||||
<span class="hidden" data-for="help_for_alias.categories">
|
||||
{{lang._('For grouping purposes you may select multiple groups here to organize items.')}}
|
||||
</span>
|
||||
@ -835,7 +841,7 @@
|
||||
<select multiple="multiple"
|
||||
id="alias.content"
|
||||
class="tokenize"
|
||||
data-width="334px"
|
||||
data-width="348px"
|
||||
data-allownew="true"
|
||||
data-nbdropdownelements="10"
|
||||
data-live-search="true"
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
id="{{ id }}"
|
||||
class="{{style|default('selectpicker')}}"
|
||||
{% if hint|default(false) %}data-hint="{{hint}}"{% endif %}
|
||||
data-width="{{width|default("334px")}}"
|
||||
data-width="{{width|default("346px")}}"
|
||||
data-allownew="{{allownew|default("false")}}"
|
||||
data-sortable="{{sortable|default("false")}}"
|
||||
data-live-search="true"
|
||||
|
||||
@ -422,7 +422,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td><a id="help_for_category" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Category"); ?></td>
|
||||
<td>
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="334px" data-live-search="true">
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="348px" data-live-search="true">
|
||||
<?php
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):
|
||||
$catname = htmlspecialchars($category['name'], ENT_QUOTES | ENT_HTML401);?>
|
||||
|
||||
@ -995,7 +995,7 @@ $( document ).ready(function() {
|
||||
<tr>
|
||||
<td><a id="help_for_category" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Category"); ?></td>
|
||||
<td>
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="334px" data-live-search="true">
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="348px" data-live-search="true">
|
||||
<?php
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):
|
||||
$catname = htmlspecialchars($category['name'], ENT_QUOTES | ENT_HTML401);?>
|
||||
|
||||
@ -234,7 +234,7 @@ $( document ).ready(function() {
|
||||
<tr>
|
||||
<td><a id="help_for_category" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Category"); ?></td>
|
||||
<td>
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="334px" data-live-search="true">
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="348px" data-live-search="true">
|
||||
<?php
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):
|
||||
$catname = htmlspecialchars($category['name'], ENT_QUOTES | ENT_HTML401);?>
|
||||
|
||||
@ -815,7 +815,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td><a id="help_for_category" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Category"); ?></td>
|
||||
<td>
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="334px" data-live-search="true">
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-width="348px" data-live-search="true">
|
||||
<?php
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):
|
||||
$catname = htmlspecialchars($category['name'], ENT_QUOTES | ENT_HTML401);?>
|
||||
|
||||
@ -1306,7 +1306,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td><a id="help_for_category" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Category"); ?></td>
|
||||
<td>
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-sortable="false" data-width="334px" data-live-search="true">
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-sortable="false" data-width="348px" data-live-search="true">
|
||||
<?php
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):
|
||||
$catname = htmlspecialchars($category['name'], ENT_QUOTES | ENT_HTML401);?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user