mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 11:51:43 +02:00
allow to set <overlay legacy="true"> to disable new web-components for the whole xet-file
also disable (not working) r/w et2-select web-component again
This commit is contained in:
parent
d02afcbe54
commit
7e4bdece84
@ -59,7 +59,9 @@ function send_template()
|
|||||||
$cache_read = microtime(true);
|
$cache_read = microtime(true);
|
||||||
}
|
}
|
||||||
else*/
|
else*/
|
||||||
if(($str = file_get_contents($path)) !== false)
|
if(($str = file_get_contents($path)) !== false &&
|
||||||
|
// eTemplate marked as legacy, return unchanged template without web-components / et2-prefix
|
||||||
|
!preg_match('/<overlay[^>]* legacy="true"/', $str))
|
||||||
{
|
{
|
||||||
// fix <menulist...><menupopup type="select-*"/></menulist> --> <select type="select-*" .../>
|
// fix <menulist...><menupopup type="select-*"/></menulist> --> <select type="select-*" .../>
|
||||||
$str = preg_replace('#<menulist([^>]*)>[\r\n\s]*<menupopup([^>]+>)[\r\n\s]*</menulist>#', '<select$1$2', $str);
|
$str = preg_replace('#<menulist([^>]*)>[\r\n\s]*<menupopup([^>]+>)[\r\n\s]*</menulist>#', '<select$1$2', $str);
|
||||||
@ -85,9 +87,9 @@ function send_template()
|
|||||||
|
|
||||||
// add et2-prefix for <select-* or <date-* readonly="true"
|
// add et2-prefix for <select-* or <date-* readonly="true"
|
||||||
if (($matches[1] === 'select' || in_array($matches[1].$matches[2], ['date','date-time'])) &&
|
if (($matches[1] === 'select' || in_array($matches[1].$matches[2], ['date','date-time'])) &&
|
||||||
isset($attrs['readonly']) && !in_array($attrs['readonly'], ['false', '0']) ||
|
isset($attrs['readonly']) && !in_array($attrs['readonly'], ['false', '0']) /*||
|
||||||
// also add it for untyped/simple <select without search or tags attribute
|
// also add it for untyped/simple <select without search or tags attribute
|
||||||
$matches[1] === 'select' && empty($matches[2]) && !isset($attrs['type']) && !isset($attrs['search']) && !isset($attrs['tags']))
|
$matches[1] === 'select' && empty($matches[2]) && !isset($attrs['type']) && !isset($attrs['search']) && !isset($attrs['tags'])*/)
|
||||||
{
|
{
|
||||||
return '<et2-'.$matches[1].$matches[2].' '.$matches[3].'></et2-'.$matches[1].$matches[2].'>';
|
return '<et2-'.$matches[1].$matches[2].' '.$matches[3].'></et2-'.$matches[1].$matches[2].'>';
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ export class et2_box extends et2_baseWidget implements et2_IDetachedDOM
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
et2_register_widget(et2_box, ["old-vbox", "old-box"]);
|
et2_register_widget(et2_box, ["vbox", "box", "old-vbox", "old-box"]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Details widget implementation
|
* Details widget implementation
|
||||||
|
@ -199,6 +199,6 @@ export class et2_hbox extends et2_baseWidget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
et2_register_widget(et2_hbox, ["old-hbox"]);
|
et2_register_widget(et2_hbox, ["hbox", "old-hbox"]);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user