AAIT#36710: Berekende waarde van velden in Facilitor.
svn path=/Website/trunk/; revision=32207
This commit is contained in:
@@ -532,6 +532,7 @@ function listKenmerk(sql, module, key, props)
|
||||
// Ook class number/float (of currency) toevoegen
|
||||
|
||||
var kv = ""; // Het in te voegen veld in HTML, zonder label
|
||||
var onchangeExp = "";
|
||||
|
||||
// Een flexkenmerk wordt altijd weergegeven volgens het volgende format:
|
||||
// <tr><td class="label"><label>LABEL</label>:</td><td><input type="text" value='XX'></td></tr>
|
||||
@@ -544,6 +545,12 @@ function listKenmerk(sql, module, key, props)
|
||||
// KENMERKTYPE C (Karakter) =================================================================
|
||||
if (ktype == 'C')
|
||||
{
|
||||
onchangeExp = ";if (valid) calculateFlexExpressions(\"" + module
|
||||
+ "\", " + key
|
||||
+ ", \"" + (props.kenmerk_module||"")
|
||||
+ "\", \"" + nameprefix
|
||||
+ "\", \"" + extraserie
|
||||
+ "\");";
|
||||
if (klen > 50 && !kenmerk_search)
|
||||
{
|
||||
// Groot text veld wordt automatisch textarea
|
||||
@@ -565,7 +572,9 @@ function listKenmerk(sql, module, key, props)
|
||||
anyTextarea = true; // straks autogrow code
|
||||
kv = "<textarea "
|
||||
+ (kregexp ? " regexp='" + kregexp + "' " : "")
|
||||
+ " onChange='checkKenmerk(this, false,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")'"
|
||||
+ " onChange='valid=checkKenmerk(this, false,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")"
|
||||
+ onchangeExp
|
||||
+ "'"
|
||||
+ " onBlur='checkKenmerk(this, true,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")'"
|
||||
+ " class='fldflexC50 "
|
||||
+ (required ? required_class : "")
|
||||
@@ -600,7 +609,9 @@ function listKenmerk(sql, module, key, props)
|
||||
{
|
||||
kv = "<input type='text'"
|
||||
+ (kregexp ? " regexp='" + kregexp + "' " : "")
|
||||
+ " onChange='checkKenmerk(this, false,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")'"
|
||||
+ " onChange='valid=checkKenmerk(this, false,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")"
|
||||
+ onchangeExp
|
||||
+ "'"
|
||||
+ " onBlur='checkKenmerk(this, true,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")'"
|
||||
+ " id='" + nameprefix + idCounter + "val' name='" + nameprefix + idCounter + "val'"
|
||||
+ " class='"
|
||||
@@ -791,6 +802,13 @@ function listKenmerk(sql, module, key, props)
|
||||
|
||||
if (!readonlyfield)
|
||||
{ // is dus impliciet ook type R
|
||||
if (flexExprIncluded && !isExpression)
|
||||
onchangeExp = "calculateFlexExpressions(\"" + module
|
||||
+ "\", " + key
|
||||
+ ", \"" + (props.kenmerk_module||"")
|
||||
+ "\", \"" + nameprefix
|
||||
+ "\", \"" + extraserie
|
||||
+ "\");";
|
||||
kv = "<select id='" + nameprefix + idCounter + "val' name='" + nameprefix + idCounter + "val'"
|
||||
+ " class='"
|
||||
+ (kenmerk_search ? "fldSflexR " : "fldflexR ")
|
||||
@@ -798,13 +816,13 @@ function listKenmerk(sql, module, key, props)
|
||||
+ "'"
|
||||
//+ " placeholder='"+val_label+"'"
|
||||
+ (required ? " required='required' " : "")
|
||||
+ (required > 1
|
||||
? " onChange='checkRequiredGroup(\"" + required_group + "\")'"
|
||||
: "")
|
||||
+ ">"
|
||||
+ "<option value='-1' " + (required? " class='" + required_class + "'" : "") + "><!--lege waarde--></option>"
|
||||
+ kvv
|
||||
+ "</select>";
|
||||
+ (required > 1
|
||||
? " onChange='checkRequiredGroup(\"" + required_group + "\");" + onchangeExp + "'"
|
||||
: (flexExprIncluded && !isExpression? " onChange='" + onchangeExp + "'" : ""))
|
||||
+ ">"
|
||||
+ "<option value='-1' " + (required? " class='" + required_class + "'" : "") + "><!--lege waarde--></option>"
|
||||
+ kvv
|
||||
+ "</select>";
|
||||
if (required) // wrapper voor rode streepje, IE-only. Wat vind je Jos (ik vind het te lelijk in chrome/safari)
|
||||
kv = "<!--[if lt IE 8]><div id='req_" + nameprefix + idCounter + "val' class='fldflexR " + required_class + "'><![endif]-->" + kv + "<!--[if lt IE 8]></div><![endif]-->";
|
||||
}
|
||||
@@ -1057,24 +1075,23 @@ function listKenmerk(sql, module, key, props)
|
||||
if (kv == "" && ktype != "M" && ktype != "F" && ktype != "E" && !makeCheckbox)
|
||||
{ // Ook lege folders met bestanden en een enkele bestandsnaam krijgen we via de query mee. Maar deze niet tonen.
|
||||
// Ooit meer HTML-types toepassen (number, float)
|
||||
var onchangeExp = "";
|
||||
if (flexExprIncluded && (ktype == "N" || ktype == "D") && !isExpression)
|
||||
onchangeExp = ";if (valid) calculateFlexExpressions(\"" + module
|
||||
+ "\", " + key
|
||||
+ ", \"" + (props.kenmerk_module||"")
|
||||
+ "\", \"" + nameprefix
|
||||
+ "\", \"" + extraserie
|
||||
+ "\");";
|
||||
kv = "<input type='text'"
|
||||
+ (!readonlyfield && kregexp ? " regexp='" + kregexp + "' " : "")
|
||||
+ (!readonlyfield
|
||||
? " onChange='valid=checkKenmerk(this, false,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")"
|
||||
+ onchangeExp
|
||||
+ "' "
|
||||
: "")
|
||||
+ (!readonlyfield ? " onBlur='checkKenmerk(this, true,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")' " : "")
|
||||
+ (readonlyfield? " readonly tabindex=-1 "
|
||||
: " id='" + nameprefix + idCounter + "val' name='" + nameprefix + idCounter + "val' ");
|
||||
if (flexExprIncluded && (ktype == "N" || ktype == "D" || ktype == "S") && !isExpression)
|
||||
onchangeExp = ";if (valid) calculateFlexExpressions(\"" + module
|
||||
+ "\", " + key
|
||||
+ ", \"" + (props.kenmerk_module||"")
|
||||
+ "\", \"" + nameprefix
|
||||
+ "\", \"" + extraserie
|
||||
+ "\");";
|
||||
kv = "<input type='text'"
|
||||
+ (!readonlyfield && kregexp ? " regexp='" + kregexp + "' " : "")
|
||||
+ (!readonlyfield
|
||||
? " onChange='valid=checkKenmerk(this, false,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")"
|
||||
+ onchangeExp
|
||||
+ "' "
|
||||
: "")
|
||||
+ (!readonlyfield ? " onBlur='checkKenmerk(this, true,\"" + ktype + "\"," + klen + "," + kdec + "," + kmin + "," + kmax + ")' " : "")
|
||||
+ (readonlyfield? " readonly tabindex=-1 "
|
||||
: " id='" + nameprefix + idCounter + "val' name='" + nameprefix + idCounter + "val' ");
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user