Changeset 38256 for main/trunk/greenstone3/web
- Timestamp:
- 2023-09-29T20:52:00+13:00 (8 months ago)
- Location:
- main/trunk/greenstone3/web/interfaces/default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/javascript-global-functions.js
r38238 r38256 616 616 } 617 617 618 619 gs.funcions.getLoggedInUser = function() 620 { 621 var baseURL = gs.xsltParams.library_name + "?a=g&rt=r&ro=1&s=CurrentUser&"; 622 } 623 618 624 // Prepare the payload (data package) to transmit to metadataserver.pl over AJAX. 619 625 // These next 2 functions prepare both the URL version of the payload and the data object version -
main/trunk/greenstone3/web/interfaces/default/transform/javascript-global-setup.xsl
r37805 r38256 161 161 </script> 162 162 </xsl:if> 163 <!-- check if we have a JSessionID and fill in any user details we haven't captured in JS vars yet as well as JSessionID --> 164 <xsl:if test="/page/pageRequest/userContext/@uid"> 165 <script type="text/javascript"> 166 <xsl:text disable-output-escaping="yes"> 167 if (typeof gs.userInformation === "undefined") { 168 gs.userInformation={}; 169 gs.userInformation.username = "</xsl:text><xsl:value-of select="/page/pageRequest/userContext/@username"/><xsl:text disable-output-escaping="yes">"; 170 gs.userInformation.groups = "</xsl:text><xsl:value-of select="/page/pageRequest/userContext/@groups"/><xsl:text disable-output-escaping="yes">"; 171 } 172 gs.userInformation.uid = "</xsl:text><xsl:value-of select="/page/pageRequest/userContext/@uid"/><xsl:text disable-output-escaping="yes">"; 173 </xsl:text> 174 </script> 175 </xsl:if> 163 176 </xsl:template> 164 177 … … 167 180 <script type="text/javascript" src="interfaces/{$interface_name}/js/GSMetadata.js"><xsl:text> </xsl:text></script> 168 181 <script type="text/javascript" src="interfaces/{$interface_name}/js/utility_scripts.js"><xsl:text> </xsl:text></script> 169 170 182 </xsl:template> 171 183 </xsl:stylesheet> -
main/trunk/greenstone3/web/interfaces/default/transform/pages/webswing-gli.xsl
r37417 r38256 132 132 webswingInstance0.options.args = "-load " + gs.cgiParams.c + "/gli.col"; 133 133 } 134 if(gs.userInformation.uid) { 135 webswingInstance0.options.args = " -username " + gs.userInformation.username; 136 webswingInstance0.options.args = " -groups " + gs.userInformation.groups.replace(/\s/g, ''); 137 webswingInstance0.options.args = " -uid " + gs.userInformation.uid; 138 } 134 139 function getParam(name) { 135 140 name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
Note:
See TracChangeset
for help on using the changeset viewer.