17 nov 2018
This commit is contained in:
parent
0c9a118281
commit
765d6a2f6b
52 changed files with 3200 additions and 229 deletions
|
|
@ -82,6 +82,7 @@
|
|||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Farbe')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
@ -93,11 +94,20 @@
|
|||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-color="{{ $value->color }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
|
||||
<td>@if($value->color)
|
||||
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: {{$value->color}}"></div>
|
||||
{{ $value->color }}
|
||||
@else
|
||||
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: #fff"></div>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->active }}">
|
||||
@if($value->active)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
|
|
@ -140,6 +150,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">Farbe*</label>
|
||||
<input type="text" name="color" id="minicolors-hue" class="form-control" value="#fff">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
|
|
@ -158,11 +177,23 @@
|
|||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#minicolors-hue').minicolors({
|
||||
control: 'hue',
|
||||
position: 'bottom ' + 'left',
|
||||
});
|
||||
|
||||
$('#modals-type').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='name']").val(button.data('name'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
color = '#fff';
|
||||
if(button.data('color') != ""){
|
||||
color = button.data('color');
|
||||
}
|
||||
$('#minicolors-hue').minicolors('value', color);
|
||||
|
||||
// $('.selectpicker').selectpicker('refresh');
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue