Changeset 32150 for main/trunk


Ignore:
Timestamp:
02/21/18 19:29:50 (3 years ago)
Author:
ak19
Message:

I changed gli4gs3.xsl to rewrite the applet page produced by PageAction.java to replace it with the JNLP Web Start version of GLI. Dr Bainbridge got this to work by changing the Librarian Interface link on the main page to have a download attribute, which will force the linked item to be downloaded. The download attribute is set to the name to assign to the downloaded item, the jnlp file. Now removing the unnecessary static GLIappWebStart.jnlp from the gli folder (as it used some fixed strings for dynamic values) and removed the unnecessary style.xsl and icons.xsl from default\transform as they were used by the now bypassed applet and were moreover GS2 styling.

Location:
main/trunk
Files:
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/WebGatherer.java

    r32139 r32150  
    159159    String library_url_string = fullLibraryURL(gwcgi_arg);
    160160
    161     String gs3 = gsdl3_arg;
     161    String gs3 = gsdl3_arg; // but we'll pass -use_remote_greenstone below, to ensure we use the branch of the code that does connects a GLI on a client machine to a remote GS3 server
    162162    boolean isGS3 = (gs3 == null || !gs3.equals("true")) ? false : true;
    163163
  • main/trunk/greenstone3/web/WEB-INF/classes/interface_default.properties

    r31910 r32150  
    5656home.quick_search=Quick Search
    5757home.librarian_interface=The Librarian Interface
     58home.gliapp_webstart=GLI Java Web Start application
    5859home.select_a_collection=Select a collection
    5960home.select_a_group=Select a collection group
    6061home.select_a_collection_or_group=Select a collection or group           
    6162home.no_collections=This library has no valid collections
    62 home.no_collections_group=This group has no valid collections           
     63home.no_collections_group=This group has no valid collections
    6364#***** logged in menu
    6465menu.account_settings=Account settings
  • main/trunk/greenstone3/web/interfaces/default/transform/gli4gs3.xsl

    r32127 r32150  
    77  exclude-result-prefixes="java util">
    88 
    9   <!-- style includes global params interface_name, library_name -->
    10   <xsl:include href="style.xsl"/>
     9  <xsl:output method="xml"/>   
    1110 
    12   <xsl:output method="html"/> 
    13  
    14   <!-- the main page layout template is here -->
    15   <xsl:template match="page">
    16     <html>
    17       <head>
    18     <title>
    19       <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    20       <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    21     </title>
    22     <xsl:call-template name="globalStyle"/>
    23     <xsl:call-template name="pageStyle"/>
    24       </head>
    25       <body>
    26     <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    27     <div id="page-wrapper">
    28       <xsl:apply-templates select="pageResponse"/>
    29       <xsl:call-template name="greenstoneFooter"/>                     
    30     </div>
    31       </body>
    32     </html>
     11  <!--
     12    1. This XSLT rewrites the applet page generated by PageAction, from the top node of / down,
     13    to replace it with a JNLP Java Web Start file to launch GLI (web/applet/SignedGatherer.java).
     14    2. Putting in an xml processing instruction doesn't seem to go through and causes stylesheet transform errors
     15    after following https://www.w3schools.com/xml/ref_xsl_el_processing-instruction.asp
     16  -->
     17  <xsl:template match="/">
     18      <!--
     19        /*
     20         *    Java Web Start support for Greenstone Librarian Interface (GLI) applet.
     21         *    Copyright (C) 2002 New Zealand Digital Library, http://www.nzdl.org
     22         *
     23         *    This program is free software; you can redistribute it and/or modify
     24         *    it under the terms of the GNU General Public License as published by
     25         *    the Free Software Foundation; either version 2 of the License, or
     26         *    (at your option) any later version.
     27         *
     28         *    This program is distributed in the hope that it will be useful,
     29         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     30         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     31         *    GNU General Public License for more details.
     32         *
     33         *    You should have received a copy of the GNU General Public License
     34         *    along with this program; if not, write to the Free Software
     35         *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     36         */
     37      -->
     38      <jnlp
     39          spec="1.0+"
     40          codebase="http://localhost:8383/greenstone3/applet"
     41          href="GLIappWebStart.jnlp">
     42          <information>
     43            <title>Greenstone Librarian Interface</title>
     44            <vendor>New Zealand Digital Library</vendor>
     45            <homepage href="http://www.greenstone.org/"/>
     46            <description>GLI</description>
     47            <description kind="short">Greenstone Librarian Interface (GLI) as Web Start Application over JNLP</description>
     48            <offline-allowed/>
     49          </information>
     50          <resources>
     51            <j2se version="1.7+"/>
     52            <jar href="SignedGatherer.jar"/>
     53          </resources>
     54          <application-desc main-class="org.greenstone.gatherer.WebGatherer">
     55            <!--<argument>-gwcgi=/greenstone3</argument>
     56            <argument>-gsdl3=true</argument>-->
     57            <argument>-gwcgi=<xsl:value-of select="/page/pageResponse/Applet/PARAM[@name='gwcgi']/@value" /></argument>
     58            <argument>-gsdl3=<xsl:value-of select="/page/pageResponse/Applet/PARAM[@name='gsdl3']/@value" /></argument>
     59          </application-desc>       
     60          <!-- https://stackoverflow.com/questions/12600076/getting-user-home-folder-from-jws-signed-jar -->
     61          <security>
     62            <all-permissions/>
     63          </security>
     64        </jnlp>
     65     
    3366  </xsl:template>
    3467
    35   <xsl:template name="pageTitle">
    36     <xsl:value-of select="pageResponse/service/applet"/>
    37   </xsl:template>
     68</xsl:stylesheet>
    3869
    39   <!-- page specific style goes here -->
    40   <xsl:template name="pageStyle"/>
    41 
    42   <xsl:template match="pageResponse">
    43     <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    44    
    45     <!-- <xsl:call-template name="navigationBar">
    46     <xsl:with-param name="collName" select="$collName"/>
    47   </xsl:call-template>-->     
    48     <div >
    49       <xsl:copy-of select="Applet"/>
    50     </div>
    51   </xsl:template>
    52 
    53 </xsl:stylesheet> 
    54 
  • main/trunk/greenstone3/web/interfaces/default/transform/gslib.xsl

    r32127 r32150  
    385385
    386386  <xsl:template name="libraryInterfaceLink">
    387     <!--<li>-->
    388       <a href="{$library_name}?a=p&amp;sa=gli4gs3">
     387    <div class="paramLabel">
     388      <!--
     389        Using HTML5 download attribute to anchor tag, providing download-as-filename value, so Gli App JNLP file downloads.
     390        Seems we don't need to set the MIME type for downloaded JNLP to launch, if program associations are correctly set up.
     391      -->
     392      <a href="{$library_name}?a=p&amp;sa=gli4gs3" download="GLIappWebStart.jnlp">
    389393        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
    390394      </a>
    391     <!--</li>-->
     395    </div>
     396    <div class="paramValue">
     397      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.gliapp_webstart')"/>
     398    </div>
    392399  </xsl:template>
    393400 
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/home.xsl

    r32127 r32150  
    5959       
    6060        <xsl:for-each select="serviceList/service[@type='authen']">
    61             <!--<gslib:libraryInterfaceLink/><br/>-->
     61            <!--<gslib:libraryInterfaceLink/><br/><br/>-->
    6262            <gslib:authenticationLink/><br/><br/>
    6363            <gslib:registerLink/><br/>
Note: See TracChangeset for help on using the changeset viewer.