Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1231 Rev 1232
Línea 281... Línea 281...
281
                'data': $('#form').serialize()
281
                'data': $('#form').serialize()
282
            }).done(function(response) {
282
            }).done(function(response) {
283
                NProgress.start();
283
                NProgress.start();
284
                if (response['success']) {
284
                if (response['success']) {
285
                    $.fn.showSuccess(response['data']);
285
                    $.fn.showSuccess(response['data']);
286
                    $('#modal').modal('hide');
286
                    $('#row-lists').show();
-
 
287
        $('#row-form').hide();
287
                    gridTable.api().ajax.reload(null, false);
288
                    gridTable.api().ajax.reload(null, false);
288
                } else {
289
                } else {
289
                    validator.resetForm();
290
                    validator.resetForm();
290
                    if (jQuery.type(response['data']) == 'string') {
291
                    if (jQuery.type(response['data']) == 'string') {
291
                        $.fn.showError(response['data']);
292
                        $.fn.showError(response['data']);
Línea 329... Línea 330...
329
                renderSubordinateData([]);
330
                renderSubordinateData([]);
330
                setCompetencySelect();
331
                setCompetencySelect();
331
                setSubordinateSelect();
332
                setSubordinateSelect();
332
                validator.resetForm();
333
                validator.resetForm();
333
                $('#custom-tabs #custom-tabs-general-tab').tab('show');
334
                $('#custom-tabs #custom-tabs-general-tab').tab('show');
334
                $('#modal').modal('show');
335
                $('#row-lists').hide();
-
 
336
        $('#row-form').show();
335
            } else {
337
            } else {
336
                $.fn.showError(response['data']);
338
                $.fn.showError(response['data']);
337
            }
339
            }
338
        }).fail(function(jqXHR, textStatus, errorThrown) {
340
        }).fail(function(jqXHR, textStatus, errorThrown) {
339
            $.fn.showError(textStatus);
341
            $.fn.showError(textStatus);
Línea 369... Línea 371...
369
                setCompetencySelect();
371
                setCompetencySelect();
370
                setSubordinateSelect();
372
                setSubordinateSelect();
371
                $('#job_description_id_boss').val(response['data']['job_description_id_boss']);
373
                $('#job_description_id_boss').val(response['data']['job_description_id_boss']);
372
                validator.resetForm();
374
                validator.resetForm();
373
                $('#custom-tabs #custom-tabs-general-tab').tab('show');
375
                $('#custom-tabs #custom-tabs-general-tab').tab('show');
374
                $('#modal').modal('show');
376
                $('#row-lists').hide();
-
 
377
        $('#row-form').show();
375
            } else {
378
            } else {
376
                $.fn.showError(response['data']);
379
                $.fn.showError(response['data']);
377
            }
380
            }
378
        }).fail(function(jqXHR, textStatus, errorThrown) {
381
        }).fail(function(jqXHR, textStatus, errorThrown) {
379
            $.fn.showError(textStatus);
382
            $.fn.showError(textStatus);
Línea 385... Línea 388...
385
        e.preventDefault();
388
        e.preventDefault();
386
        gridTable.api().ajax.reload(null, false);
389
        gridTable.api().ajax.reload(null, false);
387
    });
390
    });
388
    $('body').on('click', 'button.btn-cancel', function(e) {
391
    $('body').on('click', 'button.btn-cancel', function(e) {
389
        e.preventDefault();
392
        e.preventDefault();
-
 
393
        $('#row-lists').show();
390
        $('#modal').modal('hide');
394
        $('#row-form').hide();
391
        $('#div-listing').show();
395
        $('#div-listing').show();
392
    });
396
    });
393
    $('body').on('click', 'button.btn-import', function(e) {
397
    $('body').on('click', 'button.btn-import', function(e) {
394
        e.preventDefault();
398
        e.preventDefault();
395
        NProgress.start();
399
        NProgress.start();