some more additions to the eTemplate 2.0 DTD

This commit is contained in:
ralf 2024-04-23 10:43:06 +02:00
parent 8acfc4ed27
commit b517cbaf94
3 changed files with 162 additions and 99 deletions

View File

@ -139,6 +139,7 @@ $overwrites = [
'et2-email' => [
'.attrs' => [
'onTagClick' => 'function',
'multiple' => 'boolean',
],
],
];
@ -151,31 +152,36 @@ removeNode($grammar->start->choice);
$grammar->start->addChild('ref')->addAttribute('name', 'overlay');
// fix legacy widgets: attribute-name => (array of) widgets
$missing_legacy_attributes = [
'app' => 'customfields-types',
'callback' => 'vfs-upload',
'statustext' => 'tab',
'minWidth' => 'column',
'maxWidth' => 'column',
'id' => [
'.optional' => false,
'nextmatch-header', 'nextmatch-sortheader', 'nextmatch-customfields', 'nextmatch',
],
'template' => ['.optional' => false, 'nextmatch'],
'header_left' => 'nextmatch',
'header_row' => 'nextmatch',
'header_right' => 'nextmatch',
'class' => ['nextmatch','nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader', 'customfields-types'],
'disabled' => 'nextmatch',
'onselect' => 'nextmatch',
'span' => ['nextmatch', 'nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader'],
'class' => ['nextmatch','nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader'],
'exclude' => 'customfields',
'id' => [
'.optional' => false,
'nextmatch-header', 'nextmatch-sortheader', 'nextmatch-customfields', 'nextmatch', 'customfields-types',
],
'header_left' => 'nextmatch',
'header_right' => 'nextmatch',
'header_row' => 'nextmatch',
'label' => [
'.optional' => false,
'nextmatch-header', 'nextmatch-sortheader',
],
'.optional' => false,
'nextmatch-header', 'nextmatch-sortheader',
],
'maxWidth' => 'column',
'minWidth' => 'column',
'onchange' => 'customfields-types',
'onselect' => 'nextmatch',
'readonly' => 'customfields-types',
'sortmode' => [
'.values' => ['ASC', 'DESC'],
'.default' => 'ASC',
'nextmatch-sortheader',
],
'span' => ['nextmatch', 'nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader', 'customfields-types'],
'statustext' => ['tab', 'customfields-types'],
'template' => ['.optional' => false, 'nextmatch'],
'tab' => 'customfields',
];
foreach($missing_legacy_attributes as $attribute => $widgets)
{

View File

@ -24,10 +24,10 @@
<!ENTITY % Widgets "template|grid|groupbox|caption|entry|contact-value|contact-account|contact-template|infolog-value
|tracker-value|records-value|hidden|radio|radiogroup|diff|styles|customfields|customfields-list|html
|htmlarea|toolbar|historylog|hrule|file|progress|vfs|vfs-name|vfs-size|vfs-mode|vfs-upload|video
|audio|barcode|itempicker|script|countdown|nextmatch-header|nextmatch-sortheader
|nextmatch-customfields|nextmatch|et2-avatar|et2-avatar-group|et2-lavatar|et2-checkbox|et2-button
|et2-button-icon|et2-button-scroll|et2-button-timestamp|et2-colorpicker|et2-description|et2-label
|et2-date|et2-date-duration|et2-date-range|et2-date-since|et2-date-time|et2-date-timeonly
|audio|barcode|itempicker|script|countdown|customfields-types|nextmatch|nextmatch-header
|nextmatch-customfields|nextmatch-sortheader|et2-avatar|et2-avatar-group|et2-lavatar|et2-checkbox
|et2-button|et2-button-icon|et2-button-scroll|et2-button-timestamp|et2-colorpicker|et2-description
|et2-label|et2-date|et2-date-duration|et2-date-range|et2-date-since|et2-date-time|et2-date-timeonly
|et2-date-time-today|et2-dialog|et2-dropdown-button|et2-email|et2-favorites|et2-iframe|et2-appicon
|et2-image|et2-link|et2-link-add|et2-link-apps|et2-link-entry|et2-link-list|et2-link-paste-dialog
|et2-link-search|et2-link-string|et2-link-to|et2-portlet|et2-listbox|et2-select|et2-spinner
@ -82,8 +82,8 @@
disabled CDATA #IMPLIED
class CDATA #IMPLIED
width CDATA #IMPLIED
minWidth CDATA #IMPLIED
maxWidth CDATA #IMPLIED>
maxWidth CDATA #IMPLIED
minWidth CDATA #IMPLIED>
<!ELEMENT rows (row)*>
@ -589,7 +589,9 @@
span CDATA #IMPLIED
type CDATA #IMPLIED
readonly CDATA #IMPLIED
attributes CDATA #IMPLIED>
attributes CDATA #IMPLIED
exclude CDATA #IMPLIED
tab CDATA #IMPLIED>
<!ELEMENT customfields-list EMPTY>
@ -1255,42 +1257,53 @@
readonly CDATA #IMPLIED
attributes CDATA #IMPLIED>
<!ELEMENT nextmatch-header EMPTY>
<!ELEMENT customfields-types EMPTY>
<!ATTLIST nextmatch-header
id CDATA #REQUIRED
span CDATA #IMPLIED
<!ATTLIST customfields-types
app CDATA #IMPLIED
class CDATA #IMPLIED
label CDATA #REQUIRED>
<!ELEMENT nextmatch-sortheader EMPTY>
<!ATTLIST nextmatch-sortheader
id CDATA #REQUIRED
onchange CDATA #IMPLIED
readonly CDATA #IMPLIED
span CDATA #IMPLIED
class CDATA #IMPLIED
label CDATA #REQUIRED
sortmode (ASC|DESC) 'ASC'>
<!ELEMENT nextmatch-customfields EMPTY>
<!ATTLIST nextmatch-customfields
id CDATA #REQUIRED
span CDATA #IMPLIED
class CDATA #IMPLIED>
statustext CDATA #IMPLIED>
<!ELEMENT nextmatch EMPTY>
<!ATTLIST nextmatch
id CDATA #REQUIRED
template CDATA #REQUIRED
header_left CDATA #IMPLIED
header_row CDATA #IMPLIED
header_right CDATA #IMPLIED
class CDATA #IMPLIED
disabled CDATA #IMPLIED
id CDATA #REQUIRED
header_left CDATA #IMPLIED
header_right CDATA #IMPLIED
header_row CDATA #IMPLIED
onselect CDATA #IMPLIED
span CDATA #IMPLIED
class CDATA #IMPLIED>
template CDATA #REQUIRED>
<!ELEMENT nextmatch-header EMPTY>
<!ATTLIST nextmatch-header
class CDATA #IMPLIED
id CDATA #REQUIRED
label CDATA #REQUIRED
span CDATA #IMPLIED>
<!ELEMENT nextmatch-customfields EMPTY>
<!ATTLIST nextmatch-customfields
class CDATA #IMPLIED
id CDATA #REQUIRED
span CDATA #IMPLIED>
<!ELEMENT nextmatch-sortheader EMPTY>
<!ATTLIST nextmatch-sortheader
class CDATA #IMPLIED
id CDATA #REQUIRED
label CDATA #REQUIRED
sortmode (ASC|DESC) 'ASC'
span CDATA #IMPLIED>
<!ELEMENT et2-avatar EMPTY>
@ -1861,6 +1874,7 @@
span CDATA #IMPLIED
slot CDATA #IMPLIED
onTagClick CDATA #IMPLIED
multiple (false|true|1) #IMPLIED
tabindex CDATA #IMPLIED>
<!ELEMENT et2-favorites EMPTY>

View File

@ -58,10 +58,11 @@
<ref name="itempicker"/>
<ref name="script"/>
<ref name="countdown"/>
<ref name="nextmatch-header"/>
<ref name="nextmatch-sortheader"/>
<ref name="nextmatch-customfields"/>
<ref name="customfields-types"/>
<ref name="nextmatch"/>
<ref name="nextmatch-header"/>
<ref name="nextmatch-customfields"/>
<ref name="nextmatch-sortheader"/>
<ref name="et2-avatar"/>
<ref name="et2-avatar-group"/>
<ref name="et2-lavatar"/>
@ -299,10 +300,10 @@
<attribute name="width"/>
</optional>
<optional>
<attribute name="minWidth"/>
<attribute name="maxWidth"/>
</optional>
<optional>
<attribute name="maxWidth"/>
<attribute name="minWidth"/>
</optional>
</define>
<define name="rows">
@ -2071,6 +2072,12 @@
<optional>
<attribute name="attributes"/>
</optional>
<optional>
<attribute name="exclude"/>
</optional>
<optional>
<attribute name="tab"/>
</optional>
</define>
<define name="customfields-list">
<element name="customfields-list">
@ -4530,59 +4537,31 @@
<start>
<ref name="overlay"/>
</start>
<define name="nextmatch-header">
<element name="nextmatch-header">
<ref name="attlist.nextmatch-header"/>
<define name="customfields-types">
<element name="customfields-types">
<ref name="attlist.customfields-types"/>
<empty/>
</element>
</define>
<define name="attlist.nextmatch-header">
<attribute name="id"/>
<define name="attlist.customfields-types">
<optional>
<attribute name="span"/>
<attribute name="app"/>
</optional>
<optional>
<attribute name="class"/>
</optional>
<attribute name="label"/>
</define>
<define name="nextmatch-sortheader">
<element name="nextmatch-sortheader">
<ref name="attlist.nextmatch-sortheader"/>
<empty/>
</element>
</define>
<define name="attlist.nextmatch-sortheader">
<attribute name="id"/>
<optional>
<attribute name="onchange"/>
</optional>
<optional>
<attribute name="readonly"/>
</optional>
<optional>
<attribute name="span"/>
</optional>
<optional>
<attribute name="class"/>
</optional>
<attribute name="label"/>
<optional>
<attribute name="sortmode" a:defaultValue="ASC">
<choice>
<value>ASC</value>
<value>DESC</value>
</choice>
</attribute>
</optional>
</define>
<define name="nextmatch-customfields">
<element name="nextmatch-customfields">
<ref name="attlist.nextmatch-customfields"/>
<empty/>
</element>
</define>
<define name="attlist.nextmatch-customfields">
<attribute name="id"/>
<optional>
<attribute name="span"/>
</optional>
<optional>
<attribute name="class"/>
<attribute name="statustext"/>
</optional>
</define>
<define name="nextmatch">
@ -4592,19 +4571,21 @@
</element>
</define>
<define name="attlist.nextmatch">
<attribute name="id"/>
<attribute name="template"/>
<optional>
<attribute name="header_left"/>
<attribute name="class"/>
</optional>
<optional>
<attribute name="header_row"/>
<attribute name="disabled"/>
</optional>
<attribute name="id"/>
<optional>
<attribute name="header_left"/>
</optional>
<optional>
<attribute name="header_right"/>
</optional>
<optional>
<attribute name="disabled"/>
<attribute name="header_row"/>
</optional>
<optional>
<attribute name="onselect"/>
@ -4612,9 +4593,62 @@
<optional>
<attribute name="span"/>
</optional>
<attribute name="template"/>
</define>
<define name="nextmatch-header">
<element name="nextmatch-header">
<ref name="attlist.nextmatch-header"/>
<empty/>
</element>
</define>
<define name="attlist.nextmatch-header">
<optional>
<attribute name="class"/>
</optional>
<attribute name="id"/>
<attribute name="label"/>
<optional>
<attribute name="span"/>
</optional>
</define>
<define name="nextmatch-customfields">
<element name="nextmatch-customfields">
<ref name="attlist.nextmatch-customfields"/>
<empty/>
</element>
</define>
<define name="attlist.nextmatch-customfields">
<optional>
<attribute name="class"/>
</optional>
<attribute name="id"/>
<optional>
<attribute name="span"/>
</optional>
</define>
<define name="nextmatch-sortheader">
<element name="nextmatch-sortheader">
<ref name="attlist.nextmatch-sortheader"/>
<empty/>
</element>
</define>
<define name="attlist.nextmatch-sortheader">
<optional>
<attribute name="class"/>
</optional>
<attribute name="id"/>
<attribute name="label"/>
<optional>
<attribute name="sortmode" a:defaultValue="ASC">
<choice>
<value>ASC</value>
<value>DESC</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="span"/>
</optional>
</define>
<define name="et2-avatar">
<element name="et2-avatar">
@ -6967,6 +7001,15 @@
<optional>
<attribute name="onTagClick"/>
</optional>
<optional>
<attribute name="multiple">
<choice>
<value>false</value>
<value>true</value>
<value>1</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="tabindex"/>
</optional>