Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 265 Rev 266
Línea 145... Línea 145...
145
                        }
145
                        }
146
                    }
146
                    }
147
                }
147
                }
148
            }
148
            }
149
            $('[data-toggle="tooltip"]').tooltip();
149
            $('[data-toggle="tooltip"]').tooltip();
150
        },
150
        };
-
 
151
    }
Línea 151... Línea -...
151
        
-
 
152
         /**
-
 
153
         * Add element to question array
-
 
154
         */
-
 
155
        this.editQuestion = function(slug_section, slug_question, text, value, type, maxlength, multiline, range) {
-
 
156
            var renderTable = false;
-
 
157
            for (i = 0; i < this.sections.length; i++) {
-
 
158
                if (slug_section == this.sections[i].slug_section) {
-
 
159
                    for (j = 0; j < this.sections[i].questions.length; j++) {
-
 
160
                        if (slug_question == this.sections[i].questions[j].slug_question) {
-
 
161
                            this.sections[i].questions[j].text = text,
-
 
162
                                this.sections[i].questions[j].value = value,
-
 
163
                                this.sections[i].questions[j].type = type;
-
 
164
                            if (type == 'open') {
-
 
165
                                this.sections[i].questions[j].maxlength = maxlength;
-
 
166
                                this.sections[i].questions[j].multiline = multiline;
-
 
167
                                this.sections[i].questions[j].options = [];
-
 
168
                            } else {
-
 
169
                                this.sections[i].questions[j].maxlength = 0;
-
 
170
                                this.sections[i].questions[j].multiline = 0;
-
 
171
                            }
-
 
172
                            if (type == 'rating-range') {
-
 
173
                                this.sections[i].questions[j].range = range;
-
 
174
                            } else {
-
 
175
                                this.sections[i].questions[j].range = 0;
-
 
176
                            }
-
 
177
 
-
 
178
                            if(type=='multiple'){
-
 
179
                                this.sections[i].questions[j].answer = [];  
-
 
180
                            }else{
-
 
181
                                this.sections[i].questions[j].answer = '';  
-
 
182
                            }
-
 
183
 
-
 
184
                            renderTable = true;
-
 
185
                            break;
-
 
186
                        }
-
 
187
                    }
-
 
188
                }
-
 
189
                if (renderTable) {
-
 
190
                    break;
-
 
191
                }
-
 
192
            }
-
 
193
            if (renderTable) {
-
 
194
                this.renderSection(slug_section);
-
 
195
            }
-
 
Línea 196... Línea -...
196
        },
-
 
Línea 197... Línea 152...
197
        
152
        
198
}}
153
        
199
 
154
 
200
function htmlEntities(str) {
155
function htmlEntities(str) {