Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 17250 Rev 17272
Línea 264... Línea 264...
264
                    'orderable': false,
264
                    'orderable': false,
265
                    'render' : function ( data, type, row ) {
265
                    'render' : function ( data, type, row ) {
266
                        s = '';
266
                        s = '';
Línea 267... Línea 267...
267
                        
267
                        
268
                        if(allowRevoke && data['link_revoke']  ) {
268
                        if(allowRevoke && data['link_revoke']  ) {
269
                            s = s + '<button class="btn btn-danger btn-sm btn-revoke" data-href="' + data['link_revoke']+ '" data-toggle="tooltip" title="LABEL_REVOKE"><i class="fa fa-times"></i> LABEL_REVOKE </button>&nbsp;';
269
                            s = s + '<button class="btn btn-danger btn-sm btn-revoke" data-action"' + data['link_revoke']+ '" data-toggle="tooltip" title="LABEL_REVOKE"><i class="fa fa-times"></i> LABEL_REVOKE </button>&nbsp;';
270
                        }
270
                        }
271
                        if(allowCancel && data['link_cancel']  ) {
271
                        if(allowCancel && data['link_cancel']  ) {
272
                            s = s + '<button class="btn btn-danger btn-sm btn-cancel" data-href="' + data['link_cancel']+ '" data-toggle="tooltip" title="LABEL_CANCEL"><i class="fa fa-times"></i> LABEL_CANCEL </button>&nbsp;';
272
                            s = s + '<button class="btn btn-danger btn-sm btn-cancel" data-href="' + data['link_cancel']+ '" data-toggle="tooltip" title="LABEL_CANCEL"><i class="fa fa-times"></i> LABEL_CANCEL </button>&nbsp;';
273
                        }
273
                        }
Línea 283... Línea 283...
283
                    }
283
                    }
284
                }
284
                }
285
              ],
285
              ],
286
        });
286
        });
Línea -... Línea 287...
-
 
287
 
-
 
288
    $('body').on('click', 'button.btn-revoke', function(e) {
-
 
289
        e.preventDefault();
-
 
290
        var action = $(this).data('action');
-
 
291
        
-
 
292
        swal.fire({
-
 
293
            title: 'LABEL_ARE_YOU_SURE',
-
 
294
            icon: 'question',
-
 
295
            cancelButtonText: 'LABEL_NO',
-
 
296
            showCancelButton: true,
-
 
297
            confirmButtonText: 'LABEL_YES'
-
 
298
          }).then((result) => {
-
 
299
            if (result.isConfirmed) {
-
 
300
                $.ajax({
-
 
301
                    'dataType'  : 'json',
-
 
302
                    'accept'    : 'application/json',
-
 
303
                    'method'    : 'post',
-
 
304
                    'url'       : action
-
 
305
                }).done(function(response) {
-
 
306
                    if(response['success']) {
-
 
307
                        $.fn.showSuccess(response['data']);
-
 
308
                        gridTable.api().ajax.reload(null, false);
-
 
309
                    } else {
-
 
310
                        $.fn.showError(response['data']);
-
 
311
                    }
-
 
312
                }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
313
                    $.fn.showError(textStatus);
-
 
314
                }).always(function() {
-
 
315
                    NProgress.done();
-
 
316
                });
-
 
317
            }
-
 
318
        });
-
 
319
 
-
 
320
        return false;
-
 
321
    });
Línea 287... Línea 322...
287
 
322
 
288
 
323
 
Línea 289... Línea 324...
289
    $('body').on('click', 'button.btn-notification', function(e) {
324
    $('body').on('click', 'button.btn-notification', function(e) {