<div class="bs-flex">
    <div id="subPanier">
        <span class="">{{ modele == 1? ('Modèle'|trad):('Brouillon'|trad) }} : {{ libPanier }}</span>
        <span class="nombreArtPanier" id="ligneSub">{{ nombreLigne }}</span>
        <span style="display:flex;"><span id="montantSub" style="margin-right:3px;">{{ montantPanier | prix }}</span> {{ devise }}</span>
        <span class="deletePanier white-tooltip link-tooltip Supprimer_v2" 
            {{ generateDataTooltips('top', 'Supprimer le panier' | trad ) }}
            onClick="deletePanier()"
        ></span>
        <span class="chargerPanier white-tooltip link-tooltip download_noir_v2" 
            {{ generateDataTooltips('top', 'Charger le panier' | trad ) }}
            onClick="loadPanier('{{ path('Panier.GeneralPanier.ajaxLoadPanier', {idPanier:id_panier}) }}')"
        ></span>
        <span class="deletePanier white-tooltip link-tooltip close_v2" 
            {{ generateDataTooltips('top', 'Fermer ce panier' | trad ) }}
            onClick="closePanier()"
        ></span>
    </div>
</div>

<script>
    function deletePanier()
    {
        $.ajax({
            dataType: 'html',
            url: '{{ path('Panier.GeneralPanier.ajaxDelete', {idPanier:id_panier}) }}',
            data: {},
            type: "POST",
            success: function(result, textStatus, request){
                window.location = window.location.pathname;
            }
        });
    }

    function loadPanier(path)
    {
        ajaxPopupV2(path, 'noId', '');        
    }

    function closePanier()
    {
        ajaxPopupV2('{{ path('Panier.GeneralPanier.ajaxClose') }}', 'noId', '');
    }
</script>