Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 2785 | Rev 2789 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2785 Rev 2788
Línea 294... Línea 294...
294
            $.fn.showError(textStatus);
294
            $.fn.showError(textStatus);
295
        }).always(function() {
295
        }).always(function() {
296
            NProgress.done();
296
            NProgress.done();
297
        });
297
        });
298
    });
298
    });
-
 
299
 
-
 
300
    $('button.btn-delete').confirmation({
-
 
301
                rootSelector: 'button.btn-delete',
-
 
302
                title: 'LABEL_ARE_YOU_SURE',
-
 
303
                singleton: true,
-
 
304
                btnOkLabel: 'LABEL_YES',
-
 
305
                btnCancelLabel: 'LABEL_NO',
-
 
306
                onConfirm: function (value) {
-
 
307
                    action = $(this).data('href');
-
 
308
                    NProgress.start();
-
 
309
                    $.ajax({
-
 
310
                        'dataType': 'json',
-
 
311
                        'accept': 'application/json',
-
 
312
                        'method': 'post',
-
 
313
                        'url': $(this).data('url'),
-
 
314
                    }).done(function (response) {
-
 
315
                        if (response['success']) {
-
 
316
                            $.fn.showSuccess(response['data']);
-
 
317
                            gridTable.api().ajax.reload(null, false);
-
 
318
                        } else {
-
 
319
                            $.fn.showError(response['data']);
-
 
320
                        }
-
 
321
                    }).fail(function (jqXHR, textStatus, errorThrown) {
-
 
322
                        $.fn.showError(textStatus);
-
 
323
                    }).always(function () {
-
 
324
                        NProgress.done();
-
 
325
                    });
-
 
326
                },
-
 
327
            });
Línea 299... Línea 328...
299
    
328
    
300
    $('body').on('click', 'button.btn-cancel', function(e) {
329
    $('body').on('click', 'button.btn-cancel', function(e) {
301
        e.preventDefault();
330
        e.preventDefault();
302
        $('#main').show();
331
        $('#main').show();