";
}
function getMin(min)
{
var s = 'Only values of at least [min] are allowed';
return "
" + s.replace("[min]", min) + "
";
}
function getMax(max)
{
var s = 'Only values of at most [max] are allowed';
return "
" + s.replace("[max]", max) + "
";
}
function getMinMaxDate(min,max)
{
var s = 'between [min] and [max]';
return "
" + s.replace("[min]", min).replace("[max]", max) + "
";
}
function getMinDate(min)
{
var s = 'after [min]';
return "
" + s.replace("[min]", min) + "
";
}
function getMaxDate(max)
{
var s = 'before [max]';
return "
" + s.replace("[max]", max) + "
";
}
function getMinMaxRows(min,max)
{
var s = 'between [min] and [max] answered rows';
return "
" + s.replace("[min]", min).replace("[max]", max) + "
";
}
function getMinRows(min)
{
var s = 'at least [min] answered row(s)';
return "
" + s.replace("[min]", min) + "
";
}
function getMaxRows(max)
{
var s = 'at most [max] answered row(s)';
return "
" + s.replace("[max]", max) + "
";
}
var idsforuids = null;
function initializeTriggers()
{
triggers = {};
idsforuids = {};
triggers["bf7079ec-20bd-c526-289b-6bd46d356cd1"] = "";
idsforuids["bf7079ec-20bd-c526-289b-6bd46d356cd1"] = "127628251";
triggers["485aefd5-a917-3f5e-b2ef-05be0b6339c4"] = "";
idsforuids["485aefd5-a917-3f5e-b2ef-05be0b6339c4"] = "127628252";
triggers["99a1f21f-1490-03e7-6af8-39461dde1afb"] = "";
idsforuids["99a1f21f-1490-03e7-6af8-39461dde1afb"] = "127628253";
triggers["68da5402-1798-4344-bfcf-45b794c0b234"] = "";
idsforuids["68da5402-1798-4344-bfcf-45b794c0b234"] = "127628254";
triggers["b4362930-10f0-4552-9d1a-0426dd031206"] = "";
idsforuids["b4362930-10f0-4552-9d1a-0426dd031206"] = "127628255";
triggers["5e15b0ca-f096-4f3a-4623-d617083c3306"] = "";
idsforuids["5e15b0ca-f096-4f3a-4623-d617083c3306"] = "127628256";
triggers["8af77a15-c29c-ae68-525c-79d596bda6e2"] = "";
idsforuids["8af77a15-c29c-ae68-525c-79d596bda6e2"] = "127628257";
triggers["c03e6050-5073-1f6c-1dbb-fbf3fcd8c447"] = "";
idsforuids["c03e6050-5073-1f6c-1dbb-fbf3fcd8c447"] = "127628258";
triggers["7fc48ffe-a2cc-6326-1e79-8f3019d39d0c"] = "";
idsforuids["7fc48ffe-a2cc-6326-1e79-8f3019d39d0c"] = "127628259";
}
function initializeAnswerData()
{
values = {};
pavalues = {};
pavaluesid = {};
tablevalues = {};
filevalues = {};
validationMessages = {};
if ($("#survey\\.id").length > 0) {
initializeBackupHelper();
restoreBackup();
}
}
function initializeBackupHelper(){
backupHelper = {}
backupHelper["127628251"] = {
uid : "bf7079ec-20bd-c526-289b-6bd46d356cd1",
type : "Text"
}
backupHelper["127628252"] = {
uid : "485aefd5-a917-3f5e-b2ef-05be0b6339c4",
type : "FreeTextQuestion"
}
backupHelper["127628253"] = {
uid : "99a1f21f-1490-03e7-6af8-39461dde1afb",
type : "SingleChoiceQuestion"
}
backupHelper["127628254"] = {
uid : "68da5402-1798-4344-bfcf-45b794c0b234",
type : "PossibleAnswer"
}
backupHelper["127628255"] = {
uid : "b4362930-10f0-4552-9d1a-0426dd031206",
type : "PossibleAnswer"
}
backupHelper["127628256"] = {
uid : "5e15b0ca-f096-4f3a-4623-d617083c3306",
type : "FreeTextQuestion"
}
backupHelper["127628257"] = {
uid : "8af77a15-c29c-ae68-525c-79d596bda6e2",
type : "FreeTextQuestion"
}
backupHelper["127628258"] = {
uid : "c03e6050-5073-1f6c-1dbb-fbf3fcd8c447",
type : "Text"
}
backupHelper["127628259"] = {
uid : "7fc48ffe-a2cc-6326-1e79-8f3019d39d0c",
type : "Image"
}
}
function doAnswersExist() {
return false;
}
var invisibleElements = [];
function isInvisible(uniqueId)
{
return true;
}
var validationMessages = null;
function getValidationMessageByQuestion(uniqueId)
{
return typeof validationMessages[uniqueId] != 'undefined' ? validationMessages[uniqueId] : "";
}
var triggers = null;
function getTriggersByQuestion(uniqueId)
{
return typeof triggers[uniqueId] != 'undefined' ? triggers[uniqueId] : "";
}
var values = null;
function getValueByQuestion(uniqueId, readValueOnce, cellEl)
{
if (typeof values[uniqueId] != 'undefined' && values[uniqueId] != null) {
if (cellEl != null && $(cellEl).is(".complex")){
$(cellEl).closest(".innercell").addClass("answered");
} else {
$('.survey-element[data-uid="' + uniqueId + '"]').addClass("answered");
$('tr[data-uid="' + uniqueId + '"]').closest(".survey-element").addClass("answered");
}
if (readValueOnce) {
var ret = values[uniqueId];
values[uniqueId] = null
return ret;
}
return values[uniqueId];
}
return "";
}
var valuesread = {};
function getValueByQuestionRating(uniqueId, answerUniqueId, cellEl)
{
if (typeof values[uniqueId] != 'undefined' && typeof valuesread[answerUniqueId] == 'undefined') {
if (cellEl != null && $(cellEl).is(".complex")){
$(cellEl).closest(".innercell").addClass("answered");
} else {
$('.survey-element[data-uid="' + uniqueId + '"]').addClass("answered");
$('tr[data-uid="' + uniqueId + '"]').closest(".survey-element").addClass("answered");
valuesread[answerUniqueId] += true
}
return values[uniqueId];
}
return "";
}
function getValueByQuestionGallery(uniqueId)
{
if (typeof values[uniqueId] != 'undefined') {
return values[uniqueId];
}
return "";
}
var pavalues = null;
var pavaluesread = {};
function getPAByQuestion(uniqueId, cellEl)
{
if (typeof pavalues[uniqueId] != 'undefined')
{
if (cellEl != null && $(cellEl).is(".complex")){
$(cellEl).closest(".innercell").addClass("answered");
} else {
$('.survey-element[data-uid="' + uniqueId + '"]').addClass("answered");
}
return pavalues[uniqueId];
}
return "";
}
var pavaluesread = {};
var pavaluesread2 = {};
function getPAByQuestionCheckBox(uniqueId, answerUniqueId, cellEl)
{
if (typeof pavalues[uniqueId] != 'undefined' && typeof pavaluesread2[answerUniqueId] == 'undefined')
{
if (cellEl != null && $(cellEl).is(".complex")){
$(cellEl).closest(".innercell").addClass("answered");
} else {
$('.survey-element[data-uid="' + uniqueId + '"]').addClass("answered");
}
if (typeof pavaluesread[answerUniqueId] != 'undefined') {
pavaluesread2[answerUniqueId] += true;
} else {
pavaluesread[answerUniqueId] += true;
}
return pavalues[uniqueId];
}
return "";
}
var pavaluesid = null;
function getPAIdByQuestion(uniqueId)
{
return typeof pavaluesid[uniqueId] != 'undefined' ? pavaluesid[uniqueId] : "";
}
function getPAByQuestion2(parentuniqueId, uniqueId, id, cellEl)
{
if (getPAByQuestion(parentuniqueId).indexOf(uniqueId) > -1)
{
if (cellEl != null && $(cellEl).is(".complex, .multiple-choice li input")) {
$(cellEl).closest(".innercell").addClass("answered");
} else {
$('tr[data-uid="' + parentuniqueId + '"]').closest(".survey-element").addClass("answered");
}
return id.toString();
}
return "";
}
function getPAByQuestion3(parentuniqueId, cellEl)
{
if (getPAByQuestion(parentuniqueId).length > 0)
{
var result = getIdForUniqueId(getPAByQuestion(parentuniqueId));
if (typeof result != 'undefined')
{
if (cellEl != null && $(cellEl).is("select.complex")){
$(cellEl).closest(".innercell").addClass("answered");
}
return result;
}
}
return "";
}
function getTargetDatasetByQuestion(uniqueId) {
return values[uniqueId];
}
function getIdForUniqueId(uniqueId)
{
return typeof idsforuids[uniqueId] != 'undefined' ? idsforuids[uniqueId] : "";
}
var tablevalues = null;
function getTableAnswer(uniqueId, row, col, readOnce)
{
if (typeof tablevalues[uniqueId + "#" + row + "#" + col] != 'undefined' && tablevalues[uniqueId + "#" + row + "#" + col] != null)
{
$('.survey-element[data-uid="' + uniqueId + '"]').addClass("answered");
if (readOnce) {
var res = tablevalues[uniqueId + "#" + row + "#" + col];
tablevalues[uniqueId + "#" + row + "#" + col] = null;
return res;
}
return tablevalues[uniqueId + "#" + row + "#" + col];
}
return "";
}
var filevalues = null;
var filesread = {};
var filesread2 = {};
function getFileAnswer(uniqueId)
{
const result = filevalues[uniqueId];
if (typeof result != 'undefined' && typeof filesread2[uniqueId] == 'undefined') {
$('.survey-element[data-uid="' + uniqueId + '"]').addClass("answered");
if (typeof filesread[uniqueId] != 'undefined') {
filesread2[uniqueId] += true;
} else {
filesread[uniqueId] += true;
}
return result;
}
return "";
}
function deleteDelphiCommentFromRunner(button, isReply) {
const dialog = $(button).closest(".survey-element").children("div").eq(1).find(".delete-confirmation-dialog");
showModalDialog(dialog, button);
var deleteButton = $(dialog).find(".delete-confirmation-dialog__confirmation-button");
$(deleteButton).off("click");
$(deleteButton).click(function() {
const questionUid = $(button).closest(".survey-element").attr("data-uid");
const viewModel = modelsForDelphiQuestions[questionUid];
const errorCallback = () => { showError("error"); }
const successCallback = () => {
loadTableData(questionUid, viewModel);
}
hideModalDialog(dialog);
deleteDelphiComment(button, viewModel, isReply, errorCallback, successCallback);
});
}
initializeAnswerData();
initializeTriggers();
// showPopup
function showPopup() {
$("#motivationPopup").modal('show');
$("#motivationPopup").removeClass('not-shown');
}