Merge r7497 from nihvivo-rel-1.2-maint
This commit is contained in:
parent
198c8293ce
commit
fe3bd563bc
3 changed files with 7 additions and 22 deletions
|
@ -407,9 +407,6 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
|||
|
||||
// Let the page template know which page it's processing.
|
||||
map.put("currentServlet", normalizeServletName(vreq.getServletPath().replaceFirst("/", "")));
|
||||
|
||||
// Allow template to send domain name to JavaScript (needed for AJAX calls)
|
||||
map.put("requestedPage", vreq.getRequestURL().toString());
|
||||
|
||||
// In template: ${now?date}, ${now?datetime}, ${now?time}
|
||||
map.put("now", new Date());
|
||||
|
|
|
@ -63,18 +63,11 @@ ${stylesheets.add("/css/browseClassGroups.css")}
|
|||
</section> <!-- #browse-classes -->
|
||||
</section> <!-- #browse -->
|
||||
|
||||
<#----------------------------------------------------------------------------------
|
||||
requestedPage is currently provided by FreemarkerHttpServlet. Should this be moved
|
||||
to PageController? Maybe we should have Java provide the domain name directly
|
||||
instead of the full URL of the requested page? Chintan was also asking for a
|
||||
template variable with the domain name for an AJAX request with visualizations.
|
||||
------------------------------------------------------------------------------------>
|
||||
<#assign domainName = requestedPage?substring(0, requestedPage?index_of("/", 7)) />
|
||||
|
||||
<#-- For v1.3: The controller should pass in the dataservice url. -->
|
||||
<script type="text/javascript">
|
||||
var browseData = {
|
||||
baseUrl: '${domainName + urls.base}',
|
||||
dataServiceUrl: '${domainName + urls.base}/dataservice?getVClassesForVClassGroup=1&classgroupUri=',
|
||||
baseUrl: '${urls.base}',
|
||||
dataServiceUrl: '${urls.base}/dataservice?getVClassesForVClassGroup=1&classgroupUri=',
|
||||
defaultBrowseClassGroupUri: '${firstPopulatedClassGroup.uri!}',
|
||||
defaultBrowseClassGroupCount: '${firstPopulatedClassGroup.individualCount!}'
|
||||
};
|
||||
|
|
|
@ -2,13 +2,7 @@
|
|||
|
||||
<#-- Template to setup and call scripts for menupages -->
|
||||
|
||||
<#----------------------------------------------------------------------------------
|
||||
requestedPage is currently provided by FreemarkerHttpServlet. Should this be moved
|
||||
to PageController? Maybe we should have Java provide the domain name directly
|
||||
instead of the full URL of the requested page? Chintan was also asking for a
|
||||
template variable with the domain name for an AJAX request with visualizations.
|
||||
------------------------------------------------------------------------------------>
|
||||
<#assign domainName = requestedPage?substring(0, requestedPage?index_of("/", 7)) />
|
||||
|
||||
|
||||
<#list vClassGroup as vClass>
|
||||
<#if (vClass.entityCount > 0)>
|
||||
|
@ -21,10 +15,11 @@ template variable with the domain name for an AJAX request with visualizations.
|
|||
</#if>
|
||||
</#list>
|
||||
|
||||
<#-- For v1.3: The controller should pass in the dataservice url. -->
|
||||
<script type="text/javascript">
|
||||
var menupageData = {
|
||||
baseUrl: '${domainName + urls.base}',
|
||||
dataServiceUrl: '${domainName + urls.base}/dataservice?getLuceneIndividualsByVClass=1&vclassId=',
|
||||
baseUrl: '${urls.base}',
|
||||
dataServiceUrl: '${urls.base}/dataservice?getLuceneIndividualsByVClass=1&vclassId=',
|
||||
defaultBrowseVClassUri: '${firstNonEmptyVClass}'
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue