Changeset 19868 in main for trunk


Ignore:
Timestamp:
02/19/20 00:49:59 (3 years ago)
Author:
GarthBraithwaite_STG
Message:

view - more css tweaks. Reworked common.xml to go back to add model maps be referenced. Added complete external path for xslt access.

Location:
trunk
Files:
14 edited

Legend:

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

    r18740 r19868  
    292292                <property name="filePathAndName" value="maps.xml"/>
    293293        </bean>
    294 
    295         <bean id="commonOrgUnitsAttributesModelMap" class="org.ibisph.modelmap.ModelFromFilePathAndNameService">
     294        <bean id="commonOrgUnitsModelMap" class="org.ibisph.modelmap.ModelFromFilePathAndNameService">
    296295                <description>
    297296                        Injects the XML doc.  This helps with speed as the doc
     
    303302                <property name="filePathAndName" value="org_units.xml"/>
    304303        </bean>
    305        
     304
     305
     306        <!-- P A T H   A N D   R E Q U E S T   M O D E L   M A P S -->
     307        <bean id="commonContentBasePathModelMap" class="org.ibisph.modelmap.SimpleGetModelMap">
     308                <description>
     309                        Used by XSLT to dynamically access the 2ndardy XML
     310                        files as well as leaflet map and kendo json files.
     311                        Injected into the main Page.xslt.
     312                </description>
     313                <property name="modelMapKey" value="ContentBasePath"/>
     314                <property name="model"       ref="commonContentBasePathURL"/>
     315        </bean>
     316        <bean id="commonWebAppContextPathFromHTTPRequestModelMap" class="org.ibisph.web.modelmap.WebAppContextPathFromHTTPRequest">
     317                <description>
     318                        Webapp's context path as known by the app server.  Passed 
     319                        to the XSLT so that XSLT code can build fully qualified
     320                        access paths to the app's local resources.
     321                </description>
     322                <property name="modelMapKey" value="WebAppContextPath"/>
     323        </bean>
     324        <bean id="commonWebAppRemoteRequestPathModelMap" class="org.ibisph.modelmap.SimpleGetModelMap">
     325                <description>
     326                        Remote/external webapp HTTP request base path.  Used by
     327                        internal bean configs and the XSLT to build request paths   
     328                        back to the app.
     329                </description>
     330                <property name="modelMapKey" value="WebAppRemoteRequestPath"/>
     331                <property name="model"       value="#{commonWebAppRemoteRequestPath.string}"/>
     332        </bean>
     333        <bean id="commonHTTPRequestParametersModelMap" class="org.ibisph.web.modelmap.HTTPRequestParameters">
     334                <description>
     335                        Provides a simple mechanism to pass URL req params to the XSLT
     336                        code.  Note that this does NOT differentiate between GET and
     337                        POST so might have to remove this in some special cases - like
     338                        not needed for the query module builder post etc.
     339                </description>
     340                <property name="modelMapKey" value="HTTPRequestParameters"/>
     341        </bean>
     342        <bean id="commonRemoteRequestURLFromHTTPRequestModelMap" class="org.ibisph.web.modelmap.RequestURLFromHTTPRequest">
     343                <description>
     344                        Provides the request url to the view.  This is needed for xslt code
     345                        to access the current request uri.
     346                </description>
     347                <property name="remoteRequestPathModelMapKey" value="WebAppRemoteRequestPath"/>
     348                <property name="modelMapKey" value="RemoteRequestURL"/>
     349        </bean>
     350        <bean id="commonPathSegmentsFromHTTPRequestModelMap" class="org.ibisph.web.modelmap.PathSegmentsFromHTTPRequest">
     351                <description>
     352                        Provides the path segments to the view.  This is needed
     353                        for context menu file name and the request path bread
     354                        crumbs.
     355                </description>
     356                <property name="modelMapKey" value="PathSegments"/>
     357        </bean>
     358        <bean id="commonModifiedDateModelMap" class="org.ibisph.modelmap.AddModelDateModelToModelMap">
     359                <property name="sourceModelModelMapKey"   value="#{commonXMLModelMapKey.string}"/>
     360                <property name="formattedDateModelMapKey" value="XMLModifedDate"/>
     361                <property name="dateFormat"               ref="commonDateFormat"/>
     362                <property name="sourceModelDateXPathList">
     363                        <list>
     364                                <value>LAST_MODIFIED</value>
     365                                <value>MODIFIED_DATE</value>
     366                        </list>
     367                </property>
     368        </bean>
     369
     370        <bean id="commonUserProfileModelMap" class="org.ibisph.user.modelmap.CurrentUserDocument">
     371                <property name="modelMapKey"        value="UserProfile"/>
     372                <property name="currentUserService" ref="commonCurrentUserService"/>
     373        </bean>
     374
    306375
    307376        <!-- C O N T R O L L E R   R E S O U R C E S -->
     
    351420                <property name="additionalModelMapList">
    352421                        <list>
    353                                 <bean class="org.ibisph.modelmap.SimpleGetModelMap">
    354                                         <description>
    355                                                 Used by XSLT to dynamically access the 2ndardy XML
    356                                                 files as well as leaflet map and kendo json files.
    357                                                 Injected into the main Page.xslt.
    358                                         </description>
    359                                         <property name="modelMapKey" value="ContentBasePath"/>
    360                                         <property name="model"       ref="commonContentBasePathURL"/>
    361                                 </bean>
    362 
    363                                 <ref bean="commonOrgUnitsAttributesModelMap"/>
    364 
    365                                 <bean id="commonUserProfileModelMap" class="org.ibisph.user.modelmap.CurrentUserDocument">
    366                                         <property name="modelMapKey"        value="UserProfile"/>
    367                                         <property name="currentUserService" ref="commonCurrentUserService"/>
    368                                 </bean>
    369 
    370                                 <bean id="commonHTTPRequestParametersModelMap" class="org.ibisph.web.modelmap.HTTPRequestParameters">
    371                                         <description>
    372                                                 Provides a simple mechanism to pass URL req params to the XSLT
    373                                                 code.  Note that this does NOT differentiate between GET and
    374                                                 POST so might have to remove this in some special cases - like
    375                                                 not needed for the query module builder post etc.
    376                                         </description>
    377                                         <property name="modelMapKey" value="HTTPRequestParameters"/>
    378                                 </bean>
    379 
    380                                 <bean id="commonPathSegmentsFromHTTPRequestModelMap" class="org.ibisph.web.modelmap.PathSegmentsFromHTTPRequest">
    381                                         <description>
    382                                                 Provides the path segments to the view.  This is needed
    383                                                 for context menu file name and the request path bread
    384                                                 crumbs.
    385                                         </description>
    386                                 </bean>
    387 
    388                                 <bean id="commonWebAppContextPathFromHTTPRequestModelMap" class="org.ibisph.web.modelmap.WebAppContextPathFromHTTPRequest">
    389                                         <description>
    390                                                 Webapp's context path as known by the app server.  Passed 
    391                                                 to the XSLT so that XSLT code can build fully qualified
    392                                                 access paths to the app's local resources.
    393                                         </description>
    394                                         <property name="modelMapKey" value="WebAppContextPath"/>
    395                                 </bean>
    396 
    397                                 <bean id="commonWebAppRemoteRequestPathModelMap" class="org.ibisph.modelmap.SimpleGetModelMap">
    398                                         <description>
    399                                                 Remote/external webapp HTTP request base path.  Used by
    400                                                 internal bean configs and the XSLT to build request paths   
    401                                                 back to the app.
    402                                         </description>
    403                                         <property name="modelMapKey" value="WebAppRemoteRequestPath"/>
    404                                         <property name="model"       value="#{commonWebAppRemoteRequestPath.string}"/>
    405                                 </bean>
    406 
    407                                 <bean id="commonModifiedDateModelMap" class="org.ibisph.modelmap.AddModelDateModelToModelMap">
    408                                         <property name="sourceModelModelMapKey"   value="#{commonXMLModelMapKey.string}"/>
    409                                         <property name="formattedDateModelMapKey" value="XMLModifedDate"/>
    410                                         <property name="dateFormat"               ref="commonDateFormat"/>
    411                                         <property name="sourceModelDateXPathList">
    412                                                 <list>
    413                                                         <value>LAST_MODIFIED</value>
    414                                                         <value>MODIFIED_DATE</value>
    415                                                 </list>
    416                                         </property>
    417                                 </bean>
     422                                <ref bean="commonContentBasePathModelMap"/>
     423                                <ref bean="commonOrgUnitsModelMap"/>
     424                                <ref bean="commonWebAppContextPathFromHTTPRequestModelMap"/>
     425                                <ref bean="commonWebAppRemoteRequestPathModelMap"/>
     426                                <ref bean="commonRemoteRequestURLFromHTTPRequestModelMap"/>
     427                                <ref bean="commonPathSegmentsFromHTTPRequestModelMap"/>
     428                                <ref bean="commonHTTPRequestParametersModelMap"/>
     429                                <ref bean="commonModifiedDateModelMap"/>
     430                                <ref bean="commonUserProfileModelMap"/>
    418431                        </list>
    419432                </property>
    420 
    421433                <property name="HTTPResponseHeaders" ref="commonHTTPResponseHeaders"/>
    422434        </bean>
  • trunk/ibisph-view/src/main/webapp/css/ContentOptions.css

    r19867 r19868  
    2929}
    3030
     31.ContentOptions .SingleRowTable td
     32{
     33        padding: 0 1rem 0 0rem;
     34}
    3135
    3236
  • trunk/ibisph-view/src/main/webapp/css/SocialMedia.css

    r19863 r19868  
    6363        color:          #dd4b39;
    6464}
     65.SocialMedia a.Email:before
     66{
     67        content:        "\e80a";
     68        color:          #dd4b39;
     69}
    6570
    6671
  • trunk/ibisph-view/src/main/webapp/css/_layout-header.css

    r19867 r19868  
    106106{
    107107        position:                       relative;
    108         padding:                        34px 0px 16px 105px;
     108        padding:                        30px 0px 18px 95px;
    109109        color:                          #003366;
    110         line-height:            30px;
     110        line-height:            32px;
    111111        font-size:                      32px;
    112112        font-weight:            normal;
  • trunk/ibisph-view/src/main/webapp/xslt/_ibis-path.xslt

    r18692 r19868  
    7878
    7979
     80        <xsl:param name="RequestURL"
     81                ibis:doc="Current HTTP request URL."
     82        />
     83        <xsl:variable name="ibis.requestURL" select="$RequestURL"/>
     84
    8085        <xsl:param name="WebAppContextPath"
    8186                ibis:doc="Prefix used/needed for referencing resources within the site."
  • trunk/ibisph-view/src/main/webapp/xslt/html/Page.xslt

    r19781 r19868  
    386386                        <a href="#siteSearch"        title="Skip to search">Skip directly to search</a>
    387387                        <a href="#siteNavigation"    title="Skip to site navigation">Skip directly to the site navigation</a>
    388                         <a href="#contextNavigation" title="Skip to site navigation">Skip directly to the site navigation</a>
    389388                        <a href="#sectionsContainer" title="Skip to content">Skip directly to the page's main content</a>
    390389                        <a href="?PrinterFriendly=x" title="Show page without navigation menus and headers."/>
  • trunk/ibisph-view/src/main/webapp/xslt/html/SiteSpecific.xslt

    r19867 r19868  
    191191        <xsl:template name="Page.content"
    192192                ibis:doc="Provides the adopter specific layout by overriding the standard
    193                         content container. This layout consists of two columns.  With the left
    194                         section calling the 'SiteSpecific.contextNavigation' template and the
    195                         right column/section being the main content. 
     193                        content container. This layout consists of one main content column. 
    196194                "
    197195        >
     
    213211                                        </xsl:call-template>
    214212                                </div>
    215                                 <xsl:call-template name="socialMediaLinks"/>
     213                                <xsl:call-template name="SiteSpecific.socialMediaLinks"/>
    216214                        </div>
    217215
     
    290288
    291289
    292         <xsl:template name="socialMediaLinks">
     290        <xsl:template name="SiteSpecific.socialMediaLinks">
    293291                <nav class="SocialMedia" title="options to easily share this page">
    294292                        share
    295293                        <ul>
    296294                                <li>
    297                                         <a href="javascript:window.open('http://www.linkedin.com/shareArticle?url=' + location.href)"
     295                                        <a href="http://www.linkedin.com/shareArticle?url={$ibis.requestURL}"
    298296                                                title="Share this page on LinkedIn"
    299297                                                rel="nofollow" target="_blank"
     
    303301                                </li>
    304302                                <li>
    305                                         <a href="javascript:window.open('http://www.facebook.com/sharer.php?url=' + location.href)"
     303                                        <a href="http://www.facebook.com/sharer.php?url={$ibis.requestURL}"
    306304                                                title="Share this page on Facebook"
    307305                                                rel="nofollow" target="_blank"
     
    320318                                <li>
    321319                                        <a href="javascript:window.open('https://plus.google.com/share?url=' + location.href)"
    322                                                 title="Share this page on Google+"
    323                                                 rel="nofollow" target="_blank"
    324                                                 class="FontIcon GooglePlus"
    325                                         >
    326                                         </a>
    327                                 </li>
    328 
     320                                                title="Email this page's URL"
     321                                                rel="nofollow" target="_blank"
     322                                                class="FontIcon Email"
     323                                        >
     324                                        </a>
     325                                </li>
    329326                                <li>
    330327                                        <a href="#" onclick="window.print();return false;"
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/Page.xslt

    r19867 r19868  
    6868        <xsl:template name="Page.options">
    6969                <xsl:param name="title"/>
     70                <xsl:param name="isSummary" select="false()"/>
    7071
    7172                <div class="ContentOptions">
     
    7778                                        <td><label for="moreInformation"><h4>More Information:</h4></label></td>
    7879                                        <td><label for="relatedIndicators"><h4>Related Indicator Reports:</h4></label></td>
     80                                        <td><label for="relatedIndicators"><h4>Associated Health Topics:</h4></label></td>
    7981                                </tr>
    8082                                <tr>
     
    9092                                                                </option>
    9193                                                        </xsl:for-each>
     94                                                        <option value="{concat($ibis.contextPath, 'indicator/summary/', $indicator/NAME, '.html')}">
     95                                                                <xsl:if test="true() = $isSummary">
     96                                                                        <xsl:attribute name="selected" select="'selected'"/>
     97                                                                </xsl:if>
     98                                                                Summary Report
     99                                                        </option>
    92100                                                </select>
    93101                                        </td>
     
    113121                                                </select>
    114122                                        </td>
     123
     124                                        <td>
     125                                                <select name="associatedHealthTopics" id="associatedHealthTopics" onchange="location=this.value; this.value='';">
     126                                                        <option value="javascript:location"></option>
     127                                                        <xsl:for-each select="$indicator/TOPICS/TOPIC">
     128                                                                <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/>
     129                                                                <option value="{ibis:getCompleteURL(URL)}"><xsl:value-of select="TITLE"/></option>
     130                                                        </xsl:for-each>
     131                                                </select>
     132                                        </td>
    115133                                </tr>
    116134                        </table>
  • trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/summary/Page.xslt

    r19781 r19868  
    3939        >
    4040
    41                 <div class="Note">
    42                         <h3>Summary Report Options</h3>
    43 
    44                         <xsl:call-template name="Indicator.views"/>
    45                         <xsl:call-template name="Indicator.relatedIndicators">
    46                                 <xsl:with-param name="indicator" select="$indicator"/>
    47                         </xsl:call-template>
    48 
    49                 </div>
    50                 <br/>
    51 
     41                <xsl:call-template name="Page.options">
     42                        <xsl:with-param name="title">Summary Indicator Report Data View Options</xsl:with-param>
     43                        <xsl:with-param name="isSummary" select="true()"/>
     44                </xsl:call-template>
    5245
    5346                <!-- loop for all views -->
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/builder/Page.xslt

    r19867 r19868  
    242242                        </button>
    243243
    244                         <button type="button" accesskey="M" id="SelectNewMeasure" title="Select a new  query dataset measure"
    245                                 onclick="location.href='{concat($ibis.contextPath, /QUERY_MODULE/QUERY_CONFIGURATION_SELECTION/LOCAL_URL)}'"
    246                         >
    247                                 Select Query Measure
    248                                 <xsl:call-template name="Help.content">
    249                                         <xsl:with-param name="help">
    250                                                 <TEXT>
    251                                                         Allows you to change the measure to be queried. 
    252                                                 </TEXT>
    253                                         </xsl:with-param>
    254                                 </xsl:call-template>
    255                         </button>
    256 
    257                         <button type="button" accesskey="M" id="SelectNewMeasure" title="Reloads the default query definition"
     244                        <button type="button" accesskey="M" id="defaultQuery" title="Reloads the default query definition"
    258245                                onclick="location.href='{concat($ibis.contextPath, 'query/builder/', /QUERY_MODULE/REQUEST/CONFIGURATION_PATH, '.html?Reload=x')}'"
    259246                        >
    260                                 Reload Selections
     247                                Load Default Query
    261248                                <xsl:call-template name="Help.content">
    262249                                        <xsl:with-param name="help">
     
    272259                        </button>
    273260
     261                        <button type="button" accesskey="M" id="selectQueryMeasure" title="Select a new  query dataset measure"
     262                                onclick="location.href='{concat($ibis.contextPath, /QUERY_MODULE/QUERY_CONFIGURATION_SELECTION/LOCAL_URL)}'"
     263                        >
     264                                Select Query Measure
     265                                <xsl:call-template name="Help.content">
     266                                        <xsl:with-param name="help">
     267                                                <TEXT>
     268                                                        Allows you to change the measure to be queried. 
     269                                                </TEXT>
     270                                        </xsl:with-param>
     271                                </xsl:call-template>
     272                        </button>
     273
    274274                        <button type="button" accesskey="D" id="saveDefinition"
    275275                                title="Click this button to save the selections as a saved criteria definition"
     
    288288                        </button>
    289289
    290                         <button type="button" accesskey="D" id="saveDefinition"
     290                        <button type="button" accesskey="L" id="loadDefinition"
    291291                                title="Click this button to access all query definitions"
    292292                                onclick="location.href='{concat($ibis.contextPath, 'query/definition/index/MyDefinitions.html')}'"
  • trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/Page.xslt

    r19867 r19868  
    115115                        </button>
    116116
    117                         <button type="button" accesskey="M" id="SelectNewMeasure" title="Select a new  query dataset measure"
    118                                 onclick="location.href='{concat($ibis.contextPath, /QUERY_MODULE/QUERY_CONFIGURATION_SELECTION/LOCAL_URL)}'"
    119                         >
    120                                 Select Query Measure
    121                                 <xsl:call-template name="Help.content">
    122                                         <xsl:with-param name="help">
    123                                                 <TEXT>
    124                                                         Allows you to change the measure to be queried. 
    125                                                 </TEXT>
    126                                         </xsl:with-param>
    127                                 </xsl:call-template>
    128                         </button>
    129 
    130                         <button type="button" accesskey="M" id="SelectNewMeasure" title="Reloads the default query definition"
     117                        <button type="button" accesskey="D" id="defaultQuery" title="Reloads the default query definition"
    131118                                onclick="location.href='{concat($ibis.contextPath, 'query/result/', /QUERY_MODULE/REQUEST/CONFIGURATION_PATH, '.html?Reload=x')}'"
    132119                        >
    133                                 Default Query
     120                                Run Default Query
    134121                                <xsl:call-template name="Help.content">
    135122                                        <xsl:with-param name="help">
     
    137124                                                        Resets your query definition to the default selections
    138125                                                        and settings and runs the query. 
     126                                                </TEXT>
     127                                        </xsl:with-param>
     128                                </xsl:call-template>
     129                        </button>
     130
     131                        <button type="button" accesskey="M" id="selectQueryMeasure" title="Select a new  query dataset measure"
     132                                onclick="location.href='{concat($ibis.contextPath, /QUERY_MODULE/QUERY_CONFIGURATION_SELECTION/LOCAL_URL)}'"
     133                        >
     134                                Select Query Measure
     135                                <xsl:call-template name="Help.content">
     136                                        <xsl:with-param name="help">
     137                                                <TEXT>
     138                                                        Allows you to change the dataset measure to be queried. 
    139139                                                </TEXT>
    140140                                        </xsl:with-param>
     
    162162                        </button>
    163163
    164                         <button type="button" accesskey="D" id="saveDefinition"
     164                        <button type="button" accesskey="D" id="loadDefinition"
    165165                                title="Click this button to access all query definitions"
    166166                                onclick="location.href='{concat($ibis.contextPath, 'query/definition/index/MyDefinitions.html')}'"
  • trunk/ibisph-view/src/main/webapp/xslt/ibis.xslt

    r18944 r19868  
    9797                <xsl:param name="textNodes" ibis:doc="nodes to convert."/>
    9898                <xsl:variable name="textNodesCount" select="count($textNodes)"/>
     99<!-- GARTH TODO:
    99100<xsl:message select="$textNodesCount"/>
    100 
     101-->
    101102                <xsl:text>[</xsl:text>
    102103                <xsl:if test="1 = $textNodesCount">"<xsl:value-of select="$textNodes"/>"</xsl:if>
  • trunk/ibisph/src/main/java/org/ibisph/web/modelmap/PathSegmentsFromHTTPRequest.java

    r15116 r19868  
    1919 */
    2020public class PathSegmentsFromHTTPRequest implements GetModelMapFromHTTPRequest {
    21   protected String pathSegmentsModelMapKey = "PathSegments";
     21  protected String modelMapKey = "PathSegments";
    2222
    2323  protected String pathPrefixToRemove = null;
     
    2525  protected List<String> reverseOrderPathSegmentModelMapKeyList = null;
    2626
     27
     28  public void setModelMapKey(String modelMapKey) {this.modelMapKey = modelMapKey;}
    2729
    2830  /**
     
    6971    String filePathAndNameWithoutExtension = IOPath.getFilePathAndNameWithoutExtension(path);
    7072    String[] pathSegment = IOPath.getPathSegments(filePathAndNameWithoutExtension);
    71     modelMap.put(this.pathSegmentsModelMapKey, pathSegment);
     73    modelMap.put(this.modelMapKey, pathSegment);
    7274
    7375    // if path segment model map key list then loop the name list and put in
Note: See TracChangeset for help on using the changeset viewer.