Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 167 Rev 169
Línea 1102... Línea 1102...
1102
        $('#modal-section h4[class="modal-title"]').html('LABEL_ADD LABEL_SECTION');
1102
        $('#modal-section h4[class="modal-title"]').html('LABEL_ADD LABEL_SECTION');
1103
        $('#modal-section').modal('show');
1103
        $('#modal-section').modal('show');
1104
    });
1104
    });
1105
    $('body').on('click', 'button.btn-edit-section', function(e) {
1105
    $('body').on('click', 'button.btn-edit-section', function(e) {
1106
        e.preventDefault();
1106
        e.preventDefault();
1107
        var slug = $(this).data('slug');
1107
        var slug = $(this).data('section');
1108
        var section;
1108
        var section;
1109
        var showForm = false;
1109
        var showForm = false;
1110
        for (i = 0; i < objFormGenerator.sections.length; i++) {
1110
        for (i = 0; i < objFormGenerator.sections.length; i++) {
1111
            section = objFormGenerator.sections[i];
1111
            section = objFormGenerator.sections[i];
1112
            if (slug == section.slug) {
1112
            if (slug == section.slug) {
Línea 1128... Línea 1128...
1128
            $('#modal-section').modal('show');
1128
            $('#modal-section').modal('show');
1129
        }
1129
        }
1130
    });
1130
    });
1131
    $('body').on('click', 'button.btn-delete-section', function(e) {
1131
    $('body').on('click', 'button.btn-delete-section', function(e) {
1132
        e.preventDefault();
1132
        e.preventDefault();
1133
        var slug = $(this).data('slug');
1133
        var slug = $(this).data('section');
1134
        bootbox.confirm({
1134
        bootbox.confirm({
1135
            title: "LABEL_DELETE LABEL_SECTION",
1135
            title: "LABEL_DELETE LABEL_SECTION",
1136
            message: "LABEL_QUESTION_DELETE",
1136
            message: "LABEL_QUESTION_DELETE",
1137
            buttons: {
1137
            buttons: {
1138
                cancel: {
1138
                cancel: {
Línea 1151... Línea 1151...
1151
        });
1151
        });
1152
    });
1152
    });
1153
    $('body').on('click', 'button.btn-add-question', function(e) {
1153
    $('body').on('click', 'button.btn-add-question', function(e) {
1154
        e.preventDefault();
1154
        e.preventDefault();
1155
        validatorFormQuestion.resetForm();
1155
        validatorFormQuestion.resetForm();
1156
        var slug = $(this).data('slug');
1156
        var slug = $(this).data('section');
1157
        $('#form-question #question-section').val(slug);
1157
        $('#form-question #question-section').val(slug);
1158
        $('#form-question #question-slug').val('');
1158
        $('#form-question #question-slug').val('');
1159
        instanceName = 'question-text';
1159
        instanceName = 'question-text';
1160
        let editor = CKEDITOR.instances[instanceName];
1160
        let editor = CKEDITOR.instances[instanceName];
1161
        editor.setData('', function() {
1161
        editor.setData('', function() {