Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 6590 Rev 6591
Línea 278... Línea 278...
278
                        return s;
278
                        return s;
279
                    }
279
                    }
280
                }
280
                }
281
              ],
281
              ],
282
        });
282
        });
283
 
-
 
-
 
283
        var seleccionarCampo;
284
    var validatorTextAdd  = $('#form-slide-text-add').validate({
284
    var validatorTextAdd  = $('#form-slide-text-add').validate({
285
        debug: true,
285
        debug: true,
286
        onclick: false,
286
        onclick: false,
287
        onkeyup: false,
287
        onkeyup: false,
288
        ignore: [],
288
        ignore: [],
Línea 314... Línea 314...
314
            if (window.FormData){
314
            if (window.FormData){
315
                formdata = new FormData(form); //form[0]);
315
                formdata = new FormData(form); //form[0]);
316
            }
316
            }
Línea 317... Línea 317...
317
 
317
 
318
            $('input[type="submit"]').prop('disabled', true);
-
 
-
 
318
            $('input[type="submit"]').prop('disabled', true);
319
 
319
            NProgress.start();
320
            $.ajax({
320
            $.ajax({
321
                'dataType'  : 'json',
321
                'dataType'  : 'json',
322
                'accept'    : 'application/json',
322
                'accept'    : 'application/json',
323
                'method'    : 'post',
323
                'method'    : 'post',
Línea 326... Línea 326...
326
                'processData': false,
326
                'processData': false,
327
                'contentType': false,
327
                'contentType': false,
328
            }).done(function(response) {
328
            }).done(function(response) {
329
                if(response['success']) {
329
                if(response['success']) {
330
                    $.fn.showSuccess(response['data']);
330
                    $.fn.showSuccess(response['data']);
331
                       
-
 
-
 
331
                    $('body, html').animate({scrollTop: '0px'}, 300);
-
 
332
					$('#content1').css('display','block');
332
                    $('#company-microlearning-slide-text-add-box').modal('hide');
333
                    $('.contenido').html(''); 
-
 
334
            		seleccionarCampo.css('display','none');
Línea 333... Línea 335...
333
                    
335
                    
334
                    gridTable.api().ajax.reload(null, false);
336
                    gridTable.api().ajax.reload(null, false);
335
                } else {
337
                } else {
336
                    validatorTextAdd.resetForm();
338
                    validatorTextAdd.resetForm();
Línea 468... Línea 470...
468
                if(response['success']) {
470
                if(response['success']) {
469
                    $.fn.showSuccess(response['data']);
471
                    $.fn.showSuccess(response['data']);
470
                    $('body, html').animate({scrollTop: '0px'}, 300);
472
                    $('body, html').animate({scrollTop: '0px'}, 300);
471
					$('#content1').css('display','block');
473
					$('#content1').css('display','block');
472
                    $('.contenido').html(''); 
474
                    $('.contenido').html(''); 
-
 
475
            		
473
            		$('#company-microlearning-slide-image-add-box').css('display','none');
476
            		seleccionarCampo.css('display','none');
Línea 474... Línea 477...
474
                    
477
                    
475
                    gridTable.api().ajax.reload(null, false);
478
                    gridTable.api().ajax.reload(null, false);
476
                } else {
479
                } else {
477
                    validatorImageAdd.resetForm();
480
                    validatorImageAdd.resetForm();
Línea 536... Línea 539...
536
                    $.fn.showSuccess(response['data']);
539
                    $.fn.showSuccess(response['data']);
Línea 537... Línea 540...
537
                       
540
                       
538
                    $('body, html').animate({scrollTop: '0px'}, 300);
541
                    $('body, html').animate({scrollTop: '0px'}, 300);
539
					$('#content1').css('display','block');
542
					$('#content1').css('display','block');
-
 
543
                    $('.contenido').html(''); 
540
                    $('.contenido').html(''); 
544
            		
Línea 541... Línea 545...
541
            		$('#company-microlearning-slide-image-edit-box').css('display','none');
545
            		seleccionarCampo.css('display','none');
542
                    
546
                    
543
                    gridTable.api().ajax.reload(null, false);
547
                    gridTable.api().ajax.reload(null, false);
544
                } else {
548
                } else {
Línea 1144... Línea 1148...
1144
        },
1148
        },
1145
        invalidHandler: function(form, validator) {
1149
        invalidHandler: function(form, validator) {
Línea 1146... Línea 1150...
1146
            
1150
            
1147
        }
1151
        }
1148
    });
-
 
-
 
1152
    });
1149
    var seleccionarCampo;
1153
   
1150
    $('body').on('click', 'button.btn-edit', function(e) {
1154
    $('body').on('click', 'button.btn-edit', function(e) {
Línea 1151... Línea 1155...
1151
        e.preventDefault();
1155
        e.preventDefault();
1152
  
1156
  
Línea 1431... Línea 1435...
1431
    })
1435
    })
Línea 1432... Línea 1436...
1432
 
1436
 
Línea 1433... Línea -...
1433
 
-
 
1434
    $('#form-slide-text-add #order').inputNumberFormat({decimal: 0});
-
 
1435
 
-
 
1436
    $('#form-slide-text-add #background').fileinput({
-
 
1437
        theme: 'fas',
-
 
1438
        language: 'es',
-
 
1439
        showUpload: false,
-
 
1440
        dropZoneEnabled: false,
-
 
1441
        maxFileCount: 1,
1437
 
Línea 1442... Línea 1438...
1442
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1438
    $('#form-slide-text-add #order').inputNumberFormat({decimal: 0});
Línea 1443... Línea -...
1443
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
-
 
1444
    });
-
 
1445
 
-
 
1446
    $('#form-slide-text-edit #order').inputNumberFormat({decimal: 0});
-
 
1447
 
-
 
1448
    $('#form-slide-text-edit #background').fileinput({
-
 
1449
        theme: 'fas',
-
 
1450
        language: 'es',
-
 
1451
        showUpload: false,
1439
 
Línea 1452... Línea 1440...
1452
        dropZoneEnabled: false,
1440
 
Línea 1473... Línea 1461...
1473
        maxFileCount: 1,
1461
        maxFileCount: 1,
1474
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1462
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1475
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1463
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1476
    });
1464
    });
Línea 1477... Línea -...
1477
 
-
 
1478
    $('#form-slide-video-add #background').fileinput({
-
 
1479
        theme: 'fas',
-
 
1480
        language: 'es',
-
 
1481
        showUpload: false,
-
 
1482
        dropZoneEnabled: false,
-
 
1483
        maxFileCount: 1,
-
 
1484
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1485
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
1465
 
Línea 1486... Línea 1466...
1486
    }); 
1466
 
Línea 1487... Línea 1467...
1487
 
1467
 
1488
    $('#form-slide-video-edit #order').inputNumberFormat({decimal: 0});
1468
    $('#form-slide-video-edit #order').inputNumberFormat({decimal: 0});
Línea 1495... Línea 1475...
1495
        maxFileCount: 1,
1475
        maxFileCount: 1,
1496
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1476
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1497
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1477
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1498
    });
1478
    });
