git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C368
This commit is contained in:
parent
23356103f3
commit
c6044b83f0
2 changed files with 12 additions and 68 deletions
|
|
@ -51,74 +51,23 @@ this.CrearEncuesta = function (data) {
|
||||||
q.minRateDescription = item.mininumRateDescription,
|
q.minRateDescription = item.mininumRateDescription,
|
||||||
q.maxRateDescription = item.maximumRateDescription
|
q.maxRateDescription = item.maximumRateDescription
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type == "matrix") {
|
if (item.type == "matrix") {
|
||||||
|
q.columns = item.columns
|
||||||
|
q.rows = item.rows
|
||||||
|
|
||||||
|
|
||||||
//q.columns = [];
|
|
||||||
$.each(item.columns, function (index, columna) {
|
|
||||||
|
|
||||||
q.columns.value = columna;
|
|
||||||
q.columns.text = columna;
|
|
||||||
//var columna = { value: columna, text: columna };
|
|
||||||
//q.columns.push(columna);
|
|
||||||
});
|
|
||||||
|
|
||||||
//q.rows = [];
|
|
||||||
$.each(item.rows, function (index, fila) {
|
|
||||||
q.rows.value = fila;
|
|
||||||
q.rows.text = fila;
|
|
||||||
//var fila = { value: fila, text: fila };
|
|
||||||
//q.rows.push(fila);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
q.type = item.type;
|
||||||
|
q.title = item.title;
|
||||||
q.name = item.name;
|
q.name = item.name;
|
||||||
q.isRequired = item.Requerido == true;
|
q.isRequired = item.isRequired;
|
||||||
|
|
||||||
});
|
});
|
||||||
//var q = page.addNewQuestion("matrix", "Por favor indique su nivel de satisfacción con las siguintes preguntas")
|
|
||||||
// q.columns = [
|
|
||||||
// { value: 1, text: "Totalmente desacuerdo" },
|
|
||||||
// { value: 2, text: "Desacuerdo" }
|
|
||||||
// ],
|
|
||||||
// q.rows = [
|
|
||||||
// { value: "affordable", text: "Fácil de usar" },
|
|
||||||
// { value: "does what it claims",text: "Mejor que los demás"}
|
|
||||||
// ]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#surveyElement").Survey({
|
$("#surveyElement").Survey({
|
||||||
model: survey
|
model: survey
|
||||||
});
|
});
|
||||||
|
|
||||||
//var json = {
|
|
||||||
// title: data.DetalleEncuestas[0].EncabezadoEncuesta.Descripcion,
|
|
||||||
// showProgressBar: "top",
|
|
||||||
// pages: [
|
|
||||||
// {
|
|
||||||
// questions: [
|
|
||||||
// {
|
|
||||||
// type: "boolean",
|
|
||||||
// name: "bool",
|
|
||||||
// title: "Please answer the question digite ",
|
|
||||||
// label: "Trabaja en el AYA?",
|
|
||||||
// isRequired: true
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
//};
|
|
||||||
//window.survey = new Survey.Model(json);
|
|
||||||
//survey.onComplete.add(function (result) {
|
|
||||||
// document.querySelector("#surveyResult").innerHTML =
|
|
||||||
// "result: " + JSON.stringify(result.data);
|
|
||||||
//});
|
|
||||||
|
|
||||||
//$("#surveyElement").Survey({
|
|
||||||
// model: survey
|
|
||||||
//});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" id="btnGuardar" class="btn btn-success btn-medium" data-dismiss="modal">
|
|
||||||
<i class="fa fa-floppy-o"></i> Guardar
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue