境界線の色を変更し、ブートストラップテーブルフレームワークの検索ツールに右側のアイコンを追加したいとします。ブートストラップテーブル - 検索ツールのプロパティを変更する
また、テーブルの上部にある他のボタンと揃えたいと思います。
私のコードは次のとおりです。
/* SEARCH TOOL */
.search{
width: 25%;
}
.fixed-table-toolbar .bs-bars,
.fixed-table-toolbar .search,
.fixed-table-toolbar .columns {
position: relative;
margin-top: 10px;
margin-bottom: 10px;
line-height: 34px;
}
<table class='table-bordered' id='tableprod'
data-toggle='table'
data-toolbar='#toolbar'
data-show-refresh='true'
data-show-toggle='true'
data-sort-name='name'
data-sort-order='desc'
data-show-columns='true'
data-pagination='true'
data-search='true'>
<thead class='thead-inverse'>
<tr>
<th data-field='seleccion' data-switchable='false' data-checkbox='true'></th>
<th data-field='estado' data-switchable='false'></th>
<th data-field='pagina' data-sortable='true'>PÀGINA</th>
<th data-field='codigo' data-sortable='true' data-switchable='false'>CODI</th>
<th data-field='descripcion' data-sortable='true' data-switchable='false'>DESCRIPCIÓ</th>
<th data id='image' data-switchable='false'>imatge</th>
<th data-field='pvp-cat' data-sortable='true'>PVP-CAT</th>
<th data-field='pvp-lev' data-sortable='true'>PVP-LEV</th>
<th data-field='pvp-and' data-sortable='true'>PVP-AND</th>
<th data-field='pvp-cen' data-sortable='true'>PVP-CEN</th>
<th data-field='pvp-nor' data-sortable='true'>PVP-NOR</th>
<th data-field='pvp-vas' data-sortable='true'>PVP-VAS</th>
<th data-field='fecha-mod' data-sortable='true'>FECHA-MOD</th>
<th data-field='user' data-sortable='true' data-visible='false'>USER</th>
<th data-field='edit' data-sortable='false' data-switchable='false'>EDIT</th>
</tr>
</thead>
<tbody>
<tr>
<!— Function to load registres —>
</tr>
</tbody>
</table>
if (this.options.search) {
html = [];
html.push(
'<div class="pull-' + this.options.searchAlign + ' search">',
sprintf('<input class="form-control' +
sprintf(' input-%s', this.options.iconSize) +
'" type="text" placeholder="%s">',
this.options.formatSearch()),
'</div>');
this.$toolbar.append(html.join(''));
$search = this.$toolbar.find('.search input');
$search.off('keyup drop').on('keyup drop', function (event) {
if (that.options.searchOnEnterKey && event.keyCode !== 13) {
return;
}
if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) {
return;
}
clearTimeout(timeoutId); // doesn't matter if it's 0
timeoutId = setTimeout(function() {
that.onSearch(event);
}, that.options.searchTimeOut);
});
if (isIEBrowser()) {
$search.off('mouseup').on('mouseup', function (event) {
clearTimeout(timeoutId); // doesn't matter if it's 0
timeoutId = setTimeout(function() {
that.onSearch(event);
}, that.options.searchTimeOut);
});
}
}
それが動作しません。私は、問題は、検索ツールは入力タグとクラスフォームコントロールを使用していると思いますが、わかりません。
も –
[OK]を、すでにそれが更新のHTMLパーツを追加コーディング。 – ruzD
私はあなたのhtmlの部分に提出された検索を見ません。入力フィールドがあり、タイプが検索の場合は、 の入力で境界色を追加できます[type = search] { border-color:red; } とクリック入力フィールドの境界線に問題がある場合は、 入力[タイプ=検索]を設定することができます:focus { border-color:red; 概要:0; } –