{% extends "@crud\\crud.html.twig" %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('ace/css/chosen.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('ace/css/dataTables/dataTables.colVis.css') }}"/>
<link rel="stylesheet" type="text/css" href="{{ asset('ace/css/dataTables/dataTables.responsive.css') }}"/>
<link rel="stylesheet" type="text/css" href="{{ asset('ace/css/dataTables/dataTables.scroller.css') }}" />
<link rel="stylesheet" href="{{ asset('ace/css/colorbox.css') }}" />
{% endblock stylesheets %}
{% block javascripts %}
{{ parent() }}
<script src="{{ asset('ace/js/chosen.jquery.js') }}"></script>
<script src="{{ asset('ace/js/dataTables/jquery.dataTables.js') }}"></script>
<script src="{{ asset('ace/js/dataTables/jquery.dataTables.bootstrap.js') }}"></script>
<script src="{{ asset('ace/js/dataTables/extensions/TableTools/js/dataTables.tableTools.js') }}"></script>
<script src="{{ asset('ace/js/dataTables/extensions/ColVis/js/dataTables.colVis.js') }}"></script>
<script src="{{ asset('ace/js/dataTables/extensions/Responsive/js/dataTables.responsive.js') }}"></script>
<script src="{{ asset('ace/js/jquery.colorbox.js') }}"></script>
<script src="{{ asset('ace/js/jquery.table2excel.js') }}"></script>
{% endblock javascripts %}
{% block jquery %}
{{ parent() }}
<script type="text/javascript">
$(function()
{
$('.chosen-select').chosen({allow_single_deselect:true});
{#% for key,widget in formFilter %}
{% if key != '_token' %}
{% if widget.vars.attr.class is defined and isSubString(widget.vars.attr.class,'spinbox-input') %}
{% set min = "" %}
{% if widget.vars.attr.min is defined %}
{% set min = "min: "~widget.vars.attr.min~", " %}
{% endif %}
{% set max = "" %}
{% if widget.vars.attr.max is defined %}
{% set max = "max: "~widget.vars.attr.max~", " %}
{% endif %}
$('#{{widget.vars.id}}').ace_spinner({ {{ min }}{{ max }} step: 1, on_sides: true, icon_up: 'fas fa-plus', icon_down: 'fas fa-minus ', btn_up_class: 'btn-grey', btn_down_class: 'btn-grey', full_width: true});
{% else %}
{% if widget.vars.attr.class is defined and isSubString(widget.vars.attr.class,'campo_fecha') %}
$('#{{widget.vars.id}}').wrap('<div class="input-group" id="campo_fecha_{{widget.vars.id}}" />');
$('#campo_fecha_{{widget.vars.id}}').append('<span class="input-group-addon"><i class="fas fa-calendar bigger-110"></i></span>');
$('#{{widget.vars.id}}').datepicker({
autoclose: true,
todayHighlight: true
})
.next().on(ace.click_event, function(){
$(this).prev().focus();
});;
//$('#{{widget.vars.id}}').wrap('<div class="input-group date" id="campo_fecha_{{widget.vars.id}}" />');
//$('#campo_fecha_{{widget.vars.id}}').append('<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>');
//$('#campo_fecha_{{widget.vars.id}}').datetimepicker({ format: 'DD/MM/YYYY H:mm' });
{% endif %}
{% endif %}
{% endif %}
{% endfor %#}
});
</script>
{% endblock jquery %}
{% block crud %}
<div id="contenedor_{{ routeClassName }}">
{% include index_view %}
</div>
{% endblock %}