UWVA#36448: 2016.1 BEZ Importeren bezoekers met kenmerken.

svn path=/Website/branches/v2016.1/; revision=29514
This commit is contained in:
Maykel Geerdink
2016-05-25 08:44:13 +00:00
parent c7e7ffa008
commit 6d2022dd73
3 changed files with 25 additions and 20 deletions

View File

@@ -279,7 +279,7 @@ function validateForm(fName, params)
if (params.relaxed)
clsName = "";
$(".required").filter(jqcheckonly).not(jqchecknot).each(function (i)
$(".required").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
switch (this.tagName)
{
@@ -361,7 +361,7 @@ function validateForm(fName, params)
}
)
$(".number").filter(jqcheckonly).not(jqchecknot).each(function (i)
$(".number").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
if ($(this).val() != "" && isNaN(parseInt($(this).val()), 10))
{
@@ -374,7 +374,7 @@ function validateForm(fName, params)
}
}
)
$(".float").filter(jqcheckonly).not(jqchecknot).each(function (i)
$(".float").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
if ($(this).val() != "" && !isFinite(parseFloat($(this).val())))
{
@@ -387,7 +387,7 @@ function validateForm(fName, params)
}
}
)
$(".currency").filter(jqcheckonly).not(jqchecknot).each(function (i)
$(".currency").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
if ($(this).val() != "" && !_isGoodCurrency($(this).val().replace(',', '.')))
{
@@ -400,7 +400,7 @@ function validateForm(fName, params)
}
}
)
$("input[regexp]").filter(jqcheckonly).not(jqchecknot).each(function (i)
$("input[regexp]").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
if (($(this).hasClass("required") || $(this).val()) && (!_isGoodTextFormat(this)))
{
@@ -413,7 +413,7 @@ function validateForm(fName, params)
}
}
)
$("textarea[regexp]").filter(jqcheckonly).not(jqchecknot).each(function (i)
$("textarea[regexp]").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
if (($(this).hasClass("required") || $(this).val()) && (!_isGoodTextFormat(this)))
{
@@ -430,24 +430,29 @@ function validateForm(fName, params)
/* Experimenteel. Nieuwe browsers staan bij een maxlength ook in een textarea niet al
te veel karakters toe dus is dan dubbelop */
// Echter bij importeren van tekst in een input of texarea veld kunnen er wel meer tekens in komen te staan dan maxlength.
// In dat geval kunnen we deze check bijvoorbeeld laten uitvoeren.
// In dat geval moeten we deze check bijvoorbeeld laten uitvoeren.
if (params.checklength)
{
// Lengte controle
$("input:enabled,textarea:enabled").filter(jqcheckonly).not(jqchecknot).each(function (i)
$("input:enabled,textarea:enabled").filter(jqcheckonly).not(jqchecknot).filter(':visible').each(function (i)
{
var txt = $(this).val()||"";
var maxlen = parseInt($(this).attr("maxlength"), 10)||4000;
if (txt.length > maxlen)
{
var txt = $(this).val()||"";
var maxlen = parseInt($(this).attr("maxlength"), 10)||4000;
if (txt.length > maxlen)
{
var lbl = $("label[for="+ this.name +"]").text()||"";
lbl = lbl.replace(/\:$/, ""); // Dubbele punt aan einde weg
validatorHint.push(("Veld '{0}' is te lang. Maximum is {1} karakters, huidig is {2}.".format(lbl, maxlen, txt.length)));
$(this).addClass("bad");
var lbl = $("label[for="+ this.name +"]").text() || // Label van flexkenmerken op eigen regel. Label staat voor het veld.
$(this).closest('table').find('th').eq($(this).closest('td').index()).text() || // Label van flexkenmerken op eerste regel achter parkeerplaats. Label staat boven in de kolom boven het veld.
"";
if ($("label[for="+ this.name +"]").text() != "")
lbl = lbl.replace(/\:$/, ""); // Dubbele punt aan einde weg indien aanwezig indien flex op eigen regel
if (lbl != "")
lbl = "'" + lbl + "'";
validatorHint.push(("Veld {0} is te lang. Maximum is {1} karakters, huidig is {2}.".format(lbl, maxlen, txt.length)));
$(this).addClass("bad");
anyBad = true;
}
anyBad = true;
}
}
)
}