diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/ResponderEncuesta.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/ResponderEncuesta.js index fc6985d90..3a33f970b 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/ResponderEncuesta.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica/ResponderEncuesta.js @@ -26,9 +26,15 @@ this.CrearEncuesta = function (data) { var survey = new Survey.Survey(); + Survey + .StylesManager + .applyTheme("darkblue"); + survey.locale = "es"; survey.title = data.DetalleEncuestas[0].EncabezadoEncuesta.Descripcion; survey.showProgressBar = "top"; + survey.surveyId='5af48e08-a0a5-44a5-83f4-1c90e8e98de1'; + survey.surveyPostId = '3ce10f8b-2d8a-4ca2-a110-2994b9e697a1'; var page = {}; @@ -63,143 +69,16 @@ this.CrearEncuesta = function (data) { }); + survey + .onComplete + .add(function (result) { + document + .querySelector('#surveyResult') + .innerHTML = "result: " + JSON.stringify(result.data); + }); $("#surveyElement").Survey({ model: survey }); -} - - - - -//function init() { -// var json = { -// title: "Primera Encuesta", -// showProgressBar: "top", -// pages: [ -// { -// questions: [ -// { -// type: "boolean", -// name: "bool", -// title: "Please answer the question digite ", -// label: "Trabaja en el AYA?", -// isRequired: true -// }, -// { -// type: "checkbox", -// name: "car", -// title: "Cual es su Vehículo?", -// isRequired: true, -// hasNone: true, -// colCount: 4, -// choices: [ -// "Ford", -// "Vauxhall", -// "Volkswagen", -// "Nissan", -// "Audi", -// "Mercedes-Benz", -// "BMW", -// "Peugeot", -// "Toyota", -// "Citroen" -// ] -// }, -// { -// type: "comment", -// name: "suggestions", -// title: "Digite un comentario" -// } - - -// ] -// }, -// { -// questions: [ -// { -// type: "dropdown", -// name: "car", -// title: "Cual es su Vehículo?", -// isRequired: true, -// colCount: 0, -// choices: [ -// "None", -// "Ford", -// "Vauxhall", -// "Volkswagen", -// "Nissan", -// "Audi", -// "Mercedes-Benz", -// "BMW", -// "Peugeot", -// "Toyota", -// "Citroen" -// ] -// }, - -// { -// type: "matrix", -// name: "Quality", -// title: -// "Por favor indique su nivel de satisfacción con las siguintes preguntas", -// columns: [ -// { value: 1, text: "Totalmente desacuerdo" }, -// { value: 2, text: "Desacuerdo" }, -// { value: 3, text: "Neutral" }, -// { value: 4, text: "Deacuerdo" }, -// { value: 5, text: "Totalmente Deacuerdo" } -// ], -// rows: [ -// { value: "affordable", text: "Fácil de usar" }, -// { value: "does what it claims",text: "Mejor que los demás"} -// ] -// }, -// { -// type: "radiogroup", -// name: "price to competitors", -// title: "Comparando el producto es", -// choices: [ -// "Más caro", -// "El mismo precio", -// "Más barato", -// "No estoy seguro" -// ] -// } - -// ] -// }, -// { -// questions: [ -// { -// type: "rating", -// name: "satisfaction", -// title: "Cual es su nivel de satisfacción?", -// mininumRateDescription: "No satisfecho", -// maximumRateDescription: "Completamente satisfecho" -// }, -// //{ -// // type: "rating", -// // name: "recommend friends", -// // visibleIf: "{satisfaction} > 3", -// // title: -// // "How likely are you to recommend the Product to a friend or co-worker?", -// // mininumRateDescription: "Will not recommend", -// // maximumRateDescription: "I will recommend" -// //}, -// { -// name: "name", -// type: "text", -// title: "Cual es su nombre:", -// isRequired: true -// } -// ] -// } -// ] -// }; - - -//if (!window["%hammerhead%"]) { -// init(); -//} \ No newline at end of file +} \ No newline at end of file diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/NormativaReglamentacionTecnica/ResponderEncuesta.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/NormativaReglamentacionTecnica/ResponderEncuesta.cshtml index 1a9acc1dd..c9049ed89 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Views/NormativaReglamentacionTecnica/ResponderEncuesta.cshtml +++ b/AYA.SlnSynor/AYA.SlnSynor/Views/NormativaReglamentacionTecnica/ResponderEncuesta.cshtml @@ -17,16 +17,18 @@ +
+ -*@ @Scripts.Render("~/Sinort-Scripts/NormativaReglamentacionTecnica/ResponderEncuesta.js") @Scripts.Render("~/bundles/jquery-survey")