This commit is contained in:
jnunez 2018-07-30 22:33:20 +00:00
parent 8c0ee46295
commit 4b245f2e68
16 changed files with 229 additions and 125 deletions

View file

@ -7406,6 +7406,7 @@
<Content Include="Sinort-Scripts\Login.js" />
<Content Include="Sinort-Scripts\Mantenimientos.js" />
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\MisSolicitudes.js" />
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\ResponderEncuesta.js" />
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\Solicitud.js" />
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\VerSolicitudes.js" />
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\VerSolicitudesCompra.js" />
@ -7523,6 +7524,7 @@
<Content Include="Views\NormativaReglamentacionTecnica\VerSolicitudesCompra.cshtml" />
<Content Include="Views\NormativaReglamentacionTecnica\CrearEncuesta.cshtml" />
<Content Include="Views\Reportes\Aplicacion.cshtml" />
<Content Include="Views\NormativaReglamentacionTecnica\ResponderEncuesta.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View file

@ -50,5 +50,10 @@ namespace AYA.SlnSinort.Controllers.NormativaReglamentacionTecnica
return View();
}
public ActionResult ResponderEncuesta()
{
InitControllers();
return View();
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -730,7 +730,7 @@ this.LoadMessage = function (Message) {
stringHtml += "<div id=\"loadingGif\" class=\"toast toast-default\" style=\"font-size:14px;\">";
stringHtml += "<table>";
stringHtml += "<tr>";
stringHtml += "<td><img src=\"/dist/img/ajax-loader.gif\" alt=\"loading\" height=\"50\" width=\"50\"></td>";
stringHtml += "<td><img src=\"http://localhost/AYA.SlnSinort/dist/img/ajax-loader.gif\" alt=\"loading\" height=\"50\" width=\"50\"></td>";
stringHtml += "<td>&nbsp;&nbsp;</td>";
stringHtml += "<td>";
stringHtml += "<div class=\"toast-title\">" + Message + "</div>";

View file

@ -41,6 +41,7 @@ $('#txtUsuarioUnico').change(function () {
this.ObtenerUsuarioAD = function () {
var uri = SinorLoginWCF + '/api/ObtenerUsuarioAD';
model = {
Usuario: $('#txtUsuarioUnico').val(),

View file

@ -79,125 +79,3 @@ $('#tableTipoPregunta').on('click', 'button', function () {
});
function init() {
var json = {
title: "Product Feedback Survey Example",
showProgressBar: "top",
pages: [
{
questions: [
{
type: "matrix",
name: "Quality",
title:
"Please indicate if you agree or disagree with the following statements",
columns: [
{ value: 1, text: "Strongly Disagree" },
{ value: 2, text: "Disagree" },
{ value: 3, text: "Neutral" },
{ value: 4, text: "Agree" },
{ value: 5, text: "Strongly Agree" }
],
rows: [
{ value: "affordable", text: "Product is affordable" },
{
value: "does what it claims",
text: "Product does what it claims"
},
{
value: "better then others",
text: "Product is better than other products on the market"
},
{ value: "easy to use", text: "Product is easy to use" }
]
},
{
type: "rating",
name: "satisfaction",
title: "How satisfied are you with the Product?",
mininumRateDescription: "Not Satisfied",
maximumRateDescription: "Completely satisfied"
},
{
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"
},
{
type: "comment",
name: "suggestions",
title: "What would make you more satisfied with the Product?"
}
]
},
{
questions: [
{
type: "radiogroup",
name: "price to competitors",
title: "Compared to our competitors, do you feel the Product is",
choices: [
"Less expensive",
"Priced about the same",
"More expensive",
"Not sure"
]
},
{
type: "radiogroup",
name: "price",
title: "Do you feel our current price is merited by our product?",
choices: [
"correct|Yes, the price is about right",
"low|No, the price is too low for your product",
"high|No, the price is too high for your product"
]
},
{
type: "multipletext",
name: "pricelimit",
title: "What is the... ",
items: [
{
name: "mostamount",
title: "Most amount you would every pay for a product like ours"
},
{
name: "leastamount",
title: "The least amount you would feel comfortable paying"
}
]
}
]
},
{
questions: [
{
type: "text",
name: "email",
title:
"Thank you for taking our survey. Your survey is almost complete, please enter your email address in the box below if you wish to participate in our drawing, then press the 'Submit' button."
}
]
}
]
};
window.survey = new Survey.Model(json);
survey.onComplete.add(function (result) {
document.querySelector("#surveyResult").innerHTML =
"result: " + JSON.stringify(result.data);
});
$("#surveyElement").Survey({
model: survey
});
}
if (!window["%hammerhead%"]) {
init();
}

View file

@ -0,0 +1,152 @@
var model = {};
jQuery(document).ready(function () {
init();
});
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
}
]
}
]
};
window.survey = new Survey.Model(json);
survey.onComplete.add(function (result) {
document.querySelector("#surveyResult").innerHTML =
"result: " + JSON.stringify(result.data);
});
$("#surveyElement").Survey({
model: survey
});
}
if (!window["%hammerhead%"]) {
init();
}

