Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 8987 Rev 8988
Línea 782... Línea 782...
782
            'section-name': {
782
            'section-name': {
783
                required: true,
783
                required: true,
784
                minlength: 2,
784
                minlength: 2,
785
                maxlength: 50
785
                maxlength: 50
786
            },
786
            },
787
            'text': {
787
            'section': {
788
                required: false,
788
                required: false,
789
            },
789
            },
790
        },
790
        },
791
        highlight: function(element) {
791
        highlight: function(element) {
792
            $(element).closest('.form-group').addClass('has-error');
792
            $(element).closest('.form-group').addClass('has-error');
Línea 814... Línea 814...
814
            var slug = $('#form-section #section-slug').val();
814
            var slug = $('#form-section #section-slug').val();
815
            if (slug) {
815
            if (slug) {
816
                objFormGenerator.editSection(
816
                objFormGenerator.editSection(
817
                    $('#form-section #section-slug').val(),
817
                    $('#form-section #section-slug').val(),
818
                    $('#form-section #section-name').val(),
818
                    $('#form-section #section-name').val(),
819
                    $('#form-section #text').val(),
819
                    $('#form-section #section').val(),
820
                );
820
                );
821
            } else {
821
            } else {
822
                objFormGenerator.addSection(
822
                objFormGenerator.addSection(
823
                    $('#form-section #section-name').val(),
823
                    $('#form-section #section-name').val(),
824
                    $('#form-section #text').val()
824
                    $('#form-section #section').val()
825
                );
825
                );
826
            }
826
            }
827
            renderSectionData(objFormGenerator.sections);
827
            renderSectionData(objFormGenerator.sections);
828
            $('#modal-section').modal('hide');
828
            $('#modal-section').modal('hide');
829
            return false;
829
            return false;
Línea 971... Línea 971...
971
    $('body').on('click', 'button[id="btn-add-section"]', function(e) {
971
    $('body').on('click', 'button[id="btn-add-section"]', function(e) {
972
        e.preventDefault();
972
        e.preventDefault();
973
        validatorFormSection.resetForm();
973
        validatorFormSection.resetForm();
974
        $('#form-section #section-slug').val('');
974
        $('#form-section #section-slug').val('');
975
        $('#form-section #section-name').val('');
975
        $('#form-section #section-name').val('');
976
        CKEDITOR.instances.text.setData('');
976
        CKEDITOR.instances.section.setData('');
977
        $('#modal-section h4[class="modal-title"]').html('LABEL_ADD LABEL_SECTION');
977
        $('#modal-section h4[class="modal-title"]').html('LABEL_ADD LABEL_SECTION');
978
        $('#modal-section').modal('show');
978
        $('#modal-section').modal('show');
979
    });
979
    });
980
    /**
980
    /**
981
     * Clicked on edit section
981
     * Clicked on edit section
Línea 989... Línea 989...
989
            section = objFormGenerator.sections[i];
989
            section = objFormGenerator.sections[i];
990
            if (slug == section.slug_section) {
990
            if (slug == section.slug_section) {
991
                validatorFormSection.resetForm();
991
                validatorFormSection.resetForm();
992
                $('#form-section #section-slug').val(section.slug_section);
992
                $('#form-section #section-slug').val(section.slug_section);
993
                $('#form-section #section-name').val(section.name);
993
                $('#form-section #section-name').val(section.name);
994
                CKEDITOR.instances.text.setData(section.text);
994
                CKEDITOR.instances.section.setData(section.text);
995
                showForm = true;
995
                showForm = true;
996
                break;
996
                break;
997
            }
997
            }
998
        }
998
        }
999
        if (showForm) {
999
        if (showForm) {
Línea 1385... Línea 1385...
1385
                ],
1385
                ],
1386
                removePlugins: 'elementspath,Anchor',
1386
                removePlugins: 'elementspath,Anchor',
1387
                heigth: 100
1387
                heigth: 100
1388
    }
1388
    }
Línea 1389... Línea 1389...
1389
 
1389
 
1390
    CKEDITOR.replace('text', config);
1390
    CKEDITOR.replace('section', config);
1391
    CKEDITOR.replace('description', config);
1391
    CKEDITOR.replace('description', config);
Línea 1392... Línea 1392...
1392
    CKEDITOR.replace('text', config);
1392
    CKEDITOR.replace('text', config);
1393
     
1393
     
Línea 1531... Línea 1531...
1531
                            <label for="section-name">LABEL_FIRST_NAME</label>
1531
                            <label for="section-name">LABEL_FIRST_NAME</label>
1532
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
1532
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
1533
                        </div>
1533
                        </div>
1534
                        <div class="form-group">
1534
                        <div class="form-group">
1535
                        <div class="form-group">
1535
                        <div class="form-group">
1536
                            <label for="text">LABEL_TEXT</label>
1536
                            <label for="section">LABEL_TEXT</label>
1537
                            <!--  ckeditor -->
1537
                            <!--  ckeditor -->
1538
                            <textarea  name="text" id="text" rows="5" class="ckeditor form-control"></textarea>
1538
                            <textarea  name="section" id="section" rows="5" class="ckeditor form-control"></textarea>
1539
                        </div>
1539
                        </div>
1540
                    </div>
1540
                    </div>
1541
                    <div class="modal-footer">
1541
                    <div class="modal-footer">
1542
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1542
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
1543
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
1543
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>