Línea 1499... Línea -...
1499
 
-
 
1500
    $('#form-slide-video-edit #background').fileinput({
-
 
1501
        theme: 'fas',
-
 
1502
        language: 'es',
-
 
1503
        showUpload: false,
-
 
1504
        dropZoneEnabled: false,
-
 
1505
        maxFileCount: 1,
-
 
1506
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1507
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
1479
 
Línea 1508... Línea 1480...
1508
    }); 
1480
 
Línea 1519... Línea 1491...
1519
        maxFileCount: 1,
1491
        maxFileCount: 1,
1520
        allowedFileExtensions: ['pdf'],
1492
        allowedFileExtensions: ['pdf'],
1521
        msgPlaceholder: 'Documentos de extensión pdf',
1493
        msgPlaceholder: 'Documentos de extensión pdf',
1522
    });
1494
    });
Línea 1523... Línea -...
1523
 
-
 
1524
    $('#form-slide-document-add #background').fileinput({
-
 
1525
        theme: 'fas',
-
 
1526
        language: 'es',
-
 
1527
        showUpload: false,
-
 
1528
        dropZoneEnabled: false,
-
 
1529
        maxFileCount: 1,
-
 
1530
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1531
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
1495
 
Línea 1532... Línea 1496...
1532
    });
1496
 
Línea 1533... Línea 1497...
1533
 
1497
 
Línea 1542... Línea 1506...
1542
        maxFileCount: 1,
1506
        maxFileCount: 1,
1543
        allowedFileExtensions: ['pdf'],
1507
        allowedFileExtensions: ['pdf'],
1544
        msgPlaceholder: 'Documentos de extensión pdf',
1508
        msgPlaceholder: 'Documentos de extensión pdf',
1545
    });
1509
    });
Línea 1546... Línea -...
1546
 
-
 
1547
    $('#form-slide-document-edit #background').fileinput({
-
 
1548
        theme: 'fas',
-
 
1549
        language: 'es',
-
 
1550
        showUpload: false,
-
 
1551
        dropZoneEnabled: false,
-
 
1552
        maxFileCount: 1,
-
 
1553
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1554
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
1510
 
Línea 1555... Línea 1511...
1555
    }); 
1511
 
Línea 1556... Línea 1512...
1556
 
1512
 
Línea 1565... Línea 1521...
1565
        maxFileCount: 1,
1521
        maxFileCount: 1,
1566
        allowedFileExtensions: ['wav', 'mp3'],
1522
        allowedFileExtensions: ['wav', 'mp3'],
1567
        msgPlaceholder: 'Audios de extensión wav y mp3',
1523
        msgPlaceholder: 'Audios de extensión wav y mp3',
1568
    });
1524
    });
Línea 1569... Línea -...
1569
 
-
 
1570
    $('#form-slide-audio-add #background').fileinput({
-
 
1571
        theme: 'fas',
-
 
1572
        language: 'es',
-
 
1573
        showUpload: false,
-
 
1574
        dropZoneEnabled: false,
-
 
1575
        maxFileCount: 1,
-
 
1576
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1577
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
1525
 
Línea 1578... Línea 1526...
1578
    });
1526
 
Línea 1579... Línea 1527...
1579
 
1527
 
Línea 1588... Línea 1536...
1588
        maxFileCount: 1,
1536
        maxFileCount: 1,
1589
        allowedFileExtensions: ['wav', 'mp3'],
1537
        allowedFileExtensions: ['wav', 'mp3'],
1590
        msgPlaceholder: 'Audios de extensión wav y mp3',
1538
        msgPlaceholder: 'Audios de extensión wav y mp3',
1591
    });
1539
    });
Línea 1592... Línea -...
1592
 
-
 
1593
    $('#form-slide-audio-edit #background').fileinput({
-
 
1594
        theme: 'fas',
-
 
1595
        language: 'es',
-
 
1596
        showUpload: false,
-
 
1597
        dropZoneEnabled: false,
-
 
1598
        maxFileCount: 1,
-
 
1599
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1600
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
1540
 
Línea 1601... Línea 1541...
1601
    });
1541
 
Línea 1602... Línea -...
1602
 
-
 
1603
 
-
 
1604
    $('#form-slide-quizz-add #order').inputNumberFormat({decimal: 0});
-
 
1605
 
-
 
1606
    $('#form-slide-quizz-add #background').fileinput({
-
 
1607
        theme: 'fas',
-
 
1608
        language: 'es',
-
 
1609
        showUpload: false,
-
 
1610
        dropZoneEnabled: false,
1542
 
Línea 1611... Línea 1543...
1611
        maxFileCount: 1,
1543
 
Línea 1612... Línea -...
1612
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
1613
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
-
 
1614
    });
-
 
1615
 
-
 
1616
 
-
 
1617
    $('#form-slide-quizz-edit #order').inputNumberFormat({decimal: 0});
-
 
1618
 
-
 
1619
    $('#form-slide-quizz-edit #background').fileinput({
-
 
1620
        theme: 'fas',
1544
    $('#form-slide-quizz-add #order').inputNumberFormat({decimal: 0});