Changeset 24395 in main


Ignore:
Timestamp:
12/29/21 16:22:11 (5 months ago)
Author:
GarthBraithwaite_STG
Message:

view - changed ibis picture to pattern to be consist. added some whitespace to top of a few xslts. SelectionsList?.xslt updated heading level param to xs:integer and couple of logic changes.

Location:
trunk/ibisph-view/src/main/webapp
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/ibisph-view/src/main/webapp/WEB-INF/config/spring/community.xml

    r24014 r24395  
    3333                        Typically used for adopters that have the community request under
    3434                        "dataportal/community".  For those cases or any other case that is
    35                         not the same as the core community request without a web.xml servlet
    36                         base request path mapping this value needs to be populated for the
    37                         model map to work propertly.  If dataportal/community AND the web.xml
    38                         contains a dataportal mapping this value should be set in the ss.prop
    39                         file with a value like: "/dataportal/community".
     35                        not the same as the core community request (default value of
     36                        "community/") this value needs to be populated for the model map to
     37                        work propertly.  When IBIS has code for path prefix to remove the
     38                        starting path is URI based minus the app context.
    4039                </description>
    4140<!--
  • trunk/ibisph-view/src/main/webapp/js/KendoLeafletDataViz.js

    r23071 r24395  
    11/*------------------------------------------------------------------------------
    2         Prototypes which are mostly static type funcs that are typically injected
    3         into kendo/leaflet json options.  The kendo leaflet script uses a blank
    4         KendoLeafletDataViz object to dynamically add / contain  kendo and leaflet
    5         options and objects. 
     2        Provides object which contains kendo and leaflet helper static type funcs.
     3        These funcs are typically referenced/injected into kendo/leaflet json
     4        constructor options.  The kendo leaflet script uses a blank KendoLeafletDataViz
     5        object to dynamically add / contain  kendo and leaflet options and objects. 
    66
    77        This functionality at some point can be implemented in a more formal mixin
  • trunk/ibisph-view/src/main/webapp/xslt/_ibis-format.xslt

    r23490 r24395  
    1515
    1616
    17         <!-- ========================= P A R A M E T E R S   and   V A R I A B L E S
    18                 The java servlet controller code adds ALL URL query request parameters
    19                 to the XSLT transformation's parameters.  Other special parameters are
    20                 added as well. 
    21 
    22                 Many of the global type parameters are defined within this XSLT file. 
    23                 The parameters are passed in via the Java XSLT transformation parameter
    24                 map (and thus are nameed according to the Java model map key value). 
    25                 For ease of XSLT code maintenance these global XSLT parameters are
    26                 wrapped within an "ibis." prefix so that it is shown which XSLT file
    27                 contains the definition.
    28         -->
    29 
    3017        <!-- tried all sorts of patterns for time zone [ZN,*-3] [ZMST], [ZN,MST] etc... -->
    31         <xsl:param name="ibis.dateTimeFormatPicture" select="'[FNn,*-3], [D01] [MNn] [Y0001] [H]:[m]:[s]'"/>
    32         <xsl:param name="ibis.dateFormatPicture"     select="'[FNn,*-3], [D01] [MNn] [Y0001]'"/>
    33         <xsl:param name="ibis.timeFormatPicture"     select="'[H]:[m]:[s]'"/>
     18        <xsl:param name="ibis.dateTimeFormatPattern" select="'[FNn,*-3], [D01] [MNn] [Y0001] [H]:[m]:[s]'"/>
     19        <xsl:param name="ibis.dateFormatPattern"     select="'[FNn,*-3], [D01] [MNn] [Y0001]'"/>
     20        <xsl:param name="ibis.timeFormatPattern"     select="'[H]:[m]:[s]'"/>
    3421
    3522
     
    3825                ibis:doc="Default format for the 'ibis:formatNumber function."
    3926        />
    40         <xsl:param name="ibis.defaultNumericPicture" select="',##0.##'"
    41                 ibis:doc="default number picture format.  Done as a variable so that
    42                         site specefic templates can override."
     27        <xsl:param name="ibis.defaultNumericPattern" select="',##0.##'"
     28                ibis:doc="default XSLT number pattern format."
    4329        />
    4430
    45         <!-- XSLT 2.0 does NOT provide for any literals inside the picture string that are
     31        <!-- XSLT 2.0 does NOT provide for any literals inside the pattern string that are
    4632        defined as a format character.  So to embed a "%" sign without actually multiplying
    47         the value by 100 a format picture in XSLT 1.0 could simply be "#.#'%'".  In XSLT 2
     33        the value by 100 a format pattern in XSLT 1.0 could simply be "#.#'%'".  In XSLT 2
    4834        it shows the #.#'%' with the value multiplied.  The way to get around this is to
    49         change the % character with the decimal numeric format.  However some value will
     35        change the % character with the decimal numeric format.  However some values will
    5036        need to be multiplied so the easiest way to deal with this is to simply replace
    5137        '%' with '' and add the % character to the end of the string.
     
    5541        <xsl:decimal-format name="ibis.percentSuffixDecimalNumberFormat" NaN=" * " zero-digit="0" percent="^"
    5642                ibis:doc="Decimal format that redefines the % character so it doesn't interfere with the
    57                         format picture string."
     43                        format pattern string."
    5844        />
    5945        -->
    60         <xsl:param name="ibis.numberFormatQuotedPercentString" ibis:doc="Percentage
    61                 suffix signature to be searched and replaced with null and which signals
    62                 to concat the % sign to the end of the formatted value.  This value should
    63                 match the value used by the admin system to signify that a % should be
    64                 added as a numeric suffix.  If the % is standalone then the value should
    65                 be of the form 0.xx which will then cause the format number code to mult
    66                 by 100 and add the %.  Otherwise the value will be displayed 100x's too
    67                 large (xx00.00%)."
     46        <xsl:param name="ibis.numberFormatQuotedPercentString"
     47                ibis:doc="Percentage suffix signature to be searched and replaced with
     48                        null and which signals to concat the % sign to the end of the formatted
     49                        value.  This value should match the value used by the admin system
     50                        to signify that a % should be added as a numeric suffix.  If the %
     51                        is standalone then the value should be of the form 0.xx which will
     52                        then cause the format number code to mult by 100 and add the %. 
     53                        Otherwise the value will be displayed 100x's too large (xx00.00%).
     54                "
    6855        >'%'</xsl:param>
    6956
     
    8067                        is non numeric (blank or alpha) then the defaultDecimalNumberFormat
    8168                        will pickup/treat both as NaN and controls what to display. 
    82                         Otherwise the format picture will be applied."
     69                        Otherwise the format pattern will be applied."
    8370                />
    84                 <xsl:param name="picture" ibis:doc="Format to be applied.  If '' then
     71                <xsl:param name="pattern" ibis:doc="Format to be applied.  If '' then
    8572                        the default is used.  If 'none' is specified then the actual value
    8673                        passed in will be returned as is."
     
    8875
    8976                <xsl:choose>
    90                         <xsl:when test="$picture = 'none'">
     77                        <xsl:when test="$pattern = 'none'">
    9178                                <xsl:sequence select="$number"/>
    9279                        </xsl:when>
     
    9683                        </xsl:when>
    9784
    98                         <xsl:when test="0 = string-length($picture)">
    99                                 <xsl:sequence select="format-number($number, $ibis.defaultNumericPicture, 'ibis.defaultDecimalNumberFormat')"/>
     85                        <xsl:when test="0 = string-length($pattern)">
     86                                <xsl:sequence select="format-number($number, $ibis.defaultNumericPattern, 'ibis.defaultDecimalNumberFormat')"/>
    10087                        </xsl:when>
    10188
    102                         <!-- Check picture/format string for the '%'.  If found then need to
     89                        <!-- Check pattern/format string for the '%'.  If found then need to
    10390                                replace with and add the % to the end to avoid the whole number
    10491                                percentage being reported as 100 * numeric value.  See comments
     
    10693                                one of the defined format control chars without effecting formatting.
    10794                        -->
    108                         <xsl:when test="contains($picture, $ibis.numberFormatQuotedPercentString)">
    109                                 <xsl:sequence select="concat(format-number($number, replace($picture,$ibis.numberFormatQuotedPercentString,''), 'ibis.defaultDecimalNumberFormat'), '%')"/>
     95                        <xsl:when test="contains($pattern, $ibis.numberFormatQuotedPercentString)">
     96                                <xsl:sequence select="concat(format-number($number, replace($pattern,$ibis.numberFormatQuotedPercentString,''), 'ibis.defaultDecimalNumberFormat'), '%')"/>
    11097                        </xsl:when>
    11198
    11299                        <xsl:otherwise>
    113                                 <xsl:sequence select="format-number($number, $picture, 'ibis.defaultDecimalNumberFormat')"/>
     100                                <xsl:sequence select="format-number($number, $pattern, 'ibis.defaultDecimalNumberFormat')"/>
    114101                        </xsl:otherwise>
    115102                </xsl:choose>
     
    120107        <!-- See: http://stackoverflow.com/questions/16892344/convert-a-string-to-date-format-in-xslt -->
    121108        <xsl:function name="ibis:getFormattedDateTime" as="xs:string"
    122                 ibis:doc="Localizes date and time formatting.  Uses the ibis.dateTimeFormatPicture param."
     109                ibis:doc="Localizes date and time formatting.  Uses the ibis.dateTimeFormatPattern param."
    123110        >
    124111                <xsl:param name="dateTime" ibis:doc="DateTime value to be formatted. 
    125112                        Call with current-dateTime() to get current system date and time."
    126113                />
    127                 <xsl:sequence select="format-dateTime($dateTime, $ibis.dateTimeFormatPicture)"/>
     114                <xsl:sequence select="format-dateTime($dateTime, $ibis.dateTimeFormatPattern)"/>
    128115        </xsl:function>
    129116        <xsl:function name="ibis:getFormattedDate" as="xs:string"
    130                 ibis:doc="Localizes date formatting.  Uses the ibis.dateFormatPicture param."
     117                ibis:doc="Localizes date formatting.  Uses the ibis.dateFormatPattern param."
    131118        >
    132119                <xsl:param name="date" ibis:doc="Date value to be formatted.  Call with
    133120                        current-date() to get current system date."
    134121                />
    135                 <xsl:sequence select="format-date($date, $ibis.dateFormatPicture)"/>
     122                <xsl:sequence select="format-date($date, $ibis.dateFormatPattern)"/>
    136123        </xsl:function>
    137124        <xsl:function name="ibis:getFormattedTime" as="xs:string"
    138                 ibis:doc="Localizes time formatting.  Uses the ibis.timeFormatPicture param."
     125                ibis:doc="Localizes time formatting.  Uses the ibis.timeFormatPattern param."
    139126        >
    140127                <xsl:param name="time" ibis:doc="Time value to be formatted.  Call with
    141128                        current-time() to get current system time."
    142129                />
    143                 <xsl:sequence select="format-time($time, $ibis.timeFormatPicture)"/>
     130                <xsl:sequence select="format-time($time, $ibis.timeFormatPattern)"/>
    144131        </xsl:function>
    145132
     
    148135                ibis:doc="Returns first letter forced to lower case"
    149136        >
    150                         <xsl:param name="text" ibis:doc="Source text to be lowered"/>
    151                         <xsl:variable name="firstLetter" select="lower-case(substring(normalize-space($text),1,1))"/>
    152                         <xsl:sequence select="concat( lower-case(substring($text,1,1)), substring($text, 2, string-length($text)-1) )"/>
     137                <xsl:param name="text" ibis:doc="Source text to be lowered"/>
     138                <xsl:variable name="firstLetter" select="lower-case(substring(normalize-space($text),1,1))"/>
     139                <xsl:sequence select="concat( lower-case(substring($text,1,1)), substring($text, 2, string-length($text)-1) )"/>
    153140        </xsl:function>
    154141
  • trunk/ibisph-view/src/main/webapp/xslt/html/ContentContainer.xslt

    r24330 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
  • trunk/ibisph-view/src/main/webapp/xslt/html/Help.xslt

    r24330 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
  • trunk/ibisph-view/src/main/webapp/xslt/html/SelectionsList.xslt

    r24054 r24395  
    188188                "/>
    189189
    190                 <xsl:if test="(0 lt $headingLevel) and boolean($showSelectionsTitle) and (0 != string-length($selections/TITLE))">
    191                         <xsl:element name="h{$headingLevel}">
    192                                 <xsl:attribute name="title" select="
    193                                         if(string-length($selections/DESCRIPTION) != 0) then $selections/DESCRIPTION
     190                <xsl:if test="boolean($showSelectionsTitle) and (0 != string-length($selections/TITLE))">
     191                        <xsl:call-template name="ibis.htmlHeading">
     192                                <xsl:with-param name="headingLevel" select="$headingLevel"/>
     193                                <xsl:with-param name="description"  select="
     194                                        if(0 != string-length($selections/DESCRIPTION)) then $selections/DESCRIPTION
    194195                                        else $selections/TITLE"
    195196                                />
    196                                 <xsl:value-of select="$selections/TITLE"/>
    197                         </xsl:element>
     197                                <xsl:with-param name="content" select="$selections/TITLE/text()"/>
     198                        </xsl:call-template>
    198199                </xsl:if>
    199200
     
    303304        >
    304305                <xsl:param name="selection"/>
    305                 <xsl:param name="title" select="$selection/TITLE"/>
    306                 <xsl:param name="headingLevel" as="xs:integer?" select="-1"/>
     306                <xsl:param name="title" select="$selection/TITLE/text()"/>
     307                <xsl:param name="headingLevel" as="xs:integer?"/>
    307308
    308309                <xsl:choose>
     
    336337                        </xsl:when>
    337338
    338                         <xsl:when test="(0 lt $headingLevel) and (0 != string-length($title))">
    339                                 <xsl:element name="h{$headingLevel}">
    340                                         <xsl:if test="0 != string-length($selection/DESCRIPTION)">
    341                                                 <xsl:attribute name="title" select="$selection/DESCRIPTION"/>
    342                                         </xsl:if>
    343                                         <xsl:value-of select="$title"/>
    344                                 </xsl:element>
    345                         </xsl:when>
    346 
    347                         <xsl:otherwise><xsl:value-of select="$title"/></xsl:otherwise>
     339                        <xsl:otherwise>
     340                                <xsl:call-template name="ibis.htmlHeading">
     341                                        <xsl:with-param name="headingLevel" select="$headingLevel"/>
     342                                        <xsl:with-param name="description"  select="$selection/DESCRIPTION"/>
     343                                        <xsl:with-param name="content"      select="$title"/>
     344                                </xsl:call-template>
     345                        </xsl:otherwise>
    348346                </xsl:choose>
    349347        </xsl:template>
     
    373371                <xsl:param name="labelClass"/>
    374372                <xsl:param name="title"/>
    375                 <xsl:param name="headingLevel" select="-1" as="xs:integer?"/>
     373                <xsl:param name="headingLevel" as="xs:integer?"/>
    376374                <xsl:param name="description"  select="concat('Show/hide the ', $title, ' selections')"/>
    377375                <xsl:param name="show" select="false()"/>
     
    410408                </input>
    411409
    412                 <xsl:variable name="labelContent">
    413                         <label for="{$inputID}" title="{$description}">
    414                                 <xsl:if test="0 != string-length($labelClass)">
    415                                         <xsl:attribute name="class" select="$labelClass"/>
    416                                 </xsl:if>
    417                                 <xsl:if test="('radio' = $inputType) and $toggleRadioOnClick">
    418                                         <xsl:attribute name="onmouseover">var di=document.getElementById('<xsl:value-of select="$inputID"/>'); di.setAttribute('showing', di.checked);</xsl:attribute>
    419                                 </xsl:if>
    420                                 <xsl:value-of select="$title"/>
    421                         </label>
    422                 </xsl:variable>
    423                 <xsl:if test="0 lt $headingLevel">
    424                         <xsl:element name="h{$headingLevel}">
    425                                 <xsl:copy-of select="$labelContent"/>
    426                         </xsl:element>
    427                 </xsl:if>
    428                 <xsl:if test="0 ge $headingLevel">
    429                         <xsl:copy-of select="$labelContent"/>
    430                 </xsl:if>
     410                <xsl:call-template name="ibis.htmlHeading">
     411                        <xsl:with-param name="headingLevel" select="$headingLevel"/>
     412                        <xsl:with-param name="content">
     413                                <label for="{$inputID}" title="{$description}">
     414                                        <xsl:if test="0 != string-length($labelClass)">
     415                                                <xsl:attribute name="class" select="$labelClass"/>
     416                                        </xsl:if>
     417                                        <xsl:if test="('radio' = $inputType) and $toggleRadioOnClick">
     418                                                <xsl:attribute name="onmouseover">var di=document.getElementById('<xsl:value-of select="$inputID"/>'); di.setAttribute('showing', di.checked);</xsl:attribute>
     419                                        </xsl:if>
     420                                        <xsl:value-of select="$title"/>
     421                                </label>
     422                        </xsl:with-param>
     423                </xsl:call-template>
     424
    431425<!--
    432426                <label for="{$inputID}" onmouseover="var di=document.getElementById('{$inputID}'); di.setAttribute('showing', di.checked);"><xsl:value-of select="TITLE"/></label>
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/QueryModule.xslt

    r24330 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
     
    167168                                                </xsl:call-template>
    168169                                        </xsl:with-param>
     170                                        <xsl:with-param name="addWikiAttribute"     select="true()"/>
    169171                                </xsl:call-template>
    170172                        </xsl:when>
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/DataViz.xslt

    r24331 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/ResultPage.xslt

    r17255 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/selection/Page.xslt

    r19860 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
     
    78>
    89        <xsl:import href="../../ExpandableSectionSelectionsListPage.xslt"/>
    9 
    1010
    1111        <ibis:doc>
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/selection/SelectionPage.xslt

    r15958 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
     
    89        <xsl:import href="Page.xslt"/>
    910        <xsl:import href="SiteSpecific.xslt"/>
    10 
    1111
    1212        <ibis:doc>
  • trunk/ibisph-view/src/main/webapp/xslt/html/secure/query/selection/SelectionPage.xslt

    r15958 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
  • trunk/ibisph-view/src/main/webapp/xslt/html/secure/selection/SelectionPage.xslt

    r15958 r24395  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
     2
    23<xsl:stylesheet version="3.0"
    34        xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
  • trunk/ibisph-view/src/main/webapp/xslt/ibis.xslt

    r23544 r24395  
    1919                </description>
    2020        </ibis:doc>
     21
     22        <!-- ========================= P A R A M E T E R S   and   V A R I A B L E S
     23                The java servlet controller code adds ALL URL query request parameters
     24                to the XSLT transformation's parameters.  Other special parameters are
     25                added as well. 
     26
     27                Many of the global type parameters are defined within this XSLT file. 
     28                The parameters are passed in via the Java XSLT transformation parameter
     29                map (and thus are nameed according to the Java model map key value). 
     30                For ease of XSLT code maintenance these global XSLT parameters are
     31                wrapped within an "ibis." prefix so that it is shown which XSLT file
     32                contains the definition.
     33        -->
    2134
    2235        <xsl:import href="_ibis-format.xslt"/>
  • trunk/ibisph-view/src/main/webapp/xslt/xml/Interactive.xslt

    r23490 r24395  
    130130
    131131                <xsl:param name="geoDimensionUsage"    select="$dimensionUsages/DIMENSION_USAGE[NAME = $geoDimensionName]"/>
    132                 <xsl:param name="periodDimensionUsage" select="$dimensionUsages/DIMENSION_USAGE[NAME = $dimensions/DIMENSION[PERIOD_FLAG]/NAME][1]"/>
     132                <xsl:param name="periodDimensionUsage" select="$dimensionUsages/DIMENSION_USAGE[NAME = $dimensions/DIMENSION[exists(PERIOD_FLAG)]/NAME][1]"/>
    133133
    134134                <xsl:param name="otherDimensionUsage"  select="$dimensionUsages/DIMENSION_USAGE[USAGE != $geoDimensionUsage/USAGE] except $periodDimensionUsage"/>
     
    174174                        <xsl:choose>
    175175                                <!-- geo has no dim no value.  Process for geo flag so no otherwise -->
    176                                 <xsl:when test="$dimension/GEOGRAPHY_FLAG"/>
    177                                 <xsl:when test="$dimension/PERIOD_FLAG">
     176                                <xsl:when test="exists($dimension/GEOGRAPHY_FLAG)"/>
     177                                <xsl:when test="exists($dimension/PERIOD_FLAG)">
    178178                                        <xsl:variable name="maxPeriodValue" select="max($dimensionValues/text()[1])" />
    179179                                        <xsl:copy-of select="$dimensionValues[number(text()[1]) = $maxPeriodValue]"/>
Note: See TracChangeset for help on using the changeset viewer.