Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15373 Rev 15374
Línea 240... Línea 240...
240
                    var formdata = false;
240
                    var formdata = false;
241
                    if (window.FormData) {
241
                    if (window.FormData) {
242
                        formdata = new FormData(form); //form[0]);
242
                        formdata = new FormData(form); //form[0]);
243
                    }
243
                    }
Línea 244... Línea 244...
244
 
244
 
245
                    $('input[type="submit"]').prop('disabled', true);
245
                    $('#edit-file-box .btn-primary').prop('disabled', true);
246
 
246
                    
247
                    $.ajax({
247
                    $.ajax({
248
                        'dataType': 'json',
248
                        'dataType': 'json',
249
                        'accept': 'application/json',
249
                        'accept': 'application/json',
250
                        'method': 'post',
250
                        'method': 'post',
Línea 253... Línea 253...
253
                        'processData': false,
253
                        'processData': false,
254
                        'contentType': false,
254
                        'contentType': false,
255
                    }).done(function (response) {
255
                    }).done(function (response) {
256
                        if (response['success']) {
256
                        if (response['success']) {
257
                            $.fn.showSuccess(response['data']);
257
                            $.fn.showSuccess(response['data']);
258
 
258
                            
259
                            $('#edit-file-box').modal('hide');
259
                            $('#edit-file-box').modal('hide');
260
                            gridTable.api().ajax.reload(null, false);
260
                            gridTable.api().ajax.reload(null, false);
261
                        } else {
261
                        } else {
262
                            validatorEdit.resetForm();
262
                            validatorEdit.resetForm();
263
                            if (jQuery.type(response['data']) == 'string') {
263
                            if (jQuery.type(response['data']) == 'string') {
Línea 269... Línea 269...
269
                            }
269
                            }
270
                        }
270
                        }
271
                    }).fail(function (jqXHR, textStatus, errorThrown) {
271
                    }).fail(function (jqXHR, textStatus, errorThrown) {
272
                        $.fn.showError(textStatus);
272
                        $.fn.showError(textStatus);
273
                    }).always(function () {
273
                    }).always(function () {
-
 
274
                        $('#edit-file-box .btn-primary').prop('disabled', false);
274
                        NProgress.done();
275
                        NProgress.done();
275
                    });
276
                    });
276
                    return false;
277
                    return false;
277
                },
278
                },
278
                invalidHandler: function (form, validator) {
279
                invalidHandler: function (form, validator) {