Why does not my Jquery dialog appear when I click?

1

I am trying to make a confirmation dialog that happens when you click on the delete link, the dialog is displayed. Are you sure you want to delete the app? But for some reason it does not appear to me.

This is my html.

<a class="link_pointer" id="delete_link_{{ store_app.id }}"><img src="/static/img/icon_tool_close.gif" alt='Eliminar Colección' title='Eliminar Colección'></a>

<div id="dialog_remove_col" class="kard" title="¡Advertencia!">
    <p>¿Estás seguro de que quieres eliminar tu aplicacion?</p>
</div>

and this is my javascript file:

function delete_kapps_form(selector, content){
$('#dialog_remove_col').dialog({
    autoOpen: false, 
          resizable: false,
    height:140,
    modal: true,
    buttons: {
        'Eliminar': function() {
            $(this).dialog('close');
            send_request("/coleccion/eliminar/"+$(this).attr("to_delete")+"/", "", "POST", refresh_col_list);
        },
        Cancelar: function() {
            $(this).dialog('close');

        }
    }
      });       
$('a[id*=delete_link_]').click(function(){
    var id_col = $(this).attr('id').replace('delete_link_', ''); 
    $("#dialog_remove_col").attr("to_delete", id_col);
    open_dialog_remove_col(id_col);
});
}

$functions['delete_kapps_form'] = delete_kapps_form;

function open_dialog_remove_col(id_col){
$("#dialog_remove_col").dialog('open');
   return false;
}
    
asked by Rafael 03.08.2018 в 21:27
source

1 answer

1

Already solve my problem what it was is that the jquery was loading before the Django for the solutions utlizando:

function enable_store_kapps_envents(selector, content){
$('body').on('click', selector, function(){

    $('#dialog_remove_kapp').dialog({
        autoOpen: true, 
        resizable: false,
        height:180,
        modal: true,
        buttons: {
            'Eliminar': function() {
                $(this).dialog('close');
                send_request("/tienda/configurar/kapps/eliminar/"+$(this).attr("to_delete")+"/", "", "POST");
            },
            Cancelar: function() {
                $(this).dialog('close');
            }
        }
    })

});    
}

$functions['enable_store_kapps_envents'] = enable_store_kapps_envents;
    
answered by 07.08.2018 / 17:25
source