Línea 47... |
Línea 47... |
47 |
|
47 |
|
48 |
let table = 'table-section-question-option' + this.sections[i].slug;
|
48 |
let table = 'table-section-question-option' + this.sections[i].slug;
|
Línea 49... |
Línea 49... |
49 |
$('#' + table + ' tbody').empty();
|
49 |
$('#' + table + ' tbody').empty();
|
50 |
|
50 |
|
51 |
s = '<tr class="tr-section" data-slug="' + this.sections[i].slug + '">';
|
51 |
s = '<tr class="tr-section" data-slug="' + this.sections[i].slug + '">';
|
52 |
s = s + '<td class="text-left">Section</td>';
|
52 |
s = s + '<td class="text-left">Seccion</td>';
|
53 |
s = s + '<td class="text-left">' + this.sections[i].name + '</td>';
|
53 |
s = s + '<td class="text-left">' + this.sections[i].name + '</td>';
|
54 |
s = s + '<td class="text-right">' + this.sections[i].value + '</td>';
|
54 |
s = s + '<td class="text-right">' + this.sections[i].value + '</td>';
|
55 |
s = s + '<td> </td>';
|
55 |
s = s + '<td> </td>';
|
56 |
s = s + '<td>';
|
56 |
s = s + '<td>';
|
57 |
s = s + '<button class="btn btn-default btn-edit-section" data-slug="' + this.sections[i].slug + '" data-toggle="tooltip" title="Edit Section"><i class="fa fa-edit" aria-hidden="true"></i> Edit section </button> ';
|
57 |
s = s + '<button class="btn btn-default btn-edit-section" data-slug="' + this.sections[i].slug + '" data-toggle="tooltip" title="'LABEL_EDIT' Seccion"><i class="fa fa-edit" aria-hidden="true"></i> Editaaaaassssr seccion </button> ';
|
58 |
s = s + '<button class="btn btn-default btn-delete-section" data-slug="' + this.sections[i].slug + '" data-toggle="tooltip" title="Delete Section"><i class="fa fa-ban" aria-hidden="true"></i> Delete section </button> ';
|
58 |
s = s + '<button class="btn btn-default btn-delete-section" data-slug="' + this.sections[i].slug + '" data-toggle="tooltip" title="Eliminar Seccion"><i class="fa fa-ban" aria-hidden="true"></i> Eliminar seccion </button> ';
|
59 |
s = s + '<button class="btn btn-default btn-add-question" data-slug="' + this.sections[i].slug + '" data-toggle="tooltip" title="Add Question"><i class="fa fa-plus" aria-hidden="true"></i> Add question </button> ';
|
59 |
s = s + '<button class="btn btn-default btn-add-question" data-slug="' + this.sections[i].slug + '" data-toggle="tooltip" title="Añadir Pregunta"><i class="fa fa-plus" aria-hidden="true"></i> Añadir Pregunta </button> ';
|
60 |
s = s + '</td>';
|
60 |
s = s + '</td>';
|
Línea 117... |
Línea 117... |
117 |
s = s + ' <div class="panel-body">';
|
117 |
s = s + ' <div class="panel-body">';
|
118 |
s = s + ' <div class="table-responsive">';
|
118 |
s = s + ' <div class="table-responsive">';
|
119 |
s = s + ' <table class="table table-bordered" id="' + table + '">';
|
119 |
s = s + ' <table class="table table-bordered" id="' + table + '">';
|
120 |
s = s + ' <thead>';
|
120 |
s = s + ' <thead>';
|
121 |
s = s + ' <tr>';
|
121 |
s = s + ' <tr>';
|
122 |
s = s + ' <th>Element</th>';
|
122 |
s = s + ' <th>Elemento</th>';
|
123 |
s = s + ' <th>Text</th>';
|
123 |
s = s + ' <th>Texto</th>';
|
124 |
s = s + ' <th>Value</th>';
|
124 |
s = s + ' <th>Valor</th>';
|
125 |
s = s + ' <th>Type</th>';
|
125 |
s = s + ' <th>Type</th>';
|
126 |
s = s + ' <th>Actions</th>';
|
126 |
s = s + ' <th>Actions</th>';
|
127 |
s = s + ' </tr>';
|
127 |
s = s + ' </tr>';
|
128 |
s = s + ' </thead>';
|
128 |
s = s + ' </thead>';
|
129 |
s = s + ' <tbody>';
|
129 |
s = s + ' <tbody>';
|
Línea 136... |
Línea 136... |
136 |
|
136 |
|
Línea 137... |
Línea 137... |
137 |
$('#accordion').append(s);
|
137 |
$('#accordion').append(s);
|
138 |
|
138 |
|
139 |
|
139 |
|
140 |
s = '<tr class="tr-section" data-slug="' + section_slug + '">';
|
140 |
s = '<tr class="tr-section" data-slug="' + section_slug + '">';
|
141 |
s = s + '<td class="text-left">Section</td>';
|
141 |
s = s + '<td class="text-left">Seccion</td>';
|
142 |
s = s + '<td class="text-left">' + section_name + '</td>';
|
142 |
s = s + '<td class="text-left">' + section_name + '</td>';
|
143 |
s = s + '<td class="text-right">' + section_value + '</td>';
|
143 |
s = s + '<td class="text-right">' + section_value + '</td>';
|
144 |
s = s + '<td> </td>';
|
144 |
s = s + '<td> </td>';
|
145 |
s = s + '<td>';
|
145 |
s = s + '<td>';
|
146 |
s = s + '<button class="btn btn-default btn-edit-section" data-slug="' + section_slug + '" data-toggle="tooltip" title="Edit Section"><i class="fa fa-edit" aria-hidden="true"></i> Edit section</button> ';
|
146 |
s = s + '<button class="btn btn-default btn-edit-section" data-slug="' + section_slug + '" data-toggle="tooltip" title="Editar Section"><i class="fa fa-edit" aria-hidden="true"></i> Edit section</button> ';
|
147 |
s = s + '<button class="btn btn-default btn-delete-section" data-slug="' + section_slug + '" data-toggle="tooltip" title="Delete Section"><i class="fa fa-ban" aria-hidden="true"></i> Delete section</button> ';
|
147 |
s = s + '<button class="btn btn-default btn-delete-section" data-slug="' + section_slug + '" data-toggle="tooltip" title="Eliminar Section"><i class="fa fa-ban" aria-hidden="true"></i> Delete section</button> ';
|
148 |
s = s + '<button class="btn btn-default btn-add-question" data-slug="' + section_slug + '" data-toggle="tooltip" title="Add Question"><i class="fa fa-plus" aria-hidden="true"></i> Add question</button> ';
|
148 |
s = s + '<button class="btn btn-default btn-add-question" data-slug="' + section_slug + '" data-toggle="tooltip" title="Añadir Question"><i class="fa fa-plus" aria-hidden="true"></i> Add question</button> ';
|
149 |
s = s + '</td>';
|
149 |
s = s + '</td>';
|
Línea 150... |
Línea 150... |
150 |
s = s + '</tr>';
|
150 |
s = s + '</tr>';
|
151 |
$('#' + table + ' tbody').append(s);
|
151 |
$('#' + table + ' tbody').append(s);
|
Línea 152... |
Línea 152... |
152 |
},
|
152 |
},
|
153 |
|
153 |
|
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 |
{
|
156 |
|
156 |
|
157 |
|
157 |
|
158 |
s = '<tr class="tr-question" data-slug="' + question_slug + '">';
|
158 |
s = '<tr class="tr-question" data-slug="' + question_slug + '">';
|