Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 17202 Rev 17205
Línea 472... Línea 472...
472
                method: 'get',
472
                method: 'get',
473
                url: '$routeAdd'
473
                url: '$routeAdd'
474
            })
474
            })
475
                .done(function (response) {
475
                .done(function (response) {
476
                    if (response['success']) {
476
                    if (response['success']) {
477
                        $('#table-capsules tbody').empty()
477
                        $('#form-add #table-capsules tbody').empty()
Línea 478... Línea 478...
478
 
478
 
479
                        $('#capsule_uuid').children().not(':first').remove()
479
                        $('#form-add #capsule_uuid').children().not(':first').remove()
480
                        $.each(response['data']['capsules'], function (index, element) {
480
                        $.each(response['data']['capsules'], function (index, element) {
481
                            $('#capsule_uuid').append(
481
                            $('#form-add #capsule_uuid').append(
482
                                $('<option>', {
482
                                $('<option>', {
483
                                    value: element.id,
483
                                    value: element.id,
484
                                    text: element.name
484
                                    text: element.name
485
                                })
485
                                })
Línea 547... Línea 547...
547
                                let data = {
547
                                let data = {
548
                                    id: element.id,
548
                                    id: element.id,
549
                                    name: element.name
549
                                    name: element.name
550
                                }
550
                                }
Línea 551... Línea 551...
551
 
551
 
552
                                $('#table-capsules tbody').append(
552
                                $('#form-edit #table-capsules tbody').append(
553
                                    $('#trCapsuleTemplate').render(data)
553
                                    $('#trCapsuleTemplate').render(data)
554
                                )
554
                                )
555
                            }
555
                            }
Línea 809... Línea 809...
809
 
809
 
Línea 810... Línea 810...
810
            if (name.length > 50) name = name.substr(0, 50) + '...'
810
            if (name.length > 50) name = name.substr(0, 50) + '...'
Línea 811... Línea 811...
811
 
811
 
-
 
812
            let data = { id, name }
Línea 812... Línea 813...
812
            let data = { id, name }
813
 
813
 
814
            $('#form-add #table-capsules tbody').append($('#trCapsuleTemplate').render(data))
Línea 814... Línea 815...
814
            $('#table-capsules tbody').append($('#trCapsuleTemplate').render(data))
815
            $('#form-edit #table-capsules tbody').append($('#trCapsuleTemplate').render(data))
815
 
816
 
816
            return false
817
            return false
817
        })
818
        })
818
 
819
 
-
 
820
        // Configuración del formulario de creación
819
        // Configuración del formulario de creación
821
        $('#form-add #capsule_uuid').select2({
Línea 820... Línea 822...
820
        $('#form-add #capsule_uuid').select2({
822
            theme: 'bootstrap-5',
821
            theme: 'bootstrap-5',
823
            width: '100%',
822
            width: '100%',
824
            placeholder: 'LABEL_SELECT',
823
            placeholder: 'LABEL_SELECT'
825
            multiple: true
824
        })
826
        })
-
 
827
 
825
 
828
        // Configuración del formulario de edición
Línea 826... Línea 829...
826
        // Configuración del formulario de edición
829
        $('#form-edit #capsule_uuid').select2({
827
        $('#form-edit #capsule_uuid').select2({
830
            theme: 'bootstrap-5',
828
            theme: 'bootstrap-5',
831
            width: '100%',