Changeset 25341 in main
- Timestamp:
- 06/09/22 21:02:29 (12 months ago)
- Location:
- trunk/ibisph-view/src/main/webapp
- Files:
-
- 1 added
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ibisph-view/src/main/webapp/js/KendoLeafletDataViz.js
r24395 r25341 248 248 249 249 250 251 // ***************************** FUNCS THAT ARE CURRENTLY NOT USED...252 KendoLeafletDataViz.getChartImage = function()253 {254 // doesn't var svg = $kendoChart.kendoChart.svg();255 // works var svg = $kendoChart.data("kendoChart").svg();256 var svg = $kendoChart.getKendoChart().svg();257 KendoLeafletDataViz.getImage(svg);258 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~259 260 261 KendoLeafletDataViz.getMapImage = function()262 {263 console.debug("KendoLeafletDataViz.getMapImage - chart data: " + $kendoChart.data("kendoChart"));264 console.debug("KendoLeafletDataViz.getMapImage - leaflet data: " + $leafletMap.data("leaflet"));265 // xml declaration is NOT needed...266 var svg = "START_MARKER" + $(".leaflet-overlay-pane").html();267 svg = svg.replace("START_MARKER<svg", "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' ");268 KendoLeafletDataViz.getImage(svg);269 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~270 271 272 KendoLeafletDataViz.getImage = function(svg)273 {274 //svg = $(svg).replaceAll("stroke=''", "");275 //alert("SVG: " +svg);276 277 this.xhr = $.ajax({278 type: "POST"279 // ,url: "<xsl:value-of select="$ibis.contextPath"/>svgtoimage/download.png"280 ,crossDomain: true281 ,headers: {282 "accept": "image/png"283 ,"content-Type": "image/svg+xml"284 }285 ,data: svg286 ,success: function(data, textStatus, jqXHR)287 {288 console.debug("KendoLeafletDataViz.getImage - Converting SVG to Image - success status: "+ textStatus);289 this.insertImageData(data);290 }291 ,error: function(jqXHR, textStatus, errorThrown)292 {293 console.debug("KendoLeafletDataViz.getImage - Converting SVG to Image - ERROR: "+ errorThrown+", Status: ", textStatus);294 }295 // breaks things... ,dataType: "xml"296 });297 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~298 299 300 KendoLeafletDataViz.insertImageData = function(imageData)301 {302 var imgSrc = "data:image/png;base64," + imageData;303 var imgHTML = "<img src=\"" + imgSrc + "\"/>";304 $("#rasterImage").html(imgHTML);305 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~306 307 308 250 // Called for title type value sorting. If error converting simply return equal (0). 309 251 KendoLeafletDataViz.valueTitleSortComparision = function(a, b) -
trunk/ibisph-view/src/main/webapp/xslt/_ibis-include.xslt
r24331 r25341 211 211 standard call-template xslt processing needs to include a file. 212 212 213 IMPORTANT NOTE :213 IMPORTANT NOTES: 214 214 Prior to 7/7/2020 had various include attribute matching templates 215 215 that handled more specialized processing. However, as things evolved … … 220 220 duplicate handling rules. See that code for some of the attempts to 221 221 allow for module matches. 222 " 223 > 224 <xsl:param name="url"/> 222 223 The more complex XSLT only docment() fn vs doc() is used so that 224 the file can be referenced relative to the main XML supplied in the 225 xform operation. Otherwise the single file doc() fn should be used. 226 227 No try catch file error handling is done as want it to blow up so 228 the issue is front and center and gets fixed. 229 230 Params are not typed i.e. as=xs:string because some use cases involve 231 element attribute values. 232 " 233 > 234 <xsl:param name="url" 235 ibis:doc="Required value used to locate the XML file to be included 236 and processed. 237 238 NOTE: the use of document() vs doc(). If the URL is relative 239 the document() call uses the main xform XML file URI as it's 240 base path. If doc() is used the URL must be a complete file 241 path URL otherwise it will be relative to the XSLT file. In 242 either case fully qualified URLs work. 243 " 244 /> 225 245 <xsl:param name="basePathType" 226 246 ibis:doc="Optional value that specifies where to look for the file … … 238 258 " 239 259 /> 240 <xsl:param name="childNameList" 260 <xsl:param name="childNameList" 241 261 ibis:doc="Optional blank or csv list of child NAME element values to limit 242 262 included elements (like DIMENSION) and any other includes that … … 253 273 " 254 274 /> 275 255 276 <xsl:variable name="url" 256 select="if( not($basePathType)) then $url277 select="if(0 = string-length($basePathType)) then $url 257 278 else if('publishedxml' = lower-case($basePathType)) then ibis:getPublishedXMLPath($url) 258 279 else ibis:getContentPath($url) 259 280 " 260 281 /> 261 262 282 <xsl:choose> 263 283 <xsl:when test="$childNameList"> … … 266 286 </xsl:when> 267 287 <xsl:when test="$includeChildrenOnly"> 268 <xsl:apply-templates select="document($url , /)/(*/text() | */*)" mode="ibis.copy"/>288 <xsl:apply-templates select="document($url)/(*/text() | */*)" mode="ibis.copy"/> 269 289 </xsl:when> 270 290 <xsl:otherwise> 271 <xsl:apply-templates select="document($url , /)/*" mode="ibis.copy"/>291 <xsl:apply-templates select="document($url)/*" mode="ibis.copy"/> 272 292 </xsl:otherwise> 273 293 </xsl:choose> -
trunk/ibisph-view/src/main/webapp/xslt/html/SiteSpecific.xslt
r23543 r25341 42 42 solution." 43 43 > 44 <xsl:apply-templates select="doc ument(ibis:getContentPath('xml/selections/navigation/SiteNavigationSelections.xml'))/SELECTIONS/*" mode="ibis.copy"/>44 <xsl:apply-templates select="doc(ibis:getContentPath('xml/selections/navigation/SiteNavigationSelections.xml'))/SELECTIONS/*" mode="ibis.copy"/> 45 45 </xsl:param> 46 46 <xsl:param name="SiteSpecific.siteAuthenticatedUserSelections"> 47 <xsl:apply-templates select="doc ument(ibis:getContentPath('xml/selections/navigation/AuthenticatedUserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/>47 <xsl:apply-templates select="doc(ibis:getContentPath('xml/selections/navigation/AuthenticatedUserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/> 48 48 </xsl:param> 49 49 <xsl:param name="SiteSpecific.siteNonAuthenticatedUserSelections"> 50 <xsl:apply-templates select="doc ument(ibis:getContentPath('xml/selections/navigation/UserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/>50 <xsl:apply-templates select="doc(ibis:getContentPath('xml/selections/navigation/UserSelection.xml'))/SELECTION/SELECTIONS" mode="ibis.copy"/> 51 51 </xsl:param> 52 52 -
trunk/ibisph-view/src/main/webapp/xslt/html/community/facts/Page.xslt
r25315 r25341 16 16 <name>html/community/facts/Page</name> 17 17 <summary> 18 THIS IS NOT A WORKING PAGE. MUCH NEEDS TO BE DEFINED and IMPLEMENTED. 19 THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK. 20 18 21 Provides the Special Introduction Overrides to be able to process 19 22 both the community dimension file and the 'HTML_CONTENT' file to -
trunk/ibisph-view/src/main/webapp/xslt/html/community/indicator/Page.xslt
r24432 r25341 7 7 exclude-result-prefixes="ibis" 8 8 > 9 <!-- GARTHTODO: remove this entire XSLT page??? If not remove then decide what9 <!-- TODO: remove this entire XSLT page??? If not remove then decide what 10 10 it should be... 11 12 THIS IS NOT A WORKING PAGE. MUCH NEEDS TO BE DEFINED and IMPLEMENTED. 13 THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK. 11 14 12 15 example it could simply be an trend IP report page for a specific community - … … 30 33 <summary>Default core code that produces the Community Indicator Profile view</summary> 31 34 <description> 35 THIS IS NOT A WORKING PAGE. MUCH NEEDS TO BE DEFINED and IMPLEMENTED. 36 THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK. 37 32 38 Provides overridden Page API templates for the community profile Indicator report. 33 39 </description> -
trunk/ibisph-view/src/main/webapp/xslt/html/community/initiatives/Page.xslt
r24432 r25341 16 16 <summary>Default core code that produces the Community Initiatives</summary> 17 17 <description> 18 THIS IS NOT A WORKING PAGE. MUCH NEEDS TO BE DEFINED and IMPLEMENTED. 19 THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK. 20 18 21 Main page templates for the community profile initiatives list Report. 19 22 -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/Indicator.xslt
r24942 r25341 21 21 22 22 <!-- ==================== VARIABLES and PARAMETERS ===================== --> 23 <!-- NOTE: no file exists or try catch as want this to fail as it should never happen --> 23 24 <xsl:param name="Indicator.indicator" select=" 24 25 if(exists(/INDICATOR_VIEW))then 25 document( concat(/INDICATOR_VIEW/INDICATOR_NAME, '.xml'), /)/INDICATOR26 document(/INDICATOR_VIEW/INDICATOR_NAME || '.xml', /)/INDICATOR 26 27 else 27 28 /INDICATOR … … 34 35 <xsl:param name="Indicator.indicatorView" select=" 35 36 if(exists(/INDICATOR))then 36 document( concat(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME, '.xml'), /)/INDICATOR_VIEW37 document(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME || '.xml', /)/INDICATOR_VIEW 37 38 else 38 39 /INDICATOR_VIEW … … 691 692 </xsl:call-template> 692 693 </xsl:variable> 694 <!-- 693 695 <xsl:copy-of select="$reourcesAndLinksHTMLContent/HTML_CONTENT/CONTENT/*"/> 696 --> 694 697 </xsl:template> 695 698 -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/complete_profile/Page.xslt
r24942 r25341 84 84 85 85 <xsl:for-each select="$indicator/INDICATOR_VIEWS/INDICATOR_VIEW/NAME"> 86 <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/> 86 <!-- NOTE: no try catch for missing file - want this to fail as it should never happen --> 87 <xsl:variable name="indicatorView" select="document(current() || '.xml', /)/INDICATOR_VIEW"/> 88 87 89 <xsl:variable name="measure" select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/> 88 90 <xsl:variable name="measureValueType" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/summary/Page.xslt
r25315 r25341 46 46 47 47 <xsl:for-each select="$indicator/INDICATOR_VIEWS/INDICATOR_VIEW/NAME"> 48 <xsl:variable name="indicatorView" select="document(concat(current(), '.xml'), /)/INDICATOR_VIEW"/> 48 <!-- NOTE: no try catch for missing file - want this to fail as it should never happen --> 49 <xsl:variable name="indicatorView" select="document(current() || '.xml', /)/INDICATOR_VIEW"/> 50 49 51 <xsl:variable name="measure" select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/> 50 52 <xsl:variable name="measureValueType" select="($Indicator.valueTypes/VALUE_TYPE[NAME = $measure/VALUE_TYPE_NAME])[1]"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/report/configurations_by_file.xslt
r23472 r25341 99 99 <xsl:template name="processFile"> 100 100 <xsl:param name="filename"/> 101 <xsl:param name="file" select="document( concat($SiteSpecific.filePath, $filename), /)"/>101 <xsl:param name="file" select="document($SiteSpecific.filePath || $filename, /)"/> 102 102 <xsl:param name="configCount" select="count($file/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION)"/> 103 103 -
trunk/ibisph-view/src/main/webapp/xslt/ibis.xslt
r24395 r25341 59 59 See: https://stackoverflow.com/questions/3854345/xpath-test-if-node-value-is-number 60 60 for number() = NaN which is unique and is not the same as another NaN. 61 62 castable does NOT work as blank values return TRUE. 63 <xsl:sequence select="$value castable as xs:double"/> 61 64 --> 62 65 <xsl:param name="value" ibis:doc="Source value to be tested"/> 66 63 67 <xsl:sequence select="number($value) = number($value)"/> 64 68 </xsl:function> -
trunk/ibisph-view/src/main/webapp/xslt/json/IndicatorViewDataset.xslt
r24432 r25341 32 32 <xsl:param name="indicator" select=" 33 33 if(exists(/INDICATOR_VIEW))then 34 document( concat(/INDICATOR_VIEW/INDICATOR_NAME, '.xml'), /)/INDICATOR34 document(/INDICATOR_VIEW/INDICATOR_NAME || '.xml', /)/INDICATOR 35 35 else 36 36 /INDICATOR … … 53 53 <xsl:param name="indicatorView" select=" 54 54 if(exists(/INDICATOR))then 55 document( concat(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME, '.xml'), /)/INDICATOR_VIEW55 document(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME || '.xml', /)/INDICATOR_VIEW 56 56 else 57 57 /INDICATOR_VIEW -
trunk/ibisph-view/src/main/webapp/xslt/xml/Initiative.xslt
r24432 r25341 13 13 <description> 14 14 Main page templates for the community profile initiatives list Report. 15 16 THIS IS NOT A WORKING XSLT. MUCH NEEDS TO BE DEFINED and IMPLEMENTED. 17 THIS IS SIMPLY LEFT HERE AS A STUBB FOR POSSIBLE FUTURE WORK. 15 18 16 19 BY COMMUNITY - PICK COMMUNITY THEN LOOP ALL INITATIVES
Note: See TracChangeset
for help on using the changeset viewer.