mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Legacy options:
- Allow one content variable to contain multiple (all) legacy options - If there are more options provided than legacy options expected, put the rest into the last legacy option
This commit is contained in:
parent
c9764eb2e8
commit
577c7acb6b
@ -475,8 +475,14 @@ var et2_widget = Class.extend({
|
||||
var attrValue = _attrsObj[i].value;
|
||||
|
||||
// Special handling for the legacy options
|
||||
if (attrName == "options")
|
||||
if (attrName == "options" && _proto.legacyOptions.length > 0)
|
||||
{
|
||||
// Check for entire legacy options passed in content
|
||||
if(attrValue.charAt(0) == '@' && attrValue.indexOf(',') == -1)
|
||||
{
|
||||
attrValue = mgr.expandName(attrValue);
|
||||
}
|
||||
|
||||
// Parse the legacy options
|
||||
var splitted = et2_csvSplit(attrValue);
|
||||
|
||||
@ -487,6 +493,15 @@ var et2_widget = Class.extend({
|
||||
{
|
||||
attrValue = splitted[j];
|
||||
|
||||
/**
|
||||
If more legacy options than expected, stuff them all in the last legacy option
|
||||
Some legacy options take a comma separated list.
|
||||
*/
|
||||
if(j == _proto.legacyOptions.length - 1 && splitted.length > _proto.legacyOptions.length)
|
||||
{
|
||||
attrValue = splitted.slice(j);
|
||||
}
|
||||
|
||||
// Blank = not set
|
||||
if(attrValue == "") continue;
|
||||
|
||||
@ -498,7 +513,7 @@ var et2_widget = Class.extend({
|
||||
{
|
||||
attrValue = mgr.parseBoolExpression(attrValue);
|
||||
}
|
||||
else
|
||||
else if (typeof attrValue != "object")
|
||||
{
|
||||
attrValue = mgr.expandName(attrValue);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user