Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 411 Rev 412
Línea 307... Línea 307...
307
        ],
307
        ],
308
    });
308
    });
309
    /**
309
    /**
310
     * Clicked edit question
310
     * Clicked edit question
311
     */
311
     */
312
    $('body').on('click', 'button.btn-add-status', function(e) {
312
    $('body').on('click', 'button.btn-add-review', function(e) {
313
        e.preventDefault();
313
        e.preventDefault();
314
        objFormGenerator.editQuestion(
314
        objFormGenerator.editQuestion(
315
            $(this).data('section'),
315
            $(this).data('section'),
316
            $(this).data('question'),
316
            $(this).data('question'),
Línea 325... Línea 325...
325
    $('body').on('click', 'button.btn-edit-review', function(e) {
325
    $('body').on('click', 'button.btn-edit-review', function(e) {
326
        e.preventDefault();
326
        e.preventDefault();
Línea 327... Línea 327...
327
 
327
 
328
        e.preventDefault();
328
        e.preventDefault();
329
        var slug_section = $(this).data('section');
329
        var slug_section = $(this).data('section');
330
        var slug = $(this).data('question');
330
        var slug_question = $(this).data('question');
331
        var showForm = false;
331
        var showForm = false;
332
        for (i = 0; i < objFormGenerator.sections.length; i++) {
332
        for (i = 0; i < objFormGenerator.sections.length; i++) {
333
            if (slug_section == objFormGenerator.sections[i].slug_section) {
333
            if (slug_section == objFormGenerator.sections[i].slug_section) {
334
                for (j = 0; j < objFormGenerator.sections[i].questions.length; j++) {
334
                for (j = 0; j < objFormGenerator.sections[i].questions.length; j++) {
-
 
335
                    if (slug_question == objFormGenerator.sections[i].questions[j].slug_question) {
-
 
336
 
-
 
337
                        $('#form-review #section').val(objFormGenerator.sections[i].slug_section);
Línea 335... Línea 338...
335
                    if (slug == objFormGenerator.sections[i].questions[j].slug_question) {
338
                        $('#form-review #question').val(objFormGenerator.sections[i].questions[j].slug_question);
336
 
339
 
337
                        if(objFormGenerator.sections[i].questions[j].status) {
340
                        if(objFormGenerator.sections[i].questions[j].status) {
338
                            $('#form-review #question-status').val('1');
341
                            $('#form-review #question-status').val('1');
Línea 339... Línea 342...
339
                        } else {
342
                        } else {
340
                            $('#form-review #question-status').val('0');
343
                            $('#form-review #question-status').val('0');
341
  
344
  
342
                        }
345
                        }
343
                        if(objFormGenerator.sections[i].questions[j].comment) {
346
                        if(objFormGenerator.sections[i].questions[j].comment) {
344
                            $('#form-review #question-comment').val('1');
347
                            $('#form-review #question-comment').val('1');
345
                        }
348
                        }
346
                        showForm = true;
349
                        $('#modal-review').modal('show');
347
                        break;
-
 
-
 
350
                        return true;
348
                    }
351
                    }
349
                }
352
                }
350
                break;
-
 
351
            }
-
 
352
        }
-
 
353
        if (showForm) {
353
               
354
            $('#modal-review').modal('show');
354
            }
355
        }
355
        }
356
       
356
    
357
    });
357
    });
358
    /**
358
    /**
Línea 557... Línea 557...
557
 
557
 
558
 
558
 
559
    <div  id="modal-review" class="modal" tabindex="-1" role="dialog">
559
    <div  id="modal-review" class="modal" tabindex="-1" role="dialog">
560
        <div class="modal-dialog modal-lg" role="document">
560
        <div class="modal-dialog modal-lg" role="document">
561
            <form action="#" name="form-option" id="form-review">
561
            <form action="#" name="form-option" id="form-review">
562
                <input type="hidden" name="question-section" id="question-section" value="" />
562
                <input type="hidden" name="section" id="section" value="" />
563
                <input type="hidden" name="question-question" id="question-question" value="" />
563
                <input type="hidden" name="question" id="question" value="" />
564
                <div class="modal-content">
564
                <div class="modal-content">
565
                    <div class="modal-header">
565
                    <div class="modal-header">
566
                        <h4 class="modal-title">LABEL_EDIT LABEL_REVIEW</h4>
566
                        <h4 class="modal-title">LABEL_EDIT LABEL_REVIEW</h4>