@@ -217,6 +217,17 @@ exclude-result-prefixes="#all"
217
217
<xsl : param name =" chart-type-id" select =" 'chart-type'" as =" xs:string" />
218
218
<xsl : param name =" category-id" select =" 'category'" as =" xs:string" />
219
219
<xsl : param name =" series-id" select =" 'series'" as =" xs:string" />
220
+ <xsl : param name =" form-actions" as =" element()" >
221
+ <div class =" form-actions" >
222
+ <button class =" btn btn-primary btn-save-chart" type =" button" >
223
+ <xsl : apply-templates select =" key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode =" ldh:logo" >
224
+ <xsl : with-param name =" class" select =" 'btn btn-primary btn-save-chart'" />
225
+ </xsl : apply-templates >
226
+
227
+ <xsl : apply-templates select =" key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode =" ac:label" />
228
+ </button >
229
+ </div >
230
+ </xsl : param >
220
231
<xsl : variable name =" query-uri" select =" descendant::*[@property = '&spin; query']/@resource" as =" xs:anyURI" />
221
232
<xsl : variable name =" chart-type" select =" descendant::*[@property = '&ldh; chartType']/@resource" as =" xs:anyURI?" />
222
233
<xsl : variable name =" category" select =" descendant::*[@property = '&ldh; categoryProperty']/@resource | descendant::*[@property = '&ldh; categoryVarName']/text()" as =" xs:string?" />
@@ -314,17 +325,7 @@ exclude-result-prefixes="#all"
314
325
</xsl : if >
315
326
</div >
316
327
317
- <!-- <xsl:if test="$show-save"> -->
318
- <div class =" form-actions" >
319
- <button class =" btn btn-primary btn-save-chart" type =" button" >
320
- <xsl : apply-templates select =" key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode =" ldh:logo" >
321
- <xsl : with-param name =" class" select =" 'btn btn-primary btn-save-chart'" />
322
- </xsl : apply-templates >
323
-
324
- <xsl : apply-templates select =" key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode =" ac:label" />
325
- </button >
326
- </div >
327
- <!-- </xsl:if> -->
328
+ <xsl : sequence select =" $form-actions" />
328
329
</form >
329
330
</xsl : result-document >
330
331
</xsl : for-each >
@@ -336,7 +337,6 @@ exclude-result-prefixes="#all"
336
337
<xsl : with-param name =" this" select =" $about" />
337
338
<xsl : with-param name =" block" select =" $block" />
338
339
<xsl : with-param name =" container-id" select =" $container-id" />
339
- <!-- <xsl:with-param name="chart-uri" select="$about"/>-->
340
340
<xsl : with-param name =" query-uri" select =" $query-uri" />
341
341
<xsl : with-param name =" chart-type" select =" $chart-type" />
342
342
<xsl : with-param name =" category" select =" $category" />
@@ -454,9 +454,9 @@ exclude-result-prefixes="#all"
454
454
</xsl : call-template >
455
455
</xsl : template >
456
456
457
- <!-- save chart onclick -->
457
+ <!-- create chart onclick (appends new chart instance with query and category/series fields filled out) -->
458
458
459
- <xsl : template match =" div[@about][@typeof]//button[contains-token(@class, 'btn-save -chart')]" mode =" ixsl:onclick" >
459
+ <xsl : template match =" div[@about][@typeof]//button[contains-token(@class, 'btn-create -chart')]" mode =" ixsl:onclick" >
460
460
<ixsl : set-style name =" cursor" select =" 'progress'" object =" ixsl:page()//body" />
461
461
<xsl : variable name =" block" select =" ancestor::div[contains-token(@class, 'block')][1]" as =" element()" />
462
462
<xsl : variable name =" textarea-id" select =" $block//textarea[@name = 'query']/ixsl:get(., 'id')" as =" xs:string" />
@@ -476,7 +476,7 @@ exclude-result-prefixes="#all"
476
476
</xsl : for-each >
477
477
</xsl : variable >
478
478
479
- <xsl : message >SAVE CHART query URI: <xsl : value-of select =" $block/@about" /></xsl : message >
479
+ <xsl : message >CREATE CHART query URI: <xsl : value-of select =" $block/@about" /></xsl : message >
480
480
481
481
<xsl : variable name =" constructed-doc" as =" document-node()" >
482
482
<xsl : document >
@@ -497,7 +497,7 @@ exclude-result-prefixes="#all"
497
497
</rdf : RDF >
498
498
</xsl : document >
499
499
</xsl : variable >
500
- <xsl : message >Save chart $constructed-doc: <xsl : value-of select =" serialize($constructed-doc)" /></xsl : message >
500
+ <xsl : message >Create chart $constructed-doc: <xsl : value-of select =" serialize($constructed-doc)" /></xsl : message >
501
501
502
502
<xsl : variable name =" doc-uri" select =" ac:absolute-path(ldh:base-uri(.))" as =" xs:anyURI" />
503
503
<xsl : variable name =" method" select =" 'post'" as =" xs:string" />
@@ -545,12 +545,14 @@ exclude-result-prefixes="#all"
545
545
</xsl : apply-templates >
546
546
</xsl : variable >
547
547
548
- <xsl : variable name =" content-body" select =" id('content-body', ixsl:page())" as =" element()" />
548
+ <!-- <xsl:variable name="content-body" select="id('content-body', ixsl:page())" as="element()"/>
549
549
<xsl:for-each select="$content-body">
550
550
<xsl:result-document href="?." method="ixsl:append-content">
551
551
<xsl:sequence select="$row-form"/>
552
552
</xsl:result-document>
553
- </xsl : for-each >
553
+ </xsl:for-each>-->
554
+ <!-- insert $row-form after the $block TO-DO: replace with <xsl:result-document href="?." method="ixsl:insert-after"> when SaxonJS 3 is available https://saxonica.plan.io/issues/5543 -->
555
+ <xsl : sequence select =" ixsl:call($block, 'after', [ $row-form ])[current-date() lt xs:date('2000-01-01')]" />
554
556
</xsl : template >
555
557
556
558
<!-- disable inline editing form (do nothing if the button is disabled) -->
0 commit comments