|
1258 | 1258 | <data xmlns=""><uri></uri></data> |
1259 | 1259 | </xf:instance> |
1260 | 1260 | <!-- Element binds specifically for min/max occurrence --> |
1261 | | - <!-- Does not work due to the way elements are referenced in the form (not named) --> |
| 1261 | + <!-- Does not work due to the way elements are referenced in the form (not named) |
1262 | 1262 | <xsl:call-template name="elementBinds"> |
1263 | 1263 | <xsl:with-param name="subform" select="$subform"/> |
1264 | 1264 | <xsl:with-param name="xpath" select="$elementPath"/> |
|
1267 | 1267 | <xsl:with-param name="maxLevel" select="$maxLevel"/> |
1268 | 1268 | <xsl:with-param name="schemaConstraints" select="$schemaConstraints"/> |
1269 | 1269 | </xsl:call-template> |
| 1270 | + --> |
1270 | 1271 | </xf:model> |
1271 | 1272 | </head> |
1272 | 1273 | <body> |
|
2084 | 2085 | <xf:setvalue ref="instance('i-availableElements')/*" value="''"/> |
2085 | 2086 | </xf:trigger> |
2086 | 2087 | </xf:group> |
2087 | | - |
2088 | 2088 | <xf:trigger appearance="minimal" ref=".[instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())]/*:lookup[@form='{$subformName}' or @form=''][@formURL != ''][1]]" class="btn btn-outline-secondary btn-sm controls add showLookup"> |
2089 | | - <xf:label> <i class="bi bi-search"/> Lookup </xf:label> |
| 2089 | + <xf:label> <i class="bi bi-search"/> Lookup </xf:label> |
2090 | 2090 | <xf:action ev:event="DOMActivate"> |
2091 | 2091 | <xf:toggle case="{$grpRepeatID}LookupUnHide" ev:event="DOMActivate"/> |
2092 | 2092 | <xf:load show="embed" targetid="{$grpRepeatID}subformLookup"> |
2093 | | - <xf:resource value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup[@form='{$subformName}'][@formURL != ''][1]/@formURL"/> |
| 2093 | + <xf:resource value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup[@form='{$subformName}' or @form=''][@formURL != ''][1]/@formURL"/> |
2094 | 2094 | </xf:load> |
2095 | | - <xf:setvalue ref="instance('i-lookup-uri')//uri" value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup[@form='{$subformName}'][@formURL != ''][1]/@api"/> |
| 2095 | + <xf:setvalue ref="instance('i-lookup-uri')//uri" value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup[@form='{$subformName}' or @form=''][@formURL != ''][1]/@api"/> |
2096 | 2096 | </xf:action> |
2097 | 2097 | </xf:trigger> |
2098 | 2098 | <xf:trigger appearance="minimal" ref=".[instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:popup[@formURL != '']]" class="btn btn-outline-secondary btn-sm controls add"> |
|
2230 | 2230 | </xf:trigger> |
2231 | 2231 | </xf:group> |
2232 | 2232 | <xf:trigger appearance="minimal" ref=".[instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())]/*:lookup[@form='{$subformName}' or @form=''][@formURL != '']]" class="btn btn-outline-secondary btn-sm controls add showLookup"> |
2233 | | - <xf:label> <i class="bi bi-search"/> Lookup </xf:label> |
| 2233 | + <xf:label> <i class="bi bi-search"/> Lookup </xf:label> |
2234 | 2234 | <xf:action ev:event="DOMActivate"> |
2235 | 2235 | <xf:toggle case="{$repeatID}LookupUnHide" ev:event="DOMActivate"/> |
2236 | 2236 | <xf:load show="embed" targetid="{$repeatID}subformLookup"> |
2237 | | - <xf:resource value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())]/*:lookup[@form='{$subformName}'][@formURL != '']/@formURL"/> |
| 2237 | + <xf:resource value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())]/*:lookup[@form='{$subformName}' or @form=''][@formURL != '']/@formURL"/> |
2238 | 2238 | </xf:load> |
2239 | | - <xf:setvalue ref="instance('i-lookup-uri')//uri" value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())]/*:lookup[@form='{$subformName}'][@formURL != '']/@api"/> |
| 2239 | + <xf:setvalue ref="instance('i-lookup-uri')//uri" value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())]/*:lookup[@form='{$subformName}' or @form=''][@formURL != '']/@api"/> |
2240 | 2240 | </xf:action> |
2241 | 2241 | </xf:trigger> |
2242 | 2242 | <xf:trigger appearance="minimal" ref=".[instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:popup[@formURL != '']]" class="btn btn-outline-secondary btn-sm controls add"> |
|
2367 | 2367 | <xf:label><i xmlns="http://www.w3.org/1999/xhtml" class="bi bi-x"/> <xf:output value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current()/parent::*)][1]//*:availableAtts/*:attDef[@ident = name(current())]/@attLabel"/></xf:label> |
2368 | 2368 | <xf:delete ev:event="DOMActivate" ref="."/> |
2369 | 2369 | </xf:trigger> |
2370 | | - <!-- Do a lookup across all data types to insert into box --> |
2371 | | - <!-- |
2372 | | - <xf:trigger appearance="minimal" ref=".[instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup]" class="btn btn-outline-secondary btn-sm controls add showLookup"> |
2373 | | - <xf:label> <i class="bi bi-search"/> Lookup </xf:label> |
2374 | | - <xf:action ev:event="DOMActivate"> |
2375 | | - <xf:toggle case="{$repeatID}LookupUnHide" ev:event="DOMActivate"/> |
2376 | | - <xf:load show="embed" targetid="{$repeatID}subformLookup"> |
2377 | | - <xf:resource value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup/@formURL"/> |
2378 | | - </xf:load> |
2379 | | - <xf:setvalue ref="instance('i-lookup-uri')//uri" value="instance('i-{$subformName}-schemaConstraints')/*[local-name() = local-name(current())][1]/*:lookup/@api"/> |
2380 | | - </xf:action> |
2381 | | - </xf:trigger> |
2382 | | - --> |
2383 | 2370 | </div> |
2384 | 2371 | </div> |
2385 | 2372 | </xf:repeat> |
|
2777 | 2764 | <xsl:attribute name="formURL" select="concat('form.xq?form=forms/',$configDoc//formName/text(),'/lookup/',@formName,'.xhtml')"/> |
2778 | 2765 | </xsl:otherwise> |
2779 | 2766 | </xsl:choose> |
| 2767 | + <!--<xsl:attribute name="formURL" select="concat('form.xq?form=forms/',$configDoc//formName/text(),'/lookup/',@formName,'.xhtml')"/>--> |
2780 | 2768 | <xsl:attribute name="level" select="if(parent::*:subform) then 'subform' else 'toplevel'"/> |
2781 | 2769 | <xsl:attribute name="suppress" select="if(@suppress='true' or @supress='true' or parent::*:subform[@lookup='no']) then 'true' else 'false'"/> |
2782 | 2770 | <xsl:attribute name="form" select="if(parent::*:subform) then string(parent::*:subform/@formName) else ()"/> |
2783 | 2771 | </lookup> |
2784 | | - <!-- |
2785 | | - <xsl:choose> |
2786 | | - <xsl:when test="@suppress='true' or parent::*:subform[@lookup='no']"><lookup supress="true"/></xsl:when> |
2787 | | - <xsl:otherwise> |
2788 | | - <lookup> |
2789 | | - <xsl:copy-of select="@*"/> |
2790 | | - <xsl:attribute name="formURL" select="concat('form.xq?form=forms/',$configDoc//formName/text(),'/lookup/',tokenize(@formURL,'/')[last()])"/> |
2791 | | - <xsl:attribute name="level" select="if(parent::*:subform) then 'subform' else 'toplevel'"/> |
2792 | | - </lookup> |
2793 | | - </xsl:otherwise> |
2794 | | - </xsl:choose> |
2795 | | - --> |
2796 | 2772 | </xsl:for-each> |
2797 | 2773 | </xsl:variable> |
2798 | 2774 | <xsl:choose> |
|
2803 | 2779 | <xsl:copy-of select="$lookupList/*[@level='toplevel']"></xsl:copy-of> |
2804 | 2780 | </xsl:otherwise> |
2805 | 2781 | </xsl:choose> |
2806 | | - <xsl:variable name="popupList"> |
2807 | | - <xsl:for-each select="$configDoc/descendant::*:popup[@elementName = $elementName]"> |
2808 | | - <popup> |
| 2782 | + <xsl:variable name="popupList"> |
| 2783 | + <xsl:for-each select="$configDoc/descendant::*:popup[@elementName = $elementName]"> |
| 2784 | + <popup> |
2809 | 2785 | <xsl:copy-of select="@*"/> |
2810 | 2786 | <xsl:choose> |
2811 | 2787 | <xsl:when test="@suppress='true' or @supress='true' or parent::*:subform[@popup='no']"/> |
|
2826 | 2802 | <xsl:attribute name="suppress" select="if(@suppress='true' or @supress='true' or parent::*:subform[@popup='no']) then 'true' else 'false'"/> |
2827 | 2803 | <xsl:attribute name="form" select="$subformName"/> |
2828 | 2804 | --> |
2829 | | - </popup> |
| 2805 | + </popup> |
2830 | 2806 | </xsl:for-each> |
2831 | | - <!-- |
| 2807 | + </xsl:variable> |
2832 | 2808 | <xsl:choose> |
2833 | | - <xsl:when test="@suppress='true' or parent::*:subform[@lookup='no']"></xsl:when> |
2834 | | - <xsl:otherwise> |
2835 | | - <popup> |
2836 | | - <xsl:copy-of select="@*"/> |
2837 | | - <xsl:attribute name="formURL" select="concat('form.xq?form=forms/',$configDoc/descendant::*:popup[@elementName = $elementName]/@formName,'/index.xhtml')"/> |
2838 | | - </popup> |
2839 | | - </xsl:otherwise> |
2840 | | - </xsl:choose> |
2841 | | - --> |
2842 | | - </xsl:variable> |
2843 | | - <xsl:choose> |
2844 | 2809 | <xsl:when test="$popupList/*[@level='subform'][@form = $subformName]"> |
2845 | 2810 | <xsl:copy-of select="$popupList/*[@level='subform']"></xsl:copy-of> |
2846 | 2811 | </xsl:when> |
|
0 commit comments