Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1089 Rev 1091
Línea 409... Línea 409...
409
    });
409
    });
410
    /**
410
    /**
411
     * Clicked save and close new/edit Form
411
     * Clicked save and close new/edit Form
412
     */
412
     */
413
    $('button.btn-form-save-close').click(function(e) {
413
    $('button.btn-form-save-close').click(function(e) {
-
 
414
 
-
 
415
        for (var instanceName in CKEDITOR.instances) {
-
 
416
            CKEDITOR.instances[instanceName].updateElement();
-
 
417
        }
-
 
418
 
414
        if ($('#form-name').val() == '') {
419
        if ($('#form-name').val() == '') {
415
            $.fn.showError('ERROR_ENTER_NAME');
420
            $.fn.showError('ERROR_ENTER_NAME');
-
 
421
        } else if ($('#form-description').val() == '') {
-
 
422
            $.fn.showError('ERROR_ENTER_DESCRIPTION');
-
 
423
        } else if ($('#form-text').val() == '') {
-
 
424
            $.fn.showError('ERROR_ENTER_TEXT');
416
        } else if ($('#form-status').val() == '') {
425
        } else if ($('#form-status').val() == '') {
417
            $.fn.showError('ERROR_SELECT_STATUS');
426
            $.fn.showError('ERROR_SELECT_STATUS');
418
        } else if ($('#job_description_id').val() == '') {
427
        } else if ($('#job_description_id').val() == '') {
419
            $.fn.showError('ERROR_SELECT_JOB_DESCRIPTION');
428
            $.fn.showError('ERROR_SELECT_JOB_DESCRIPTION');
420
        } else if (sections.length == 0) {
429
        } else if (sections.length == 0) {
421
            $.fn.showError('ERROR_NOT_SECTIONS');
430
            $.fn.showError('ERROR_NOT_SECTIONS');
422
        } else {
431
        } else {
-
 
432
 
423
            $.ajax({
433
            $.ajax({
424
                'dataType': 'json',
434
                'dataType': 'json',
425
                'method': 'post',
435
                'method': 'post',
426
                'url': $('#form-main').attr('action'),
436
                'url': $('#form-main').attr('action'),
427
                'data': {
437
                'data': {