git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C367
This commit is contained in:
parent
4f2a0a71a1
commit
23356103f3
1 changed files with 44 additions and 11 deletions
|
|
@ -25,6 +25,7 @@ this.CrearEncuesta = function (data) {
|
|||
var body = data.questions;
|
||||
|
||||
var survey = new Survey.Survey();
|
||||
|
||||
survey.locale = "es";
|
||||
survey.title = data.DetalleEncuestas[0].EncabezadoEncuesta.Descripcion;
|
||||
survey.showProgressBar = "top";
|
||||
|
|
@ -46,15 +47,47 @@ this.CrearEncuesta = function (data) {
|
|||
q.colCount = 3;
|
||||
}
|
||||
|
||||
if (item.type == "rating")
|
||||
{
|
||||
q.mininumRateDescription = item.RangoMinimo;
|
||||
q.maximumRateDescription = item.RangoMaximo;
|
||||
if (item.type == "rating") {
|
||||
q.minRateDescription = item.mininumRateDescription,
|
||||
q.maxRateDescription = item.maximumRateDescription
|
||||
}
|
||||
|
||||
if (item.type == "matrix") {
|
||||
|
||||
|
||||
//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.name = item.name;
|
||||
q.isRequired = item.Requerido == true;
|
||||
|
||||
});
|
||||
//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({
|
||||
model: survey
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue