Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15372 Rev 15373
Línea 352... Línea 352...
352
                    if (window.FormData) {
352
                    if (window.FormData) {
353
                        formdata = new FormData(form); //form[0]);
353
                        formdata = new FormData(form); //form[0]);
354
                    }
354
                    }
Línea 355... Línea 355...
355
 
355
 
356
                    $('#add-file-box .btn-primary').prop('disabled', true);
356
                    $('#add-file-box .btn-primary').prop('disabled', true);
357
 
357
                    
358
                    $.ajax({
358
                    $.ajax({
359
                        'dataType': 'json',
359
                        'dataType': 'json',
360
                        'accept': 'application/json',
360
                        'accept': 'application/json',
361
                        'method': 'post',
361
                        'method': 'post',
Línea 364... Línea 364...
364
                        'processData': false,
364
                        'processData': false,
365
                        'contentType': false,
365
                        'contentType': false,
366
                    }).done(function (response) {
366
                    }).done(function (response) {
367
                        if (response['success']) {
367
                        if (response['success']) {
368
                            $.fn.showSuccess(response['data']);
368
                            $.fn.showSuccess(response['data']);
369
 
369
                            
370
                            $('#add-file-box').modal('hide');
370
                            $('#add-file-box').modal('hide');
371
                            gridTable.api().ajax.reload(null, false);
371
                            gridTable.api().ajax.reload(null, false);
372
                        } else {
372
                        } else {
373
                            validatorAdd.resetForm();
373
                            validatorAdd.resetForm();
374
                            if (jQuery.type(response['data']) == 'string') {
374
                            if (jQuery.type(response['data']) == 'string') {
Línea 380... Línea 380...
380
                            }
380
                            }
381
                        }
381
                        }
382
                    }).fail(function (jqXHR, textStatus, errorThrown) {
382
                    }).fail(function (jqXHR, textStatus, errorThrown) {
383
                        $.fn.showError(textStatus);
383
                        $.fn.showError(textStatus);
384
                    }).always(function () {
384
                    }).always(function () {
-
 
385
                        $('#add-file-box .btn-primary').prop('disabled', false);
385
                        NProgress.done();
386
                        NProgress.done();
386
                    });
387
                    });
387
                    return false;
388
                    return false;
388
                },
389
                },
389
                invalidHandler: function (form, validator) {
390
                invalidHandler: function (form, validator) {