View file

@ -0,0 +1,43 @@

@{
ViewBag.Title = "ResponderEncuesta";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<form id="formResponderEncuesta" class="form-horizontal" role="form">
<div class="panel-body"> <h3>&nbsp;<i class="fa fa-file-text"></i>&nbsp; Responder Encuesta</h3> </div>
<div style="background-color: #fff">
<div class="panel-body">
<div id="surveyElement">
</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>&nbsp;Guardar
</button>
</div>
</div>
</form>
<div id="ucBtnSeleccionarCatalogo" style="display:none;">
<button type="button" id="btnSeleccionarCatalogo" class="btn btn-default btn-xs">
<i id="ibtnSeleccionarCatalogo" class="fa fa-check"></i>
</button>
</div>
@Scripts.Render("~/Sinort-Scripts/NormativaReglamentacionTecnica/ResponderEncuesta.js")
@Scripts.Render("~/bundles/jquery-survey")

View file

@ -162,7 +162,9 @@
<li><a href="@Url.Action("MisSolicitudes", "NormativaReglamentacionTecnica")"> Ver mis solicitudes </a></li>
<span><i class="fa fa-circle text-success"> Sitios</i> </span>
<li><a href="@Url.Action("CrearEncuesta", "NormativaReglamentacionTecnica")"> Crear Encuesta </a></li>
<li><a href="@Url.Action("CrearEncuesta", "NormativaReglamentacionTecnica")"> Crear encuesta </a></li>
<li><a href="@Url.Action("ResponderEncuesta", "NormativaReglamentacionTecnica")"> Responder encuesta </a></li>
<li><a href="#"> Ver mis encuestas </a></li>
<span><i class="fa fa-circle text-success"> Administar</i> </span>
<li><a href="@Url.Action("FichaTecnica", "NormativaReglamentacionTecnica")"> Ficha Técnica</a></li>
<li><a href="#"> Ver fichas técnicas inactivas</a></li>

View file

@ -18,3 +18,24 @@ C:\Sistemas.Net\AyA\Sinort\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.
C:\Sistemas.Net\AyA\Sinort\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.Razor.xml
C:\Sistemas.Net\AyA\Sinort\AYA.SlnSynor\ReportViewerForMvc\obj\Debug\ReportViewerForMvc.dll
C:\Sistemas.Net\AyA\Sinort\AYA.SlnSynor\ReportViewerForMvc\obj\Debug\ReportViewerForMvc.pdb
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\ReportViewerWebForm.aspx
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\ReportViewerWebForm.aspx.cs
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\ReportViewerWebForm.aspx.designer.cs
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\ReportViewerForMvc.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\ReportViewerForMvc.pdb
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\Microsoft.Web.Infrastructure.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.Helpers.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.Mvc.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.Razor.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.Deployment.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.Razor.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.Helpers.xml
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.Mvc.xml
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.Razor.xml
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.xml
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.Deployment.xml
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\bin\Debug\System.Web.WebPages.Razor.xml
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\obj\Debug\ReportViewerForMvc.csprojResolveAssemblyReference.cache
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\obj\Debug\ReportViewerForMvc.dll
C:\AYA\SINORT\AYA.SlnSynor\ReportViewerForMvc\obj\Debug\ReportViewerForMvc.pdb