Línea 154... |
Línea 154... |
154 |
this.drawQuestion = function(section_slug, question_slug, question_text, question_value, question_type)
|
154 |
this.drawQuestion = function(section_slug, question_slug, question_text, question_value, question_type)
|
155 |
{
|
155 |
{
|
Línea 156... |
Línea 156... |
156 |
|
156 |
|
157 |
|
157 |
|
158 |
s = '<tr class="tr-question" data-slug="' + question_slug + '">';
|
158 |
s = '<tr class="tr-question" data-slug="' + question_slug + '">';
|
159 |
s = s + '<td class="text-left">--Pregunta</td>';
|
159 |
s = s + '<td class="text-left">--LABEL_QUESTION</td>';
|
160 |
s = s + '<td class="text-left">' + question_text + '</td>';
|
160 |
s = s + '<td class="text-left">' + question_text + '</td>';
|
161 |
s = s + '<td class="text-right"><font color="red">' + question_value + '</font></td>';
|
161 |
s = s + '<td class="text-right"><font color="red">' + question_value + '</font></td>';
|
162 |
s = s + '<td>' + question_type.substr(0,1).toUpperCase() + question_type.substr(1) + '</td>';
|
162 |
s = s + '<td>' + question_type.substr(0,1).toUpperCase() + question_type.substr(1) + '</td>';
|
163 |
s = s + '<td>';
|
163 |
s = s + '<td>';
|
164 |
s = s + '<button class="btn btn-default btn-edit-question" data-section="' + section_slug + '" data-slug="' + question_slug + '" data-toggle="tooltip" title="Edit Question"><i class="fa fa-edit" aria-hidden="true"></i> Edit question</button> ';
|
164 |
s = s + '<button class="btn btn-default btn-edit-question" data-section="' + section_slug + '" data-slug="' + question_slug + '" data-toggle="tooltip" title="LABEL_EDIT LABEL_QUESTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_QUESTION</button> ';
|
165 |
s = s + '<button class="btn btn-default btn-delete-question" data-section="' + section_slug + '" data-slug="' + question_slug + '" data-toggle="tooltip" title="Delete Question"><i class="fa fa-ban" aria-hidden="true"></i> Delete question</button> ';
|
165 |
s = s + '<button class="btn btn-default btn-delete-question" data-section="' + section_slug + '" data-slug="' + question_slug + '" data-toggle="tooltip" title="LABEL_DELETE LABEL_QUESTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_QUESTION</button> ';
|
166 |
if(question_type == 'simple' || question_type == 'multiple' || question_type == 'rating-open') {
|
166 |
if(question_type == 'simple' || question_type == 'multiple' || question_type == 'rating-open') {
|
Línea 167... |
Línea 167... |
167 |
s = s + '<button class="btn btn-default btn-add-option" data-section="' + section_slug + '" data-slug="' + question_slug + '" data-toggle="tooltip" title="Add Option"><i class="fa fa-plus" aria-hidden="true"></i> Add option</button> ';
|
167 |
s = s + '<button class="btn btn-default btn-add-option" data-section="' + section_slug + '" data-slug="' + question_slug + '" data-toggle="tooltip" title="LABEL_ADD LABEL_OPTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_OPTION</button> ';
|
Línea 168... |
Línea 168... |
168 |
}
|
168 |
}
|
Línea 176... |
Línea 176... |
176 |
this.drawOption = function(section_slug, question_slug, question_type, option_slug, option_text, option_type, option_correct, option_value)
|
176 |
this.drawOption = function(section_slug, question_slug, question_type, option_slug, option_text, option_type, option_correct, option_value)
|
177 |
{
|
177 |
{
|
Línea 178... |
Línea 178... |
178 |
|
178 |
|
179 |
|
179 |
|
180 |
s = '<tr class="tr-option" data-slug="' + option_slug + '">';
|
180 |
s = '<tr class="tr-option" data-slug="' + option_slug + '">';
|
181 |
s = s + '<td class="text-left">---Option</td>';
|
181 |
s = s + '<td class="text-left">---LABEL_OPTION</td>';
|
Línea 182... |
Línea 182... |
182 |
s = s + '<td class="text-left">' + option_text + '</td>';
|
182 |
s = s + '<td class="text-left">' + option_text + '</td>';
|
183 |
if(question_type == 'multiple' || question_type == 'rating-open') {
|
183 |
if(question_type == 'multiple' || question_type == 'rating-open') {
|
Línea 195... |
Línea 195... |
195 |
s = s + '<td> </td>';
|
195 |
s = s + '<td> </td>';
|
196 |
}
|
196 |
}
|
Línea 197... |
Línea 197... |
197 |
|
197 |
|
198 |
if(question_type == 'simple' || question_type == 'multiple') {
|
198 |
if(question_type == 'simple' || question_type == 'multiple') {
|
199 |
if(option_correct == 1) {
|
199 |
if(option_correct == 1) {
|
200 |
s = s + '<td class="text-left"><font color="green">Correct</font></td>';
|
200 |
s = s + '<td class="text-left"><font color="green">LABEL_CORRECT</font></td>';
|
201 |
} else {
|
201 |
} else {
|
Línea 202... |
Línea 202... |
202 |
s = s + '<td class="text-left"><font color="red">Fail</font></td>';
|
202 |
s = s + '<td class="text-left"><font color="red">LABEL_FAIL</font></td>';
|
203 |
|
203 |
|
204 |
}
|
204 |
}
|
205 |
} else {
|
205 |
} else {
|
Línea 206... |
Línea 206... |
206 |
s = s + '<td> </td>';
|
206 |
s = s + '<td> </td>';
|
207 |
}
|
207 |
}
|
208 |
|
208 |
|
209 |
|
209 |
|
Línea 210... |
Línea 210... |
210 |
s = s + '<td>';
|
210 |
s = s + '<td>';
|
211 |
s = s + '<button class="btn btn-default btn-edit-option" data-section="' + section_slug + '" data-question="' + question_slug + '" data-slug="' + option_slug + '" data-toggle="tooltip" title="Edit Option"><i class="fa fa-edit" aria-hidden="true"></i></button> ';
|
211 |
s = s + '<button class="btn btn-default btn-edit-option" data-section="' + section_slug + '" data-question="' + question_slug + '" data-slug="' + option_slug + '" data-toggle="tooltip" title="LABEL_EDIT LABEL_OPTION"><i class="fa fa-edit" aria-hidden="true"></i></button> ';
|
Línea 588... |
Línea 588... |
588 |
});
|
588 |
});
|
589 |
},
|
589 |
},
|
590 |
aaSorting : [],
|
590 |
aaSorting : [],
|
591 |
aoColumns: [
|
591 |
aoColumns: [
|
592 |
{sName: "checkbox", sTitle : '<input type="checkbox" value="all" data-type="select_all" name="select_all" id="select_all">',bSortable:false,bSearchable:false},
|
592 |
{sName: "checkbox", sTitle : '<input type="checkbox" value="all" data-type="select_all" name="select_all" id="select_all">',bSortable:false,bSearchable:false},
|
593 |
{sName: "name", sTitle: 'Name'},
|
593 |
{sName: "name", sTitle: 'LABEL_FIRST_NAME'},
|
594 |
{sName: "language", sTitle: 'Language'},
|
594 |
{sName: "language", sTitle: 'LABEL_LANGUAGE'},
|
595 |
{sName: "added_on", sTitle : 'Added on'},
|
595 |
{sName: "added_on", sTitle : 'LABEL_ADDED_ON'},
|
596 |
{sName: "status", sTitle: 'Status', bSortable:false, bSearchable:false},
|
596 |
{sName: "status", sTitle: 'LABEL_STATUS', bSortable:false, bSearchable:false},
|
597 |
{sName: "operation", sTitle: 'Operation', bSortable: false, bSearchable: false},
|
597 |
{sName: "operation", sTitle: 'LABEL_OPERATION', bSortable: false, bSearchable: false},
|
598 |
],
|
598 |
],
|
599 |
// fnServerParams: function(aoData){
|
599 |
// fnServerParams: function(aoData){
|
600 |
// setTitle(aoData, this)
|
600 |
// setTitle(aoData, this)
|
601 |
// },
|
601 |
// },
|
602 |
fnDrawCallback: function(oSettings) {
|
602 |
fnDrawCallback: function(oSettings) {
|