Skip to content

Commit

Permalink
add select contains operator in bootstrap 5
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed May 4, 2021
1 parent 9350dae commit c3ca65a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
13 changes: 13 additions & 0 deletions resources/views/bootstrap/50/components/input_text.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
@endif
<div class="@if($inline) flex flex-col @else flex flex-row @endif">
<div class="mt-1 mb-1 @if(!$inline) pr-4 @endif">
<div>
<select
id="input_text_options" class="form-control livewire_powergrid_select"
wire:input.debounce.100ms="filterInputTextOptions('{{ $number['field'] }}', $event.target.value)"
>
<option value="contains">{{ trans('livewire-powergrid::datatable.input_text_options.contains') }}</option>
<option value="contains_not">{{ trans('livewire-powergrid::datatable.input_text_options.contains_not') }}</option>
<option value="is">{{ trans('livewire-powergrid::datatable.input_text_options.is') }}</option>
<option value="is_not">{{ trans('livewire-powergrid::datatable.input_text_options.is_not') }}</option>
<option value="starts_with">{{ trans('livewire-powergrid::datatable.input_text_options.starts_with') }}</option>
<option value="ends_with">{{ trans('livewire-powergrid::datatable.input_text_options.ends_with') }}</option>
</select>
</div>
<input
data-id="{{ $number['field'] }}"
wire:model.debounce.800ms="filters_enabled.{{ $column->field }}"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/bootstrap/50/components/number.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<input data-id="{{ $number['field'] }}"
wire:model.debounce.800ms="filters_enabled.{{ $number['field'] }}.start"
wire:input.debounce.800ms="filterNumberStart('{{ $number['data_field'] }}', $event.target.value, '{{ addslashes($number['thousands']) }}', '{{ addslashes($number['decimal']) }}')"
style="@if($inline) max-width: 130px !important; margin-bottom: 6px; @else margin-right: 12px;padding-bottom: 6px;@endif"
style="@if($inline) max-width: 130px !important; @else margin-right: 12px;padding-bottom: 6px;@endif"
type="number" class="form-control livewire_powergrid_input" placeholder="MIN">
<input data-id="{{ $number['field'] }}"
wire:model.debounce.800ms="filters_enabled.{{ $number['field'] }}.end"
Expand Down
38 changes: 21 additions & 17 deletions resources/views/bootstrap/50/header.blade.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
<div class="dt--top-section">
<div class="row">

<div class="col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center">

<button class="btn livewire-powergrid" wire:click="exportToExcel()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-file-earmark-excel" viewBox="0 0 16 16">
<path
d="M5.884 6.68a.5.5 0 1 0-.768.64L7.349 10l-2.233 2.68a.5.5 0 0 0 .768.64L8 10.781l2.116 2.54a.5.5 0 0 0 .768-.641L8.651 10l2.233-2.68a.5.5 0 0 0-.768-.64L8 9.219l-2.116-2.54z"/>
<path
d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z"/>
</svg>
@if(count($checkbox_values) == 0)
{{ trans('livewire-powergrid::datatable.buttons.export') }}
@elseif(count($checkbox_values) == 1)
{{ trans('livewire-powergrid::datatable.buttons.export_one') }}
@else
{{ trans('livewire-powergrid::datatable.buttons.export_selected') }}
@endif
<div class="btn-group">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<span>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
class="fill-current text-gray-400" viewBox="0 0 16 16">
<path
d="M5.884 6.68a.5.5 0 1 0-.768.64L7.349 10l-2.233 2.68a.5.5 0 0 0 .768.64L8 10.781l2.116 2.54a.5.5 0 0 0 .768-.641L8.651 10l2.233-2.68a.5.5 0 0 0-.768-.64L8 9.219l-2.116-2.54z"/>
<path
d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z"/>
</svg>
</span>
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" wire:click="exportToExcel()" href="#">Excel</a></li>
<li><a class="dropdown-item" wire:click="exportToCsv()" href="#">Csv</a></li>
</ul>
</div>

</button>
<div class="d-flex align-items-center" style="padding-left: 10px;">
<div wire:loading class="spinner-border ms-auto" role="status" aria-hidden="true" style="color: #656363;"></div>
<div wire:loading class="spinner-border ms-auto" role="status" aria-hidden="true"
style="color: #656363;"></div>
</div>

</div>
Expand Down

0 comments on commit c3ca65a

Please sign in to comment.