Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1131 Rev 1132
Línea 322... Línea 322...
322
        behaviors = [];
322
        behaviors = [];
323
        CKEDITOR.instances.description.setData('');
323
        CKEDITOR.instances.description.setData('');
324
        validator.resetForm();
324
        validator.resetForm();
325
        $('#row-form').show();
325
        $('#row-form').show();
326
        $('#row-list').hide();
326
        $('#row-list').hide();
327
        $("#rows").html('');
327
        renderData([]);
328
        return false;
328
        return false;
329
    });
329
    });
330
    $('body').on('click', 'button.btn-edit', function(e) {
330
    $('body').on('click', 'button.btn-edit', function(e) {
331
        e.preventDefault();
331
        e.preventDefault();
332
        NProgress.start();
332
        NProgress.start();
333
        var action = $(this).data('href');
333
        var action = $(this).data('href');
334
        $("#rows").html('');
334
        renderData([]);
335
        $.ajax({
335
        $.ajax({
336
            'dataType': 'json',
336
            'dataType': 'json',
337
            'method': 'get',
337
            'method': 'get',
338
            'url': action,
338
            'url': action,
339
        }).done(function(response) {
339
        }).done(function(response) {
Línea 532... Línea 532...
532
    /**
532
    /**
533
     * Render Sections data
533
     * Render Sections data
534
     */
534
     */
535
    const renderData = (data) => {
535
    const renderData = (data) => {
536
        getAllBehaviors();
536
        getAllBehaviors();
-
 
537
        if(data.length>0){
537
        $("#rows").html($("#behaviorTemplate").render(data));
538
            $("#rows").html($("#behaviorTemplate").render(data));
-
 
539
        }else{
-
 
540
            $("#rows").html('')
-
 
541
        }
538
    }
542
    }
539
    /**
543
    /**
540
     * get alls Behavios
544
     * get alls Behavios
541
     */
545
     */
542
    const getAllBehaviors = () => {
546
    const getAllBehaviors = () => {