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' => [ 'et2-email' => [
'.attrs' => [ '.attrs' => [
'onTagClick' => 'function', 'onTagClick' => 'function',
'multiple' => 'boolean',
], ],
], ],
]; ];
@ -151,31 +152,36 @@ removeNode($grammar->start->choice);
$grammar->start->addChild('ref')->addAttribute('name', 'overlay'); $grammar->start->addChild('ref')->addAttribute('name', 'overlay');
// fix legacy widgets: attribute-name => (array of) widgets // fix legacy widgets: attribute-name => (array of) widgets
$missing_legacy_attributes = [ $missing_legacy_attributes = [
'app' => 'customfields-types',
'callback' => 'vfs-upload', 'callback' => 'vfs-upload',
'statustext' => 'tab', 'class' => ['nextmatch','nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader', 'customfields-types'],
'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',
'disabled' => 'nextmatch', 'disabled' => 'nextmatch',
'onselect' => 'nextmatch', 'exclude' => 'customfields',
'span' => ['nextmatch', 'nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader'], 'id' => [
'class' => ['nextmatch','nextmatch-header', 'nextmatch-customfields', 'nextmatch-sortheader'], '.optional' => false,
'nextmatch-header', 'nextmatch-sortheader', 'nextmatch-customfields', 'nextmatch', 'customfields-types',
],
'header_left' => 'nextmatch',
'header_right' => 'nextmatch',
'header_row' => 'nextmatch',
'label' => [ 'label' => [
'.optional' => false, '.optional' => false,
'nextmatch-header', 'nextmatch-sortheader', 'nextmatch-header', 'nextmatch-sortheader',
], ],
'maxWidth' => 'column',
'minWidth' => 'column',
'onchange' => 'customfields-types',
'onselect' => 'nextmatch',
'readonly' => 'customfields-types',
'sortmode' => [ 'sortmode' => [
'.values' => ['ASC', 'DESC'], '.values' => ['ASC', 'DESC'],
'.default' => 'ASC', '.default' => 'ASC',
'nextmatch-sortheader', '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) 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 <!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 |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 |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 |audio|barcode|itempicker|script|countdown|customfields-types|nextmatch|nextmatch-header
|nextmatch-customfields|nextmatch|et2-avatar|et2-avatar-group|et2-lavatar|et2-checkbox|et2-button |nextmatch-customfields|nextmatch-sortheader|et2-avatar|et2-avatar-group|et2-lavatar|et2-checkbox
|et2-button-icon|et2-button-scroll|et2-button-timestamp|et2-colorpicker|et2-description|et2-label |et2-button|et2-button-icon|et2-button-scroll|et2-button-timestamp|et2-colorpicker|et2-description
|et2-date|et2-date-duration|et2-date-range|et2-date-since|et2-date-time|et2-date-timeonly |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-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-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 |et2-link-search|et2-link-string|et2-link-to|et2-portlet|et2-listbox|et2-select|et2-spinner
@ -82,8 +82,8 @@
disabled CDATA #IMPLIED disabled CDATA #IMPLIED
class CDATA #IMPLIED class CDATA #IMPLIED
width CDATA #IMPLIED width CDATA #IMPLIED
minWidth CDATA #IMPLIED maxWidth CDATA #IMPLIED
maxWidth CDATA #IMPLIED> minWidth CDATA #IMPLIED>
<!ELEMENT rows (row)*> <!ELEMENT rows (row)*>
@ -589,7 +589,9 @@
span CDATA #IMPLIED span CDATA #IMPLIED
type CDATA #IMPLIED type CDATA #IMPLIED
readonly CDATA #IMPLIED readonly CDATA #IMPLIED
attributes CDATA #IMPLIED> attributes CDATA #IMPLIED
exclude CDATA #IMPLIED
tab CDATA #IMPLIED>
<!ELEMENT customfields-list EMPTY> <!ELEMENT customfields-list EMPTY>
@ -1255,42 +1257,53 @@
readonly CDATA #IMPLIED readonly CDATA #IMPLIED
attributes CDATA #IMPLIED> attributes CDATA #IMPLIED>
<!ELEMENT nextmatch-header EMPTY> <!ELEMENT customfields-types EMPTY>
<!ATTLIST nextmatch-header <!ATTLIST customfields-types
id CDATA #REQUIRED app CDATA #IMPLIED
span CDATA #IMPLIED
class CDATA #IMPLIED class CDATA #IMPLIED
label CDATA #REQUIRED>
<!ELEMENT nextmatch-sortheader EMPTY>
<!ATTLIST nextmatch-sortheader
id CDATA #REQUIRED id CDATA #REQUIRED
onchange CDATA #IMPLIED
readonly CDATA #IMPLIED
span CDATA #IMPLIED span CDATA #IMPLIED
class CDATA #IMPLIED statustext 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>
<!ELEMENT nextmatch EMPTY> <!ELEMENT nextmatch EMPTY>
<!ATTLIST nextmatch <!ATTLIST nextmatch
id CDATA #REQUIRED class CDATA #IMPLIED
template CDATA #REQUIRED
header_left CDATA #IMPLIED
header_row CDATA #IMPLIED
header_right CDATA #IMPLIED
disabled CDATA #IMPLIED disabled CDATA #IMPLIED
id CDATA #REQUIRED
header_left CDATA #IMPLIED
header_right CDATA #IMPLIED
header_row CDATA #IMPLIED
onselect CDATA #IMPLIED onselect CDATA #IMPLIED
span 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> <!ELEMENT et2-avatar EMPTY>
@ -1861,6 +1874,7 @@
span CDATA #IMPLIED span CDATA #IMPLIED
slot CDATA #IMPLIED slot CDATA #IMPLIED
onTagClick CDATA #IMPLIED onTagClick CDATA #IMPLIED
multiple (false|true|1) #IMPLIED
tabindex CDATA #IMPLIED> tabindex CDATA #IMPLIED>
<!ELEMENT et2-favorites EMPTY> <!ELEMENT et2-favorites EMPTY>

View File

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