mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
rename parent_node to parentId, as parentNode is already a DOM property
This commit is contained in:
parent
b9d96ea3e9
commit
39a3ef8183
@ -346,7 +346,7 @@ function send_template()
|
||||
(substr($matches[ADD_ET2_PREFIX_LAST_GROUP], -1) === '/' ? substr($matches[ADD_ET2_PREFIX_LAST_GROUP], 0, -1) .
|
||||
'></et2-' . $matches[3] : $matches[ADD_ET2_PREFIX_LAST_GROUP]) . '>';
|
||||
}, $str);
|
||||
|
||||
}
|
||||
// change all attribute-names of new et2-* widgets to camelCase
|
||||
$str = preg_replace_callback('/<et2-([a-z-]+)\s([^>]+)>/', static function(array $matches)
|
||||
{
|
||||
@ -357,6 +357,7 @@ function send_template()
|
||||
{
|
||||
if (count($parts = preg_split('/[_-]/', $name)) > 1)
|
||||
{
|
||||
if ($name === 'parent_node') $parts[1] = 'Id'; // we can not use DOM property parentNode --> parentId
|
||||
$attrs[array_shift($parts).implode('', array_map('ucfirst', $parts))] = $value;
|
||||
unset($attrs[$name]);
|
||||
}
|
||||
@ -366,7 +367,7 @@ function send_template()
|
||||
}, array_keys($attrs), $attrs)).(substr($matches[2], -1) === '/' ? '/' : ''), $matches[0]);
|
||||
return $ret;
|
||||
}, $str);
|
||||
}
|
||||
|
||||
$processing = microtime(true);
|
||||
|
||||
if (isset($cache) && (file_exists($cache_dir = dirname($cache)) || mkdir($cache_dir, 0755, true) || is_dir($cache_dir)))
|
||||
|
@ -144,7 +144,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
* Widget ID of another node to insert this node into instead of the normal location
|
||||
* This isn't a normal property...
|
||||
*/
|
||||
parent_node: {type: String},
|
||||
parentId: {type: String},
|
||||
|
||||
/**
|
||||
* Tooltip which is shown for this element on hover
|
||||
@ -901,7 +901,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
*
|
||||
* @param {string} parent
|
||||
*/
|
||||
set parent_node(parent : string | Element)
|
||||
set parentId(parent : string | Element)
|
||||
{
|
||||
if(typeof parent === "string")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user